From d312b614d7f82607243160451d68390de27a717c Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Tue, 24 Dec 2024 14:45:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E5=91=8A=E4=BF=AE=E6=94=B9=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/task/index.vue | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pages/task/index.vue b/pages/task/index.vue index f733170..d6b764e 100644 --- a/pages/task/index.vue +++ b/pages/task/index.vue @@ -81,7 +81,7 @@ {{error}} @@ -129,6 +129,7 @@ isIos: false, isLoading: false, isAndroid: false, + urlCallback: null, } }, onShow() { @@ -148,18 +149,23 @@ this.isShowMoneyPay = !(res.data.value == '1' && isIos) } }); + }, async onReady() { + this.urlCallback = { + userId: uni.getStorageSync('userId'), + extra: uni.getStorageSync('userId')+""+new Date().getTime(), + } + this.isLoading = true; - console.log(1) - // 首次加载广告 + // 首次加载广告 setTimeout(() => { this.$refs.adRewardedVideo.load(); }, 1000) + }, methods: { showAd() { - console.log(this.isLoading) if (this.isLoading) { return } @@ -167,7 +173,6 @@ }, onadload(e) { this.isLoading = false; - console.log(2) console.log('广告数据加载成功'); }, async onadclose(e) { @@ -175,8 +180,9 @@ if (detail && detail.isEnded) { // 正常播放结束 // /sqx_fast/app/ad/state + console.log(this.urlCallback.extra) let res = await this.$Request.getT('app/ad/state', { - extraKey: 1 + extraKey: this.urlCallback.extra }) this.$Request.getT('/app/common/type/921').then(res => { if (res.code == 0) {