uni.navigateTo在进行传参的时候, 遇到特殊字符串, 传入的参数会被打乱
解决办法:
- 使用 encodeURIComponent 进行编码传值
uni.navigateTo({
url: "/pages/index/index?row="+ encodeURIComponent(JSON.stringify(row))
});
- 使用 decodeURIComponent 进行解码
row = JSON.parse(decodeURIComponent(data.row))
encodeURIComponent不编码的字符串: ! ' ( ) * - . _ ~ 0-9 a-z A-Z