过了一个周末来重新试了下,好像又不会出现这样的问题了。。。
插屏广告无法正常显示之前接入了激励视频广告,展示完全正常;最近接入插屏广告调用show()之后无法正常显示 加载插屏广告: public loadInterstitialAd(adUnitId: string) { if (!this._sdk) { return; } let interstitialAd if (!this.interAdInstance) { interstitialAd = this.interAdInstance = this._sdk.createInterstitialAd({ adUnitId: adUnitId }) } else { interstitialAd = this.interAdInstance } if (interstitialAd != null) { interstitialAd.offLoad() interstitialAd.onLoad(() => { console.log("wx interstitialAd onLoad") }) interstitialAd.load() } } 展示插屏广告 public createInterstitialAd(showCallback?: Function, endCallback?: Function) { if (!this._sdk) { console.warn("wx 不是微信环境,不加载广告") showCallback && showCallback() endCallback && endCallback(false) return null; }; showCallback && showCallback() //检测一下网络状态,才能从断网状态中恢复 this._sdk.getNetworkType().then((res: WechatMinigame.GetNetworkTypeSuccessCallbackResult) => { console.log("wx getNetworkType:", res); }) let interstitialAd if (!this.interAdInstance) { interstitialAd = this.interAdInstance = this._sdk.createInterstitialAd({ adUnitId: AD_UNIT_ID_INTERSTITIAL }) } else { interstitialAd = this.interAdInstance } let self = this if (interstitialAd != null) { interstitialAd.offError() interstitialAd.onError(res => { console.log("wx interstitialAd onError:", res); endCallback && endCallback(false); }); interstitialAd.offClose() interstitialAd.onClose(res => { console.log("wx interstitialAd onClose:", res); endCallback && endCallback(res != null && res.errMsg != null); AudioMgr.resumeMusic() }); let promise: Promise = interstitialAd.show() console.log("wx interstitialAd show") promise.then(() => { console.log("wx interstitialAd showCallback"); }).catch(res => { console.log("wx interstitialAd show error:", res); endCallback && endCallback(false); interstitialAd.load() }).finally(() => { console.log("wx interstitialAd show finally") }) return interstitialAd; } } [图片] 几率性出现,当某次加载卡在show的时候,show()方法的promise不会返回,then,catch,finally都没有回调,之后再调用show()都无法加载广告,报错2003插屏广告正在展示中,但其实是没有加载出来的。 有没有人遇到这种情况?
04-14https://developers.weixin.qq.com/community/develop/doc/000a04f16d47681c84cbf93b950814?highLine=%25E5%25BC%2580%25E5%258F%2591%25E8%2580%2585%25E5%25B7%25A5%25E5%2585%25B7%25E8%25B0%2583%25E8%25AF%2595%25E5%2599%25A8%25E6%2597%25A0%25E5%2586%2585%25E5%25AE%25B9 里面评论说的 设置在任务栏然后点击进行打开,调试面板不会出现,在桌面点击快捷方式打开调试面板就会出现 楼主试下这个,我也是这样的问题而且模拟器上的点击事件也不生效
开发者工具调试器无内容https://developers.weixin.qq.com/miniprogram/dev/devtools/devtools.html 调试器无内容。[图片]真机调试是正常的。
2021-04-08