You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
const app = getApp<IAppOption>()
|
|
|
|
|
|
|
|
|
|
Page({
|
|
|
|
|
data: {
|
|
|
|
|
id: '',
|
|
|
|
|
detail: {} as any,
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
this.setData({
|
|
|
|
|
id: options.id,
|
|
|
|
|
})
|
|
|
|
|
app.waitLogin({ type: [0, 1] }).then(() => {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getDetail() {
|
|
|
|
|
wx.ajax({
|
|
|
|
|
method: 'GET',
|
|
|
|
|
url: '?r=zd/dtp-pharmacy/detail',
|
|
|
|
|
data: {
|
|
|
|
|
Id: this.data.id,
|
|
|
|
|
},
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.setData({
|
|
|
|
|
detail: res,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleSite() {
|
|
|
|
|
const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail
|
|
|
|
|
wx.openLocation({
|
|
|
|
|
latitude: LAT,
|
|
|
|
|
longitude: LNG,
|
|
|
|
|
name: Name,
|
|
|
|
|
address: `${ProvinceName}${CityName}${CountyName}${Address}`,
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handlePhone() {
|
|
|
|
|
const tel = this.data.detail.Telephone
|
|
|
|
|
if (!tel) {
|
|
|
|
|
wx.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: '电话暂未开通',
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
wx.makePhoneCall({
|
|
|
|
|
phoneNumber: tel,
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export {}
|