From 1227785bcd58d9a7b7a4a9df319fd76838e2e4c6 Mon Sep 17 00:00:00 2001 From: kuaileWu <1432334894@qq.com> Date: Tue, 4 Mar 2025 14:45:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=93=E5=BC=80=E5=8C=BB=E7=94=9F?= =?UTF-8?q?=E7=9A=84=E9=93=BE=E6=8E=A5=E5=9C=A8=E5=BE=AE=E4=BF=A1=E4=B8=8A?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0=E9=93=BE=E6=8E=A5=E5=90=8E?= =?UTF-8?q?=E9=9D=A2=E7=9A=84get=20=E5=8F=82=E6=95=B0did?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 17 +++++++++++++++-- manifest.json | 5 +++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/App.vue b/App.vue index bac732c..1be10e4 100644 --- a/App.vue +++ b/App.vue @@ -6,7 +6,17 @@ }, onLaunch: function(option) { console.log(option,'option===='); - if(!(option.query && option.query.did)){ + var did = false + try { + const pathParts = location.href.split('/'); + const paramIndex = pathParts.indexOf('did'); + if(paramIndex !== -1 && paramIndex + 1 < pathParts.length) { + did = pathParts[paramIndex + 1] + } + } catch (e) { + } + + if(!did){ var doctor_id = uni.getStorageSync(this.globalData.doctoridStorageKey) if(doctor_id){ this.globalData.doctorId = doctor_id @@ -17,8 +27,11 @@ },500) } }else{ - this.globalData.doctorId = option.query.did + this.globalData.doctorId = did uni.setStorageSync(this.globalData.doctoridStorageKey, this.globalData.doctorId) + uni.navigateTo({ + url:'/' + }) } }, onShow: function() {}, diff --git a/manifest.json b/manifest.json index d557148..4b95eeb 100644 --- a/manifest.json +++ b/manifest.json @@ -70,7 +70,8 @@ "enable" : false }, "vueVersion" : "2", - /* "target" : "http://jasonyizherenxin.checkcopy.com",*/ + /* "target" : "http://jasonyizherenxin.checkcopy.com",*/ + /* "target" : "http://api.yizherenxin.cn",*/ "h5" : { "router" : { "mode" : "history", @@ -81,7 +82,7 @@ "disableHostCheck" : true, "proxy" : { "/api" : { - "target" : "http://api.yizherenxin.cn", + "target" : "http://jasonyizherenxin.checkcopy.com", "changeOrigin" : true, "secure" : false } From 20ae051417c7df1126d05a503019a5c08b9126ce Mon Sep 17 00:00:00 2001 From: kuaileWu <1432334894@qq.com> Date: Tue, 4 Mar 2025 15:32:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=89=93=E5=BC=80=E5=8C=BB=E7=94=9F?= =?UTF-8?q?=E7=9A=84=E9=93=BE=E6=8E=A5=E5=9C=A8=E5=BE=AE=E4=BF=A1=E4=B8=8A?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0=E9=93=BE=E6=8E=A5=E5=90=8E?= =?UTF-8?q?=E9=9D=A2=E7=9A=84get=20=E5=8F=82=E6=95=B0did?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App.vue b/App.vue index 1be10e4..c087f74 100644 --- a/App.vue +++ b/App.vue @@ -8,7 +8,7 @@ console.log(option,'option===='); var did = false try { - const pathParts = location.href.split('/'); + const pathParts = location.pathname.split('/'); const paramIndex = pathParts.indexOf('did'); if(paramIndex !== -1 && paramIndex + 1 < pathParts.length) { did = pathParts[paramIndex + 1]