53 lines
1.0 KiB
JavaScript
53 lines
1.0 KiB
JavaScript
// packageC/selfCarry/component/selfPickupPointChild2/selfPickupPointChild.js
|
|
const app = getApp();
|
|
Component({
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
properties: {
|
|
datas: {
|
|
type: null
|
|
},
|
|
selected: {
|
|
type: null
|
|
},
|
|
pluginName: {
|
|
type: null
|
|
}
|
|
},
|
|
/**
|
|
* 组件的初始数据
|
|
*/
|
|
data: {
|
|
|
|
},
|
|
|
|
/**
|
|
* 组件的方法列表
|
|
*/
|
|
methods: {
|
|
callPhone(e) {
|
|
let detailinfo = e.currentTarget.dataset.phone;
|
|
wx.makePhoneCall({
|
|
phoneNumber: detailinfo,
|
|
});
|
|
},
|
|
chooseDeliver(e){
|
|
let id = e.currentTarget.dataset.id;
|
|
this.triggerEvent('chooseDeliver', id);
|
|
},
|
|
goToAdress() {
|
|
let latitude = this.data.datas.lat;
|
|
let longitude = this.data.datas.lng;
|
|
let store_name = this.data.datas.deliver_name;
|
|
let point = app.BMapTransqqMap(parseFloat(longitude), parseFloat(latitude));
|
|
wx.openLocation({
|
|
latitude: point.lat,
|
|
longitude: point.lng,
|
|
scale: 18,
|
|
name: store_name
|
|
});
|
|
},
|
|
}
|
|
});
|