通過先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= },