uView——Http请求


简介

  uView封装了uni-app的请求.....

 

重点1. 同步请求

  使用

    await 限制方法强制同步。

    asyn:awiat关键字必须写在asyn方法里

async onLoad() {
            let indexUrl = 'https://api.shop.eduwork.cn/api/index';
            await this.$u.get(indexUrl).then(res=>{console.log(res);})
            console.log(1);
        }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM