zhangdan 4 سال پیش
والد
کامیت
50135dd2df

+ 9 - 0
api/login.js

@@ -46,4 +46,13 @@ export const loginPhone = params => {
     method: 'post',
 	data: params
   },true)
+};
+
+// 获取客服电话
+export const customerPhone = params => {
+  return axios.request({
+    url: `paramConfig/getParamInfo`,
+    method: 'POST',
+	data: {}
+  })
 };

+ 25 - 7
pages/index/index.vue

@@ -44,23 +44,24 @@
 				<view @click="intoWaitOrderDetail(item)"
 					class="cont-item-right flex_1 flex flex_column justify_between">
 					<view class="flex align_center justify_between">
-						<view class="flex_1 bold ellipsis-one">{{item.contactName}}</view>
+						<view class="flex_1 bold ellipsis-one">{{item.customerName||'--'}}</view>
 						<view class="do-btn">去处理</view>
 					</view>
 					<view class="greey-font flex align_center justify_between">
-						<view class="dizhi">{{item.contactAddress+(item.houseAddress||'')}}</view>
+						<view class="greey-font">{{item.createDate}}</view>
 						<view v-if="item.distance" @click.stop="openLocation(item)" class="flex align_center">
 							<u-icon class="icon" name="icon_coordinate1" custom-prefix="custom-icon" size="20"
 								color="#999999"></u-icon>
 							<text>{{item.distance}}KM</text>
 						</view>
 					</view>
-					<view class="greey-font">{{item.reserveTime}},预估{{item.reserveWeightDictValue}}</view>
+					<view class="greey-font">{{item.address || '--'}}</view>
+					<!-- <view class="greey-font">{{item.reserveTime}}</view>
 					<view class="type">
 						<text v-for="(key,index) in item.reserveTypeList" :key="index" class="mark">
 							{{key}}
 						</text>
-					</view>
+					</view> -->
 				</view>
 			</view>
 
@@ -245,12 +246,22 @@
 					}
 				})
 
+			},
+			// 截取市以下的地址
+			getArea(obj,state) {
+			var index=obj.lastIndexOf("\市");
+			if(state==0){
+			obj=obj.substring(0,index);
+			}else {
+			obj=obj.substring(index+1,obj.length);
+			}
+			return obj;
 			},
 			// 待处理订单信息
 			getList(lat, lng) {
-				uni.showLoading({
-					title: '加载中...'
-				})
+				// uni.showLoading({
+				// 	title: '加载中...'
+				// })
 				waitOrderQuery({
 					handleUserLng: lng,
 					handleUserLat: lat
@@ -264,6 +275,13 @@
 							item.reserveTime = moment(item.reserveDateBegin).format('YYYY-MM-DD') + item
 								.reserveTimeTypeDictValue
 							item.reserveTypeList = item.reserveRubbishType.split(',')
+							
+							
+							if(item.receiveAreasName){
+								item.cityAddress=this.getArea(item.receiveAreasName,1)
+							}
+							console.log(item.cityAddress,'-----------item.cityAddress=============')
+							item.address=(item.houseAddress? item.receiveAddress:'')+(item.cityAddress? '('+item.cityAddress+')':'')
 						})
 						this.noDataText = '暂无数据'
 					} else {

+ 27 - 6
pages/login/login.vue

@@ -17,8 +17,8 @@
 			</view>
 			<!-- 客服电话 -->
 			<view class="phone flex justify_center align_center">
-				<u-icon name="phone" color="#191919" font-size="32"></u-icon>
-				<text>客服电话:4008826012</text>
+				<u-icon name="phone" color="#191919" font-size="32" @click="callPhone(customerPhoneNum)"></u-icon>
+				<text  @click="callPhone(customerPhoneNum)">客服电话:{{customerPhoneNum}}</text>
 			</view>
 			<view class="nologin">
 				<u-button shape="circle" size="mini" plain lass="login-btn" @click="cansel" type="info">
@@ -41,9 +41,7 @@
 </template>
 
 <script>
-	import {
-		login
-	} from "@/api/login"
+	import {login,customerPhone} from "@/api/login"
 	export default {
 		components: {},
 		data() {
@@ -57,10 +55,12 @@
 				phoneButton: {
 					background: '#fff',
 					color:'#000',
-				}
+				},
+				customerPhoneNum:'' // 客服电话
 			}
 		},
 		onLoad(option) {
+			this.getCustomerPhone()
 			// 开启分享
 			uni.showShareMenu({
 				withShareTicket: true,
@@ -89,6 +89,27 @@
 					url: '/pages/agreement/agreement'
 				})
 			},
