信达小程序
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.

53 lines
1.0 KiB

8 months ago
const app = getApp<IAppOption>();
Page({
data: {
id: "",
detail: {} as any,
},
onLoad(options) {
this.setData({
id: options.id,
});
app.waitLogin().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,
});
},
});