提现页面优化
This commit is contained in:
parent
76db18804b
commit
c1f3c9a937
|
|
@ -2,7 +2,7 @@
|
||||||
"version" : "1.0",
|
"version" : "1.0",
|
||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
3
App.vue
3
App.vue
|
|
@ -2,7 +2,8 @@
|
||||||
export default {
|
export default {
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
console.log('App Launch');
|
console.log('App Launch');
|
||||||
|
uni.setStorageSync('adRewardedNum',0)
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,7 @@
|
||||||
urlCallback: {},
|
urlCallback: {},
|
||||||
adpid: null,
|
adpid: null,
|
||||||
adRewardedShow: false,
|
adRewardedShow: false,
|
||||||
|
adRewardedNum: 0,
|
||||||
adRewardedVideoloadNum: 0,
|
adRewardedVideoloadNum: 0,
|
||||||
isWithdraw: false,
|
isWithdraw: false,
|
||||||
userInfo: null,
|
userInfo: null,
|
||||||
|
|
@ -131,6 +132,7 @@
|
||||||
// }
|
// }
|
||||||
getExtractFei();
|
getExtractFei();
|
||||||
getMoneyDetail();
|
getMoneyDetail();
|
||||||
|
getCanCash()
|
||||||
|
|
||||||
})
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
|
@ -147,7 +149,6 @@
|
||||||
data.adRewardedVideoloadNum = 0
|
data.adRewardedVideoloadNum = 0
|
||||||
adRewardedw.value.load();
|
adRewardedw.value.load();
|
||||||
})
|
})
|
||||||
getCanCash()
|
|
||||||
})
|
})
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
if (data.page * data.limit < data.totalCount) {
|
if (data.page * data.limit < data.totalCount) {
|
||||||
|
|
@ -209,6 +210,12 @@
|
||||||
async function getCanCash() {
|
async function getCanCash() {
|
||||||
canCash().then(res => {
|
canCash().then(res => {
|
||||||
data.isWithdraw = !res;
|
data.isWithdraw = !res;
|
||||||
|
if( uni.getStorageSync('adRewardedNum') >= 3 ){
|
||||||
|
data.isWithdraw = true;
|
||||||
|
// uni.setStorageSync('adRewardedNum',0)
|
||||||
|
} else {
|
||||||
|
uni.setStorageSync('adRewardedNum',((uni.getStorageSync('adRewardedNum')||0)+1))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -218,6 +225,7 @@
|
||||||
*/
|
*/
|
||||||
function onadload(e) {
|
function onadload(e) {
|
||||||
data.adRewardedShow = true;
|
data.adRewardedShow = true;
|
||||||
|
uni.setStorageSync('adRewardedNum',0)
|
||||||
console.log('广告数据加载成功');
|
console.log('广告数据加载成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -247,6 +255,7 @@
|
||||||
let res = await state({
|
let res = await state({
|
||||||
extraKey: data.urlCallback.extra
|
extraKey: data.urlCallback.extra
|
||||||
})
|
})
|
||||||
|
uni.setStorageSync('adRewardedNum',0)
|
||||||
getCanCash()
|
getCanCash()
|
||||||
} else {
|
} else {
|
||||||
// 播放中途退出
|
// 播放中途退出
|
||||||
|
|
@ -349,6 +358,7 @@
|
||||||
amount: data.money
|
amount: data.money
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
data.money = ''
|
data.money = ''
|
||||||
|
uni.setStorageSync('adRewardedNum',0)
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
getcashMoney()
|
getcashMoney()
|
||||||
}, 1500)
|
}, 1500)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue