toDraw(){
uni.navigateTo({
url:`./drawPage?data=${this.data}`
})
},
跳转时,drawId和customerI都被截断了。
解决
1、将链接进行编码:encodeURIComponent(res.data)
2、在需要赋值链接时再解码:decodeURIComponent(options.data)
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url: null,
}
},
methods: {
},
onLoad(options) {
this.url = decodeURIComponent(options.data)
}
}
</script>