收藏
回答

拉取激励广告个别用户拉取不起来,也不报错,也没反馈?

onReady(() => {

if (wx.createRewardedVideoAd) {

videoAd = wx.createRewardedVideoAd({

adUnitId: "adunit-c512b55722889b10",

});

videoAd.onLoad(() => {});

videoAd.onError((err) => {

console.error("激励视频光告加载失败", err);

});

videoAd.onClose(async (res) => {

if (res && res.isEnded) {

// 正常播放结束,可以下发游戏奖励

await uni.$api.basicEnterprise.CreateEnterpriseRepairedCard({

enterpriseId: state.enterpriseId,

userId: user_infos.value.id,

openId: user_info.value.openId,

});

fetchData();

}

});

}

});



const handleRepairedCard = () => {

// 用户触发广告后,显示激励视频广告

if (videoAd) {

videoAd.show().catch(() => {

// 失败重试

videoAd

.load()

.then(() => videoAd.show().catch((err) => console.log(err)))

.catch((err) => {

console.error("激励视频 广告显示失败", err);

});

});

}

};


回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 本次回答由AI生成
    2025-12-22
    有用 1
    回复
登录 后发表内容