wangfukang 4 days ago
parent
commit
157a52fa49
  1. 9
      components/worker/delivery.vue
  2. 3
      manifest.json
  3. 6
      pages/worker/index.vue

9
components/worker/delivery.vue

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

3
manifest.json

@ -23,7 +23,8 @@
"modules" : {
"Camera" : {},
"Bluetooth" : {},
"Push" : {}
"Push" : {},
"Geolocation" : {}
},
/* */
"distribute" : {

6
pages/worker/index.vue

@ -1146,6 +1146,12 @@
},
//
getUserLocation(id) {
if (!id) return
// #ifdef APP-PLUS
if (typeof plus == 'undefined' || !plus.geolocation) {
return
}
// #endif
let that = this;
uni.getLocation({
type: 'gcj02', //

Loading…
Cancel
Save