小程序中webview链接跳转?参数中带有多个参数的的问题

比如有这么一个地址:'../webview/webview/?url=http://api/list?id=1'我们用wx.navigateToAPI去跳转到这么页面。问好后面的参数是传不过去的。

解决办法:先encodeURIComponent(url) 后在webview页面decodeURIComponent(url )

猜你喜欢

转载自blog.csdn.net/wandoumm/article/details/81188905