请求返回修改
This commit is contained in:
parent
1704cd2e7c
commit
51f8f54a26
13
http/http.js
13
http/http.js
|
|
@ -100,9 +100,18 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
|||
code: bodyData.code,
|
||||
});
|
||||
}
|
||||
|
||||
let result=null;
|
||||
if(bodyData.hasOwnProperty('data')){
|
||||
result=bodyData.data
|
||||
}
|
||||
else if(bodyData.hasOwnProperty('page')){
|
||||
result=bodyData.page
|
||||
}
|
||||
else{
|
||||
result=bodyData
|
||||
}
|
||||
// 构造请求成功的响应数据
|
||||
return Promise.resolve(bodyData.data || bodyData.page || bodyData);
|
||||
return Promise.resolve(result);
|
||||
})
|
||||
.catch((res) => {
|
||||
|
||||
|
|
|
|||
|
|
@ -209,6 +209,8 @@
|
|||
async function getCanCash() {
|
||||
canCash().then(res => {
|
||||
data.isWithdraw = res;
|
||||
console.log(res)
|
||||
console.log(uni.getStorageSync('adRewardedNum'))
|
||||
if( uni.getStorageSync('adRewardedNum') >= 3 ){
|
||||
data.isWithdraw = true;
|
||||
// uni.setStorageSync('adRewardedNum',0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue