wx.navigateTo({
url: '../test/index?a={"name":"xxxxx=222222"}',
})
navigateTo 跳转url 参数为json,并且对象中的value 有 ‘=’号,在新页面的OnLoad 函数 会自动截取掉 =号后面的值
wx.navigateTo 跳转新页面onLoad截取wx.navigateTo jump to a new page onLoad interception
wx.navigateTo 跳转新页面onLoad截取框架类型 | 问题类型 | API/组件名称 | 终端类型 | 微信版本 | 基础库版本 |
---|---|---|---|---|---|
小程序 | Bug | wx.navigateTo,onLoad | 工具 | 7.0 | 2.14 |
wx.navigateTo({
url: '../test/index?a={"name":"xxxxx=222222"}',
})
navigateTo 跳转url 参数为json,并且对象中的value 有 ‘=’号,在新页面的OnLoad 函数 会自动截取掉 =号后面的值
Framework type problem type API / component name terminal type wechat version basic library version applet bug wx.navigateTo , onload tool 7.0 2.14 wx.navigateTo ({URL: '/ / test / index? A = {"name": "xxxxx = 222222"}},}) the navigateto jump URL parameter is JSON, and the value in the object has the' = 'sign. The onload function of the new page will automatically intercept the value after the = sign Code snippet https://developers.weixin.qq.com/s/4zevtymE7nnk
回答:
传json字符串,跳转后格式化一下不就好了吗
@管方
var data = { name: "xxxxx=22222"}wx.navigateTo({ url: "../test/index?a=" + JSON.stringify(data)})