From a59ff44b2eaa7020f0529632d9ec064c4dc38e27 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期二, 28 四月 2026 22:08:46 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/gtzxinglijicun
---
small-program/App.vue | 38 +++-----------------------------------
1 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/small-program/App.vue b/small-program/App.vue
index 4735960..b26826c 100644
--- a/small-program/App.vue
+++ b/small-program/App.vue
@@ -1,6 +1,5 @@
<script>
import { mapState } from 'vuex'
- // var QQMapWX = require('@/utils/qqmap-wx-jssdk.js')
var amapFile = require('@/utils/amap-wx.130.js')
export default {
computed: {
@@ -61,17 +60,15 @@
isHighAccuracy: true,
success: function (addr) {
const locParam = { latitude: addr.latitude, longitude: addr.longitude };
- // uni.setStorageSync('address', locParam);
- var address = null
- var myAmapFun = new amapFile.AMapWX({ key: 'e4d46c87adf151dca20060317592b1b6' });
+ var myAmapFun = new amapFile.AMapWX({ key: that.$gaodeMapKey});
myAmapFun.getRegeo({
location: addr.longitude + ',' + addr.latitude,
success: async function(data) {
- console.log(data, '==================鑾峰彇鍦板潃');
let info = data[0];
+ console.log(info, '==================鑾峰彇鍦板潃');
locParam.province = info.province;
locParam.city = info.regeocodeData.addressComponent.city;
- var ta = info.name || '鍦板潃鑾峰彇澶辫触';
+ var ta = info.desc || '鍦板潃鑾峰彇澶辫触';
locParam.address = ta
const resCity = await that.$u.api.getCityByName({ cityName: locParam.city })
if (resCity.code === 200 && resCity.data) {
@@ -89,35 +86,6 @@
that.$isResolve()
}
});
-
- // const qqmapsdk = new QQMapWX({
- // key: 'WE3BZ-HN6WS-ONDOH-62QCV-MNL6F-5NFNE'
- // });
- // qqmapsdk.reverseGeocoder({
- // locParam,
- // success: async function(res) {
- // console.log(res, '==================鑾峰彇鍦板潃');
- // let info = res.result;
- // locParam.province = info.address_component.province;
- // locParam.city = info.address_component.city;
- // locParam.area = info.address_component.district;
- // locParam.street = info.address_component.street;
- // var ta = info.address || '鍦板潃鑾峰彇澶辫触' ;
- // if(info.formatted_addresses && info.formatted_addresses.recommend){
- // ta =info.formatted_addresses.recommend
- // }
- // locParam.address =ta
- // const resCity = await that.$u.api.getCityByName({ cityName: locParam.city })
- // if (resCity.code === 200) {
- // locParam.cityId = resCity.data.id
- // }
- // that.$store.commit('setPosition',locParam)
- // that.$isResolve()
- // },
- // fail: (err) => {
- // that.$isResolve()
- // }
- // });
}
});
},
--
Gitblit v1.9.3