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) {