通过先encodeURIComponent,取到值以后再decodeURIComponent,拼接参数正常传递
A页面 switch: function (e) { var aa = ‘UNNZVUf5qkM=‘;//拼接到url的参数 var urls = encodeURIComponent(aa);//先encodeURIComponent wx.navigateTo({ url: ‘/pages/teaTestWork/teaTestWork?id=‘ + urls, }) }, B页面 onLoad: function (options) { console.log(decodeURIComponent(options.id));//结果为UNNZVUf5qkM= },