1004749546@qq.com 4 years ago
parent
commit
cbc7cbbb6b
2 changed files with 8 additions and 3 deletions
  1. 1 1
      pages/index/index.vue
  2. 7 2
      pages/order/hisOrderDetail.vue

+ 1 - 1
pages/index/index.vue

@@ -197,7 +197,7 @@
 					if(res.status == 200){
 					if(res.status == 200){
 						this.listdata = res.data
 						this.listdata = res.data
 						this.listdata.forEach(item =>{
 						this.listdata.forEach(item =>{
-							item.distance = item.distanct && item.distanct.distance ? Math.round(item.distanct.distance/1000) : ''
+							item.distance = item.distanct && item.distanct.distance ? (item.distanct.distance/1000).toFixed(2) : ''
 							item.reserveTime = moment(item.reserveDateBegin).format('YYYY-MM-DD') + item.reserveTimeTypeDictValue
 							item.reserveTime = moment(item.reserveDateBegin).format('YYYY-MM-DD') + item.reserveTimeTypeDictValue
 						})
 						})
 					} else {
 					} else {

+ 7 - 2
pages/order/hisOrderDetail.vue

@@ -25,7 +25,7 @@
 				</view>
 				</view>
 				<view class="time flex align_center justify_between">
 				<view class="time flex align_center justify_between">
 					<text>{{orderInfo.contactName}}</text>
 					<text>{{orderInfo.contactName}}</text>
-					<view class="flex align_center">
+					<view @click="callPhone(orderInfo.contactMobile)" class="flex align_center">
 						<u-icon class="phone" name="icon_phone" custom-prefix="custom-icon" size="28" color="#999999"></u-icon>
 						<u-icon class="phone" name="icon_phone" custom-prefix="custom-icon" size="28" color="#999999"></u-icon>
 						<text>{{orderInfo.contactMobile}}</text>
 						<text>{{orderInfo.contactMobile}}</text>
 					</view>
 					</view>
@@ -165,7 +165,12 @@
 					uni.hideLoading()
 					uni.hideLoading()
 				})
 				})
 			},
 			},
-			
+			// 打电话
+			callPhone(phone) {
+				uni.makePhoneCall({
+				    phoneNumber: phone
+				});
+			},
 		},
 		},
 	}
 	}
 </script>
 </script>