合并代码

This commit is contained in:
duan
2025-01-16 09:51:44 +08:00
4 changed files with 50 additions and 34 deletions

View File

@@ -62,7 +62,7 @@
<!-- 激励视频广告 -->
<view style="width: 0;height: 0;overflow: hidden;">
<!-- 激励视频广告 -->
<ad-rewarded-video v-if="datas.adRewardedShow" ref="adRewarded" :adpid="datas.adpid" :loadnext="true"
<ad-rewarded-video ref="adRewarded" :adpid="datas.adpid" :loadnext="true"
:url-callback="datas.urlCallback" @load="onadload" @close="onadclose" @error="onaderror">
</ad-rewarded-video>
</view>
@@ -104,20 +104,19 @@
list: [],
urlCallback: {},
adpid: null,
adRewardedShow: true,
adRewardedShow: false,
adRewardedVideoloadNum: 0,
})
const adRewarded = ref(null);
onShow(() => {
// 判断ios是否审核
$common.init()
if (uni.getSystemInfoSync().platform == 'android') {
datas.adpid = 1531580352
}
if (uni.getSystemInfoSync().platform == 'ios') {
// if ( uni.getSystemInfoSync().platform == 'android' ) {
// datas.adpid = 1531580352
// }
// if ( uni.getSystemInfoSync().platform == 'ios' ) {
datas.adpid = 1373604770
}
// }
if (uni.getStorageSync("token")) {
getTaskdata()
getsignIn()
@@ -249,7 +248,6 @@
*/
function onaderror(e) {
if (datas.adRewardedVideoloadNum >= 3) {
datas.adRewardedShow = false;
return
}
datas.adRewardedVideoloadNum++
@@ -318,6 +316,13 @@
}
} else if (item.buttonTitle.indexOf("观看视频") != -1) {
// 首次加载广告
if(!datas.adRewardedShow){
uni.showToast({
icon: 'none',
title: '广告加载失败,请稍后重试'
});
return
}
datas.urlCallback = {
userId: uni.getStorageSync('userId'),
extra: uni.getStorageSync('userId') + "" + new Date().getTime(),