使用webview打开h5页面打开手机短信体验版丢失了里面的链接打开调试而不会?

小程序 文章 2022-02-07 15:00 379 0 全屏看文

AI助手支持GPT4.0

使用webview打开h5页面打开手机短信体验版丢失了里面的链接打开调试而不会?Use webview to open the h5 page to open the mobile phone SMS experience version Lost the link inside and open the debugging without?

使用webview打开h5页面打开手机短信体验版丢失了里面的链接打开调试而不会?

第一张图是调试状态下运行,里面的链接内容没有丢失,第二张是关闭调试状态下运行,里面的链接内容丢失了。这是什么原因?

The first picture is running in the debugging state, and the link content in it is not lost. The second picture is running in the off debugging state, and the link content in it is lost. What's the reason?

回答:

社交恐怖分z:

关掉调试后,看下弹出来什么,你的url是上个页面带过来的。关掉调试后。是否是因为没有配置服务器域名,上个页面获取url的接口报错了,导致没返回url,跳到webview页面就没拿到url。

wx.showModal({content: options.url}) 
微喵网络:

没有代码猜不出来

T:
T:
微喵网络:这点代码看不出有什么问题,options打印出来看看
T:主要是调试模式下没有问题,关闭调试状态就不行了,但关闭调试状态就看不到打印的东西
圣殿骑士:

encode 试下

T:啥意思

-EOF-

AI助手支持GPT4.0