From 37b1176f4b37260bd455891898ed1258c6421607 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期四, 21 八月 2025 15:28:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 small-program/pages/index/index.vue |  120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 109 insertions(+), 11 deletions(-)

diff --git a/small-program/pages/index/index.vue b/small-program/pages/index/index.vue
index 7d73195..f8c2695 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>
 			
@@ -193,7 +193,7 @@
 						</view>
 					</view>
 					<view class="box-hz-btn" :style="{ backgroundImage: 'url(' + btn + ')' }">
-						<view class="box-hz-btn-kf">瀹㈡湇</view>
+						<view class="box-hz-btn-kf" @click="contactPhone()">瀹㈡湇</view>
 						<view class="box-hz-btn-next" @click="submit">涓嬩竴姝�</view>
 					</view>
 				</view>
@@ -303,7 +303,7 @@
 					</template>
 					
 					<view class="box-hz-btn" :style="{ backgroundImage: 'url(' + btn + ')' }">
-						<view class="box-hz-btn-kf">瀹㈡湇</view>
+						<view class="box-hz-btn-kf"  @click="contactPhone()" >瀹㈡湇</view>
 						<view class="box-hz-btn-next" @click="jump()">涓嬩竴姝�</view>
 					</view>
 				</view>
@@ -312,25 +312,47 @@
 		
 		<!-- 閫夋嫨鏃ユ湡鑼冨洿 -->
 		<u-calendar :show="show" color="#00BC12" mode="range" @close="show = false" @confirm="confirmDate"></u-calendar>
+		<u-popup :show="showPhone" round="15" mode="bottom"   @close="contactPhone()" :closeable="true" :closeOnClickOverlay="true">
+			<view class="phone">
+				<view class="phone-head">
+					<view></view>
+					<text>瀹㈡湇鐢佃瘽</text> 
+				</view>
+				 <view class="phone-item" v-for="(item,index) in serverPhone"    :key="item" @click="contactPhoneDo(item)">
+				 	<view></view>
+				 	<text>{{item}}</text> 
+				 </view>  
+				<!-- <view class="phone-botton"  @click="contactPhone()" >鍏抽棴</view> -->
+			</view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
 	import { mapState } from 'vuex'
 	import sunuiMverify from '@/components/sunui-mverify/sunui-mverify.vue';
+	var QQMapWX = require('@/utils/qqmap-wx-jssdk.js');
 	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
 			}
 		},
 		data() {
 			return {
+				showPhone:false,
+				serverPhone:[],
 				show: false,
 				isLogin: false,
 				typeId: 0,
+				qqmapsdk: null,
+				location:{
+					latitude:null,
+					longitude:null,
+					address:null,
+				},
 				type: [
 					{ name: '鐢ㄥ伐', id: 0 },
 					{ name: '杩愯揣', id: 1 },
@@ -390,13 +412,21 @@
 				isOnce: true
 			}
 		},
-		async onLoad() {
+		async onLoad() { 
 			await this.$onLaunched;
-			if(this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
+			
+			if (this.token && this.token != '' && this.userInfo && JSON.stringify(this.userInfo) != '{}') {
 				this.getOrderList()
 				this.getCategoryLists()
 			}
+			
+			this.qqmapsdk = new QQMapWX({
+				key: '4PXBZ-JLBC7-LCLXG-P2SZX-C4HYE-LDBLQ'
+			});
+			
 			this.form.linkPhone = this.userInfo.telephone
+			
+			this.getDictInfo()
 		},
 		onShow(options) {
 			this.typeViewId = 0
@@ -469,11 +499,29 @@
 			}
 		},
 		onReachBottom() {
-			this.getOrderList()
+			this.getOrderList() 
 		},
 		methods: {
+			getDictInfo(){
+				var that = this;
+				this.$u.api.getPlatformAboutUs({}).then(res =>{ 
+					  that.serverPhone = (res.data.serverPhone||'').split(",") 
+				})
+			},
+			contactPhone(){
+				 this.showPhone = !this.showPhone
+				 console.log("==================================",this.showPhone)
+			},
+			contactPhoneDo(phone){ 
+				if(phone !=null && phone!=''){
+					uni.makePhoneCall({
+					   phoneNumber: phone  
+					})
+				}
+			},
 			// 鎵嬪姩鎺ュ崟
 			getaccept(e, orderId, index) {
+				if (!e.msg) return;
 				this.$u.api.accept({ orderId })
 					.then(res => {
 						if (res.code === 200) {
@@ -655,7 +703,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
@@ -668,7 +716,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
+						} 
 					}
 				});
 			},
@@ -1060,7 +1113,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;
@@ -1077,6 +1130,10 @@
 					font-size: 32rpx;
 					color: #ffffff;
 					margin-right: 12rpx;
+					max-width: 280rpx;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
 				}
 				.qu {
 					width: 22rpx;
@@ -1695,5 +1752,46 @@
 				}
 			}
 		}
+		.phone {
+			width: 100%;
+			padding-top: 40rpx;
+			box-sizing: border-box;
+			.phone-botton {
+				width: 100%;
+				height: 88rpx;
+				line-height: 88rpx;
+				text-align: center;
+				font-weight: 500;
+				font-size: 32rpx;
+				color: #FFFFFF;
+				background: #00BC12;
+				border-radius: 44rpx;
+				margin-top: 60rpx;
+			}
+			.phone-head {
+				width: 100%;
+				text-align: center;
+				justify-content: space-between; 
+				margin-bottom: 40rpx;
+				text {
+					font-weight: 800;
+					font-size: 32rpx;
+					color: #222222;
+				}
+			}
+			.phone-item {
+				width: 100%;
+				text-align: center;
+				justify-content: space-between;  
+				border-bottom: 1rpx solid #eeeeee;
+				line-height: 78rpx;
+				text {
+					font-weight: 500;
+					font-size: 28rpx;
+					line-height: 28rpx;
+					color: #222222;
+				}
+			}
+		}
 	}
 </style>

--
Gitblit v1.9.3