收藏
回答

路由传参出现乱码?

  wx.redirectTo({
          url: "/pages/public/order/pay?order_id=" + id + "&sum=" + sum + "&car_number=" + 
                   this.data.orderInfo.goods[0].id,
        });

   pay页面:
    onLoad: function (options) {
    console.log(options)
    this.setData({
      "payInfo.orderId": options.order_id,
      "payInfo.sum": options.sum,
      "payInfo.car_number": options.car_number
    })
    console.log(this.data.payInfo)
  }

 console.log(this.data.payInfo)打印未出现乱码,但是将该参数传入api,后台数据库中出现乱码

回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容