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

1、客户地址定位

parent be2d69fa
...@@ -291,48 +291,48 @@ ...@@ -291,48 +291,48 @@
methods: { methods: {
openLocation(address){ openLocation(address){
if(this.isAllowDianhuaAndDaohang){ if(this.isAllowDianhuaAndDaohang){
uni.getLocation({ // uni.getLocation({
type: 'gcj02', //返回可以用于uni.openLocation的经纬度 // type: 'gcj02', //返回可以用于uni.openLocation的经纬度
success: function (res) { // success: function (res) {
const latitude = res.latitude; debugger
const longitude = res.longitude; const latitude = this.contactAddressLatitud //res.latitude;
const longitude =this.contactAddressLongitud //res.longitude;
uni.openLocation({ uni.openLocation({
latitude: latitude, latitude: Number(this.contactAddressLatitud),
longitude: longitude, longitude: Number(this.contactAddressLongitud),
success: function () { success: function () {
console.log('success'); console.log('success');
} }
}); });
}, // }
complete: function(res) { // ,
console.log('-------complete-----', res) // complete: function(res) {
if (res.errMsg.indexOf('auth') != -1) { // console.log('-------complete-----', res)
uni.showModal({ // if (res.errMsg.indexOf('auth') != -1) {
title: '提示', // uni.showModal({
content: '获取权限失败,请到设置页面开启权限', // title: '提示',
confirmText: '好的', // content: '获取权限失败,请到设置页面开启权限',
success(res) { // confirmText: '好的',
if (res.confirm) { // success(res) {
uni.openSetting({ // if (res.confirm) {
success(res) { // uni.openSetting({
console.log(res.authSetting) // success(res) {
} // console.log(res.authSetting)
}); // }
} // });
// }
} // }
}) // })
} else if (res.errMsg) { // } else if (res.errMsg) {
// uni.setClipboardData({ // // uni.setClipboardData({
// data: address, // // data: address,
// success: function () { // // success: function () {
// console.log('success'); // // console.log('success');
// } // // }
// }); // // });
} // }
} // }
});
} }
}, },
phoneToCustomer(phone){ // 联系客户 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