通过先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=
    
  },
View Code

相关文章:

  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-02-07
  • 2021-11-28
  • 2022-01-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-14
  • 2021-11-14
  • 2022-12-23
  • 2021-05-20
相关资源
相似解决方案