收藏
回答

为什么有的用户能点击观看广告获取次数,为什么有的用户点击观看广告没有任何反应?

开发了一个小程序,然后用户需要点击广告获取次数。但是发现部分用户点击观看广告获取次数没有任何反应。请问这是怎么回事,如何debug?同样的操作系统有的人可以有的人不能。

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

2 个回答

  • 社区技术运营专员--许涛
    社区技术运营专员--许涛
    2023-06-18

    你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html



    复现问题的用户麻烦在手机微信那里上传下日志: 我->设置->帮助与反馈右上角有个上报日志的入口,麻烦提供一下微信号,具体时间点

    2023-06-18
    有用
    回复 3
    • 强
      2023-06-18
      机型:iphone11,微信版本号:8.0.38,IOS版本16.4.1,微信号yzqbpq,上报日志2023-06-18 0:00 到24:00,代码片段稍后发送
      2023-06-18
      回复
    • 强
      2023-06-20
      我外包的前端代码,不会用开发者工具,你分享的代码片段文档,我产生了链接发现链接不到代码片段,我直接在下面贴出来,您看一下
      2023-06-20
      回复
    • 社区技术运营专员--许涛
      社区技术运营专员--许涛
      2023-06-25回复
      重新复现一次最近五小时内,提供下广告ID
      2023-06-25
      回复
  • 强
    2023-06-20
    methods: {
                advertising() {
                    if (wx.createRewardedVideoAd) {
                        rewardedVideoAd = wx.createRewardedVideoAd({
                            adUnitId: _this.adUnit.adunit
                        })
                        rewardedVideoAd.onLoad(() => {
                            console.log('激励视频 广告加载成功')
                        })
                        rewardedVideoAd.onError((err) => {
                            console.log('onError event emit', err)
                        })
                    }
                },
                info() {
                    if (this.isinfo) {
                        return;
                    }
                    this.isinfo = true;
                    this.token = uni.$mk.vuex.get('userInfo.token');
                    if (this.token && this.token.length > 0) {
                        this.isinfo = false;
                        uni.navigateTo({
                            url: '/pages/index/userInfo'
                        })
                    } else {
                        this.login();
                    }
                },
                login() {
                    _this.$mk.util.authorToken().then(res => {
                        if (res) {
                            _this.init();
                        } else {
                            _this.isinfo = false;
                        }
                    });
                },
                init() {
                    _this.$mk.api.index.userInfo().then(res => {
                        if (res.code == 0) {
                            _this.userInfo = res.data.userInfo;
                            _this.isinfo = false;
                            uni.$mk.vuex.set('userInfo.data', _this.userInfo);
    
                        }
                    });
    
    
                    _this.$mk.api.index.advertising().then(res => {
                        if (res.code == 0) {
                            _this.adUnit = res.data;
                            _this.advertising();
                        }
                    });
                },
                play() {
                    rewardedVideoAd.show().then(() => {
                        console.log('激励视频 广告显示');
                    })
                    rewardedVideoAd.onClose(res => {
                        console.log('onClose--', res);
                        if (res && res.isEnded) {
                            console.log('我看完了');
                            _this.$mk.api.index.complate().then(res => {
                            
                                if (res.code == 0) {
                                    console.log('加次数', res)
                                    uni.showToast({
                                        title: '领取次数成功',
                                        icon: 'none'
                                    })
                                    rewardedVideoAd.offClose();
                                    _this.init();
                                } else {
                                    uni.showToast({
                                        title: res.message,
                                        icon: 'none'
                                    })
                                }
                                
                            });
                        } else {
                            console.log('我没看完');
                            uni.showToast({
                                title: '广告未看完,获取次数失败',
                                icon: 'none'
                            })
                        }
                    })
                }
            },
    
    2023-06-20
    有用
    回复
登录 后发表内容