广告加载失败隐藏,兑换按钮条件修改

This commit is contained in:
GaoHao
2024-12-24 17:57:49 +08:00
parent 70594ec8cb
commit fef62822c3
2 changed files with 9 additions and 4 deletions

View File

@@ -82,7 +82,7 @@
</view>
</view>
<!-- 激励视频广告 -->
<ad-rewarded-video ref="adRewardedVideo" adpid="1531580352" :loadnext="true" v-slot:default="{loading, error}"
<ad-rewarded-video v-if="adRewardedVideo" ref="adRewardedVideo" adpid="1531580352" :loadnext="true" v-slot:default="{loading, error}"
:url-callback="urlCallback" @load="onadload" @close="onadclose" @error="onaderror">
<view class="ad-error" v-if="error">{{error}}</view>
</ad-rewarded-video>
@@ -127,10 +127,12 @@
isShowMoneyPay: true,
isIos: false,
isAndroid: true,
adRewardedVideo: true,
urlCallback: null,
}
},
onShow() {
this.adRewardedVideo = true;
this.getTaskdata()
this.getsignIn()
this.$Request.getT("app/common/type/919", {}).then(res => {
@@ -176,6 +178,7 @@
}
},
onaderror(e) { // 广告加载失败
this.adRewardedVideo = false;
console.log("广告加载失败")
},
/**
@@ -319,7 +322,8 @@
<style lang="scss">
.container {
width: 100%;
height: 100vh;
background-color: #F3F4F8;
.task_bg {
width: 100% !important;
height: 494rpx !important;