uni.getStorage({
key:"remark",
success:function(res){
uni.request({
url:"https://25q686n876.qicp.vip/tp5/publica/index/Bii/Look",
method:"POST",
header:{
"Content-Type":"application/x-www-form-urlencoded"
},
data:{user:res.data.user,time:res.data.time},
dataType:"json",
success:function(res){
vue.list=res.data.info
}
})
}
})
由于我写的是uniapp原生代码举例子其实只要写上面一段就可以运行了
突出能用原生uniapp组件api解决的问题 一律不要考虑什么vuex,vue-router等等之类的H5的东西,免得麻烦。
// #ifdef H5
uni.getStorage({
key:"remark",
success:function(res){
uni.request({
url:"https://25q686n876.qicp.vip/tp5/publica/index/Bii/Look",
method:"POST",
header:{
"Content-Type":"application/x-www-form-urlencoded"
},
data:{user:res.data.user,time:res.data.time},
dataType:"json",
success:function(res){
vue.list=res.data.info
}
})
}
})
// #endif
//#ifdef MP-WEIXIN
uni.getStorage({
key:"remark",
success:function(res){
uni.request({
url:"https://25q686n876.qicp.vip/tp5/publica/index/Bii/Look",
method:"POST",
header:{
"Content-Type":"application/x-www-form-urlencoded"
},
data:{user:res.data.user,time:res.data.time},
dataType:"json",
success:function(res){
vue.list=res.data.info
}
})
}
})
//#endif
// #ifdef APP-PLUS
uni.request({
url:"https://25q686n876.qicp.vip/tp5/publica/index/Bii/Look",
method:"POST",
header:{
"Content-Type":"application/x-www-form-urlencoded"
},
data:{user:options.user,time:options.time},
dataType:"json",
success:function(res){
vue.list=res.data.info
}
})
// #endif