From c1f3c9a9378df01a4522a29eb2b04898acb10c1f Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Thu, 16 Jan 2025 11:24:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E9=A1=B5=E9=9D=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 2 +- App.vue | 3 ++- pages/me/withdraw/index.vue | 12 +++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 15f1188..e466870 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -2,7 +2,7 @@ "version" : "1.0", "configurations" : [ { - "playground" : "custom", + "playground" : "standard", "type" : "uni-app:app-android" }, { diff --git a/App.vue b/App.vue index 9f89c23..ec8eb74 100644 --- a/App.vue +++ b/App.vue @@ -2,7 +2,8 @@ export default { onLaunch: function() { console.log('App Launch'); - + uni.setStorageSync('adRewardedNum',0) + }, onShow: function() { }, diff --git a/pages/me/withdraw/index.vue b/pages/me/withdraw/index.vue index dac6b4f..8ba8898 100644 --- a/pages/me/withdraw/index.vue +++ b/pages/me/withdraw/index.vue @@ -114,6 +114,7 @@ urlCallback: {}, adpid: null, adRewardedShow: false, + adRewardedNum: 0, adRewardedVideoloadNum: 0, isWithdraw: false, userInfo: null, @@ -131,6 +132,7 @@ // } getExtractFei(); getMoneyDetail(); + getCanCash() }) onShow(() => { @@ -147,7 +149,6 @@ data.adRewardedVideoloadNum = 0 adRewardedw.value.load(); }) - getCanCash() }) onReachBottom(() => { if (data.page * data.limit < data.totalCount) { @@ -209,6 +210,12 @@ async function getCanCash() { canCash().then(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) { data.adRewardedShow = true; + uni.setStorageSync('adRewardedNum',0) console.log('广告数据加载成功'); } @@ -247,6 +255,7 @@ let res = await state({ extraKey: data.urlCallback.extra }) + uni.setStorageSync('adRewardedNum',0) getCanCash() } else { // 播放中途退出 @@ -349,6 +358,7 @@ amount: data.money }).then(res => { data.money = '' + uni.setStorageSync('adRewardedNum',0) setTimeout(function() { getcashMoney() }, 1500)