请求返回修改
This commit is contained in:
parent
1704cd2e7c
commit
51f8f54a26
15
http/http.js
15
http/http.js
|
|
@ -92,7 +92,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
||||||
infoBox.showToast(data.message);
|
infoBox.showToast(data.message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加密数据
|
// 加密数据
|
||||||
if (!bodyData.data && bodyData.encryptData) {
|
if (!bodyData.data && bodyData.encryptData) {
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
|
|
@ -100,9 +100,18 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
||||||
code: bodyData.code,
|
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) => {
|
.catch((res) => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,8 @@
|
||||||
async function getCanCash() {
|
async function getCanCash() {
|
||||||
canCash().then(res => {
|
canCash().then(res => {
|
||||||
data.isWithdraw = res;
|
data.isWithdraw = res;
|
||||||
|
console.log(res)
|
||||||
|
console.log(uni.getStorageSync('adRewardedNum'))
|
||||||
if( uni.getStorageSync('adRewardedNum') >= 3 ){
|
if( uni.getStorageSync('adRewardedNum') >= 3 ){
|
||||||
data.isWithdraw = true;
|
data.isWithdraw = true;
|
||||||
// uni.setStorageSync('adRewardedNum',0)
|
// uni.setStorageSync('adRewardedNum',0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue