|
@ -6,7 +6,17 @@ |
|
|
}, |
|
|
}, |
|
|
onLaunch: function(option) { |
|
|
onLaunch: function(option) { |
|
|
console.log(option,'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) |
|
|
var doctor_id = uni.getStorageSync(this.globalData.doctoridStorageKey) |
|
|
if(doctor_id){ |
|
|
if(doctor_id){ |
|
|
this.globalData.doctorId = doctor_id |
|
|
this.globalData.doctorId = doctor_id |
|
@ -17,8 +27,11 @@ |
|
|
},500) |
|
|
},500) |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
this.globalData.doctorId = option.query.did |
|
|
this.globalData.doctorId = did |
|
|
uni.setStorageSync(this.globalData.doctoridStorageKey, this.globalData.doctorId) |
|
|
uni.setStorageSync(this.globalData.doctoridStorageKey, this.globalData.doctorId) |
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url:'/' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onShow: function() {}, |
|
|
onShow: function() {}, |
|
|