+			// 获取客服电话
+			getCustomerPhone(){
+				customerPhone().then(res=>{
+					console.log(res,'=====================客服电话')
+					if(res.status==200){
+						this.customerPhoneNum=res.data.paramPhone
+					}else{
+						uni.showToast({
+							title:res.message,
+							icon:'none'
+						})
+					}
+					
+				})
+			},
+			//联系客服
+			callPhone(customerPhoneNum){
+				uni.makePhoneCall({
+				    phoneNumber: customerPhoneNum
+				});
+			},
 			getPhoneNumber(e) {
 				let _this = this
 				uni.showLoading({

+ 4 - 4
pages/order/hisOrderDetail.vue

@@ -12,9 +12,9 @@
 					<!-- <view  class="t-icon icon t-icon-icon_complete"></view> -->
 					{{orderInfo.orderStatusDictValue || '--'}}
 				</view>
-				<view class="status-care">
+				<!-- <view class="status-care">
 					预约时间:{{orderInfo.reserveTime}}
-				</view>
+				</view> -->
 			</view>
 			<!-- 服务信息 -->
 			<view class="info-main flex flex_column">
@@ -32,7 +32,7 @@
 				</view>
 			</view>
 			<!-- 预约信息 -->
-			<view class="item-info">
+			<!-- <view class="item-info">
 				<view class="item flex justify_between">
 					<text>预约品类</text>
 					<text>{{orderInfo.reserveRubbishType}}</text>
@@ -41,7 +41,7 @@
 					<text>预约重量</text>
 					<text>{{orderInfo.reserveWeightDictValue}}</text>
 				</view>
-			</view>
+			</view> -->
 			<!-- 订单信息 -->
 			<view class="item-info">
 				<view class="item flex justify_between">

+ 1 - 1
pages/order/historyOrder.vue

@@ -7,7 +7,7 @@
 			<view class="list-item" v-for="item in list" :key="item.id" @click="intoDetail(item)">
 				<view class="cont">
 					<view class="cont-top flex align_center justify_between">
-						<text>{{item.contactName||'--'}}</text>
+						<text>{{item.customerName||'--'}}</text>
 						<text>{{'¥'+(item.originalAmount || 0)}}</text>
 					</view>
 					<view class="cont-bot flex align_center justify_between">

+ 1 - 1
pages/store/storeList.vue

@@ -185,7 +185,7 @@
 				}
 			}
 			.nodata{
-				margin-top: 50%;
+				padding-top: 30vh;
 			}
 		}
 		.footer{

+ 29 - 12
pages/userCenter/index.vue

@@ -65,20 +65,21 @@
 		</view>
 		<!-- 客服电话 -->
 		<view class="phone flex justify_center align_center">
-			<u-icon name="phone" color="#191919" font-size="32" @click="callPhone"></u-icon>
-			<text @click="callPhone">客服电话:4008826012</text>
+			<u-icon name="phone" color="#191919" font-size="32" @click="callPhone(customerPhoneNum)"></u-icon>
+			<text @click="callPhone(customerPhoneNum)">客服电话:{{customerPhoneNum || ''}}</text>
 		</view>
 	</view>
 </template>
 
 <script>
-	import { checkLogin, getUserInfo, logout } from '@/api/login.js'
+	import { checkLogin, getUserInfo, logout,customerPhone } from '@/api/login.js'
 	export default {
 		data() {
 			return {
 				hasLogin: false,
 				userData: {},
-				version: '1.0.0' // 小程序版本
+				version: '1.0.0' ,// 小程序版本
+				customerPhoneNum:'' // 客服电话
 			};
 		},
 		onShow() {
@@ -98,7 +99,7 @@
 			
 		},
 		onLoad() {
-			// this.getVersion()
+			this.getCustomerPhone()
 			// 开启分享
 			uni.showShareMenu({
 				withShareTicket: true,
@@ -112,6 +113,26 @@
 				this.version = accountInfo.miniProgram.version
 				console.log(accountInfo,accountInfo.miniProgram.appId,'ppppppppp'); // 小程序 appId
 			},
+			// 获取客服电话
+			getCustomerPhone(){
+				customerPhone().then(res=>{
+					console.log(res,'=====================客服电话')
+					if(res.status==200){
+						this.customerPhoneNum=res.data.paramPhone
+					}else{
+						uni.showToast({
+							title:res.message,
+							icon:'none'
+						})
+					}
+				})
+			},
+			//联系客服
+			callPhone(customerPhoneNum){
+				uni.makePhoneCall({
+				    phoneNumber: customerPhoneNum
+				});
+			},
 			// 检查更新
 			checkUpdate(){
 				if (uni.canIUse('getUpdateManager')) {
@@ -200,12 +221,6 @@
 					url: '/pages/login/login'
 				})
 			},
-			//联系客服
-			callPhone(){
-				uni.makePhoneCall({
-				    phoneNumber: "4008826012"
-				});
-			}
 		}
 	}
 </script>
@@ -264,8 +279,10 @@
 			}
 		}
 		.phone{
+			position: absolute;
 			text-align: center;
-			margin-top: 20%;
+			bottom: 3%;
+			left:28%
 		}
 	}
 </style>

BIN
static/tabbar/tab_home_normal.png


BIN
static/tabbar/tab_home_pressed.png


BIN
static/tabbar/tab_personal_normal.png


BIN
static/tabbar/tab_personal_pressed.png