diff --git a/App.vue b/App.vue index bac732c..c087f74 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.pathname.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 787983c..a47267f 100644 --- a/manifest.json +++ b/manifest.json @@ -82,7 +82,7 @@ "disableHostCheck" : true, "proxy" : { "/api" : { - "target" : "http://api.yizherenxin.cn", + "target" : "http://jasonyizherenxin.checkcopy.com", "changeOrigin" : true, "secure" : false }