ソースを参照

地址超出处理

vaecebyZ 8 ヶ月 前
コミット
959aaae50e
2 ファイル変更20 行追加6 行削除
  1. 1 1
      my/order/trip/detail.vue
  2. 19 5
      trip/index/index.vue

+ 1 - 1
my/order/trip/detail.vue

@@ -209,7 +209,7 @@ export default {
 				// driverArrivedTime
 
 				const driverEndTime = new Date(this.info.goodsList[0].extend.driverEndTime).getTime()
-				const startTime = new Date(this.info.goodsList[0].extend.driverArrivedTime).getTime()
+				const startTime = new Date(this.info.goodsList[0].extend.driverStartTime).getTime()
 				const time = driverEndTime - startTime
 				// 转换为分钟数
 				this.minutes = Math.ceil((time / 1000 / 60))

+ 19 - 5
trip/index/index.vue

@@ -24,7 +24,9 @@
 					</view>
 					<view class="end" @click="chooseAddress('end')">
 						<view class="point"></view>
-						{{ form.end || '您想去哪里' }}
+						<view class="place">
+							{{ form.end || '您想去哪里' }} 
+						</view>
 					</view>
 					<u-button @click="call()" color="#FF4A39" shape="circle" :loading="loading">
 						呼叫秋香代驾
@@ -92,7 +94,7 @@
 
 							</view>
 						</view>
-						<view class="price-box" @click="jump('../expense/index?priceItems='+JSON.stringify(priceItems))">
+						<view class="price-box" @click="jump('../expense/index?priceItems=' + JSON.stringify(priceItems))">
 							<view class="price">预估<text>{{ driver.payPrice }}</text>元</view>
 							<view class="jiantou">
 								<image src="../../static/jiantou-icon.png" mode=""></image>
@@ -229,7 +231,7 @@
 							</view>
 
 						</view>
-						<view class="price-box" @click="jump('../expense/index?priceItems='+JSON.stringify(priceItems))">
+						<view class="price-box" @click="jump('../expense/index?priceItems=' + JSON.stringify(priceItems))">
 							<view class="price">需支付<text>{{ driver.payPrice }}</text>元</view>
 							<view class="jiantou">
 								<image src="../../static/jiantou-icon.png" mode=""></image>
@@ -682,12 +684,12 @@ export default {
 				}
 			});
 		},
-		callPhone(){
+		callPhone() {
 			uni.makePhoneCall({
 				phoneNumber: this.driver.driverPhone
 			})
 		},
-		customer(){
+		customer() {
 			uni.showModal({
 				title: '提示',
 				content: '是否拨打客服电话0851-86889969',
@@ -881,6 +883,18 @@ export default {
 					border-radius: 50%;
 				}
 
+				.place {
+					width: 90%;
+					text-indent: 0;
+					word-break: break-all;
+					// 超出部分变成...
+					display: -webkit-box;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 1;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+
 			}
 
 			.btn {