From 289b5b0d4335dedfa9c9c9fabdd3a20b70d6ba37 Mon Sep 17 00:00:00 2001 From: liudan <18634735655@163.com> Date: Thu, 8 Jun 2023 08:00:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 4 +- technician/pages/apply.vue | 92 +++++++++++++++++++------------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/manifest.json b/manifest.json index 147a9c7..776bf76 100644 --- a/manifest.json +++ b/manifest.json @@ -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" : { diff --git a/technician/pages/apply.vue b/technician/pages/apply.vue index a163ed6..9e44e0b 100644 --- a/technician/pages/apply.vue +++ b/technician/pages/apply.vue @@ -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()