|
|
@ -3,19 +3,19 @@ |
|
|
|
<view class="header-wrapper flex"> |
|
|
|
<view class="left"> |
|
|
|
<view class="flex top PfScMedium"> |
|
|
|
<view class="ft50 over2">{{doctorInfo.name}}</view> |
|
|
|
<view class="ft50 over2">{{doctorInfo.doctor_info.name}}</view> |
|
|
|
<view v-if="doctor_dept"> |
|
|
|
<view class="over2">{{doctor_dept}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="bt over2" v-if="doctorInfo.brief"> |
|
|
|
{{doctorInfo.brief}} |
|
|
|
<view class="bt over2" v-if="doctorInfo.doctor_info.desc"> |
|
|
|
{{doctorInfo.doctor_info.desc}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<img class="right" :src="doctorInfo.photo" alt="" @click="enlargePicture(doctorInfo.photo)" v-if="doctorInfo.photo"> |
|
|
|
<img class="right" :src="doctorInfo.doctor_info.avator" alt="" @click="enlargePicture(doctorInfo.doctor_info.avator)" v-if="doctorInfo.doctor_info.avator"> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="block desc-wrapper" v-if="doctorInfo.intro"> |
|
|
|
<view class="block desc-wrapper" v-if="doctorInfo.doctor_info.detail"> |
|
|
|
<view class="title-wrapper flex"> |
|
|
|
<view class="title"> |
|
|
|
医生简介 |
|
|
@ -24,7 +24,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="con over2 over4"> |
|
|
|
{{doctorInfo.intro}} |
|
|
|
{{doctorInfo.doctor_info.detail}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
@ -33,15 +33,15 @@ |
|
|
|
<view class="top flex"> |
|
|
|
<view class="left"> |
|
|
|
<view class="title flex"> |
|
|
|
<text class="over2">{{item.hospital_name}}</text> |
|
|
|
<img :src="cssUrl+'index_comback.svg'" v-if="item.hospital_location" @click="toLocation(item)"> |
|
|
|
<text class="over2">{{item.h_name}}</text> |
|
|
|
<img :src="cssUrl+'index_comback.svg'" v-if="item.h_pos" @click="toLocation(item)"> |
|
|
|
</view> |
|
|
|
<view class="date over2" v-if="item.visit_day_text"> |
|
|
|
出诊:{{item.visit_day_text}} |
|
|
|
<view class="date over2" v-if="item.visit_times"> |
|
|
|
出诊:{{item.visit_times}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="right"> |
|
|
|
<view class="flex right-wrapper" style="justify-content:flex-end;" v-if="item.hospital_location"> |
|
|
|
<view class="flex right-wrapper" style="justify-content:flex-end;" v-if="item.h_pos"> |
|
|
|
<view class="" @click="toLocation(item)"> |
|
|
|
<img :src="cssUrl+'index_nav.svg'" alt=""> |
|
|
|
<view>导航</view> |
|
|
@ -90,7 +90,8 @@ |
|
|
|
doctorInfo:false, |
|
|
|
doctor_dept:false, |
|
|
|
hospitals:false, |
|
|
|
recentAppoint:[] |
|
|
|
recentAppoint:[], |
|
|
|
loginToken:false |
|
|
|
} |
|
|
|
}, |
|
|
|
components:{ |
|
|
@ -99,24 +100,29 @@ |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
if(option.code) this.code = option.code |
|
|
|
if(option.token) { |
|
|
|
this.loginToken = option.token |
|
|
|
uni.setStorageSync('token', this.loginToken) |
|
|
|
// var rebackPagePath = uni.getStorageSync('rebackPagePath') |
|
|
|
// if(!rebackPagePath) |
|
|
|
} |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.doctor_id = getApp().globalData.doctorId |
|
|
|
if(!this.doctor_id) return |
|
|
|
|
|
|
|
var title = '李静医生预约就诊' |
|
|
|
var title = '' |
|
|
|
if(this.code) title = '登录' |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title:title |
|
|
|
}) |
|
|
|
|
|
|
|
var token = uni.getStorageSync('token') |
|
|
|
if(this.code && !token) { |
|
|
|
var rebackPagePath = uni.getStorageSync('rebackPagePath') |
|
|
|
this.login() |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// var token = uni.getStorageSync('token') |
|
|
|
// if(this.code && !token) { |
|
|
|
// var rebackPagePath = uni.getStorageSync('rebackPagePath') |
|
|
|
// this.login() |
|
|
|
// return |
|
|
|
// } |
|
|
|
this.getDoctorInfo() |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -125,18 +131,19 @@ |
|
|
|
uni.showActionSheet({ |
|
|
|
itemList: ['腾讯地图', '百度地图', '高德地图'], |
|
|
|
success: function (res) { |
|
|
|
var lngLat = hospital.hospital_location.toString().split(',') |
|
|
|
var lngLat = hospital.h_pos.toString().split(',') |
|
|
|
var lng = lngLat[0].toString() |
|
|
|
, lat = lngLat[1].toString() |
|
|
|
|
|
|
|
var baiduLngLat = that.qqMapTransBMap(lng, lat) |
|
|
|
var mapList = [ |
|
|
|
'http://apis.map.qq.com/uri/v1/marker?marker=coord:'+ lat+','+lng+';addr:'+hospital.hospital_name, |
|
|
|
'http://api.map.baidu.com/marker?location='+baiduLngLat.lat+','+baiduLngLat.lng+'&title='+hospital.hospital_name+'&content=即将前往目的地&output=html&src=webapp.baidu.openAPIdemo', |
|
|
|
'https://m.amap.com/share/index/lnglat='+hospital.hospital_location+'&name='+hospital.hospital_name+'&src=uriapi&innersrc=uriapi', |
|
|
|
'http://apis.map.qq.com/uri/v1/marker?marker=coord:'+ lat+','+lng+';addr:'+hospital.h_name, |
|
|
|
'http://api.map.baidu.com/marker?location='+baiduLngLat.lat+','+baiduLngLat.lng+'&title='+hospital.h_name+'&content=即将前往目的地&output=html&src=webapp.baidu.openAPIdemo', |
|
|
|
'https://m.amap.com/share/index/lnglat='+hospital.h_pos+'&name='+hospital.h_name+'&src=uriapi&innersrc=uriapi', |
|
|
|
] |
|
|
|
console.log(mapList[res.tapIndex]) |
|
|
|
// return; |
|
|
|
// return; |
|
|
|
location.href = mapList[res.tapIndex] |
|
|
|
}, |
|
|
|
fail: function (res) { |
|
|
@ -144,33 +151,34 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
login() { |
|
|
|
this.$http.req('client/user/login', {code:this.code}, 'POST').then(data=>{ |
|
|
|
if(data == -1) return |
|
|
|
uni.setStorageSync('token', data.token) |
|
|
|
var rebackPagePath = uni.getStorageSync('rebackPagePath') |
|
|
|
if(rebackPagePath){ |
|
|
|
uni.navigateTo({ |
|
|
|
url:rebackPagePath |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
// this.$http.req('login', {code:this.code}, 'POST').then(data=>{ |
|
|
|
// if(data == -1) return |
|
|
|
// uni.setStorageSync('token', data.token) |
|
|
|
// var rebackPagePath = uni.getStorageSync('rebackPagePath') |
|
|
|
// if(rebackPagePath){ |
|
|
|
// uni.navigateTo({ |
|
|
|
// url:rebackPagePath |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }); |
|
|
|
}, |
|
|
|
getDoctorInfo() { |
|
|
|
this.$http.req('client/user/doctorpage/'+this.doctor_id, {}, 'GET').then(data=>{ |
|
|
|
// if(this.loginToken) return; |
|
|
|
|
|
|
|
this.$http.req('index_info', {}, 'GET').then(data=>{ |
|
|
|
if(data == -1) return |
|
|
|
this.pageShow = true |
|
|
|
this.keywords = data |
|
|
|
this.doctorInfo = data |
|
|
|
if(this.doctorInfo.visit_hospital && this.doctorInfo.visit_hospital.length>0){ |
|
|
|
this.doctor_dept = this.doctorInfo.visit_hospital[0].hospital_dept_name |
|
|
|
if(this.doctorInfo.doctor_info && this.doctorInfo.doctor_info.depart_name.length>0){ |
|
|
|
this.doctor_dept = this.doctorInfo.doctor_info.depart_name |
|
|
|
} |
|
|
|
|
|
|
|
if(this.doctorInfo.visit_hospital && this.doctorInfo.visit_hospital.length>0){ |
|
|
|
this.hospitals = this.doctorInfo.visit_hospital |
|
|
|
if(this.doctorInfo.hospital_list && this.doctorInfo.hospital_list.length>0){ |
|
|
|
this.hospitals = this.doctorInfo.hospital_list |
|
|
|
} |
|
|
|
|
|
|
|
if(this.doctorInfo.appoint_record && this.doctorInfo.appoint_record.length>0){ |
|
|
|
this.recentAppoint = this.doctorInfo.appoint_record |
|
|
|
if(this.doctorInfo.appoint_list && this.doctorInfo.appoint_list.length>0){ |
|
|
|
this.recentAppoint = this.doctorInfo.appoint_list |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|