任务merit领取

This commit is contained in:
duan
2025-01-16 10:33:19 +08:00
parent 5de46a4020
commit 08e4f8ae6e

View File

@@ -62,8 +62,8 @@
<!-- 激励视频广告 --> <!-- 激励视频广告 -->
<view style="width: 0;height: 0;overflow: hidden;"> <view style="width: 0;height: 0;overflow: hidden;">
<!-- 激励视频广告 --> <!-- 激励视频广告 -->
<ad-rewarded-video ref="adRewarded" :adpid="datas.adpid" :loadnext="true" <ad-rewarded-video ref="adRewarded" :adpid="datas.adpid" :loadnext="true" :url-callback="datas.urlCallback"
:url-callback="datas.urlCallback" @load="onadload" @close="onadclose" @error="onaderror"> @load="onadload" @close="onadclose" @error="onaderror">
</ad-rewarded-video> </ad-rewarded-video>
</view> </view>
</view> </view>
@@ -296,7 +296,27 @@
}) })
} else { } else {
if (item.jumpType == 0) { if (item.jumpType == 0) {
if (item.title.indexOf("新人福利") != -1) { if (item.buttonTitle.indexOf("领取") != -1) {
let res = await taskReceive({
id: item.id
})
console.log(res,'调试')
if (res.code == 0) {
uni.showToast({
title: res.id == 15 ? '签到成功' : '领取成功',
icon: 'none'
})
setTimeout(() => {
getTaskdata()
getsignIn()
}, 1000)
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
} else if (item.title.indexOf("新人福利") != -1) {
let res = await taskReceive({ let res = await taskReceive({
id: item.id id: item.id
}) })
@@ -316,7 +336,7 @@
} }
} else if (item.buttonTitle.indexOf("观看视频") != -1) { } else if (item.buttonTitle.indexOf("观看视频") != -1) {
// 首次加载广告 // 首次加载广告
if(!datas.adRewardedShow){ if (!datas.adRewardedShow) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '广告加载失败,请稍后重试' title: '广告加载失败,请稍后重试'