diff --git a/components/tabbar.vue b/components/tabbar.vue index c9b2b7e..250c9bc 100644 --- a/components/tabbar.vue +++ b/components/tabbar.vue @@ -85,6 +85,13 @@ // #ifdef MP-WEIXIN uni.scanCode({ success: (res) => { + if(res.path) { + const sceneParam = res.path.split('scene=')[1]; + if (sceneParam && sceneParam.indexOf('dp=') > -1) { + var encodedScene = encodeURIComponent(sceneParam); + res.path = res.path.replace(`scene=${sceneParam}`, `scene=${encodedScene}`); + } + } var url = `/${res.path}`; uni.navigateTo({ url }); },