URI解码问题

发布于 7 年前作者 qianxiulan16878 次浏览最后编辑 7 年前来自 ask

小程序页面跳转参数进行encodeURIComponent编码,

var objstr = encodeURIComponent(JSON.stringify(obj));


// console.log(‘navToEditOwner this.data.subOwners length’,this.data.subOwners.length);


wx.navigateTo({


   url: ‘./editOwner/editOwner?owner=’ + objstr,


});

在下一个页面options中获取,在开发者工具中 owner是经过解码的,而在手机上测试owner是未解码的,为什么会有两种结果?

0 回复
暂无回复