1
0
réplica de https://github.com/ialley-workshop-open/uni-halo.git sincronizado 2026-06-12 13:19:31 +08:00

update: 文章详情广告字段调整

Este cometimento está contido em:
小莫唐尼
2024-07-02 17:43:18 +08:00
ascendente 850ee73fa2
cometimento add84f6e4b
+4 -4
Ver ficheiro
@@ -55,8 +55,8 @@ export default {
} }
}, },
computed: { computed: {
adConfigs() { toolsPluginConfigs() {
return this.$tm.vx.getters().getConfigs.adConfig; return this.$tm.vx.getters().getConfigs?.pluginConfig?.toolsPlugin || {};
} }
}, },
onLoad(options) { onLoad(options) {
@@ -76,7 +76,7 @@ export default {
adLoad() { adLoad() {
if (wx.createRewardedVideoAd) { if (wx.createRewardedVideoAd) {
videoAd = wx.createRewardedVideoAd({ videoAd = wx.createRewardedVideoAd({
adUnitId: this.adConfigs.rewardedVideoAdId //你的广告key adUnitId: this.toolsPluginConfigs.rewardedVideoAdId //你的广告key
}) })
videoAd.onError(err => { videoAd.onError(err => {
}) })
@@ -91,7 +91,7 @@ export default {
} }
}, },
openVideoAd: function () { openVideoAd: function () {
if (videoAd && this.adConfigs.rewardedVideoAdId != '') { if (videoAd && this.toolsPluginConfigs.rewardedVideoAdId !== '') {
videoAd.show().catch(err => { videoAd.show().catch(err => {
// 失败重试 // 失败重试
console.log("广告拉取失败") console.log("广告拉取失败")