小程序中页面跳转路由传参

点击跳转页面  事件

 // 点击具体的单去看更多
    godetailall: function(e) {
        const orderobj = JSON.stringify(e.currentTarget.dataset.moreorder)
        console.log(orderobj)
        wx.navigateTo({
            url: "/pages/order/onetiao/index?obj=" + encodeURIComponent(orderobj)
        })
    },

  接受页面中

    onLoad: function(options) {
        var details = JSON.parse(decodeURIComponent(options.obj));
        console.log(details)
        if (details) {
            this.setData({
                baselistmore: details
            })
        }
    },

  

原文地址:https://www.cnblogs.com/taxun/p/14067109.html