uniapp的路由传参里url有长度限制,如何解决

官方文档: https://uniapp.dcloud.io/api/router?id=navigateto

示例代码

【list.vue】
goMicroInfo(e){
    let a=e.currentTarget.dataset.microlink
    let link=encodeURIComponent(JSON.stringify(a))  //先JSON.stringify转字符串,再转码
    uni.navigateTo({
          url: `/pages/micro-lesson/micro-info/micro-info?microlink=${link}`
    })
},

【info.vue】
onLoad(option) {
    let link=JSON.parse(decodeURIComponent(option.microlink))  //先转码,再JSON.parse转对象
    this.weburl=link
},
原文地址:https://www.cnblogs.com/huihuihero/p/13203043.html