|
@ -34,15 +34,15 @@ |
|
|
<view class="left"> |
|
|
<view class="left"> |
|
|
<view class="title flex"> |
|
|
<view class="title flex"> |
|
|
<text class="over2">{{item.hospital_name}}</text> |
|
|
<text class="over2">{{item.hospital_name}}</text> |
|
|
<img :src="cssUrl+'index_comback.svg'" alt=""> |
|
|
<img :src="cssUrl+'index_comback.svg'" v-if="item.hospital_location" @click="toLocation(item)"> |
|
|
</view> |
|
|
</view> |
|
|
<view class="date over2" v-if="item.visit_day_text"> |
|
|
<view class="date over2" v-if="item.visit_day_text"> |
|
|
出诊:{{item.visit_day_text}} |
|
|
出诊:{{item.visit_day_text}} |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="right"> |
|
|
<view class="right"> |
|
|
<view class="flex right-wrapper" style="justify-content:flex-end;"> |
|
|
<view class="flex right-wrapper" style="justify-content:flex-end;" v-if="item.hospital_location"> |
|
|
<view class=""> |
|
|
<view class="" @click="toLocation(item)"> |
|
|
<img :src="cssUrl+'index_nav.svg'" alt=""> |
|
|
<img :src="cssUrl+'index_nav.svg'" alt=""> |
|
|
<view>导航</view> |
|
|
<view>导航</view> |
|
|
</view> |
|
|
</view> |
|
@ -120,6 +120,29 @@ |
|
|
this.getDoctorInfo() |
|
|
this.getDoctorInfo() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
toLocation(hospital){ |
|
|
|
|
|
var that = this |
|
|
|
|
|
uni.showActionSheet({ |
|
|
|
|
|
itemList: ['腾讯地图', '百度地图', '高德地图'], |
|
|
|
|
|
success: function (res) { |
|
|
|
|
|
var lngLat = hospital.hospital_location.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', |
|
|
|
|
|
] |
|
|
|
|
|
console.log(mapList[res.tapIndex]) |
|
|
|
|
|
// return; |
|
|
|
|
|
location.href = mapList[res.tapIndex] |
|
|
|
|
|
}, |
|
|
|
|
|
fail: function (res) { |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
login() { |
|
|
login() { |
|
|
this.$http.req('client/user/login', {code:this.code}, 'POST').then(data=>{ |
|
|
this.$http.req('client/user/login', {code:this.code}, 'POST').then(data=>{ |
|
|
if(data == -1) return |
|
|
if(data == -1) return |
|
@ -173,6 +196,19 @@ |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url:"/pages/book_detail/book_detail" |
|
|
url:"/pages/book_detail/book_detail" |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
qqMapTransBMap(lng, lat) { |
|
|
|
|
|
let x_pi = 3.14159265358979324 * 3000.0 / 180.0; |
|
|
|
|
|
let x = lng; |
|
|
|
|
|
let y = lat; |
|
|
|
|
|
let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi); |
|
|
|
|
|
let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi); |
|
|
|
|
|
let lngs = z * Math.cos(theta) + 0.0065; |
|
|
|
|
|
let lats = z * Math.sin(theta) + 0.006; |
|
|
|
|
|
return { |
|
|
|
|
|
lng: lngs, |
|
|
|
|
|
lat: lats |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -274,6 +310,7 @@ |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
margin-bottom: 36rpx; |
|
|
margin-bottom: 36rpx; |
|
|
.top{ |
|
|
.top{ |
|
|
|
|
|
min-height: 102rpx; |
|
|
.left{ |
|
|
.left{ |
|
|
flex-grow: 1; |
|
|
flex-grow: 1; |
|
|
.title{ |
|
|
.title{ |
|
|