web-view 组件 url 参数丢失

小程序 文章 2020-08-11 22:41 705 0 全屏看文

AI助手支持GPT4.0

web-view 组件 url 参数丢失The web-view component url parameter is missing

web-view 组件 url 参数丢失
框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug web-view 微信安卓客户端 6.5.3 2.0.0

https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html


你好!我这边的问题是,我给 web-view 的 src 链接中是有参数的,但是在 web-view 中 js 却获取不到此参数,是否是 web-view 对参数有长度限制还是做了什么转换?

还是需要使用 encodeURIComponent 处理一下?

我们这边的链接,加上参数长度也没有特别长。

希望您解答下。


还有希望 web-view 也能有vconsole,便于定位 web-view 的问题。

Framework type problem type API / component name terminal type wechat version basic library version applet bug web view wechat Android client 6.5.3 2.0.0 https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html Hello! My question here is that there is a parameter in the SRC link I give the web view, but JS can't get this parameter in the web view. Does the web view have a limit on the length of the parameter or has it made any conversion? Or do you need to use encodeurcomponent? The link on our side, plus the parameter length, is not particularly long. I hope you can answer. It is also hoped that web view can also have vconsole to facilitate the positioning of Web view problems.

回答:

卢静:

这里是直接在页面中用 location.href 获取链接的,是 web-view 中不支持这样获取链接吗?

Distance:

怎么赋的值

11月:

你打印下url是有带参数的?

-EOF-

AI助手支持GPT4.0