main
liudan 2 years ago
parent ea92df05a5
commit 289b5b0d43
  1. 4
      manifest.json
  2. 92
      technician/pages/apply.vue

@ -118,13 +118,13 @@
"amap" : {
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "6915e7c20ed1fb4abb6c5b45b5c54c50",
"appkey_android" : "6cbbd69cc7973aba0d1c834accb2ceb3"
"appkey_android" : "ad263f79472a94912ec991ded259aba8"
}
},
"maps" : {
"amap" : {
"appkey_ios" : "6915e7c20ed1fb4abb6c5b45b5c54c50",
"appkey_android" : "6cbbd69cc7973aba0d1c834accb2ceb3"
"appkey_android" : "ad263f79472a94912ec991ded259aba8"
}
},
"payment" : {

@ -445,52 +445,52 @@
} = this
if (!location.lat) {
// #ifdef H5
// if (this.$jweixin.isWechat()) {
// this.$util.showLoading()
// // await this.$jweixin.initJssdk();
// await this.$jweixin.wxReady2();
// let {
// latitude: lat = 0,
// longitude: lng = 0
// } = await this.$jweixin.getWxLocation()
// location = {
// lng,
// lat,
// address: '',
// province: '',
// city: '',
// district: ''
// }
// if (lat && lng) {
// let key = `${lat},${lng}`
// let data = await this.$api.base.getMapInfo({
// location: key
// })
// let {
// status,
// result
// } = JSON.parse(data)
// if (status == 0) {
// let {
// address,
// address_component
// } = result
// let {
// province,
// city,
// district
// } = address_component
// location = {
// lng,
// lat,
// address,
// province,
// city,
// district
// }
// }
// }
// }
if (this.$jweixin.isWechat()) {
this.$util.showLoading()
// await this.$jweixin.initJssdk();
await this.$jweixin.wxReady2();
let {
latitude: lat = 0,
longitude: lng = 0
} = await this.$jweixin.getWxLocation()
location = {
lng,
lat,
address: '定位失败',
province: '',
city: '',
district: ''
}
if (lat && lng) {
let key = `${lat},${lng}`
let data = await this.$api.base.getMapInfo({
location: key
})
let {
status,
result
} = JSON.parse(data)
if (status == 0) {
let {
address,
address_component
} = result
let {
province,
city,
district
} = address_component
location = {
lng,
lat,
address,
province,
city,
district
}
}
}
}
// #endif
// #ifndef H5
location = await this.$util.getBmapLocation()

Loading…
Cancel
Save