From fbc074229fd4736f1ae2793c9daebf04726188b2 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 22 五月 2026 18:27:27 +0800
Subject: [PATCH] 提交

---
 small-program/App.vue |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/small-program/App.vue b/small-program/App.vue
index 48c6653..44a58d3 100644
--- a/small-program/App.vue
+++ b/small-program/App.vue
@@ -65,10 +65,11 @@
 								let info = data[0];
 								console.log(info, '==================鑾峰彇鍦板潃');
 								locParam.province = info.province;
-								locParam.city = info.regeocodeData.addressComponent.city;
-								var ta = info.desc || '鍦板潃鑾峰彇澶辫触';
+								locParam.adcode = info.regeocodeData.addressComponent.adcode;
+								var ta = (info.regeocodeData.addressComponent.city + info.regeocodeData.addressComponent.township) || '鍦板潃鑾峰彇澶辫触';
 								locParam.address = ta
-								const resCity = await that.$u.api.getCityByName({ cityName: locParam.city })
+								locParam.cityName = info.regeocodeData.addressComponent.city
+								const resCity = await that.$u.api.getCityByName({ code: locParam.adcode })
 								if (resCity.code === 200 && resCity.data) {
 									locParam.cityId = resCity.data.id
 									that.$store.commit('setPosition', locParam)
@@ -134,8 +135,8 @@
 					type: 'wgs84',
 					success: (addr) => {
 						const locParam = { latitude: addr.latitude, longitude: addr.longitude };
-						uni.setStorageSync('address', locParam);
-						var address = null
+						// uni.setStorageSync('address', locParam);
+						// var address = null
 						var myAmapFun = new amapFile.AMapWX({ key: 'f2e6c0bfcac14c27b4f0d6d0d5b9d7d' });
 						myAmapFun.getRegeo({
 							location: addr.longitude + ',' + addr.latitude,

--
Gitblit v1.9.3