广告回调修改

This commit is contained in:
GaoHao 2025-01-20 15:09:04 +08:00
parent 3fbca65f86
commit 46ac9db29d
1 changed files with 14 additions and 4 deletions

View File

@ -227,6 +227,10 @@
})
onReady(() => {
nextTick(() => {
datas.urlCallback = {
userId: uni.getStorageSync('userInfo').userId,
extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}
datas.adRewardedVideoloadNum = 0
adRewarded.value.load();
})
@ -251,6 +255,10 @@
}
datas.adRewardedVideoloadNum++
setTimeout(() => {
datas.urlCallback = {
userId: uni.getStorageSync('userInfo').userId,
extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}
adRewarded.value.load();
}, 1000); // 10
console.log("广告加载失败")
@ -275,6 +283,10 @@
let res = await state({
extraKey: datas.urlCallback.extra
})
datas.urlCallback = {
userId: uni.getStorageSync('userInfo').userId,
extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}
uni.showToast({
title: '获得' + $common.freeDuration + '分钟免费时长',
icon: 'none'
@ -347,10 +359,8 @@
});
return
}
datas.urlCallback = {
userId: uni.getStorageSync('userInfo').userId,
extra: uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
}
console.log(datas.urlCallback)
adRewarded.value.show();
} else {
uni.switchTab({