From 3696830fbaf2fd97d98020087abf20917e491bdc Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期四, 23 四月 2026 20:06:35 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

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

diff --git a/small-program/App.vue b/small-program/App.vue
index b135e6e..4735960 100644
--- a/small-program/App.vue
+++ b/small-program/App.vue
@@ -39,7 +39,7 @@
 				let res = await that.$u.api.getMemberInfo({})
 				if (res.code === 200) {
 					await that.$store.commit('setUserInfo', res.data)
-					await that.$store.commit('setOpenid', res.data.openId)
+					await that.$store.commit('setOpenid', res.data.openid)
 				}
 				// 璁剧疆瀹氫綅
 				await that.checkLocationAuth()
@@ -61,7 +61,7 @@
 					isHighAccuracy: true,
 					success: function (addr) {
 						const locParam = { latitude: addr.latitude, longitude: addr.longitude };
-						uni.setStorageSync('address', locParam);
+						// uni.setStorageSync('address', locParam);
 						var address = null
 						var myAmapFun = new amapFile.AMapWX({ key: 'e4d46c87adf151dca20060317592b1b6' });
 						myAmapFun.getRegeo({
@@ -74,10 +74,13 @@
 								var ta = info.name || '鍦板潃鑾峰彇澶辫触';
 								locParam.address = ta
 								const resCity = await that.$u.api.getCityByName({ cityName: locParam.city })
-								if (resCity.code === 200) {
+								if (resCity.code === 200 && resCity.data) {
 									locParam.cityId = resCity.data.id
-								}	
-								that.$store.commit('setPosition', locParam)
+									that.$store.commit('setPosition', locParam)
+								} else {
+									that.$store.commit('setPosition', locParam)
+									that.$store.commit('clearCityId')
+								}
 								that.$isResolve()
 							},
 							fail: function(err) {

--
Gitblit v1.9.3