nvue 页面调用 uni.request 报错

                uni.request({

url:"http://192.168.3.9/news",

dataType:"json",

method:"post",

data:{token:uni.getStorageSync("userToken"),type:this.tabBars[i].id},

success:(res)=>{

aryItem.data=res.data.data;

}

});

uni.postMessage({type:"完成"});

\n

报错

00:03:38.694 [ERROR] : TypeError: Attempted to assign to readonly property.filename:file:///var/mobile/Containers/Data/Application/CF440F54-F0BC-44ED-A528-2EF762887F93/Documents/Pandora/apps/0E09F7BFC9B048CB6BC486814CA279B9/www/__uniappservice.htmllineno:1

00:03:38.714 [LOG] : App.vue收到数据

00:03:38.734 [LOG] : {"type":"完成"}



2018-12-30 00:06 添加评论 分享
已邀请:
0

dhb

赞同来自:

查出来了,不是 request报错,是不支持 getStorageSync


要回复问题请先登录注册