Commit 60244773 authored by 郭晓清's avatar 郭晓清

1、客户地址定位

parent be2d69fa
......@@ -291,48 +291,48 @@
methods: {
openLocation(address){
if(this.isAllowDianhuaAndDaohang){
uni.getLocation({
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
success: function (res) {
const latitude = res.latitude;
const longitude = res.longitude;
// uni.getLocation({
// type: 'gcj02', //返回可以用于uni.openLocation的经纬度
// success: function (res) {
debugger
const latitude = this.contactAddressLatitud //res.latitude;
const longitude =this.contactAddressLongitud //res.longitude;
uni.openLocation({
latitude: latitude,
longitude: longitude,
latitude: Number(this.contactAddressLatitud),
longitude: Number(this.contactAddressLongitud),
success: function () {
console.log('success');
}
});
},
complete: function(res) {
console.log('-------complete-----', res)
if (res.errMsg.indexOf('auth') != -1) {
uni.showModal({
title: '提示',
content: '获取权限失败,请到设置页面开启权限',
confirmText: '好的',
success(res) {
if (res.confirm) {
uni.openSetting({
success(res) {
console.log(res.authSetting)
}
});
}
// }
// ,
// complete: function(res) {
// console.log('-------complete-----', res)
// if (res.errMsg.indexOf('auth') != -1) {
// uni.showModal({
// title: '提示',
// content: '获取权限失败,请到设置页面开启权限',
// confirmText: '好的',
// success(res) {
// if (res.confirm) {
// uni.openSetting({
// success(res) {
// console.log(res.authSetting)
// }
// });
// }
}
})
} else if (res.errMsg) {
// uni.setClipboardData({
// data: address,
// success: function () {
// console.log('success');
// }
// });
}
}
});
// }
// })
// } else if (res.errMsg) {
// // uni.setClipboardData({
// // data: address,
// // success: function () {
// // console.log('success');
// // }
// // });
// }
// }
}
},
phoneToCustomer(phone){ // 联系客户
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment