From aee5272d23ade39f178d6b3c2032a29db6752aca Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期一, 21 十月 2024 13:18:52 +0800
Subject: [PATCH] update 首页定位

---
 pages/user/address/address.vue |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/pages/user/address/address.vue b/pages/user/address/address.vue
index 82a5fdd..21a8e14 100644
--- a/pages/user/address/address.vue
+++ b/pages/user/address/address.vue
@@ -28,7 +28,7 @@
 			</view>
 		</view>
 		<view class="m-t-12 ">
-			<view class="desc-gray">我的收获地址</view>
+			<view class="desc-gray">我的收货地址</view>
 
 		</view>
 		<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
@@ -278,6 +278,7 @@
 								// that.search_flow =   (location.name || '')
 								that.$store.commit('setAddressDesc', (location.name || location.address || ''))
 								that.$forceUpdate()
+								that.backpage()
 							}
 
 							// if (!that.submitForm.province && location.provinceName) {
@@ -370,7 +371,7 @@
 						//  };
 						const {
 							code,data
-						} = that.$http.request('get', '/api/pub/customer/home/address/parse', {
+						} = await that.$http.request('get', '/api/pub/customer/home/address/parse', {
 							data: {},
 							params: {
 								// https://apis.map.qq.com/ws/geocoder/v1/?location=39.984154,116.307490&key=[你的key]&get_poi=1
@@ -379,9 +380,13 @@
 						})
 						console.log('定位成功:', data);
 						if(data){
-							var address = data.address || ''
+							var address = data.result&&data.result.address || ''
 							
 							that.$store.commit('setAddressDesc', (address || ''))
+							that.$forceUpdate()
+							
+							that.backpage()
+							
 						}
 						
 

--
Gitblit v1.9.3