|
|
@ -844,6 +844,12 @@ |
|
|
// 获取用户位置 |
|
|
// 获取用户位置 |
|
|
getUserLocation(item) { |
|
|
getUserLocation(item) { |
|
|
if (!this.ensureLogin()) return |
|
|
if (!this.ensureLogin()) return |
|
|
|
|
|
if (!item || !item.workerId) return |
|
|
|
|
|
// #ifdef APP-PLUS |
|
|
|
|
|
if (typeof plus == 'undefined' || !plus.geolocation) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
// #endif |
|
|
let that = this; |
|
|
let that = this; |
|
|
uni.getLocation({ |
|
|
uni.getLocation({ |
|
|
type: 'gcj02', |
|
|
type: 'gcj02', |
|
|
@ -856,7 +862,8 @@ |
|
|
geolocation: that.latitude + ',' + that.longitude |
|
|
geolocation: that.latitude + ',' + that.longitude |
|
|
}, false, 'post', 'application/x-www-form-urlencoded').then((res) => {}) |
|
|
}, false, 'post', 'application/x-www-form-urlencoded').then((res) => {}) |
|
|
|
|
|
|
|
|
} |
|
|
}, |
|
|
|
|
|
fail: () => {} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
onReachPage() { |
|
|
onReachPage() { |
|
|
|