Browse Source

救援修改

twt 1 year ago
parent
commit
08ac993144
3 changed files with 44 additions and 17 deletions
  1. 28 15
      pages/rescue/rescueOrderDetail.vue
  2. 11 0
      pages/wyCar/apply.vue
  3. 5 2
      utils/request.js

+ 28 - 15
pages/rescue/rescueOrderDetail.vue

@@ -30,18 +30,20 @@
 		</view>
 		<!-- 拖车起始点 -->
 		<view class="startPointBox" >
-			<div class="hStartAddressBox" :class="{hStartAddressBox2:orderData.openShopHelpSheet.helpType==2}">
-				<div class="hStartAddressYd"></div>
-				<div class="startPointTitle">起点</div>
-				<div class="hStartAddress">{{orderData.openShopHelpSheet.hStartAddress}}</div>
-				<img src="../../static/img/icon_ditu.png" alt="" class="mapImg" @click="goMapStart"/>
-			</div>
-			<div class="hEndAddressBox" v-if="orderData.openShopHelpSheet.helpType==2">
-				<div class="hEndAddressYd"></div>
-				<div class="startPointTitle">终点</div>
-				<div class="hStartAddress">{{orderData.openShopHelpSheet.hEndAddress}}</div>
-				<img src="../../static/img/icon_ditu.png" alt="" class="mapImg" @click="goMapEnd"/>
-			</div>
+			<view class="hStartAddressBox" :class="{hStartAddressBox2:orderData.openShopHelpSheet.helpType==2}">
+				<view class="hStartAddressYd"></view>
+				<view class="startPointTitle">救援位置</view>
+				<view class="hStartAddress">{{orderData.openShopHelpSheet.hStartAddress}}</view>
+				<!-- <img src="../../static/img/icon_ditu.png" alt="" class="mapImg" @click="goMapStart"/> -->
+			    <view class="gomapDiv" @click="goMapStart">导航</view>
+			</view>
+			<view class="hEndAddressBox"  v-if="orderData.openShopHelpSheet.helpType==2&&orderData.openShopHelpSheet.hEndAddress"><!-- v-if="orderData.openShopHelpSheet.helpType==2" -->
+				<view class="hEndAddressYd"></view>
+				<view class="startPointTitle">终点</view>
+				<view class="hStartAddress">{{orderData.openShopHelpSheet.hEndAddress}}</view>
+				<!-- <img src="../../static/img/icon_ditu.png" alt="" class="mapImg" @click="goMapEnd"/> -->
+				 <view class="gomapDiv" @click="goMapEnd">导航</view>
+			</view>
 		</view>
 
 		<!-- 救援信息 -->
@@ -87,10 +89,10 @@
 				<view class="informationNum">{{orderData.shopInfo.shopName}}</view>
 			</view>
 			<view class="informationLine" >
-				<view class="informationTxt">起点:</view>
+				<view class="informationTxt">救援位置:</view>
 				<view class="informationNum">{{orderData.openShopHelpSheet.hStartAddress}}</view>
 			</view>
-			<view class="informationLine">
+			<view class="informationLine" v-if="orderData.openShopHelpSheet.helpType==2">
 				<view class="informationTxt">终点:</view>
 				<view class="informationNum">{{orderData.openShopHelpSheet.hEndAddress}}</view>
 			</view>
@@ -869,10 +871,21 @@
 		font-weight: 400;font-size: 28rpx;
 		color: #333333;padding-left: 30rpx;
 		line-height: 40rpx;
-		width: 500rpx;
+		width: 400rpx;
+	}
+	.gomapDiv{
+		font-weight: 400;font-size: 24rpx;
+		color: #F03B3B;
+		border-radius: 8rpx;
+		border: 1px solid #F03B3B;
+		height: 38rpx;
+		line-height: 38rpx;
+		padding:2rpx 12rpx;
+		margin-left: 4rpx;
 	}
 	.startPointTitle{
 		color: #666666;line-height: 40rpx;font-size: 28rpx;
+		width: 120rpx;
 	}
 	.shopGhTitle{
 		font-size: 30rpx;color: #333333;padding: 24rpx;

+ 11 - 0
pages/wyCar/apply.vue

@@ -110,6 +110,17 @@
 		},
 		methods: {
 			submit(){
+				  var regex = /(^[安京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([A-HJ-NP-Z0-9]{5})|([A-HJ-NP-Z0-9]{6}))$)|(^[安京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-HJ-NP-Z0-9]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$)/u;
+				  if (regex.test(this.plateNumber)) {
+				        
+				} else {
+				       uni.showToast({
+				       	title: '请输入正确车牌号',
+				       	icon: 'none',
+				       	duration: 3000
+				       });
+					   return false;
+				}
 				uni.showLoading({
 					title: '加载中'
 				});

+ 5 - 2
utils/request.js

@@ -1,12 +1,15 @@
 //测试地址
-//const baseUrl = 'http://api.dms.66km.com.cn/'
+const baseUrl = 'http://api.dms.66km.com.cn/'
 //const baseUrl = 'http://dms.66km.com.cn/'
 //const baseUrl = 'http://192.168.0.146:20187/'
 //const baseUrl = 'http://syadmin.66km.com/'
 //正式地址-66
-const baseUrl = 'http://apidms.66km.com/'
+//const baseUrl = 'http://apidms.66km.com/'
 //欧洲维修
 //const baseUrl = 'https://crm.eurorepar.cn/'
+//安徒生
+//const baseUrl = 'http://dms-api.lhrhy.cn/'
+//const baseUrl = '//store-api.qdbtl.cn/'
 import $store from '../store'
 
 const http = (url = '', date = {}, type = 'POST', header = {