Browse Source

打开医生的链接在微信上获取不到链接后面的get 参数did

master
kuaileWu 6 months ago
parent
commit
1227785bcd
  1. 17
      App.vue
  2. 5
      manifest.json

17
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() {},

5
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
}

Loading…
Cancel
Save