From 391c0cfc4ba595ef26c7a2315c555d8c75afec7d Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 22 八月 2025 11:13:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 small-program/pages/index/index.vue |   55 +++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index c100d48..5b2c779 100644
--- a/small-program/pages/index/index.vue
+++ b/small-program/pages/index/index.vue
@@ -83,10 +83,10 @@
 		<!-- 鍙戝崟鏂� -->
 		<view class="index-c" v-if="typeViewId === 0">
 			<view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
-			<view class="index-c-title" :style="{ height: navHeight + 'px' }" @click="selectAddress">
+			<view class="index-c-title" :style="{ height: navHeight + 'px' }" @click="selectAddress(-1)">
 				<text class="index-c-title-logo">杩戝揩</text>
 				<image class="dingwei" src="/static/icon/home_ic_location@2x.png" mode="widthFix"></image>
-				<text>瑗挎箹鍥介檯骞垮満</text>
+				<text>{{location.address || address || '鑾峰彇鍦板潃澶辫触'}}</text>
 				<image class="qu" src="/static/icon/home_ar_next@2x.png" mode="widthFix"></image>
 			</view>
 			
@@ -321,11 +321,7 @@
 				 <view class="phone-item" v-for="(item,index) in serverPhone"    :key="item" @click="contactPhoneDo(item)">
 				 	<view></view>
 				 	<text>{{item}}</text> 
-				 </view> 
-				 <view class="phone-item" v-for="(item,index) in serverPhone"    :key="item" @click="contactPhoneDo(item)">
-				 	<view></view>
-				 	<text>{{item}}</text> 
-				 </view> 
+				 </view>  
 				<!-- <view class="phone-botton"  @click="contactPhone()" >鍏抽棴</view> -->
 			</view>
 		</u-popup>
@@ -339,7 +335,7 @@
 	export default {
 		components: { sunuiMverify },
 		computed: {
-			...mapState(['navHeight', 'statusbarHeight','userInfo','token','openid', 'latitude', 'longitude']),
+			...mapState(['navHeight', 'statusbarHeight','userInfo','token','openid', 'latitude', 'longitude','address']),
 			totalPrice() {
 				return this.form.estimatedAccount / 100
 			}
@@ -352,6 +348,11 @@
 				isLogin: false,
 				typeId: 0,
 				qqmapsdk: null,
+				location:{
+					latitude:null,
+					longitude:null,
+					address:null,
+				},
 				type: [
 					{ name: '鐢ㄥ伐', id: 0 },
 					{ name: '杩愯揣', id: 1 },
@@ -411,7 +412,7 @@
 				isOnce: true
 			}
 		},
-		async onLoad() {
+		async onLoad() { 
 			await this.$onLaunched;
 			
 			if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}' && this.userInfo.useIdentity === 1) {
@@ -446,6 +447,16 @@
 				this.form.estimatedAccount = ''
 				this.form.price = ''
 				this.form.address = ''
+				this.orderFood = []
+			})
+			// 鍒锋柊棣栭〉鏁版嵁
+			uni.$on('refresh', () => {
+				this.getCategoryLists()
+				this.getDictInfo()
+				
+				if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
+					this.form.linkPhone = this.userInfo.telephone
+				}
 			})
 		},
 		onShow(options) {
@@ -519,7 +530,9 @@
 			}
 		},
 		onReachBottom() {
-			this.getOrderList() 
+			if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}' && this.userInfo.useIdentity === 1) {
+				this.getOrderList()
+			}
 		},
 		methods: {
 			getDictInfo(){
@@ -724,7 +737,7 @@
 			},
 			selectAddress(type, index) {
 				uni.chooseLocation({
-					success: (res) => {
+					success: (res) => { 
 						if ([1,2].includes(type)) {
 							this.form.latitude = res.latitude
 							this.form.longitude = res.longitude
@@ -737,7 +750,12 @@
 							this.form.wayInfoDTOList[0].lat = res.latitude
 							this.form.wayInfoDTOList[0].lgt = res.longitude
 							this.form.wayInfoDTOList[0].location = res.address
-						}
+						}else if (type == -1) {
+							console.log(res)
+							this.location.latitude = res.latitude
+							this.location.longitude = res.longitude
+							this.location.address =res.name ||  res.address
+						} 
 					}
 				});
 			},
@@ -1129,7 +1147,7 @@
 				padding: 0 30rpx;
 				box-sizing: border-box;
 				display: flex;
-				align-items: center;
+				align-items: center; 				
 				.index-c-title-logo {
 					font-weight: bold;
 					font-size: 40rpx;
@@ -1146,6 +1164,10 @@
 					font-size: 32rpx;
 					color: #ffffff;
 					margin-right: 12rpx;
+					max-width: 280rpx;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
 				}
 				.qu {
 					width: 22rpx;
@@ -1244,12 +1266,16 @@
 							padding: 30rpx 0;
 							box-sizing: border-box;
 							flex-direction: column;
-							border-bottom: 1rpx solid #E5E5E5;
+							// border-bottom: 1rpx solid #E5E5E5;
 							.radio-item {
 								width: 100%;
 								display: flex;
 								align-items: self-end;
 								margin-bottom: 30rpx;
+								border-bottom: 1rpx solid #E5E5E5;
+								&:last-child {
+									border: none;
+								}
 								&:last-child {
 									margin: 0 !important;
 								}
@@ -1302,6 +1328,7 @@
 										align-items: center;
 										justify-content: flex-end;
 										margin-top: 42rpx;
+										margin-bottom: 34rpx;
 										text {
 											font-weight: 400;
 											font-size: 30rpx;

--
Gitblit v1.9.3