This commit is contained in:
2019-12-24 16:32:27 +08:00
parent 68a7aea72c
commit f9ef1a34bd
34 changed files with 136 additions and 55 deletions

View File

@@ -1,5 +1,9 @@
//请求接口
let request = function (obj){
wx.showLoading({
title: '加载中',
mask:true
})
let {
url,
data,
@@ -43,11 +47,14 @@ let request = function (obj){
responseType,
success(data){
res(data)
},
fail(data){
rej(data)
},
complete
complete(){
wx.hideLoading()
}
})
})
}
@@ -57,7 +64,12 @@ let getuserid = function(){
url:"User/validateOpenid"
}).then((r)=>{
res(r.data.data.user_id)
if(r.data.code == 400){
res(0)
}else{
res(r.data.data.user_id)
}
})
})