Bladeren bron

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun-app

gjy 2 jaren geleden
bovenliggende
commit
4caa2043e5
49 gewijzigde bestanden met toevoegingen van 1849 en 2588 verwijderingen
  1. 21 18
      .hbuilderx/launch.json
  2. 108 102
      App.vue
  3. 53 0
      common/helper.js
  4. 31 20
      components/bert-suggest/suggest.vue
  5. 44 36
      components/upload.vue
  6. 2 2
      config/index.js
  7. 16 13
      main.js
  8. 8 10
      manifest.json
  9. 44 54
      pages.json
  10. 1 1
      pages/goodSource/cargoOwnerSee.vue
  11. 54 43
      pages/goodSource/index.vue
  12. 1 0
      pages/goodSource/shippingDetails.vue
  13. 0 213
      pages/mine/camera/camera.nvue
  14. 0 246
      pages/mine/camera/idcard/idcard.nvue
  15. 0 246
      pages/mine/camera/idcard/idphoto.nvue
  16. 0 214
      pages/mine/camera/portrait/portrait.nvue
  17. 0 228
      pages/mine/camera/watermark/watermark.nvue
  18. 29 23
      pages/mine/driverCertification.vue
  19. 205 190
      pages/mine/driverCertificationNext.vue
  20. 108 94
      pages/mine/editDriverCertification.vue
  21. 195 175
      pages/mine/editDriverCertificationNext.vue
  22. 5 3
      pages/mine/fleet/carCaptainAuthentication.vue
  23. 4 2
      pages/mine/manageBankCards/addBankCard.vue
  24. 7 6
      pages/mine/manageBankCards/editBankCard.vue
  25. 4 2
      pages/mine/manageVehicles/addVehicle.vue
  26. 381 359
      pages/mine/manageVehicles/editVehicle.vue
  27. 31 30
      pages/mine/settings/editAvatar.vue
  28. 5 4
      pages/news/index.vue
  29. 211 169
      pages/order/confirmLoading.vue
  30. 207 83
      pages/order/confirmUnloading.vue
  31. 2 2
      pages/public/register.vue
  32. BIN
      unpackage/res/icons/1024x1024.png
  33. BIN
      unpackage/res/icons/120x120.png
  34. BIN
      unpackage/res/icons/144x144.png
  35. BIN
      unpackage/res/icons/152x152.png
  36. BIN
      unpackage/res/icons/167x167.png
  37. BIN
      unpackage/res/icons/180x180.png
  38. BIN
      unpackage/res/icons/192x192.png
  39. BIN
      unpackage/res/icons/20x20.png
  40. BIN
      unpackage/res/icons/29x29.png
  41. BIN
      unpackage/res/icons/40x40.png
  42. BIN
      unpackage/res/icons/58x58.png
  43. BIN
      unpackage/res/icons/60x60.png
  44. BIN
      unpackage/res/icons/72x72.png
  45. BIN
      unpackage/res/icons/76x76.png
  46. BIN
      unpackage/res/icons/80x80.png
  47. BIN
      unpackage/res/icons/87x87.png
  48. BIN
      unpackage/res/icons/96x96.png
  49. 72 0
      util/dw.js

+ 21 - 18
.hbuilderx/launch.json

@@ -1,20 +1,23 @@
-{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
-  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
-    "version": "0.0",
-    "configurations": [{
-     	"app-plus" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"default" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"h5" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"type" : "uniCloud"
-     }
+{
+    // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+    // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version" : "0.0",
+    "configurations" : [
+        {
+            "app-plus" : {
+                "launchtype" : "local"
+            },
+            "default" : {
+                "launchtype" : "local"
+            },
+            "h5" : {
+                "launchtype" : "local"
+            },
+            "type" : "uniCloud"
+        },
+        {
+            "playground" : "custom",
+            "type" : "uni-app:app-android"
+        }
     ]
 }

+ 108 - 102
App.vue

@@ -43,8 +43,8 @@
 				appSecurity: "", //网络货运企业在省平台申请的接入安全码
 				enterpriseSenderCode: "", //网络货运企业在省平台申请的企业发送代码
 				environment: "", //环境:“debug”接入测试环境,“release”接入正式环境。
-				version: "" ,// 版本号
-				id:""
+				version: "", // 版本号
+				id: ""
 			}
 		},
 		methods: {
@@ -304,113 +304,119 @@
 					if (res1.data.length > 0) {
 						this.shippingNoteInfos[0].shippingNoteNumber = res1.data[0].orderNo //运单号
 						this.shippingNoteInfos[0].serialNumber = "0000" //分单号
-						this.shippingNoteInfos[0].startCountrySubdivisionCode = res1.data[0].sendAdCode //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-						this.shippingNoteInfos[0].endCountrySubdivisionCode = res1.data[0].unsendAdCode //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-						this.shippingNoteInfos[0].startLongitude = res1.data[0].sendLongitude //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-						this.shippingNoteInfos[0].startLatitude = res1.data[0].sendLatitude //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-						this.shippingNoteInfos[0].endLongitude = res1.data[0].unsendLongitude //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-						this.shippingNoteInfos[0].endLatitude = res1.data[0].unsendLatitude //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-						this.shippingNoteInfos[0].driverName = res1.data[0].driverName //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
-						this.shippingNoteInfos[0].vehicleNumber = res1.data[0].carNumber //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
-						this.shippingNoteInfos[0].startLocationText = res1.data[0].sendCity //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-						this.shippingNoteInfos[0].endLocationText = res1.data[0].unloadCity //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].startCountrySubdivisionCode = res1.data[0]
+							.sendAdCode //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+						this.shippingNoteInfos[0].endCountrySubdivisionCode = res1.data[0]
+							.unsendAdCode //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+						this.shippingNoteInfos[0].startLongitude = res1.data[0]
+							.sendLongitude //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].startLatitude = res1.data[0]
+							.sendLatitude //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].endLongitude = res1.data[0]
+							.unsendLongitude //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].endLatitude = res1.data[0]
+							.unsendLatitude //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].driverName = res1.data[0]
+							.driverName //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+						this.shippingNoteInfos[0].vehicleNumber = res1.data[0]
+							.carNumber //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+						this.shippingNoteInfos[0].startLocationText = res1.data[0]
+							.sendCity //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+						this.shippingNoteInfos[0].endLocationText = res1.data[0]
+							.unloadCity //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
 						this.shippingNoteInfos[0].interval = "5000"
 						console.log("查看参数", this.shippingNoteInfos)
 						// that.auth()
-						that.$helper.fUN_AmapLocation.start({
-								// intervalTime: 1000 * 60,
-								intervalTime: 5000,
-								// locationCacheEnable:true,
-								isReport: false
-								// url: 'http://192.168.0.66/fun/open/test_json.do',
-								// params: {
-								// 	a: 1,
-								// 	B: '测试',
-								// 	c: true
-								// },
-								// headers: {
-								// 	a: '123',
-								// 	B: 'abcd'
-								// }
-							},
-							res => {
-								// console.log('====确认装车开启连续定位====');
-								// console.log(res)
-								that.id = res1.data[0].id
-								let _data = {
-									orderId: res1.data[0].id,
-									longitude: res.longitude,
-									latitude: res.latitude,
-									province: res.province,
-									city: res.city,
-									area: res.district
-								}
-								this.$helper.gjList.push(_data)
-								uni.setStorageSync('mapGJ', this.$helper.gjList);
-								// console.log('this.$helper.gjList')
-								// console.log(this.$helper.gjList)
-								// console.log("条数", uni.getStorageSync('mapGJ').length)
-								if (uni.getStorageSync('mapGJ').length > 100) {
-									// console.log(JSON.stringify(uni.getStorageSync('mapGJ')))
-									this.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo', {
-											orderId: that.id,
-											// orderId: "cdae6ec34c2349768c490a9fefa03fb3",
-											longitudeLatitude: JSON.stringify(uni.getStorageSync(
-												'mapGJ'))
-										}).then(res => {
-											uni.removeStorageSync('mapGJ');
-											this.$helper.gjList = []
-										})
-										.catch(res => {
-											uni.$u.toast(res.message);
-										});
-								}
-								//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
+						//判断有没有定位权限  有权限 定位 没权限不操作
+						let system = uni.getSystemInfoSync(); // 获取系统信息
+						if (system.platform === 'android') { // 判断平台
+							var context = plus.android.importClass("android.content.Context");
+							var locationManager = plus.android.importClass("android.location.LocationManager");
+							var main = plus.android.runtimeMainActivity();
+							var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+							if (mainSvr) {
+								that.$helper.fUN_AmapLocation.start({
+										intervalTime: 60000,
+										isReport: false
+									},
+									res => {
+										that.id = res1.data[0].id
+										let _data = {
+											orderId: res1.data[0].id,
+											longitude: res.longitude,
+											latitude: res.latitude,
+											province: res.province,
+											city: res.city,
+											area: res.district
+										}
+										this.$helper.gjList.push(_data)
+										uni.setStorageSync('mapGJ', this.$helper.gjList);
+										if (uni.getStorageSync('mapGJ').length > 100) {
+											this.$request.baseRequest('post',
+													'/hyOrderTravelPath/api/addInfo', {
+														orderId: that.id,
+														// orderId: "cdae6ec34c2349768c490a9fefa03fb3",
+														longitudeLatitude: JSON.stringify(uni
+															.getStorageSync(
+																'mapGJ'))
+													}).then(res => {
+													uni.removeStorageSync('mapGJ');
+													this.$helper.gjList = []
+												})
+												.catch(res => {
+													uni.$u.toast(res.message);
+												});
+										}
+									}
+								);
 							}
-						);
+						} else if (system.platform === 'ios') {
+							// console.log("苹果");
+							var cllocationManger = plus.ios.import("CLLocationManager");
+							var enable = cllocationManger.locationServicesEnabled();
+							var status = cllocationManger.authorizationStatus();
+							plus.ios.deleteObject(cllocationManger);
+							if (enable && status != 2) {
+								that.$helper.fUN_AmapLocation.start({
+										intervalTime: 60000,
+										isReport: false
+									},
+									res => {
+										that.id = res1.data[0].id
+										let _data = {
+											orderId: res1.data[0].id,
+											longitude: res.longitude,
+											latitude: res.latitude,
+											province: res.province,
+											city: res.city,
+											area: res.district
+										}
+										this.$helper.gjList.push(_data)
+										uni.setStorageSync('mapGJ', this.$helper.gjList);
+										if (uni.getStorageSync('mapGJ').length > 100) {
+											this.$request.baseRequest('post',
+													'/hyOrderTravelPath/api/addInfo', {
+														orderId: that.id,
+														longitudeLatitude: JSON.stringify(uni
+															.getStorageSync(
+																'mapGJ'))
+													}).then(res => {
+													uni.removeStorageSync('mapGJ');
+													this.$helper.gjList = []
+												})
+												.catch(res => {
+													uni.$u.toast(res.message);
+												});
+										}
+									}
+								);
+
+							}
+						}
 					}
 				})
 			}
-			// this.$helper.fUN_AmapLocation.stop({}, result => {
-			// 	console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
-			// 	this.$helper.fUN_AmapLocation.start(
-			// 		{
-			// 			intervalTime: 1000*60,
-			// 			isReport: true,
-			// 			reportInterval: 5,
-			// 			url: 'http://192.168.0.66/fun/open/test_json.do',
-			// 			params: { a: 1, B: '测试', c: true },
-			// 			headers: { a: '123', B: 'abcd' }
-			// 		},
-			// 		res => {
-			// 			//见下方定位返回示例
-			// 			console.log('====确认装车开启连续定位====', JSON.stringify(res));
-			// 			//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
-			// 		}
-			// 	); 
-			// });
 
-			// fUN_AmapLocation.permission({}, result => {
-			//     console.log('====fUN_AmapLocation定位====');
-			// });
-			// fUN_AmapLocation.hasLocationPermissions(function(result) {
-			//     console.log('====fUN_AmapLocation定位权限===='+ result)
-			// });
-			// startLocation与start均可
-			// this.$helper.fUN_AmapLocation.start(
-			// 	{
-			// 		intervalTime: 1000*10,
-			// 		isReport: false,
-			// 	},
-			// 	result => {
-			// 		//见下方定位返回示例
-			// 		console.log('====fUN_AmapLocation定位====', JSON.stringify(result));
-			// 	}
-			// ); 
-
-			// let  isOpenLocation= permision.checkSystemEnableLocation() 
-			// console.log("isOpenLocation",isOpenLocation)
-			// this.requestAndroidPermission('android.permission.ACCESS_FINE_LOCATION')
 			let type = uni.getSystemInfoSync().platform
 			if (type == "android") {
 				// appUpdate()
@@ -510,7 +516,7 @@
 			// var isContains = true;//隐私权政策是否包含高德开平隐私权政策  true是包含
 			// var isShow = true;//隐私权政策是否弹窗展示告知用户 true是展示 
 			// sdkwx.updatePrivacyShow(isContains, isShow);
-			
+
 			// var isAgree = true;//隐私权政策是否取得用户同意  true是用户同意
 			// sdkwx.updatePrivacyAgree(isAgree);
 			// //检查定位权限

+ 53 - 0
common/helper.js

@@ -435,6 +435,58 @@ const changeTime = (t1) => {
 		}
 	}
 }
+const formatLocation = (str) => {
+	let area = {}
+	let index11 = 0
+	let index1 = str.indexOf("省")
+	if (index1 == -1) {
+		index11 = str.indexOf("自治区")
+		if (index11 != -1) {
+			area.Province = str.substring(0, index11 + 3)
+		} else {
+			area.Province = str.substring(0, 0)
+		}
+	} else {
+		area.Province = str.substring(0, index1 + 1)
+	}
+
+	let index2 = str.indexOf("市")
+	if (index11 == -1) {
+		area.City = str.substring(index11 + 1, index2 + 1)
+	} else {
+		if (index11 == 0) {
+			area.City = str.substring(index1 + 1, index2 + 1)
+		} else {
+			area.City = str.substring(index11 + 3, index2 + 1)
+		}
+	}
+
+	let index3 = str.indexOf("区")
+	if (index3 == -1) {
+		index3 = str.indexOf("县")
+		if (index3 == -1) {
+			index3 = str.lastIndexOf("市")
+			if (index3 == -1) {
+				index3 = str.indexOf("镇")
+				if (index3 == -1) {
+
+				} else {
+					area.Country = str.substring(index2 + 1, index3 + 1)
+
+				}
+			} else {
+				area.Country = str.substring(index2 + 1, index3 + 1)
+			}
+		} else {
+			area.Country = str.substring(index2 + 1, index3 + 1)
+		}
+
+	} else {
+		area.Country = str.substring(index2 + 1, index3 + 1)
+	}
+	area.Village = str.substring(index3 + 1, str.length)
+	return area;
+}
 //获取省份简称
 const getProvinceAbbreviation = (province) => {
 	if (province == "北京市" || province == "北京")
@@ -519,6 +571,7 @@ export default {
 	periodOfValidity,
 	sdkAuth,
 	getProvinceAbbreviation,
+	formatLocation,
 	filterUrban,
 	filterArea,
 	sdkStart,

+ 31 - 20
components/bert-suggest/suggest.vue

@@ -1,15 +1,16 @@
 <template>
 	<view>
 		<view style='background:#fff;margin:20px 10px 10px;border-radius:10px;'>
-			<uni-card class="box" :isFull="true" title="反馈意见" >
+			<uni-card class="box" :isFull="true" title="反馈意见">
 				<textarea v-model="data.content" placeholder="您的反馈对我们非常重要,请在此输入。"></textarea>
-				<view style='position:absolute;right:22px;bottom:16px;font-size:13px;'>{{data.content.length}}/150个字</view>
+				<view style='position:absolute;right:22px;bottom:16px;font-size:13px;'>{{data.content.length}}/150个字
+				</view>
 			</uni-card>
-			<uni-card class="box contact" :isFull="true" title="联系方式" >
+			<uni-card class="box contact" :isFull="true" title="联系方式">
 				<input v-model="data.contact" placeholder="请输入您的手机号,方便我们联系您" maxlength="11" type="number" />
 			</uni-card>
 		</view>
-		
+
 		<button class="submit-btn" @click="submit">提交</button>
 	</view>
 </template>
@@ -17,7 +18,7 @@
 <script>
 	import uniCard from '@/components/uni-card/uni-card.vue';
 	export default {
-		components:{
+		components: {
 			uniCard
 		},
 		data() {
@@ -36,7 +37,7 @@
 			chooseImage() {
 				let _self = this;
 				uni.chooseImage({
-					sizeType: ['compressed', 'original'],
+					sizeType: ['compressed'],
 					sourceType: ['album', 'camera'],
 					success: function(res) {
 						_self.data.imgList = _self.data.imgList.concat(res.tempFiles)
@@ -67,6 +68,7 @@
 		margin-bottom: 10rpx;
 		position: relative;
 	}
+
 	.imgs {
 		position: relative;
 		display: inline-flex;
@@ -74,48 +76,57 @@
 		margin: 10rpx;
 		width: 150rpx;
 		height: 150rpx;
+
 		.img {
 			width: 100%;
 			height: 100%;
 			border-radius: 10rpx;
 			border: 1rpx solid #ebebeb;
 		}
+
 		.remove {
 			line-height: 30rpx;
 			text-align: center;
 			border-radius: 10rpx;
 			position: absolute;
-			right: 0rpx;	
+			right: 0rpx;
 			top: 0rpx;
 			width: 30rpx;
 			height: 30rpx;
 			font-weight: bold;
 			background-color: #e53c25;
 		}
+
 		.add-img {
 			background-color: #f0f0f0;
 		}
 	}
+
 	.submit-btn {
 		background-color: #2772FB;
-		color:#fff;
-		border-radius:30px;
+		color: #fff;
+		border-radius: 30px;
 		margin: 20rpx;
-		margin-top:30px;
+		margin-top: 30px;
 	}
-	textarea,input{
-		background:#F9F9FA;
+
+	textarea,
+	input {
+		background: #F9F9FA;
 		border: 1px solid #eee;
 	}
-	textarea{
-		margin:0 auto;
-		padding:10px;
-		font-size:14px;
+
+	textarea {
+		margin: 0 auto;
+		padding: 10px;
+		font-size: 14px;
 	}
-	input{
-		padding:20px;
+
+	input {
+		padding: 20px;
 	}
-	.contact{
-		padding-bottom:20px;
+
+	.contact {
+		padding-bottom: 20px;
 	}
 </style>

+ 44 - 36
components/upload.vue

@@ -10,7 +10,8 @@
 				}">
 				<u-icon class="u-icon" :name="delIcon" :size="delIconSize" :color="delColor"></u-icon>
 			</view>
-			<view v-if="showProgress && item.progress > 0 && !item.error" class="u-check-icon" @tap.stop="deleteItem(index)" :style="{
+			<view v-if="showProgress && item.progress > 0 && !item.error" class="u-check-icon"
+				@tap.stop="deleteItem(index)" :style="{
 					background: checkBgColor,
 				}">
 				<u-icon class="u-icon" :name="checkIcon" :size="checkIconSize" :color="checkColor"></u-icon>
@@ -25,21 +26,22 @@
 		<view style="display: inline-block;" :style="{
 			background:custom?customBack:'transparent',
 			border:custom?customBorder:'1px solid transparent'
-		}" :class="custom?'customStyle':'default'"
-			@tap="selectFile" v-if="maxCount > lists.length">
+		}" :class="custom?'customStyle':'default'" @tap="selectFile" v-if="maxCount > lists.length">
 			<slot name="addBtn"></slot>
 			<img v-if="custom&&options.bgc!=''" :src="options.bgc" alt="" class="imgstyle">
 			<view class="u-list-item u-add-wrap" hover-class="u-add-wrap__hover" hover-stay-time="150" :style="{
 					width: width + 'rpx',
 					height: width + 'rpx'
 				}">
-				<image style='width:23px;height:23px;' v-if="custom&&!customBtn" src="../static/images/tianjiazhaopian.png" mode=""></image>
+				<image style='width:23px;height:23px;' v-if="custom&&!customBtn"
+					src="../static/images/tianjiazhaopian.png" mode=""></image>
 				<!-- <u-icon v-if="custom&&!customBtn" name="camera-fill" class="" size="100" color="#617E8B"></u-icon> -->
 				<image v-if="custom&&customBtn" :style="{
 				width: customBtnWidth + 'px',
 				height: customBtnHeight + 'px'
 			}" :src="customBtnImage" mode=""></image>
-				<image v-if="!custom" style='width:23px;height:23px;' src="../static/images/xiangji-2.png" mode=""></image>
+				<image v-if="!custom" style='width:23px;height:23px;' src="../static/images/xiangji-2.png" mode="">
+				</image>
 				<view v-if="!custom" class="u-add-tips">{{ uploadText }}</view>
 				<view v-if="custom" :style="{
 				color: customBtnColor,
@@ -115,9 +117,9 @@
 			maxCount: {
 				type: [String, Number],
 				default: 52,
-				},
+			},
 			// 删除图标大小
-			delIconSize:{
+			delIconSize: {
 				type: String,
 				default: '20'
 			},
@@ -159,7 +161,7 @@
 			sizeType: {
 				type: Array,
 				default () {
-					return ['original', 'compressed'];
+					return ['compressed'];
 				}
 			},
 			sourceType: {
@@ -169,22 +171,22 @@
 				}
 			},
 			// 成功背景颜色
-			checkBgColor:{
+			checkBgColor: {
 				type: String,
 				default: '#2772FB'
 			},
 			// 成功icon颜色
-			checkColor:{
+			checkColor: {
 				type: String,
 				default: '#fff'
 			},
 			// 成功icon
-			checkIcon:{
+			checkIcon: {
 				type: String,
 				default: 'checkbox-mark'
 			},
 			// 成功icon颜色
-			checkIconSize:{
+			checkIconSize: {
 				type: String,
 				default: '20'
 			},
@@ -251,15 +253,15 @@
 				type: String,
 				default: '#617E8B'
 			},
-			customBack:{
+			customBack: {
 				type: String,
 				default: '#F5F6FA'
 			},
-			customBorder:{
+			customBorder: {
 				type: String,
 				// default: '2px dashed #C6CBCE'
 			},
-			customBtnFontSize:{
+			customBtnFontSize: {
 				type: String,
 				default: '18'
 			},
@@ -301,7 +303,7 @@
 				type: Boolean,
 				default: false
 			},
-			imgIndex:{
+			imgIndex: {
 				type: Number,
 				default: 0
 			}
@@ -313,7 +315,7 @@
 				isInCount: true,
 				uploading: false,
 				isSelectFile: false,
-				imgShow:false,
+				imgShow: false,
 			};
 		},
 		watch: {
@@ -476,11 +478,11 @@
 						this.lists[index].progress = 100;
 						this.lists[index].error = false;
 						let data = result
-						this.$emit('on-success', data, index, this.lists,this.imgIndex);
+						this.$emit('on-success', data, index, this.lists, this.imgIndex);
 						uni.hideLoading();
 						this.uploading = false;
 						this.uploadFile(index + 1);
-						this.$emit('on-change', data, index, this.lists,this.imgIndex);
+						this.$emit('on-change', data, index, this.lists, this.imgIndex);
 					}
 				)
 				// 创建上传对象
@@ -561,11 +563,11 @@
 			},
 			// 预览图片
 			doPreviewImage(url, index) {
-				console.log(this.lists,url,index)
+				console.log(this.lists, url, index)
 				if (!this.previewFullImage) return;
 				const images = this.lists.map(item => item.url || item.path);
-				this.url=url
-				this.imgShow=true
+				this.url = url
+				this.imgShow = true
 				// 图片预览调用onShow清空数据
 				// uni.previewImage({
 				// 	urls: images,
@@ -667,7 +669,7 @@
 		right: 0rpx;
 		z-index: 10;
 		background: rgba(17, 26, 52, 0.5);
-		border-radius:0 0 0 10rpx;
+		border-radius: 0 0 0 10rpx;
 		width: 44rpx;
 		height: 44rpx;
 		display: flex;
@@ -703,6 +705,7 @@
 		z-index: 9;
 		line-height: 1;
 	}
+
 	.customStyleBgc {
 		width: 100% !important;
 		height: 440rpx !important;
@@ -758,27 +761,32 @@
 		height: 440rpx !important;
 		position: absolute;
 	}
-	.default{
-		
-		.u-list-item.u-add-wrap{
-			background:#fff;
-			border:1px dashed #AFB3BF;
+
+	.default {
+
+		.u-list-item.u-add-wrap {
+			background: #fff;
+			border: 1px dashed #AFB3BF;
 		}
 	}
-	.shade{
-		background:#000;
-		position:fixed;
-		top:0;left:0;
-	   width:100%;height:100%;
-	   z-index:10000;
+
+	.shade {
+		background: #000;
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 10000;
 	}
-	.u-check-icon{
+
+	.u-check-icon {
 		position: absolute;
 		bottom: 0rpx;
 		left: 0rpx;
 		z-index: 10;
 		background-color: $u-error;
-		border-radius:0 0 0 10rpx;
+		border-radius: 0 0 0 10rpx;
 		width: 44rpx;
 		height: 44rpx;
 		display: flex;

+ 2 - 2
config/index.js

@@ -11,9 +11,9 @@ const dev = {
 	androidAppSecurity: "24c593b7037347e08857a6ab05fd231b0509f5bb7cb741078f524f506ad32db8", //安卓网络货运企业在省平台申请的接入安全码
 	iosAppSecurity: "b01e4805276646eeb25f0fad91de97a4f32e8c2c0e0d42e5b24cc4737e9f040f", //ios网络货运企业在省平台申请的接入安全码
 	enterpriseSenderCode: "23106960", //网络货运企业在省平台申请的企业发送代码
-	environment: "debug", //环境:“debug”接入测试环境,“release”接入正式环境。
+	environment: "release", //环境:“debug”接入测试环境,“release”接入正式环境。
 }
 
 export function def() {
 	return dev
-}
+}

+ 16 - 13
main.js

@@ -11,7 +11,10 @@ import baseApi from '@/util/base.js'
 import request from '@/util/request.js'
 import utils from '@/util/util.js'
 import webim from 'webim.js';
-import helper from'@/common/helper.js'
+
+import helper from '@/common/helper.js'
+import dw from '@/util/dw.js'
+Vue.prototype.$dw = dw
 // import axios from 'axios'
 // import TabbarView from "./common/TabBarView.js";
 // Vue.prototype.$tabbarView = new TabbarView();
@@ -24,9 +27,9 @@ Vue.prototype.$store = store
 // Vue.prototype.$axios = axios
 
 // import axios from 'axios'
- 
- 
- 
+
+
+
 // // 解决uniapp 适配axios请求,避免报adapter is not a function错误
 // axios.defaults.adapter = config => {
 // 	console.log(config)
@@ -73,8 +76,8 @@ const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')
 Vue.mixin(mpShare)
 // #endif
 const app = new Vue({
-    store,
-    ...App
+	store,
+	...App
 })
 
 // // 引入请求封装
@@ -82,16 +85,16 @@ const app = new Vue({
 
 app.$mount()
 // #ifdef APP-PLUS
-let main = plus.android.runtimeMainActivity(); 
+let main = plus.android.runtimeMainActivity();
 plus.runtime.quit = function() {
-    main.moveTaskToBack(false);
+	main.moveTaskToBack(false);
 };
 
 plus.nativeUI.toast = (function(str) {
-    if (str == '再按一次退出应用') {
+	if (str == '再按一次退出应用') {
 
-        main.moveTaskToBack(false);
-        return false;
-    }
+		main.moveTaskToBack(false);
+		return false;
+	}
 });
-// #endif
+// #endif

+ 8 - 10
manifest.json

@@ -2,8 +2,8 @@
     "name" : "畅运通",
     "appid" : "__UNI__9C76CB6",
     "description" : "",
-    "versionName" : "1.2.2",
-    "versionCode" : 122,
+    "versionName" : "1.2.4",
+    "versionCode" : 124,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -23,7 +23,7 @@
         "modules" : {
             "Geolocation" : {},
             "Maps" : {},
-            "iBeacon" : {}
+            "Camera" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -36,26 +36,22 @@
                     "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
-                    "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
                     "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-permission android:name=\"android.permission.GET_PACKAGE_SIZE\"/>",
+                    "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
                     "<uses-permission android:name=\"android.permission.INTERNET\"/>",
                     "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
-                    "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
-                    "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
-                    "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
-                    "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>"
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                 ],
                 "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ]
             },
@@ -182,3 +178,5 @@
     },
     "vueVersion" : "2"
 }
+/* 5+App特有相关 */
+

+ 44 - 54
pages.json

@@ -63,7 +63,7 @@
 				"navigationBarTextStyle": "white"
 			}
 
-		},{
+		}, {
 			"path": "pages/news/newsSee",
 			"style": {
 				"navigationBarTitleText": "系统消息",
@@ -76,7 +76,7 @@
 				"navigationStyle": "custom"
 			}
 
-		},{
+		}, {
 			"path": "pages/mine/index1",
 			"style": {
 				"navigationBarTitleText": "测试定位",
@@ -120,11 +120,11 @@
 							"text": "\ue7c3",
 							"fontSrc": "/static/addfleet/iconfont.ttf",
 							"fontSize": "22"
-							 // "redDot": "true"
+							// "redDot": "true"
 						}]
 					}
 				}
-		
+
 			}
 		},
 		{
@@ -139,11 +139,11 @@
 							"text": "\ue7c3",
 							"fontSrc": "/static/addfleet/iconfont.ttf",
 							"fontSize": "22"
-							 // "redDot": "true"
+							// "redDot": "true"
 						}]
 					}
 				}
-		
+
 			}
 		},
 		{
@@ -158,11 +158,11 @@
 							"text": "\ue622",
 							"fontSrc": "/static/addfleet/iconfont.ttf",
 							"fontSize": "22"
-							 // "redDot": "true"
+							// "redDot": "true"
 						}]
 					}
 				}
-		
+
 			}
 		},
 		{
@@ -179,7 +179,7 @@
 				"navigationBarTitleText": "举报",
 				"enablePullDownRefresh": false
 			}
-		
+
 		},
 		{
 			"path": "pages/riders/checkPage",
@@ -216,16 +216,16 @@
 							"text": "保存",
 							"fontSrc": "/static/addfleet/iconfont.ttf",
 							"fontSize": "30rpx",
-							 "color": "#2772FB",
-							 "width":"80rpx",
-							 "textAlign":"left",
-							 "fontWeight":"600"
+							"color": "#2772FB",
+							"width": "80rpx",
+							"textAlign": "left",
+							"fontWeight": "600"
 						}]
 					}
 				}
 			}
-		
-		},{
+
+		}, {
 			"path": "pages/riders/noticeSee",
 			"style": {
 				"navigationBarTitleText": "公告详情",
@@ -275,9 +275,9 @@
 							"text": "提交",
 							"fontSrc": "/static/addfleet/iconfont.ttf",
 							"fontSize": "28rpx",
-							 "color": "#2772FB",
-							 "width":"80rpx",
-							 "textAlign":"left"
+							"color": "#2772FB",
+							"width": "80rpx",
+							"textAlign": "left"
 						}]
 					}
 				}
@@ -294,14 +294,14 @@
 							"text": "完成",
 							"fontSrc": "/static/addfleet/iconfont.ttf",
 							"fontSize": "28rpx",
-							 "color": "#2772FB",
-							 "width":"80rpx",
-							 "textAlign":"left"
+							"color": "#2772FB",
+							"width": "80rpx",
+							"textAlign": "left"
 						}]
 					}
 				}
 			}
-		},{
+		}, {
 			"path": "pages/riders/fleetInvitation",
 			"style": {
 				"navigationBarTitleText": "车队邀请",
@@ -371,7 +371,7 @@
 			}
 
 		},
-		
+
 		{
 			"path": "pages/mine/often/addRoute",
 			"style": {
@@ -394,7 +394,7 @@
 				"navigationBarTitleText": "管理车辆",
 				"enablePullDownRefresh": false,
 				"navigationBarBackgroundColor": "white"
-				
+
 			}
 		}, {
 			"path": "pages/mine/manageVehicles/addVehicle",
@@ -432,21 +432,21 @@
 				"enablePullDownRefresh": false
 			}
 
-		},{
+		}, {
 			"path": "pages/mine/fleet/bindingCarCaptain",
 			"style": {
 				"navigationBarTitleText": "绑定车队长",
 				"enablePullDownRefresh": false
-				
+
 			}
-		},{
+		}, {
 			"path": "pages/mine/fleet/addBinding",
 			"style": {
 				"navigationBarTitleText": "绑定",
 				"enablePullDownRefresh": false
-				
+
 			}
-		},{
+		}, {
 			"path": "pages/mine/fleet/fleetManage",
 			"style": {
 				"navigationBarTitleText": "管理车队",
@@ -458,26 +458,26 @@
 							"text": "账单",
 							"fontSrc": "/static/addfleet/iconfont.ttf",
 							"fontSize": "16",
-							 "textAlign":"left"
-							 // "redDot": "true"
+							"textAlign": "left"
+							// "redDot": "true"
 						}]
 					}
 				}
 			}
-		},{
+		}, {
 			"path": "pages/mine/fleet/fleetBill",
 			"style": {
 				"navigationBarTitleText": "账单",
 				"enablePullDownRefresh": false
 			}
-		},{
+		}, {
 			"path": "pages/mine/fleet/carCaptainAuthentication",
 			"style": {
 				"navigationBarTitleText": "车队长认证",
 				"enablePullDownRefresh": false
-				
+
 			}
-		},{
+		}, {
 			"path": "pages/mine/set",
 			"style": {
 				"navigationBarTitleText": "设置",
@@ -494,14 +494,6 @@
 				"navigationBarBackgroundColor": "white"
 			}
 
-		},
-		{
-			"path": "pages/mine/camera/idcard/idcard",
-			"style": {
-				"navigationStyle": "custom",
-				"backgroundColor": "#000000"
-			}
-
 		}, {
 			"path": "pages/goodSource/map",
 			"style": {
@@ -565,7 +557,7 @@
 				"navigationBarTitleText": "选择银行卡",
 				"enablePullDownRefresh": false
 			}
-		},{
+		}, {
 			"path": "pages/goodSource/jb",
 			"style": {
 				"navigationBarTitleText": "举报",
@@ -595,17 +587,15 @@
 				}
 			}
 
+		}, {
+			"path": "pages/mine/fankui",
+			"style": {
+				"navigationBarTitleText": "意见反馈",
+				"enablePullDownRefresh": false
+			}
+
 		}
-	    ,{
-            "path" : "pages/mine/fankui",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "意见反馈",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",

+ 1 - 1
pages/goodSource/cargoOwnerSee.vue

@@ -12,7 +12,7 @@
 						v-show="objectInfo.cargoOwner=='企业货主'">
 					</image>
 				</view>
-				<view class="feedback_css">+关注</view>
+				<!-- <view class="feedback_css">+关注</view> -->
 			</view>
 			<view class="pf-row flex">
 				<view class="flex">

+ 54 - 43
pages/goodSource/index.vue

@@ -1,6 +1,7 @@
 <!-- 货源 -->
 <template>
-	<view @touchend="end" @touchmove="move" :class="{popupShow:isShowAlert}" class="content">
+	<!-- @touchend="end" @touchmove="move" -->
+	<view :class="{popupShow:isShowAlert}" class="content">
 		<!-- 		<fh-no-network></fh-no-network> -->
 		<view class="banner">
 			<image class="banner-img" src="@/static/images/goodSource/banner@2x.png" mode='widthFix'></image>
@@ -222,6 +223,7 @@
 			//          },
 		},
 		onLoad() {
+			that = this
 			this.checkOpenGPSServiceByAndroidIOS()
 		},
 		onHide() {
@@ -243,23 +245,37 @@
 				selectedIconPath: 'static/images/common/dingdan@2x.png'
 			})
 			var that = this
-			setTimeout(() => {
-				// var photol=await permision.checkSystemEnableLocation()
-				if (uni.getStorageSync('confirm_location')) {
-					that.get_localtion_permission()
-				}
-				//获取上一次点击起装卸地
-				if (uni.getStorageSync('fPlaceObj')) {
-					that.startPlace = uni.getStorageSync('fPlaceObj');
-				}
-				if (uni.getStorageSync('sPlaceObj')) {
-					that.endPlace = uni.getStorageSync('sPlaceObj');
-				}
-				that.upCallback({
-					size: 10,
-					num: 1
+			// var photol=await permision.checkSystemEnableLocation()
+			// if (uni.getStorageSync('confirm_location')) {
+			// 	// that.get_localtion_permission()
+			// }
+			//获取上一次点击起装卸地
+			if (uni.getStorageSync('fPlaceObj')) {
+				that.startPlace = uni.getStorageSync('fPlaceObj');
+			} else {
+				that.startPlace.selected = '北京'
+				uni.setStorageSync('fPlaceObj', {
+					fchoosearea: '全部',
+					fchoosecity: '市辖区',
+					fchooseprovince: '北京',
+					selected: '北京'
+				})
+			}
+			if (uni.getStorageSync('sPlaceObj')) {
+				that.endPlace = uni.getStorageSync('sPlaceObj');
+			} else {
+				that.endPlace.selected = '全国';
+				uni.setStorageSync('sPlaceObj', {
+					schoosearea: '请选择区',
+					schoosecity: '请选择市',
+					schooseprovince: '全国',
+					selected: '全国'
 				})
-			}, 1500)
+			}
+			that.upCallback({
+				size: 10,
+				num: 1
+			})
 
 			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
 				reCommonId: this.userInfo.id,
@@ -334,30 +350,12 @@
 			async get_localtion_permission() {
 				var photol = await permision.checkSystemEnableLocation()
 				if (photol == true) {
-					uni.removeStorageSync('confirm_location')
-					// uni.showToast({
-					// 				title: '只有文字弹窗',
-					// 				icon: 'none',    //如果要纯文本,不要icon,将值设为'none'
-					// 				duration: 2000    //持续时间为 2秒
-					// 			})  
 					this.getLngLat()
 				} else {
-					if (uni.getStorageSync('confirm_location')) {
-						uni.removeStorageSync('confirm_location')
-					}
-					uni.setStorageSync('fPlaceObj', {
-						fchoosearea: '全部',
-						fchoosecity: '市辖区',
-						fchooseprovince: '北京',
-						selected: '东城'
-					})
-					uni.setStorageSync('sPlaceObj', {
-						schoosearea: '请选择区',
-						schoosecity: '请选择市',
-						schooseprovince: '全国',
-						selected: '全国'
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "未获取定位权限!",
 					})
-					uni.setStorageSync('longitudeAndLatitude', '116.3972,39.9096')
 				}
 			},
 			async getLngLat() {
@@ -391,6 +389,10 @@
 								selected: '全国'
 							})
 							uni.setStorageSync('longitudeAndLatitude', res.longitude + ',' + res.latitude)
+							that.upCallback({
+								size: 10,
+								num: 1
+							})
 						}
 					}
 				})
@@ -952,12 +954,21 @@
 						this.mescroll.endErr();
 					});
 			},
-			clickTab(val) {
+			async clickTab(val) {
+				console.log("val", val)
 				this.tabIndex = val.index
-				this.upCallback({
-					size: 10,
-					num: 1,
-				})
+				if (val == '按距离') {
+					var photol = await permision.checkSystemEnableLocation()
+					if (uni.getStorageSync('confirm_location')) {
+						that.get_localtion_permission()
+					}
+				} else {
+					this.upCallback({
+						size: 10,
+						num: 1,
+					})
+				}
+
 			},
 			changeCity() {
 				if (this.endPlace.selected == '全国') {

+ 1 - 0
pages/goodSource/shippingDetails.vue

@@ -122,6 +122,7 @@
 				</view>
 				<view class="flex align-center">
 					<view class="left">车型</view>
+					<!-- carModel -->
 					<view v-if='carLength!=""&&carType!="不限"&&carWeight!=""' class="right">
 						{{carLength}} |
 						<text v-if='carType!="不限"'> {{carType}} </text>

+ 0 - 213
pages/mine/camera/camera.nvue

@@ -1,213 +0,0 @@
-<template>
-	<view class="live-camera" :style="{ width: windowWidth, height: windowHeight }">
-		<live-pusher
-			id="livePusher"
-			ref="livePusher"
-			class="livePusher"
-			mode="FHD"
-			beauty="0"
-			whiteness="0"
-			:aspect="aspect"
-			min-bitrate="1000"
-			audio-quality="16KHz"
-			device-position="back"
-			:auto-focus="true"
-			:muted="true"
-			:enable-camera="true"
-			:enable-mic="false"
-			:zoom="false"
-			@statechange="statechange"
-			:style="{ width: windowWidth, height: windowHeight }"
-		></live-pusher>
-
-		<view class="menu">
-			<!--底部菜单区域背景-->
-			<cover-image class="menu-mask" src="/static/live-camera/bar.png"></cover-image>
-
-			<!--返回键-->
-			<cover-image class="menu-back" @tap="back" src="/static/live-camera/back.png"></cover-image>
-
-			<!--快门键-->
-			<cover-image class="menu-snapshot" @tap="snapshot" src="/static/live-camera/shutter.png"></cover-image>
-
-			<!--反转键-->
-			<cover-image class="menu-flip" @tap="flip" src="/static/live-camera/flip.png"></cover-image>
-		</view>
-	</view>
-</template>
-
-<script>
-let _this = null;
-export default {
-	data() {
-		return {
-			poenCarmeInterval:null,//打开相机的轮询
-			aspect: '2:3', //比例
-			windowWidth: '', //屏幕可用宽度
-			windowHeight: '', //屏幕可用高度
-			camerastate: false, //相机准备好了
-			livePusher: null, //流视频对象
-			snapshotsrc: null //快照
-		};
-	},
-	onLoad(e) {
-		_this = this;
-		this.initCamera();
-	},
-	onReady() {
-		this.livePusher = uni.createLivePusherContext('livePusher', this);
-		this.startPreview(); //开启预览并设置摄像头
-		this.poenCarme();
-	},
-	methods: {
-		
-		//轮询打开
-		poenCarme(){
-			//#ifdef APP-PLUS
-			if (plus.os.name == 'Android') {
-				this.poenCarmeInterval = setInterval(function() {
-					console.log(_this.camerastate);
-					if (!_this.camerastate) _this.startPreview();
-				}, 2500);
-			}
-			//#endif
-		},
-		//初始化相机
-		initCamera() {
-			uni.getSystemInfo({
-				success: function(res) {
-					_this.windowWidth = res.windowWidth;
-					_this.windowHeight = res.windowHeight;
-					let zcs = _this.aliquot(_this.windowWidth,_this.windowHeight);
-					_this.aspect = (_this.windowWidth/zcs)+':'+(_this.windowHeight/zcs);
-					console.log('画面比例:'+_this.aspect);
-				}
-			});
-		},
-		
-		//整除数计算
-		aliquot(x, y) {
-			if (x % y == 0) return y;
-			return this.aliquot(y, x % y);
-		},
-
-		//开始预览
-		startPreview() {
-			this.livePusher.startPreview({
-				success: a => {
-					console.log(a)
-				}
-			});
-		},
-		
-		//停止预览
-		stopPreview() {
-			this.livePusher.stopPreview({
-				success: a => {
-					_this.camerastate = false; //标记相机未启动
-				}
-			});
-		},
-		
-		//状态
-		statechange(e) {
-			//状态改变
-			console.log(e);
-			if (e.detail.code == 1007) {
-				_this.camerastate = true;
-			} else if (e.detail.code == -1301) {
-				_this.camerastate = false;
-			}
-		},
-		
-
-		//返回
-		back() {
-			uni.navigateBack();
-		},
-
-		//抓拍
-		snapshot() {
-			//震动
-			uni.vibrateShort({
-			    success: function () {
-			        console.log('success');
-			    }
-			});
-			//拍照
-			this.livePusher.snapshot({
-				success: e => {
-					_this.snapshotsrc = e.message.tempImagePath;
-					_this.stopPreview();
-					_this.setImage();
-					uni.navigateBack();
-				}
-			});
-		},
-
-		//反转
-		flip() {
-			this.livePusher.switchCamera();
-		},
-
-		//设置
-		setImage() {
-			let pages = getCurrentPages();
-			let prevPage = pages[pages.length - 2]; //上一个页面
-
-			//直接调用上一个页面的setImage()方法,把数据存到上一个页面中去
-			prevPage.$vm.setImage({ path: _this.snapshotsrc });
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.live-camera {
-	justify-content: center;
-	align-items: center;
-	.menu {
-		position: absolute;
-		left: 0;
-		bottom: 0;
-		width: 750rpx;
-		height: 180rpx;
-		z-index: 98;
-		align-items: center;
-		justify-content: center;
-		.menu-mask {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			width: 750rpx;
-			height: 180rpx;
-			z-index: 98;
-		}
-		.menu-back {
-			position: absolute;
-			left: 30rpx;
-			bottom: 50rpx;
-			width: 80rpx;
-			height: 80rpx;
-			z-index: 99;
-			align-items: center;
-			justify-content: center;
-		}
-		.menu-snapshot {
-			width: 130rpx;
-			height: 130rpx;
-			z-index: 99;
-		}
-		.menu-flip {
-			position: absolute;
-			right: 30rpx;
-			bottom: 50rpx;
-			width: 80rpx;
-			height: 80rpx;
-			z-index: 99;
-			align-items: center;
-			justify-content: center;
-		}
-	}
-}
-</style>

+ 0 - 246
pages/mine/camera/idcard/idcard.nvue

@@ -1,246 +0,0 @@
-<template>
-	<view class="live-camera" :style="{ width: windowWidth, height: windowHeight }">
-		<view class="preview" :style="{ width: windowWidth, height: windowHeight - 80 }">
-			<live-pusher id="livePusher" ref="livePusher" class="livePusher" mode="FHD" beauty="0" whiteness="0"
-				:aspect="aspect" min-bitrate="1000" audio-quality="16KHz" device-position="back" :auto-focus="true"
-				:muted="true" :enable-camera="true" :enable-mic="false" :zoom="false" @statechange="statechange"
-				:style="{ width: cameraWidth, height: cameraHeight }"></live-pusher>
-
-			<!--提示语-->
-			<cover-view class="remind">
-				<text class="remind-text" style="">{{ message }}</text>
-			</cover-view>
-
-			<!--辅助线-->
-			<cover-view class="outline-box" :style="{ width: windowWidth, height: windowHeight - 80 }">
-				<cover-image class="outline-img" :src="src" style=""></cover-image>
-			</cover-view>
-		</view>
-
-		<view class="menu">
-			<!--底部菜单区域背景-->
-			<cover-image class="menu-mask" src="/static/live-camera/bar.png"></cover-image>
-
-			<!--返回键-->
-			<cover-image class="menu-back" @tap="back" src="/static/live-camera/back.png"></cover-image>
-
-			<!--快门键-->
-			<cover-image class="menu-snapshot" @tap="snapshot" src="/static/live-camera/shutter.png"></cover-image>
-
-			<!--反转键-->
-			<cover-image class="menu-flip" @tap="flip" src="/static/live-camera/flip.png"></cover-image>
-		</view>
-	</view>
-</template>
-
-<script>
-	let _this = null;
-	export default {
-		data() {
-			return {
-				poenCarmeInterval: null, //打开相机的轮询
-				dotype: 'face', //操作类型
-				message: '', //提示
-				aspect: '2:3', //比例
-				cameraWidth: '', //相机画面宽度
-				cameraHeight: '', //相机画面宽度
-				windowWidth: '', //屏幕可用宽度
-				windowHeight: '', //屏幕可用高度
-				camerastate: false, //相机准备好了
-				livePusher: null, //流视频对象
-				snapshotsrc: null //快照
-			};
-		},
-		onLoad(e) {
-			_this = this;
-			this.dotype = e.dotype;
-			if (e.dotype == 'idcardface') {
-				this.src = '/static/live-camera/outline/idcardface1.png';
-			} else if (e.dotype == 'bank') {
-				this.src = '/static/live-camera/outline/idphotoskin1.png'
-			} else {
-				this.src = '/static/live-camera/outline/idcardbadge1.png'
-			}
-			this.initCamera();
-		},
-		onReady() {
-			this.livePusher = uni.createLivePusherContext('livePusher', this);
-			this.startPreview(); //开启预览并设置摄像头
-			this.poenCarme();
-		},
-		methods: {
-			//轮询打开
-			poenCarme() {
-				//#ifdef APP-PLUS
-				if (plus.os.name == 'Android') {
-					this.poenCarmeInterval = setInterval(function() {
-						console.log(_this.camerastate);
-						if (!_this.camerastate) _this.startPreview();
-					}, 2500);
-				}
-				//#endif
-			},
-			//初始化相机
-			initCamera() {
-				//处理安卓手机异步授权问题
-				uni.getSystemInfo({
-					success: function(res) {
-						_this.windowWidth = res.windowWidth;
-						_this.windowHeight = res.windowHeight;
-						_this.cameraWidth = res.windowWidth;
-						_this.cameraHeight = res.windowWidth * 1.5;
-					}
-				});
-			},
-
-			//开始预览
-			startPreview() {
-				this.livePusher.startPreview({
-					success: a => {
-						console.log(a);
-					}
-				});
-			},
-
-			//停止预览
-			stopPreview() {
-				this.livePusher.stopPreview({
-					success: a => {
-						_this.camerastate = false; //标记相机未启动
-					}
-				});
-			},
-
-			//状态
-			statechange(e) {
-				//状态改变
-				console.log(e);
-				if (e.detail.code == 1007) {
-					_this.camerastate = true;
-				} else if (e.detail.code == -1301) {
-					_this.camerastate = false;
-				}
-			},
-
-			//返回
-			back() {
-				uni.navigateBack();
-			},
-
-			//抓拍
-			snapshot() {
-				this.livePusher.snapshot({
-					success: e => {
-						_this.snapshotsrc = e.message.tempImagePath;
-						_this.stopPreview();
-						_this.setImage();
-						uni.navigateBack();
-					}
-				});
-			},
-
-			//反转
-			flip() {
-				this.livePusher.switchCamera();
-			},
-
-			//设置
-			setImage() {
-				let pages = getCurrentPages();
-				let prevPage = pages[pages.length - 2]; //上一个页面
-
-				//直接调用上一个页面的setImage()方法,把数据存到上一个页面中去
-				prevPage.$vm.setImage({
-					path: _this.snapshotsrc,
-					dotype: this.dotype
-				});
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	.live-camera {
-		.preview {
-			justify-content: center;
-			align-items: center;
-
-			.outline-box {
-				position: absolute;
-				top: 0;
-				left: 0;
-				bottom: 0;
-				z-index: 99;
-				align-items: center;
-				justify-content: center;
-
-				.outline-img {
-					width: 750rpx;
-					height: 1125rpx;
-				}
-			}
-
-			.remind {
-				position: absolute;
-				top: 880rpx;
-				width: 750rpx;
-				z-index: 100;
-				align-items: center;
-				justify-content: center;
-
-				.remind-text {
-					color: #dddddd;
-					font-weight: bold;
-				}
-			}
-		}
-
-		.menu {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			width: 750rpx;
-			height: 180rpx;
-			z-index: 98;
-			align-items: center;
-			justify-content: center;
-
-			.menu-mask {
-				position: absolute;
-				left: 0;
-				bottom: 0;
-				width: 750rpx;
-				height: 180rpx;
-				z-index: 98;
-			}
-
-			.menu-back {
-				position: absolute;
-				left: 30rpx;
-				bottom: 50rpx;
-				width: 80rpx;
-				height: 80rpx;
-				z-index: 99;
-				align-items: center;
-				justify-content: center;
-			}
-
-			.menu-snapshot {
-				width: 130rpx;
-				height: 130rpx;
-				z-index: 99;
-			}
-
-			.menu-flip {
-				position: absolute;
-				right: 30rpx;
-				bottom: 50rpx;
-				width: 80rpx;
-				height: 80rpx;
-				z-index: 99;
-				align-items: center;
-				justify-content: center;
-			}
-		}
-	}
-</style>

+ 0 - 246
pages/mine/camera/idcard/idphoto.nvue

@@ -1,246 +0,0 @@
-<template>
-	<view class="live-camera" :style="{ width: windowWidth, height: windowHeight }">
-		<view class="preview" :style="{ width: windowWidth, height: windowHeight - 80 }">
-			<live-pusher
-				id="livePusher"
-				ref="livePusher"
-				class="livePusher"
-				mode="FHD"
-				beauty="0"
-				whiteness="0"
-				:aspect="aspect"
-				min-bitrate="1000"
-				audio-quality="16KHz"
-				device-position="back"
-				:auto-focus="true"
-				:muted="true"
-				:enable-camera="true"
-				:enable-mic="false"
-				:zoom="false"
-				@statechange="statechange"
-				:style="{ width: cameraWidth, height: cameraHeight }"
-			></live-pusher>
-
-			<!--提示语-->
-			<cover-view class="remind">
-				<text class="remind-text" style="">{{ message }}</text>
-			</cover-view>
-
-			<!--辅助线-->
-			<cover-view class="outline-box" :style="{ width: windowWidth, height: windowHeight - 80 }">
-				<cover-image
-					class="outline-img"
-					:src="dotype == 'idcardface' ? '/static/live-camera/outline/idcardface1.png' : '/static/live-camera/outline/idcardbadge1.png'"
-					style="width:526rpx;height:696rpx;"
-				></cover-image>
-			</cover-view>
-		</view>
-
-		<view class="menu">
-			<!--底部菜单区域背景-->
-			<cover-image class="menu-mask" src="/static/live-camera/bar.png"></cover-image>
-
-			<!--返回键-->
-			<cover-image class="menu-back" @tap="back" src="/static/live-camera/back.png"></cover-image>
-
-			<!--快门键-->
-			<cover-image class="menu-snapshot" @tap="snapshot" src="/static/live-camera/shutter.png"></cover-image>
-
-			<!--反转键-->
-			<cover-image class="menu-flip" @tap="flip" src="/static/live-camera/flip.png"></cover-image>
-		</view>
-	</view>
-</template>
-
-<script>
-let _this = null;
-export default {
-	data() {
-		return {
-			poenCarmeInterval: null, //打开相机的轮询
-			dotype: 'face', //操作类型
-			message: '', //提示
-			aspect: '2:3', //比例
-			cameraWidth: '', //相机画面宽度
-			cameraHeight: '', //相机画面宽度
-			windowWidth: '', //屏幕可用宽度
-			windowHeight: '', //屏幕可用高度
-			camerastate: false, //相机准备好了
-			livePusher: null, //流视频对象
-			snapshotsrc: null //快照
-		};
-	},
-	onLoad(e) {
-		_this = this;
-		this.dotype = e.dotype;
-		this.initCamera();
-	},
-	onReady() {
-		this.livePusher = uni.createLivePusherContext('livePusher', this);
-		this.startPreview(); //开启预览并设置摄像头
-		this.poenCarme();
-	},
-	methods: {
-		//轮询打开
-		poenCarme() {
-			//#ifdef APP-PLUS
-			if (plus.os.name == 'Android') {
-				this.poenCarmeInterval = setInterval(function() {
-					console.log(_this.camerastate);
-					if (!_this.camerastate) _this.startPreview();
-				}, 2500);
-			}
-			//#endif
-		},
-		//初始化相机
-		initCamera() {
-			//处理安卓手机异步授权问题
-			uni.getSystemInfo({
-				success: function(res) {
-					_this.windowWidth = res.windowWidth;
-					_this.windowHeight = res.windowHeight;
-					_this.cameraWidth = res.windowWidth;
-					_this.cameraHeight = res.windowWidth * 1.5;
-				}
-			});
-		},
-
-		//开始预览
-		startPreview() {
-			this.livePusher.startPreview({
-				success: a => {
-					console.log(a);
-				}
-			});
-		},
-
-		//停止预览
-		stopPreview() {
-			this.livePusher.stopPreview({
-				success: a => {
-					_this.camerastate = false; //标记相机未启动
-				}
-			});
-		},
-
-		//状态
-		statechange(e) {
-			//状态改变
-			console.log(e);
-			if (e.detail.code == 1007) {
-				_this.camerastate = true;
-			} else if (e.detail.code == -1301) {
-				_this.camerastate = false;
-			}
-		},
-
-		//返回
-		back() {
-			uni.navigateBack();
-		},
-
-		//抓拍
-		snapshot() {
-			this.livePusher.snapshot({
-				success: e => {
-					_this.snapshotsrc = e.message.tempImagePath;
-					_this.stopPreview();
-					_this.setImage();
-					uni.navigateBack();
-				}
-			});
-		},
-
-		//反转
-		flip() {
-			this.livePusher.switchCamera();
-		},
-
-		//设置
-		setImage() {
-			let pages = getCurrentPages();
-			let prevPage = pages[pages.length - 2]; //上一个页面
-
-			//直接调用上一个页面的setImage()方法,把数据存到上一个页面中去
-			prevPage.$vm.setImage({ path: _this.snapshotsrc, dotype: this.dotype });
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.live-camera {
-	.preview {
-		justify-content: center;
-		align-items: center;
-		.outline-box {
-			position: absolute;
-			top: 0;
-			left: 0;
-			bottom: 0;
-			z-index: 99;
-			align-items: center;
-			justify-content: center;
-			.outline-img {
-				width: 750rpx;
-				height: 1125rpx;
-			}
-		}
-		.remind {
-			position: absolute;
-			top: 880rpx;
-			width: 750rpx;
-			z-index: 100;
-			align-items: center;
-			justify-content: center;
-			.remind-text {
-				color: #dddddd;
-				font-weight: bold;
-			}
-		}
-	}
-	.menu {
-		position: absolute;
-		left: 0;
-		bottom: 0;
-		width: 750rpx;
-		height: 180rpx;
-		z-index: 98;
-		align-items: center;
-		justify-content: center;
-		.menu-mask {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			width: 750rpx;
-			height: 180rpx;
-			z-index: 98;
-		}
-		.menu-back {
-			position: absolute;
-			left: 30rpx;
-			bottom: 50rpx;
-			width: 80rpx;
-			height: 80rpx;
-			z-index: 99;
-			align-items: center;
-			justify-content: center;
-		}
-		.menu-snapshot {
-			width: 130rpx;
-			height: 130rpx;
-			z-index: 99;
-		}
-		.menu-flip {
-			position: absolute;
-			right: 30rpx;
-			bottom: 50rpx;
-			width: 80rpx;
-			height: 80rpx;
-			z-index: 99;
-			align-items: center;
-			justify-content: center;
-		}
-	}
-}
-</style>

+ 0 - 214
pages/mine/camera/portrait/portrait.nvue

@@ -1,214 +0,0 @@
-<template>
-	<view class="live-camera" :style="{ width: windowWidth, height: windowHeight }">
-		<live-pusher
-			id="livePusher"
-			ref="livePusher"
-			class="livePusher"
-			mode="FHD"
-			beauty="0"
-			whiteness="0"
-			:aspect="aspect"
-			min-bitrate="1000"
-			audio-quality="16KHz"
-			device-position="back"
-			:auto-focus="true"
-			:muted="true"
-			:enable-camera="true"
-			:enable-mic="false"
-			:zoom="false"
-			:style="{ width: windowWidth, height: windowHeight }"
-		></live-pusher>
-
-		<!--提示语-->
-		<cover-view class="remind">
-			<text class="remind-text" style="">{{ message }}</text>
-		</cover-view>
-
-		<!--辅助线-->
-		<cover-view class="outline">
-			<cover-image class="outline" src="/static/live-camera/outline/portrait.png" style=""></cover-image>
-		</cover-view>
-		
-
-		<view class="menu">
-			<!--底部菜单区域背景-->
-			<cover-image class="menu-mask" src="/static/live-camera/bar.png"></cover-image>
-
-			<!--返回键-->
-			<cover-image class="menu-back" @tap="back" src="/static/live-camera/back.png"></cover-image>
-
-			<!--快门键-->
-			<cover-image class="menu-snapshot" @tap="snapshot" src="/static/live-camera/shutter.png"></cover-image>
-
-			<!--反转键-->
-			<cover-image class="menu-flip" @tap="flip" src="/static/live-camera/flip.png"></cover-image>
-		</view>
-	</view>
-</template>
-
-<script>
-let _this = null;
-export default {
-	data() {
-		return {
-			message:'请拍摄苛学加',//提示
-			aspect: '2:3', //比例
-			windowWidth: '', //屏幕可用宽度
-			windowHeight: '', //屏幕可用高度
-			camerastate: false, //相机准备好了
-			livePusher: null, //流视频对象
-			snapshotsrc: null //快照
-		};
-	},
-	onLoad(e) {
-		_this = this;
-		this.initCamera();
-	},
-	onReady() {
-		this.livePusher = uni.createLivePusherContext('livePusher', this);
-		this.startPreview(); //开启预览并设置摄像头
-	},
-	methods: {
-		//初始化相机
-		initCamera() {
-			uni.getSystemInfo({
-				success: function(res) {
-					_this.windowWidth = res.windowWidth;
-					_this.windowHeight = res.windowHeight;
-					let zcs = _this.aliquot(_this.windowWidth, _this.windowHeight);
-					_this.aspect = _this.windowWidth / zcs + ':' + _this.windowHeight / zcs;
-				}
-			});
-		},
-
-		//整除数计算
-		aliquot(x, y) {
-			if (x % y == 0) return y;
-			return this.aliquot(y, x % y);
-		},
-
-		//开始预览
-		startPreview() {
-			this.livePusher.startPreview({
-				success: a => {
-					if (a.errMsg == 'startPreview:ok' || a.errMsg == 'operateLivePusher:ok') {
-						_this.camerastate = true; //标记相机启动成功
-					}
-				}
-			});
-		},
-		//停止预览
-		stopPreview() {
-			this.livePusher.stopPreview({
-				success: a => {
-					_this.camerastate = false; //标记相机未启动
-				}
-			});
-		},
-
-		//返回
-		back() {
-			uni.navigateBack();
-		},
-
-		//抓拍
-		snapshot() {
-			this.livePusher.snapshot({
-				success: e => {
-					_this.snapshotsrc = e.message.tempImagePath;
-					_this.stopPreview();
-					_this.setImage();
-					uni.navigateBack();
-				}
-			});
-		},
-
-		//反转
-		flip() {
-			this.livePusher.switchCamera();
-		},
-
-		//设置
-		setImage() {
-			let pages = getCurrentPages();
-			let prevPage = pages[pages.length - 2]; //上一个页面
-
-			//直接调用上一个页面的setImage()方法,把数据存到上一个页面中去
-			prevPage.$vm.setImage({ path: _this.snapshotsrc });
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.live-camera {
-	justify-content: center;
-	align-items: center;
-	.outline {
-		position: absolute;
-		top: 0;
-		left: 0;
-		bottom: 0;
-		width: 750rpx;
-		height: 1125rpx;
-		z-index: 99;
-		align-items: center;
-		justify-content: center;
-	}
-	.remind {
-		position: absolute;
-		top: 880rpx;
-		width: 750rpx;
-		z-index: 100;
-		align-items: center;
-		justify-content: center;
-		.remind-text {
-			color: #dddddd;
-			font-weight: bold;
-		}
-	}
-	.menu {
-		position: absolute;
-		left: 0;
-		bottom: 0;
-		width: 750rpx;
-		height: 180rpx;
-		z-index: 98;
-		align-items: center;
-		justify-content: center;
-		.menu-mask {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			width: 750rpx;
-			height: 180rpx;
-			z-index: 98;
-		}
-		.menu-back {
-			position: absolute;
-			left: 30rpx;
-			bottom: 50rpx;
-			width: 80rpx;
-			height: 80rpx;
-			z-index: 99;
-			align-items: center;
-			justify-content: center;
-		}
-		.menu-snapshot {
-			width: 130rpx;
-			height: 130rpx;
-			z-index: 99;
-		}
-		.menu-flip {
-			position: absolute;
-			right: 30rpx;
-			bottom: 50rpx;
-			width: 80rpx;
-			height: 80rpx;
-			z-index: 99;
-			align-items: center;
-			justify-content: center;
-		}
-	}
-}
-</style>

+ 0 - 228
pages/mine/camera/watermark/watermark.nvue

@@ -1,228 +0,0 @@
-<template>
-	<view class="live-camera" :style="{ width: windowWidth, height: windowHeight }">
-		<view class="preview" :style="{ width: windowWidth, height: windowHeight}">
-			<live-pusher
-				id="livePusher"
-				ref="livePusher"
-				class="livePusher"
-				mode="FHD"
-				beauty="0"
-				whiteness="0"
-				:aspect="aspect"
-				min-bitrate="1000"
-				audio-quality="16KHz"
-				device-position="back"
-				:auto-focus="true"
-				:muted="true"
-				:enable-camera="true"
-				:enable-mic="false"
-				:zoom="false"
-				@statechange="statechange"
-				:style="{ width: windowWidth, height: windowHeight }"
-			></live-pusher>
-			<!--提示语-->
-			<cover-view class="remind">
-				<text class="remind-text" style="">{{ message }}</text>
-			</cover-view>
-		</view>
-		<view class="menu">
-			<!--底部菜单区域背景-->
-			<cover-image class="menu-mask" src="/static/live-camera/bar.png"></cover-image>
-
-			<!--返回键-->
-			<cover-image class="menu-back" @tap="back" src="/static/live-camera/back.png"></cover-image>
-
-			<!--快门键-->
-			<cover-image class="menu-snapshot" @tap="snapshot" src="/static/live-camera/shutter.png"></cover-image>
-
-			<!--反转键-->
-			<cover-image class="menu-flip" @tap="flip" src="/static/live-camera/flip.png"></cover-image>
-		</view>
-	</view>
-</template>
-
-<script>
-let _this = null;
-export default {
-	data() {
-		return {
-			dotype:'watermark',
-			message:'live-camer',//水印内容
-			poenCarmeInterval: null, //打开相机的轮询
-			aspect: '2:3', //比例
-			windowWidth: '', //屏幕可用宽度
-			windowHeight: '', //屏幕可用高度
-			camerastate: false, //相机准备好了
-			livePusher: null, //流视频对象
-			snapshotsrc: null //快照
-		};
-	},
-	onLoad(e) {
-		_this = this;
-		if (e.dotype != undefined) this.dotype = e.dotype;
-		this.initCamera();
-	},
-	onReady() {
-		this.livePusher = uni.createLivePusherContext('livePusher', this);
-		this.startPreview(); //开启预览并设置摄像头
-		this.poenCarme();
-	},
-	methods: {
-		//轮询打开
-		poenCarme() {
-			//#ifdef APP-PLUS
-			if (plus.os.name == 'Android') {
-				this.poenCarmeInterval = setInterval(function() {
-					console.log(_this.camerastate);
-					if (!_this.camerastate) _this.startPreview();
-				}, 2500);
-			}
-			//#endif
-		},
-		//初始化相机
-		initCamera() {
-			uni.getSystemInfo({
-				success: function(res) {
-					_this.windowWidth = res.windowWidth;
-					_this.windowHeight = res.windowHeight;
-					let zcs = _this.aliquot(_this.windowWidth, _this.windowHeight);
-					_this.aspect = _this.windowWidth / zcs + ':' + _this.windowHeight / zcs;
-					console.log('画面比例:'+_this.aspect);
-				}
-			});
-		},
-
-		//整除数计算
-		aliquot(x, y) {
-			if (x % y == 0) return y;
-			return this.aliquot(y, x % y);
-		},
-
-		//开始预览
-		startPreview() {
-			this.livePusher.startPreview({
-				success: a => {
-					console.log(a);
-				}
-			});
-		},
-
-		//停止预览
-		stopPreview() {
-			this.livePusher.stopPreview({
-				success: a => {
-					_this.camerastate = false; //标记相机未启动
-				}
-			});
-		},
-
-		//状态
-		statechange(e) {
-			//状态改变
-			console.log(e);
-			if (e.detail.code == 1007) {
-				_this.camerastate = true;
-			} else if (e.detail.code == -1301) {
-				_this.camerastate = false;
-			}
-		},
-
-		//返回
-		back() {
-			uni.navigateBack();
-		},
-
-		//抓拍
-		snapshot() {
-			this.livePusher.snapshot({
-				success: e => {
-					_this.snapshotsrc = e.message.tempImagePath;
-					_this.stopPreview();
-					_this.setImage();
-					uni.navigateBack();
-				}
-			});
-		},
-
-		//反转
-		flip() {
-			this.livePusher.switchCamera();
-		},
-
-		//设置
-		setImage() {
-			let pages = getCurrentPages();
-			let prevPage = pages[pages.length - 2]; //上一个页面
-
-			//直接调用上一个页面的setImage()方法,把数据存到上一个页面中去
-			prevPage.$vm.setImage({ path: _this.snapshotsrc , dotype: this.dotype });
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.live-camera {
-	justify-content: center;
-	align-items: center;
-	.preview {
-		justify-content: center;
-		align-items: center;
-		.remind {
-			position: absolute;
-			top: 60rpx;
-			left: 20rpx;
-			width: 130px;
-			z-index: 100;
-			.remind-text {
-				color: #dddddd;
-				font-size: 40rpx;
-				text-shadow: #fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px 0;
-			}
-		}
-	}
-	.menu {
-		position: absolute;
-		left: 0;
-		bottom: 0;
-		width: 750rpx;
-		height: 180rpx;
-		z-index: 98;
-		align-items: center;
-		justify-content: center;
-		.menu-mask {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			width: 750rpx;
-			height: 180rpx;
-			z-index: 98;
-		}
-		.menu-back {
-			position: absolute;
-			left: 30rpx;
-			bottom: 50rpx;
-			width: 80rpx;
-			height: 80rpx;
-			z-index: 99;
-			align-items: center;
-			justify-content: center;
-		}
-		.menu-snapshot {
-			width: 130rpx;
-			height: 130rpx;
-			z-index: 99;
-		}
-		.menu-flip {
-			position: absolute;
-			right: 30rpx;
-			bottom: 50rpx;
-			width: 80rpx;
-			height: 80rpx;
-			z-index: 99;
-			align-items: center;
-			justify-content: center;
-		}
-	}
-}
-</style>

+ 29 - 23
pages/mine/driverCertification.vue

@@ -8,8 +8,7 @@
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
 					<view class="text">上传身份证人像面</view>
 				</view>
-				<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(1)"
-					class="preview-card-img picture">
+				<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(1)" class="preview-card-img picture">
 					<!-- <image class="card-img" :src="dataDetails.cardAddressUrl"></image> -->
 					<view @click.stop="delCard(1)">
 						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
@@ -25,8 +24,7 @@
 					<view class="text">上传身份证国徽面</view>
 				</view>
 
-				<view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(2)"
-					class="preview-card-img picture">
+				<view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(2)" class="preview-card-img picture">
 					<!-- <image class="card-img" :src="dataDetails.cardAddressUrl"></image> -->
 					<view @click.stop="delCard(2)">
 						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
@@ -59,7 +57,9 @@
 				<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
 					@cancel='isShowcardValidity=false' @confirm="confirmValidityPeriod" @change="changeHandler">
 				</u-picker>
-				<itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="status" :periodOfValidity="true" ref="dateEl" :startYear="1999"  :futureYear="30" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+				<itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="status" :periodOfValidity="true"
+					ref="dateEl" :startYear="1999" :futureYear="30" @dateConfirm="confirmValidityPeriod">
+				</itmister-date-picker>
 			</view>
 			<view class="content1 content-other">
 				<view class="flex row">
@@ -221,7 +221,8 @@
 				<view class="flex row flex-space-between">
 					<view class="left-text">银行卡卡号</view>
 					<view class="flex">
-						<u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="item.bankCard" maxlength="19">
+						<u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="item.bankCard"
+							maxlength="19">
 						</u--input>
 					</view>
 				</view>
@@ -242,8 +243,8 @@
 						<!-- <u--input class="select-bankzh" placeholder="选择开户支行" inputAlign='right' border="none"
 							v-model="item.bankDepositBranch">
 						</u--input> -->
-						<view 
-						 :style="{'color':item.bankDepositBranch?'#000':'#C6CBD5'}" style='font-size:15px;text-align:right;' class="select-bankzh point" @click="selectZhbank">
+						<view :style="{'color':item.bankDepositBranch?'#000':'#C6CBD5'}"
+							style='font-size:15px;text-align:right;' class="select-bankzh point" @click="selectZhbank">
 							{{item.bankDepositBranch?item.bankDepositBranch:'选择开户支行'}}
 						</view>
 						<view @click="manualInput" class="type">手动输入</view>
@@ -252,7 +253,8 @@
 				<view class="flex row flex-space-between">
 					<view class="left-text">收款人</view>
 					<view class="flex">
-						<u--input placeholder="自动获取,不可编辑" inputAlign='right' border="none" v-model="item.payeeName" readonly>
+						<u--input placeholder="自动获取,不可编辑" inputAlign='right' border="none" v-model="item.payeeName"
+							readonly>
 						</u--input>
 					</view>
 				</view>
@@ -304,7 +306,7 @@
 					height: 273
 				},
 				tips: '',
-				status:1,
+				status: 1,
 				// refCode: null,
 				seconds: 30,
 				carModelColumns: [
@@ -601,7 +603,7 @@
 				this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
 						driverPhone: this.userInfo.phone,
 					}).then(res => {
-						if (res.data.passOnce==1) {
+						if (res.data.passOnce == 1) {
 							this.isFirstAuthentication = false
 						} else {
 							this.isFirstAuthentication = true
@@ -678,7 +680,7 @@
 			},
 			// 回调参数为包含columnIndex、value、values
 			confirmValidityPeriod(date) {
-					this.dataDetails.cardValidityDate = date.date
+				this.dataDetails.cardValidityDate = date.date
 			},
 			selectValidityPeriod() {
 				this.$refs.dateEl.show()
@@ -713,9 +715,9 @@
 				this.uploadType = type
 				// this.isShowimgType = true
 				// this.imgTypeSelect()
-				if(index >=0){
+				if (index >= 0) {
 					this.index = index
-					this.dataDetails.hyDriverPayeeInfoList[index].bankDepositBranch=''
+					this.dataDetails.hyDriverPayeeInfoList[index].bankDepositBranch = ''
 				}
 				this.imgTypeSelect()
 			},
@@ -725,6 +727,7 @@
 				// console.log(val)
 				uni.chooseImage({
 					count: 1,
+					sizeType: ['compressed'],
 					// sourceType: this.$helper.chooseImage.sourceType,
 					success: function(res) {
 						console.log(JSON.stringify(res.tempFilePaths));
@@ -745,13 +748,15 @@
 												if (res.data) {
 													_this.dataDetails.cardAddress = res.data
 														.recPersonAddr
-													_this.dataDetails.numberCard = res.data.recPersonNo.replace(/\s*/g,"")
-													
-													if(res.data.recPersonNo && res.data.recPersonNo.length == 18){  //自动获取性别
-														let sex = res.data.recPersonNo.substr(-2,1)
-														if(sex % 2 == 0){
+													_this.dataDetails.numberCard = res.data.recPersonNo
+														.replace(/\s*/g, "")
+
+													if (res.data.recPersonNo && res.data.recPersonNo
+														.length == 18) { //自动获取性别
+														let sex = res.data.recPersonNo.substr(-2, 1)
+														if (sex % 2 == 0) {
 															_this.dataDetails.driverSex = "女"
-														}else{
+														} else {
 															_this.dataDetails.driverSex = "男"
 														}
 													}
@@ -808,7 +813,8 @@
 												if (res.data) {
 													if (res.data.bankNo) {
 														_this.dataDetails.hyDriverPayeeInfoList[_this
-															.index].bankCard = res.data.bankNo.replace(/\s*/g,"")
+																.index].bankCard = res.data.bankNo
+															.replace(/\s*/g, "")
 													}
 													if (res.data.bankName) {
 														_this.dataDetails.hyDriverPayeeInfoList[_this
@@ -956,7 +962,7 @@
 									this.$refs.uToast.show({
 										type: 'error',
 										message: res.data.distinguish,
-										duration:4000
+										duration: 4000
 									})
 								} else {
 									uni.$u.route('/pages/mine/driverCertificationNext', {
@@ -976,7 +982,7 @@
 					})
 					return true
 				}
-				
+
 				if (!uni.$u.test.chinese(this.dataDetails.driverName)) {
 					this.$refs.uToast.show({
 						type: 'error',

+ 205 - 190
pages/mine/driverCertificationNext.vue

@@ -3,8 +3,8 @@
 		<view class="top-head"></view>
 		<view class="container">
 			<u-radio-group v-model="radiovalue" iconPlacement="row" class='radio-group'>
-				<u-radio :customStyle="{marginBottom: '8px',marginRight:'4px'}" v-for="(item, index) in radiolist" :key="index"
-					:label="item.name" :name="item.name" @change="radioChange">
+				<u-radio :customStyle="{marginBottom: '8px',marginRight:'4px'}" v-for="(item, index) in radiolist"
+					:key="index" :label="item.name" :name="item.name" @change="radioChange">
 				</u-radio>
 			</u-radio-group>
 			<view class="level1-title">证件信息</view>
@@ -45,7 +45,7 @@
 					</view>
 					<view>~</view>
 					<view style='font-size:12px;' class="" @click="selectValidityPeriod(9)">
-						
+
 						{{dataDetails.driverLicenseValidityDate?dataDetails.driverLicenseValidityDate:'结束时间'}}
 					</view>
 				</view>
@@ -57,7 +57,8 @@
 				</view>
 				<view class="flex row noborder">
 					<view class="left-text">驾驶证发证机关</view>
-					<u--input placeholder="请输入驾驶证发证机关" inputAlign='right' border="none" v-model="dataDetails.lssuingAuthority" >
+					<u--input placeholder="请输入驾驶证发证机关" inputAlign='right' border="none"
+						v-model="dataDetails.lssuingAuthority">
 					</u--input>
 				</view>
 
@@ -83,22 +84,25 @@
 				</view>
 				<view class="flex row ">
 					<view class="left-text">从业资格证号</view>
-					<u--input maxlength='30' placeholder="请输入从业资格证号" inputAlign='right' border="none" v-model="dataDetails.qualificationCertificateNumber">
+					<u--input maxlength='30' placeholder="请输入从业资格证号" inputAlign='right' border="none"
+						v-model="dataDetails.qualificationCertificateNumber">
 					</u--input>
 				</view>
 				<view class="flex row ">
 					<view class="left-text">道路运输经营许可证号</view>
-					<u--input maxlength='30' placeholder="请输入道路运输经营许可证号" inputAlign='right' border="none" v-model="dataDetails.actualCarrierBusinessLicense">
+					<u--input maxlength='30' placeholder="请输入道路运输经营许可证号" inputAlign='right' border="none"
+						v-model="dataDetails.actualCarrierBusinessLicense">
 					</u--input>
 				</view>
 				<view class="flex row noborder">
 					<view class="left-text">通讯地址</view>
-					<u--textarea v-model="dataDetails.postalAddress" border="none"  placeholder="输入通讯地址" autoHeight  maxlength="30"></u--textarea>
+					<u--textarea v-model="dataDetails.postalAddress" border="none" placeholder="输入通讯地址" autoHeight
+						maxlength="30"></u--textarea>
 					<!-- <u--input placeholder="输入通讯地址" inputAlign='right' border="none" v-model="dataDetails.postalAddress"></u--input> -->
 				</view>
-				
+
 			</view>
-			
+
 			<view class="flex service align-center">
 				<u--image @click='consent'
 					:src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
@@ -119,13 +123,11 @@
 			<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 				:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
 			</u-picker> -->
-			<itmister-date-picker :dateStatus="0"
-			ref="datestartEl" :startYear="1980"  :futureYear="10" 
-			@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
-			<itmister-date-picker :overdueContent="overdueContent" :dateStatus="status" 
-			:periodOfValidity="true" 
-			ref="dateEl" :startYear="1980"  :futureYear="10" 
-			@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+			<itmister-date-picker :dateStatus="0" ref="datestartEl" :startYear="1980" :futureYear="10"
+				@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+			<itmister-date-picker :overdueContent="overdueContent" :dateStatus="status" :periodOfValidity="true"
+				ref="dateEl" :startYear="1980" :futureYear="10" @dateConfirm="confirmValidityPeriod">
+			</itmister-date-picker>
 			<u-picker :show="isShowDrive" ref="uPicker" :columns="driveList" @confirm="confirmDriveType"
 				:closeOnClickOverlay='true' @close='isShowDrive=false' @cancel='isShowDrive=false'>
 			</u-picker>
@@ -146,11 +148,13 @@
 				isGCar: true,
 				ValidityPeriodType: '',
 				isShowValidity: false,
-				isShowDrive:false,
-				driveList:[["A2","B2"]],
-				overdueContent:'',
+				isShowDrive: false,
+				driveList: [
+					["A2", "B2"]
+				],
+				overdueContent: '',
 				uploadType: '',
-				status:1,
+				status: 1,
 				isShowimgType: false,
 				dataDetails: {},
 				radiolist: [{
@@ -170,59 +174,59 @@
 			_this = this;
 			console.log(options)
 			this.get_camera_permission()
-			if(options.data){
+			if (options.data) {
 				this.dataDetails = JSON.parse(options.data)
 				this.dataDetails.driverType = 1
 			}
 		},
 		methods: {
 			async get_camera_permission() {
-				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
-				if(photol == false){
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
 					uni.showModal({
 						title: '提示',
 						content: '您已经关闭相册权限,去设置',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 								permision.gotoAppPermissionSetting()
-									            // plus.runtime.openURL("app-settings:");
+								// plus.runtime.openURL("app-settings:");
 							} else if (res.cancel) {
 								console.log('用户点击取消');
 							}
 						}
-					});	
+					});
 				}
 			},
 			delCard(type) {
-			switch (type) {
-				case 1:
-					_this.dataDetails.driverLicenseHomePage = ""
-					break;
-				case 2:
-					_this.dataDetails.driverLicenseBackPage = ""
-					break;
-				case 3:
-					_this.dataDetails.drivingLicenseHomePage = ""
-					break;
-				case 4:
-					_this.dataDetails.drivingLicenseBackPage = ""
-					break;
-				case 5:
-					_this.dataDetails.trailerLicenseHomePage = ""
-					break;
-				case 6:
-					_this.dataDetails.trailerLicenseBackPage = ""
-					break;
-				case 7:
-					_this.dataDetails.qualificationCertificate = ""
-					break;
-				case 8:
-					_this.dataDetails.operationCertificate = ""
-					break;
-				case 9:
-					_this.dataDetails.trailerOperationCertificate = ""
-					break;
-			}
+				switch (type) {
+					case 1:
+						_this.dataDetails.driverLicenseHomePage = ""
+						break;
+					case 2:
+						_this.dataDetails.driverLicenseBackPage = ""
+						break;
+					case 3:
+						_this.dataDetails.drivingLicenseHomePage = ""
+						break;
+					case 4:
+						_this.dataDetails.drivingLicenseBackPage = ""
+						break;
+					case 5:
+						_this.dataDetails.trailerLicenseHomePage = ""
+						break;
+					case 6:
+						_this.dataDetails.trailerLicenseBackPage = ""
+						break;
+					case 7:
+						_this.dataDetails.qualificationCertificate = ""
+						break;
+					case 8:
+						_this.dataDetails.operationCertificate = ""
+						break;
+					case 9:
+						_this.dataDetails.trailerOperationCertificate = ""
+						break;
+				}
 			},
 			consent() {
 				this.consentStatus = !this.consentStatus
@@ -234,53 +238,53 @@
 			validate(data) {},
 			confirmValidityPeriod(date) {
 				console.log('confirm', date)
-					switch (this.ValidityPeriodType) {
-						case 0:
-							this.dataDetails.driverLicenseValidityStartDate = date.date
-							break
-						case 1:
-							this.dataDetails.drivingLicenseValidityDate = date.date 
-							break
-						case 2:
-							this.dataDetails.trailerLicenseValidityDate = date.date
-							break
-						case 3:
-							this.dataDetails.qualificationCertificateValidityDate = date.date 
-							break
-						case 4:
-							this.dataDetails.operationCertificateValidityDate = date.date 
-							break
-						case 5:
-							this.dataDetails.trailerOperationCertificateValidityDate = date.date 
-							break
-						case 9:
-							this.dataDetails.driverLicenseValidityDate = date.date
-							break
-					}
-					this.$forceUpdate()
-				
+				switch (this.ValidityPeriodType) {
+					case 0:
+						this.dataDetails.driverLicenseValidityStartDate = date.date
+						break
+					case 1:
+						this.dataDetails.drivingLicenseValidityDate = date.date
+						break
+					case 2:
+						this.dataDetails.trailerLicenseValidityDate = date.date
+						break
+					case 3:
+						this.dataDetails.qualificationCertificateValidityDate = date.date
+						break
+					case 4:
+						this.dataDetails.operationCertificateValidityDate = date.date
+						break
+					case 5:
+						this.dataDetails.trailerOperationCertificateValidityDate = date.date
+						break
+					case 9:
+						this.dataDetails.driverLicenseValidityDate = date.date
+						break
+				}
+				this.$forceUpdate()
+
 			},
 			selectValidityPeriod(type) {
 				this.ValidityPeriodType = type
-				if(type==0){
+				if (type == 0) {
 					this.$refs.datestartEl.show()
-				}else{
+				} else {
 					switch (this.ValidityPeriodType) {
-					case 3:
-						this.status=0
-						this.overdueContent='从业资格证已过期'
-						break
-					case 9:
-						this.overdueContent='驾驶证已过期'
-						break
+						case 3:
+							this.status = 0
+							this.overdueContent = '从业资格证已过期'
+							break
+						case 9:
+							this.overdueContent = '驾驶证已过期'
+							break
 					}
 					this.$refs.dateEl.show()
 				}
 			},
-			driveType(){
+			driveType() {
 				this.isShowDrive = true
 			},
-			confirmDriveType(e){
+			confirmDriveType(e) {
 				this.dataDetails.quasiDrivingVehicle = e.value[0]
 				this.isShowDrive = false
 			},
@@ -289,85 +293,98 @@
 				// console.log(val)
 				console.log(this.uploadType)
 				// if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						// sourceType: this.$helper.chooseImage.sourceType,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage("images",res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功回调函数
-									console.log('图片地址-----', result)
-									switch (_this.uploadType) {
-										case 1:
-											_this.dataDetails.driverLicenseHomePage = result
-											_this.$request.baseRequest('get',
-													'/driverInfo/api/driverLicenseShibie', {
-														image: result
-													}).then(res => {
-													if (res.data) {
-														let date = res.data.driverEndDate.substr(0,4)+"-"+res.data.driverEndDate.substr(4,2)+"-"+res.data.driverEndDate.substr(6,2)
-														_this.dataDetails.driverLicenseValidityDate = date	
-														if(res.data.allowCar == 'A2' || res.data.allowCar == 'B2'){
-															_this.dataDetails.quasiDrivingVehicle = res.data.allowCar
-														}
-														let sdate = res.data.driverStartDate.substr(0,4)+"-"+res.data.driverStartDate.substr(4,2)+"-"+res.data.driverStartDate.substr(6,2)
-														_this.dataDetails.driverLicenseValidityStartDate = sdate
-														_this.dataDetails.lssuingAuthority = res.data.issuingAuthority
-														_this.$forceUpdate()
-													}
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											break;
-										case 2:
-											_this.dataDetails.driverLicenseBackPage = result
-											break;
-										case 3:
-											_this.dataDetails.drivingLicenseHomePage = result
-											break;
-										case 4:
-											_this.dataDetails.drivingLicenseBackPage = result
-											break;
-										case 5:
-											_this.dataDetails.trailerLicenseHomePage = result
-											break;
-										case 6:
-											_this.dataDetails.trailerLicenseBackPage = result
-											break;
-										case 7:
-											_this.dataDetails.qualificationCertificate = result
-											_this.$request.baseRequest('get',
-													'/driverInfo/api/qualificationLicenseShibie', {
-														image: result
-													}).then(res => {
-													if (res.data&&res.data.qualificationCertificate) {
-														_this.dataDetails.qualificationCertificateValidityDate = res.data.qualificationCertificate
-														// _this.dataDetails.driverLicenseValidityDate =
-														// 	res.data.driverEndDate
-													}
-													if(res.data&&res.data.qualificationCertificateNum){
-														_this.dataDetails.qualificationCertificateNumber = res.data.qualificationCertificateNum.replace(/\s*/g,"")
+				uni.chooseImage({
+					count: 1,
+					sizeType: ['compressed'],
+					// sourceType: this.$helper.chooseImage.sourceType,
+					success: function(res) {
+						console.log(JSON.stringify(res.tempFilePaths));
+						uploadImage("images", res.tempFilePaths[0], 'appData/',
+							result => {
+								// 上传成功回调函数
+								console.log('图片地址-----', result)
+								switch (_this.uploadType) {
+									case 1:
+										_this.dataDetails.driverLicenseHomePage = result
+										_this.$request.baseRequest('get',
+												'/driverInfo/api/driverLicenseShibie', {
+													image: result
+												}).then(res => {
+												if (res.data) {
+													let date = res.data.driverEndDate.substr(0, 4) +
+														"-" + res.data.driverEndDate.substr(4, 2) +
+														"-" + res.data.driverEndDate.substr(6, 2)
+													_this.dataDetails.driverLicenseValidityDate = date
+													if (res.data.allowCar == 'A2' || res.data
+														.allowCar == 'B2') {
+														_this.dataDetails.quasiDrivingVehicle = res
+															.data.allowCar
 													}
+													let sdate = res.data.driverStartDate.substr(0, 4) +
+														"-" + res.data.driverStartDate.substr(4, 2) +
+														"-" + res.data.driverStartDate.substr(6, 2)
+													_this.dataDetails.driverLicenseValidityStartDate =
+														sdate
+													_this.dataDetails.lssuingAuthority = res.data
+														.issuingAuthority
 													_this.$forceUpdate()
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											break;
-										case 8:
-											_this.dataDetails.operationCertificate = result
-											break;
-										case 9:
-											_this.dataDetails.trailerOperationCertificate = result
-											break;
-									}
-									_this.$forceUpdate()
+												}
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break;
+									case 2:
+										_this.dataDetails.driverLicenseBackPage = result
+										break;
+									case 3:
+										_this.dataDetails.drivingLicenseHomePage = result
+										break;
+									case 4:
+										_this.dataDetails.drivingLicenseBackPage = result
+										break;
+									case 5:
+										_this.dataDetails.trailerLicenseHomePage = result
+										break;
+									case 6:
+										_this.dataDetails.trailerLicenseBackPage = result
+										break;
+									case 7:
+										_this.dataDetails.qualificationCertificate = result
+										_this.$request.baseRequest('get',
+												'/driverInfo/api/qualificationLicenseShibie', {
+													image: result
+												}).then(res => {
+												if (res.data && res.data.qualificationCertificate) {
+													_this.dataDetails
+														.qualificationCertificateValidityDate = res
+														.data.qualificationCertificate
+													// _this.dataDetails.driverLicenseValidityDate =
+													// 	res.data.driverEndDate
+												}
+												if (res.data && res.data.qualificationCertificateNum) {
+													_this.dataDetails.qualificationCertificateNumber =
+														res.data.qualificationCertificateNum.replace(
+															/\s*/g, "")
+												}
+												_this.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break;
+									case 8:
+										_this.dataDetails.operationCertificate = result
+										break;
+									case 9:
+										_this.dataDetails.trailerOperationCertificate = result
+										break;
 								}
-							)
-						}
-					});
+								_this.$forceUpdate()
+							}
+						)
+					}
+				});
 
 				// } else {
 
@@ -473,7 +490,7 @@
 				// 		return true
 				// 	}
 				// }
-				
+
 				// if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
 				// 	this.$refs.uToast.show({
 				// 		type: 'error',
@@ -481,7 +498,7 @@
 				// 	})
 				// 	return true
 				// }
-				
+
 				if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificate)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -496,7 +513,7 @@
 					})
 					return true
 				}
-				
+
 				if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificateNumber)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -511,20 +528,15 @@
 				// 	})
 				// 	return true
 				// }
-				// if (this.dataDetails.qualificationCertificateNumber.length !=19 || this.dataDetails.qualificationCertificateNumber.length !=18) {
+
+				// if (this.dataDetails.qualificationCertificateNumber.length != 19 || this.dataDetails
+				// 	.qualificationCertificateNumber.length != 18) {
 				// 	this.$refs.uToast.show({
 				// 		type: 'error',
 				// 		message: "从业资格证号输入错误!",
 				// 	})
 				// 	return true
 				// }
-				if (this.dataDetails.qualificationCertificateNumber.length>19||this.dataDetails.qualificationCertificateNumber.length<18) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "从业资格证号输入错误!",
-					})
-					return true
-				}
 				// if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
 				// 	this.$refs.uToast.show({
 				// 		type: 'error',
@@ -586,11 +598,11 @@
 				return false
 			},
 			btnBClick() {
-							// 此处用法为在js中调用,需要写uni.$u.throttle()
+				// 此处用法为在js中调用,需要写uni.$u.throttle()
 				uni.$u.throttle(this.submit(), 1000)
 			},
 			submit() {
-	
+
 				// 校验
 				if (this.validate()) return
 				// if(this.dataDetails.driverSex=='男'){
@@ -598,7 +610,7 @@
 				// }else{
 				// 	this.dataDetails.driverCall = this.dataDetails.driverCall+'女士'
 				// }
-				if(!this.consentStatus){
+				if (!this.consentStatus) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "请勾选协议!",
@@ -612,7 +624,7 @@
 					title: '加载中'
 				})
 				this.$request.baseRequest('post', '/driverInfo/api/addInfo', this.dataDetails).then(res => {
-						if(res.code==200){
+						if (res.code == 200) {
 							uni.hideLoading()
 							this.$refs.uToast.show({
 								type: 'success',
@@ -624,7 +636,7 @@
 								}
 							})
 							// uni.$u.route('/pages/mine/index');
-						}else{
+						} else {
 							uni.hideLoading()
 							uni.$u.toast(res.message);
 						}
@@ -694,7 +706,7 @@
 	.radio-group {
 		display: flex;
 		align-items: center;
-		
+
 	}
 
 	.level1-title {
@@ -807,14 +819,17 @@
 		height: 80rpx;
 		z-index: 9;
 	}
-	.path{
+
+	.path {
 		color: #2772FB;
 	}
-	/deep/.u-textarea{
-		padding:9px 0;
+
+	/deep/.u-textarea {
+		padding: 9px 0;
 	}
-	/deep/.u-textarea__field{
-		color:#000;
-		text-align:right;
+
+	/deep/.u-textarea__field {
+		color: #000;
+		text-align: right;
 	}
 </style>

+ 108 - 94
pages/mine/editDriverCertification.vue

@@ -22,12 +22,14 @@
 					<u--input placeholder="输入姓氏" class="ch-style" inputAlign='right' border="none"
 						v-model="dataDetails.driverCall" maxlength="1">
 					</u--input>
-					<view style='margin-left:4px;font-size:15px;' class="flex align-center" v-if="dataDetails.driverSex=='男'">先生</view>
+					<view style='margin-left:4px;font-size:15px;' class="flex align-center"
+						v-if="dataDetails.driverSex=='男'">先生</view>
 					<view style='margin-left:4px;font-size:15px;' class="flex align-center" v-else>女士</view>
 				</view>
 				<view class="flex row noborder">
 					<view class="left-text">联系电话</view>
-					<u--input maxlength='11' placeholder="请输入联系电话" inputAlign='right' border="none" v-model="dataDetails.driverPhone">
+					<u--input maxlength='11' placeholder="请输入联系电话" inputAlign='right' border="none"
+						v-model="dataDetails.driverPhone">
 					</u--input>
 				</view>
 				<view class="flex row noborder" v-if="dataDetails.driverPhone!=userInfo.phone">
@@ -46,8 +48,7 @@
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
 					<view class="text">上传身份证人像面</view>
 				</view>
-				<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(1,1)"
-					class="preview-card-img picture">
+				<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(1,1)" class="preview-card-img picture">
 					<view @click.stop="delCard(1)">
 						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
 						</image>
@@ -70,7 +71,8 @@
 				</view>
 				<view class="flex row">
 					<view class="left-text">身份证号</view>
-					<u--input disabled placeholder="请输入身份证号" inputAlign='right' border="none" v-model="dataDetails.numberCard" maxlength="18">
+					<u--input disabled placeholder="请输入身份证号" inputAlign='right' border="none"
+						v-model="dataDetails.numberCard" maxlength="18">
 					</u--input>
 				</view>
 
@@ -82,7 +84,8 @@
 				</view>
 				<view class="flex row noborder">
 					<view class="left-text">身份证地址</view>
-					<u--textarea v-model="dataDetails.cardAddress" border="none"  placeholder="请输入身份证地址" autoHeight  maxlength="30"></u--textarea>
+					<u--textarea v-model="dataDetails.cardAddress" border="none" placeholder="请输入身份证地址" autoHeight
+						maxlength="30"></u--textarea>
 					<!-- <u--input placeholder="请输入身份证地址" inputAlign='right' border="none" > 
 					</u--input>-->
 				</view>
@@ -91,9 +94,8 @@
 				@confirm="confirmValidityPeriod" @change="changeHandler" @cancel='isShowcardValidity= false'>
 			</u-picker>
 			<itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="status" :periodOfValidity="true"
-			 :checkYear="year" :checkMonth="month" :checkDay="day"
-			 ref="dateEl" :startYear="1999"  :futureYear="30" 
-			 @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+				:checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl" :startYear="1999" :futureYear="30"
+				@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 			<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 				@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
 				@close="isShowimgType=false">
@@ -126,13 +128,13 @@
 					width: 188,
 					height: 273
 				},
-				status:1,
+				status: 1,
 				tips: '',
 				// refCode: null,
 				seconds: 30,
-				year:'',
-				month:'',
-				day:'',
+				year: '',
+				month: '',
+				day: '',
 				radiolist1: [{
 						name: '男',
 						disabled: false
@@ -195,20 +197,20 @@
 		},
 		methods: {
 			async get_camera_permission() {
-				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
-				if(photol == false){
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
 					uni.showModal({
 						title: '提示',
 						content: '您已经关闭相册权限,去设置',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 								permision.gotoAppPermissionSetting()
-									            // plus.runtime.openURL("app-settings:");
+								// plus.runtime.openURL("app-settings:");
 							} else if (res.cancel) {
 								console.log('用户点击取消');
 							}
 						}
-					});	
+					});
 				}
 			},
 			changeHandler(e) {
@@ -304,16 +306,16 @@
 				this.dataDetails.cardValidityDate = date.date
 			},
 			selectValidityPeriod() {
-				if(this.dataDetails.cardValidityDate!='长期'){
-					var arr=this.dataDetails.cardValidityDate.split('-')
-					this.year=arr[0]
-					this.month=arr[1]
-					this.day=arr[2]
+				if (this.dataDetails.cardValidityDate != '长期') {
+					var arr = this.dataDetails.cardValidityDate.split('-')
+					this.year = arr[0]
+					this.month = arr[1]
+					this.day = arr[2]
 				}
-				if(this.dataDetails.cardValidityDate=='长期'){
-					this.year='长期'
-					this.month=''
-					this.day=''
+				if (this.dataDetails.cardValidityDate == '长期') {
+					this.year = '长期'
+					this.month = ''
+					this.day = ''
 				}
 				this.$refs.dateEl.show()
 			},
@@ -350,7 +352,7 @@
 
 			},
 			delCard(type) {
-				var _this=this
+				var _this = this
 				switch (type) {
 					case 1:
 						_this.dataDetails.cardAddressUrl = ""
@@ -365,64 +367,70 @@
 				// console.log(val)
 				console.log(this.uploadType)
 				// if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						// sourceType: this.$helper.chooseImage.sourceType,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image',res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功回调函数
-									console.log('图片地址', result)
-									switch (_this.uploadType) {
-										// 身份正面
-										case 1:
-											_this.dataDetails.cardAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get',
-													'/driverInfo/personShibie', {
-														personImg: result,
-														flag:1
-													}).then(res => {
-													if(res.data){
-														_this.dataDetails.cardAddress=res.data.recPersonAddr
-														// _this.dataDetails.numberCard = res.data.recPersonNo
-														if (res.data.recPerson) {
-															_this.dataDetails.driverName = res.data.recPerson
-															_this.dataDetails.driverCall = res.data.recPerson.substring(0,1)
-														}
-														_this.dataDetails.driverBirthday=res.data.recPersonBrithday
-													}
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											break
-											// 身份反面
-										case 2:
-											_this.dataDetails.cardBackAddressUrl = result
-											// 识别
-											_this.$request.baseRequest('get',
-													'/driverInfo/personShibie', {
-														personImg: result,
-														flag:2
-													}).then(res => {
-													if(res.data.idCardValidity){
-														let date = res.data.idCardValidity.split("-")[1]
-													    _this.dataDetails.cardValidityDate = date.replace('.', '-').replace('.', '-')
+				uni.chooseImage({
+					count: 1,
+					sizeType: ['compressed'],
+					// sourceType: this.$helper.chooseImage.sourceType,
+					success: function(res) {
+						console.log(JSON.stringify(res.tempFilePaths));
+						uploadImage('image', res.tempFilePaths[0], 'appData/',
+							result => {
+								// 上传成功回调函数
+								console.log('图片地址', result)
+								switch (_this.uploadType) {
+									// 身份正面
+									case 1:
+										_this.dataDetails.cardAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get',
+												'/driverInfo/personShibie', {
+													personImg: result,
+													flag: 1
+												}).then(res => {
+												if (res.data) {
+													_this.dataDetails.cardAddress = res.data
+														.recPersonAddr
+													// _this.dataDetails.numberCard = res.data.recPersonNo
+													if (res.data.recPerson) {
+														_this.dataDetails.driverName = res.data
+															.recPerson
+														_this.dataDetails.driverCall = res.data
+															.recPerson.substring(0, 1)
 													}
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											break
-										case 3:
-											break;
-									}
+													_this.dataDetails.driverBirthday = res.data
+														.recPersonBrithday
+												}
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break
+										// 身份反面
+									case 2:
+										_this.dataDetails.cardBackAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get',
+												'/driverInfo/personShibie', {
+													personImg: result,
+													flag: 2
+												}).then(res => {
+												if (res.data.idCardValidity) {
+													let date = res.data.idCardValidity.split("-")[1]
+													_this.dataDetails.cardValidityDate = date.replace(
+														'.', '-').replace('.', '-')
+												}
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break
+									case 3:
+										break;
 								}
-							)
-						}
-					});
+							}
+						)
+					}
+				});
 
 				// } else {
 				// 	switch (this.uploadType) {
@@ -458,7 +466,7 @@
 					})
 					return true
 				}
-				
+
 				if (!uni.$u.test.chinese(this.dataDetails.driverName)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -511,7 +519,7 @@
 				// 		return true
 				// 	}
 				// }
-			
+
 				if (uni.$u.test.isEmpty(this.dataDetails.cardAddressUrl)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -779,6 +787,7 @@
 		justify-content: center;
 		background: white;
 		padding: 40rpx 20rpx 50rpx 20rpx;
+
 		.next-btn {
 			background: rgb(39, 114, 251);
 			width: 90%;
@@ -813,20 +822,25 @@
 		height: 80rpx;
 		z-index: 9;
 	}
-	/deep/.u-radio{
-		margin-left:10px;
+
+	/deep/.u-radio {
+		margin-left: 10px;
 	}
+
 	/deep/.uni-input-input:disabled {
 		background: #fff;
 	}
+
 	/deep/.u-radio-group--row {
-	    justify-content: flex-end;
+		justify-content: flex-end;
 	}
-	/deep/.u-textarea{
-		padding:9px 0;
+
+	/deep/.u-textarea {
+		padding: 9px 0;
 	}
-	/deep/.u-textarea__field{
-		color:#000;
-		text-align:right;
+
+	/deep/.u-textarea__field {
+		color: #000;
+		text-align: right;
 	}
 </style>

+ 195 - 175
pages/mine/editDriverCertificationNext.vue

@@ -3,8 +3,8 @@
 		<view class="top-head"></view>
 		<view class="container">
 			<u-radio-group v-model="radiovalue" iconPlacement="row" class='radio-group'>
-				<u-radio :customStyle="{marginBottom: '8px',marginRight:'4px'}" v-for="(item, index) in radiolist" :key="index"
-					:label="item.name" :name="item.name" @change="radioChange">
+				<u-radio :customStyle="{marginBottom: '8px',marginRight:'4px'}" v-for="(item, index) in radiolist"
+					:key="index" :label="item.name" :name="item.name" @change="radioChange">
 				</u-radio>
 			</u-radio-group>
 			<view class="level1-title">证件信息</view>
@@ -45,7 +45,7 @@
 					</view>
 					<view>~</view>
 					<view style='font-size:14px;' class="" @click="selectValidityPeriod(9)">
-						
+
 						{{dataDetails.driverLicenseValidityDate?dataDetails.driverLicenseValidityDate:'结束时间'}}
 					</view>
 				</view>
@@ -57,10 +57,11 @@
 				</view>
 				<view class="flex row noborder">
 					<view class="left-text">驾驶证发证机关</view>
-					<u--input placeholder="请输入驾驶证发证机关" inputAlign='right' border="none" v-model="dataDetails.lssuingAuthority" >
+					<u--input placeholder="请输入驾驶证发证机关" inputAlign='right' border="none"
+						v-model="dataDetails.lssuingAuthority">
 					</u--input>
 				</view>
-				
+
 				<view class="title">从业资格证</view>
 				<view @click="uploadImg(7)" class="picture picture7" v-if="!dataDetails.qualificationCertificate">
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
@@ -83,21 +84,25 @@
 				</view>
 				<view class="flex row">
 					<view class="left-text">从业资格证号</view>
-					<u--input maxlength='19' placeholder="请输入从业资格证号" inputAlign='right' border="none" v-model="dataDetails.qualificationCertificateNumber">
+					<u--input maxlength='19' placeholder="请输入从业资格证号" inputAlign='right' border="none"
+						v-model="dataDetails.qualificationCertificateNumber">
 					</u--input>
 				</view>
 				<view class="flex row ">
 					<view class="left-text">道路运输经营许可证号</view>
-					<u--input maxlength='30' placeholder="请输入道路运输经营许可证号" inputAlign='right' border="none" v-model="dataDetails.actualCarrierBusinessLicense">
+					<u--input maxlength='30' placeholder="请输入道路运输经营许可证号" inputAlign='right' border="none"
+						v-model="dataDetails.actualCarrierBusinessLicense">
 					</u--input>
 				</view>
 				<view class="flex row noborder align-center">
 					<view class="left-text">通讯地址</view>
-					<u--textarea v-model="dataDetails.postalAddress" border="none"  placeholder="输入通讯地址" autoHeight  maxlength="30"></u--textarea>
+					<u--textarea v-model="dataDetails.postalAddress" border="none" placeholder="输入通讯地址" autoHeight
+						maxlength="30"></u--textarea>
 				</view>
 			</view>
 			<view class="flex service align-center">
-				<u--image @click='consent' :src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
+				<u--image @click='consent'
+					:src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
 					width="12px" height="12px"></u--image>
 				我已阅读并同意
 				<navigator
@@ -107,20 +112,17 @@
 					class="path" hover-class="navigator-hover">《隐私政策》</navigator>
 			</view>
 			<u-button class="btn-color" @click="btnBClick">提交</u-button>
-			
+
 			<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 				@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
 				@close="isShowimgType=false">
 			</u-action-sheet>
-			<itmister-date-picker :dateStatus="0"
-			:checkYear="year" :checkMonth="month" :checkDay="day"
-			ref="datestartEl" :startYear="1980"  :futureYear="10" 
-			@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
-			<itmister-date-picker :overdueContent="overdueContent" :dateStatus="status" 
-			:periodOfValidity="true" 
-			:checkYear="year" :checkMonth="month" :checkDay="day"
-			ref="dateEl" :startYear="1980"  :futureYear="10" 
-			@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+			<itmister-date-picker :dateStatus="0" :checkYear="year" :checkMonth="month" :checkDay="day"
+				ref="datestartEl" :startYear="1980" :futureYear="10" @dateConfirm="confirmValidityPeriod">
+			</itmister-date-picker>
+			<itmister-date-picker :overdueContent="overdueContent" :dateStatus="status" :periodOfValidity="true"
+				:checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl" :startYear="1980" :futureYear="10"
+				@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 			<!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="ValidityPeriodType==9?validityPeriod1:validityPeriod" @confirm="confirmValidityPeriod"
 				:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
 			</u-picker> -->
@@ -147,14 +149,16 @@
 				ValidityPeriodType: '',
 				validityPeriod: [],
 				isShowValidity: false,
-				isShowDrive:false,
-				driveList:[["A2","B2"]],
+				isShowDrive: false,
+				driveList: [
+					["A2", "B2"]
+				],
 				uploadType: '',
 				isShowimgType: false,
 				dataDetails: {},
-				year:'',
-				month:'',
-				day:'',
+				year: '',
+				month: '',
+				day: '',
 				radiolist: [{
 						name: '挂车司机',
 						disabled: false
@@ -180,20 +184,20 @@
 		},
 		methods: {
 			async get_camera_permission() {
-				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
-				if(photol == false){
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
 					uni.showModal({
 						title: '提示',
 						content: '您已经关闭相册权限,去设置',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 								permision.gotoAppPermissionSetting()
-									            // plus.runtime.openURL("app-settings:");
+								// plus.runtime.openURL("app-settings:");
 							} else if (res.cancel) {
 								console.log('用户点击取消');
 							}
 						}
-					});	
+					});
 				}
 			},
 			delCard(type) {
@@ -236,157 +240,170 @@
 			},
 			confirmValidityPeriod(date) {
 				console.log('confirm', date)
-					switch (this.ValidityPeriodType) {
-						case 0:
-							this.dataDetails.driverLicenseValidityStartDate = date.date
-							break
-						case 1:
-							this.dataDetails.drivingLicenseValidityDate = date.date 
-							break
-						case 2:
-							this.dataDetails.trailerLicenseValidityDate = date.date
-							break
-						case 3:
-							this.dataDetails.qualificationCertificateValidityDate = date.date 
-							break
-						case 4:
-							this.dataDetails.operationCertificateValidityDate = date.date 
-							break
-						case 5:
-							this.dataDetails.trailerOperationCertificateValidityDate = date.date 
-							break
-						case 9:
-							this.dataDetails.driverLicenseValidityDate = date.date
-							break
-					}
-					this.$forceUpdate()
-				
+				switch (this.ValidityPeriodType) {
+					case 0:
+						this.dataDetails.driverLicenseValidityStartDate = date.date
+						break
+					case 1:
+						this.dataDetails.drivingLicenseValidityDate = date.date
+						break
+					case 2:
+						this.dataDetails.trailerLicenseValidityDate = date.date
+						break
+					case 3:
+						this.dataDetails.qualificationCertificateValidityDate = date.date
+						break
+					case 4:
+						this.dataDetails.operationCertificateValidityDate = date.date
+						break
+					case 5:
+						this.dataDetails.trailerOperationCertificateValidityDate = date.date
+						break
+					case 9:
+						this.dataDetails.driverLicenseValidityDate = date.date
+						break
+				}
+				this.$forceUpdate()
+
 			},
 			selectValidityPeriod(type) {
 				this.ValidityPeriodType = type
-				if(type==0){
-					if(this.dataDetails.driverLicenseValidityStartDate!='长期'&&this.dataDetails.driverLicenseValidityStartDate){
-						var arr=this.dataDetails.driverLicenseValidityStartDate.split('-')
-						this.year=arr[0]
-						this.month=arr[1]
-						this.day=arr[2]
+				if (type == 0) {
+					if (this.dataDetails.driverLicenseValidityStartDate != '长期' && this.dataDetails
+						.driverLicenseValidityStartDate) {
+						var arr = this.dataDetails.driverLicenseValidityStartDate.split('-')
+						this.year = arr[0]
+						this.month = arr[1]
+						this.day = arr[2]
 					}
 					this.$refs.datestartEl.show()
-				}else{
+				} else {
 					switch (this.ValidityPeriodType) {
-					case 3:
-						this.status=0
-						this.overdueContent='从业资格证已过期'
-						if(this.dataDetails.qualificationCertificateValidityDate!='长期'&&this.dataDetails.qualificationCertificateValidityDate){
-							var arr=this.dataDetails.qualificationCertificateValidityDate.split('-')
-							this.year=arr[0]
-							this.month=arr[1]
-							this.day=arr[2]
-						}
-						break
-					case 9:
-					if(this.dataDetails.driverLicenseValidityDate!='长期'&&this.dataDetails.qualificationCertificateValidityDate){
-						var arr=this.dataDetails.driverLicenseValidityDate.split('-')
-						this.year=arr[0]
-						this.month=arr[1]
-						this.day=arr[2]
-					}
-					if(this.dataDetails.driverLicenseValidityDate=='长期'){
-						this.year='长期'
-						this.month=''
-						this.day=''
-					}
-						this.overdueContent='驾驶证已过期'
-						break
+						case 3:
+							this.status = 0
+							this.overdueContent = '从业资格证已过期'
+							if (this.dataDetails.qualificationCertificateValidityDate != '长期' && this.dataDetails
+								.qualificationCertificateValidityDate) {
+								var arr = this.dataDetails.qualificationCertificateValidityDate.split('-')
+								this.year = arr[0]
+								this.month = arr[1]
+								this.day = arr[2]
+							}
+							break
+						case 9:
+							if (this.dataDetails.driverLicenseValidityDate != '长期' && this.dataDetails
+								.qualificationCertificateValidityDate) {
+								var arr = this.dataDetails.driverLicenseValidityDate.split('-')
+								this.year = arr[0]
+								this.month = arr[1]
+								this.day = arr[2]
+							}
+							if (this.dataDetails.driverLicenseValidityDate == '长期') {
+								this.year = '长期'
+								this.month = ''
+								this.day = ''
+							}
+							this.overdueContent = '驾驶证已过期'
+							break
 					}
 					this.$refs.dateEl.show()
 				}
 			},
-			driveType(){
+			driveType() {
 				this.isShowDrive = true
 			},
-			confirmDriveType(e){
+			confirmDriveType(e) {
 				this.dataDetails.quasiDrivingVehicle = e.value[0]
 				this.isShowDrive = false
 			},
 			// 上传图片
 			imgTypeSelect() {
 				// if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						// sourceType: this.$helper.chooseImage.sourceType,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image', res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功回调函数
-									console.log('图片地址-----', result)
-									switch (_this.uploadType) {
-										case 1:
-											_this.dataDetails.driverLicenseHomePage = result
-											_this.$request.baseRequest('get',
-													'/driverInfo/api/driverLicenseShibie', {
-														image: result
-													}).then(res => {
-													if (res.data) {
-														let date = res.data.driverEndDate.substr(0,4)+"-"+res.data.driverEndDate.substr(4,2)+"-"+res.data.driverEndDate.substr(6,2)
-														_this.dataDetails.driverLicenseValidityDate = date	
-													if(res.data.allowCar == 'A2' || res.data.allowCar == 'B2'){
-														_this.dataDetails.quasiDrivingVehicle =  res.data.allowCar
+				uni.chooseImage({
+					count: 1,
+					sizeType: ['compressed'],
+					// sourceType: this.$helper.chooseImage.sourceType,
+					success: function(res) {
+						console.log(JSON.stringify(res.tempFilePaths));
+						uploadImage('image', res.tempFilePaths[0], 'appData/',
+							result => {
+								// 上传成功回调函数
+								console.log('图片地址-----', result)
+								switch (_this.uploadType) {
+									case 1:
+										_this.dataDetails.driverLicenseHomePage = result
+										_this.$request.baseRequest('get',
+												'/driverInfo/api/driverLicenseShibie', {
+													image: result
+												}).then(res => {
+												if (res.data) {
+													let date = res.data.driverEndDate.substr(0, 4) +
+														"-" + res.data.driverEndDate.substr(4, 2) +
+														"-" + res.data.driverEndDate.substr(6, 2)
+													_this.dataDetails.driverLicenseValidityDate = date
+													if (res.data.allowCar == 'A2' || res.data
+														.allowCar == 'B2') {
+														_this.dataDetails.quasiDrivingVehicle = res
+															.data.allowCar
 													}
-													_this.dataDetails.lssuingAuthority = res.data.issuingAuthority
+													_this.dataDetails.lssuingAuthority = res.data
+														.issuingAuthority
 													_this.$forceUpdate()
-													}
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											break;
-										case 2:
-											_this.dataDetails.driverLicenseBackPage = result
-
-											break;
-										case 3:
-											_this.dataDetails.drivingLicenseHomePage = result
-											break;
-										case 4:
-											_this.dataDetails.drivingLicenseBackPage = result
-											break;
-										case 5:
-											_this.dataDetails.trailerLicenseHomePage = result
-											break;
-										case 6:
-											_this.dataDetails.trailerLicenseBackPage = result
-											break;
-										case 7:
-											_this.dataDetails.qualificationCertificate = result
-											_this.$request.baseRequest('get',
-													'/driverInfo/api/qualificationLicenseShibie', {
-														image: result
-													}).then(res => {
-													if (res.data&&res.data.qualificationCertificate) {
-														_this.dataDetails.qualificationCertificateValidityDate = res.data.qualificationCertificate
-													}
-													if(res.data&&res.data.qualificationCertificateNum){
-														_this.dataDetails.qualificationCertificateNumber = res.data.qualificationCertificateNum.replace(/\s*/g,"")
-													}
-													_this.$forceUpdate()
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											break;
-										case 8:
-											_this.dataDetails.operationCertificate = result
-											break;
-										case 9:
-											_this.dataDetails.trailerOperationCertificate = result
-											break;
-									}
+												}
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break;
+									case 2:
+										_this.dataDetails.driverLicenseBackPage = result
+
+										break;
+									case 3:
+										_this.dataDetails.drivingLicenseHomePage = result
+										break;
+									case 4:
+										_this.dataDetails.drivingLicenseBackPage = result
+										break;
+									case 5:
+										_this.dataDetails.trailerLicenseHomePage = result
+										break;
+									case 6:
+										_this.dataDetails.trailerLicenseBackPage = result
+										break;
+									case 7:
+										_this.dataDetails.qualificationCertificate = result
+										_this.$request.baseRequest('get',
+												'/driverInfo/api/qualificationLicenseShibie', {
+													image: result
+												}).then(res => {
+												if (res.data && res.data.qualificationCertificate) {
+													_this.dataDetails
+														.qualificationCertificateValidityDate = res
+														.data.qualificationCertificate
+												}
+												if (res.data && res.data.qualificationCertificateNum) {
+													_this.dataDetails.qualificationCertificateNumber =
+														res.data.qualificationCertificateNum.replace(
+															/\s*/g, "")
+												}
+												_this.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break;
+									case 8:
+										_this.dataDetails.operationCertificate = result
+										break;
+									case 9:
+										_this.dataDetails.trailerOperationCertificate = result
+										break;
 								}
-							)
-						}
-					});
+							}
+						)
+					}
+				});
 
 				// } else {
 
@@ -493,7 +510,7 @@
 				// 		return true
 				// 	}
 				// }
-				
+
 				// if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
 				// 	this.$refs.uToast.show({
 				// 		type: 'error',
@@ -501,7 +518,7 @@
 				// 	})
 				// 	return true
 				// }
-				
+
 				if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificate)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -516,7 +533,7 @@
 					})
 					return true
 				}
-				
+
 				if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificateNumber)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -531,13 +548,13 @@
 				// 	})
 				// 	return true
 				// }
-				if (this.dataDetails.qualificationCertificateNumber.length>19||this.dataDetails.qualificationCertificateNumber.length<18) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "从业资格证号输入错误!",
-					})
-					return true
-				}
+				// if (this.dataDetails.qualificationCertificateNumber.length>19||this.dataDetails.qualificationCertificateNumber.length<18) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "从业资格证号输入错误!",
+				// 	})
+				// 	return true
+				// }
 				// if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
 				// 	this.$refs.uToast.show({
 				// 		type: 'error',
@@ -612,7 +629,7 @@
 
 			},
 			btnBClick() {
-							// 此处用法为在js中调用,需要写uni.$u.throttle()
+				// 此处用法为在js中调用,需要写uni.$u.throttle()
 				uni.$u.throttle(this.submit(), 1000)
 			},
 			submit() {
@@ -834,14 +851,17 @@
 	}
 
 	.btn-color {}
+
 	/deep/.uni-input-input:disabled {
 		background: #fff;
 	}
-	/deep/.u-textarea{
-		padding:9px 0;
+
+	/deep/.u-textarea {
+		padding: 9px 0;
 	}
-	/deep/.u-textarea__field{
-		color:#000;
-		text-align:right;
+
+	/deep/.u-textarea__field {
+		color: #000;
+		text-align: right;
 	}
 </style>

+ 5 - 3
pages/mine/fleet/carCaptainAuthentication.vue

@@ -221,7 +221,7 @@
 				bankType: [],
 				auditShow: false,
 				alertTitle: "",
-				checkType:"",
+				checkType: "",
 			};
 		},
 		onLoad(options) {
@@ -374,7 +374,7 @@
 					}).then(res => {
 						if (res.code == 200) {
 							// this.dataDetails = res.data
-							if( res.data.authenticationStatus !="未认证"){
+							if (res.data.authenticationStatus != "未认证") {
 								this.dataDetails.accountNumber = res.data.accountNumber
 								this.dataDetails.cardAddressUrl = res.data.cardAddressUrl
 								this.dataDetails.cardBackAddressUrl = res.data.cardBackAddressUrl
@@ -385,7 +385,8 @@
 								this.dataDetails.payeeAddressUrl = res.data.hyDriverPayeeInfoList[0].payeeAddressUrl
 								this.dataDetails.bankCard = res.data.hyDriverPayeeInfoList[0].bankCard
 								this.dataDetails.bankDeposit = res.data.hyDriverPayeeInfoList[0].bankDeposit
-								this.dataDetails.bankDepositBranch = res.data.hyDriverPayeeInfoList[0].bankDepositBranch
+								this.dataDetails.bankDepositBranch = res.data.hyDriverPayeeInfoList[0]
+									.bankDepositBranch
 								this.dataDetails.payeeName = res.data.hyDriverPayeeInfoList[0].payeeName
 							}
 						}
@@ -487,6 +488,7 @@
 				// if (val.name == '相册') {
 				uni.chooseImage({
 					count: 1,
+					sizeType: ['compressed'],
 					// sourceType: this.$helper.chooseImage.sourceType,
 					success: function(res) {
 						console.log(JSON.stringify(res.tempFilePaths));

+ 4 - 2
pages/mine/manageBankCards/addBankCard.vue

@@ -36,7 +36,8 @@
 					<view @click="manualInput" class="type">选择支行</view>
 				</view>
 				<view class="flex align-center" v-if="!isShowManualInput">
-					<view :style="{'color':dataDetails.bankDepositBranch?'#000':'#C6CBD5'}" style='font-size:15px;' class="select-bankzh" @click="selectZhbank">
+					<view :style="{'color':dataDetails.bankDepositBranch?'#000':'#C6CBD5'}" style='font-size:15px;'
+						class="select-bankzh" @click="selectZhbank">
 						{{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
 					</view>
 					<view @click="manualInput" class="type">手动输入</view>
@@ -221,6 +222,7 @@
 				// if (val.name == '相册') {
 				uni.chooseImage({
 					count: 1,
+					sizeType: ['compressed'],
 					// sourceType: this.$helper.chooseImage.sourceType,
 					success: function(res) {
 						console.log(JSON.stringify(res.tempFilePaths));
@@ -232,7 +234,7 @@
 										'/driverInfo/bankShibie', {
 											bankImg: result,
 										}).then(res => {
-											_this.dataDetails.bankDepositBranch=''
+										_this.dataDetails.bankDepositBranch = ''
 										_this.dataDetails.payeeAddressUrl = result
 										if (res.data.bankNo) {
 											_this.dataDetails.bankCard = res.data.bankNo

+ 7 - 6
pages/mine/manageBankCards/editBankCard.vue

@@ -81,20 +81,20 @@
 		},
 		methods: {
 			async get_camera_permission() {
-				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
-				if(photol == false){
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
 					uni.showModal({
 						title: '提示',
 						content: '您已经关闭相册权限,去设置',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 								permision.gotoAppPermissionSetting()
-									            // plus.runtime.openURL("app-settings:");
+								// plus.runtime.openURL("app-settings:");
 							} else if (res.cancel) {
 								console.log('用户点击取消');
 							}
 						}
-					});	
+					});
 				}
 			},
 			manualInput() {
@@ -155,6 +155,7 @@
 				let that = this;
 				uni.chooseImage({
 					count: 1,
+					sizeType: ['compressed'],
 					success: function(res) {
 						console.log(JSON.stringify(res.tempFilePaths));
 						uploadImage(res.tempFilePaths[0], 'appData/',
@@ -172,7 +173,7 @@
 				if (val.name == '相册') {
 					uni.chooseImage({
 						count: 1,
-						sourceType: this.$helper.chooseImage.sourceType,
+						sizeType: ['compressed'],
 						success: function(res) {
 							console.log(JSON.stringify(res.tempFilePaths));
 							uploadImage(res.tempFilePaths[0], 'appData/',

+ 4 - 2
pages/mine/manageVehicles/addVehicle.vue

@@ -690,6 +690,7 @@
 				// if (val.name == '相册') {
 				uni.chooseImage({
 					count: 1,
+					sizeType: ['compressed'],
 					success: function(res) {
 						uploadImage("images", res.tempFilePaths[0], 'appData/',
 							result => {
@@ -764,7 +765,7 @@
 														res.data.driveringEndDate //行驶证有效期
 													_this.dataDetails.drivingLicenseNumber = res
 														.data.driveringNum.replace(/\s*/g,
-														"") //行驶证档案编号
+															"") //行驶证档案编号
 													if (_this.sign == "非挂车") {
 														if (res.data.servicingMass && res.data
 															.servicingMass.indexOf("kg") != -1) {
@@ -856,7 +857,7 @@
 														res.data.driveringEndDate //挂车行驶证有效期
 													_this.dataDetails.trailerLicenseNumber = res
 														.data.driveringNum.replace(/\s*/g,
-														"") //挂车行驶证档案编号
+															"") //挂车行驶证档案编号
 													if (res.data.servicingMass && res.data
 														.servicingMass.indexOf("kg") != -1) {
 														res.data.servicingMass = res.data
@@ -1133,6 +1134,7 @@
 			unloadGroupPhoto() {
 				uni.chooseImage({
 					count: 1,
+					sizeType: ['compressed'],
 					success: function(res) {
 						uploadImage('image', res.tempFilePaths[0], 'appData/',
 							result => {

File diff suppressed because it is too large
+ 381 - 359
pages/mine/manageVehicles/editVehicle.vue


+ 31 - 30
pages/mine/settings/editAvatar.vue

@@ -3,7 +3,7 @@
 		<view @click="upload" class="picture">
 			<image class="xj-image" v-if="!deptListurl.avatarUrl" src="@/static/images/common/tianjiazhaopian@2x.png">
 			</image>
-			<image  :src="deptListurl.avatarUrl" v-if="deptListurl.avatarUrl" style="width: 100%;height: 100%;"></image>
+			<image :src="deptListurl.avatarUrl" v-if="deptListurl.avatarUrl" style="width: 100%;height: 100%;"></image>
 		</view>
 		<view @click="submit" class="submit">提交</view>
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
@@ -43,35 +43,36 @@
 			},
 			imgTypeSelect(val) {
 				// if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						// sourceType: that.$helper.chooseImage.sourceType,
-						success: function(res) {
-							uploadImage('image',res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功
-									that.$request.baseRequest('get', '/BDAccessToken/getAuth', {
-											apiKey: 'yNWLRW6unoUxo2KXiCZxOxGS',
-											secretKey: 'E8hqzKWdFdTGnFnpAwZ7ixtL89SN3deR'
-										}).then(res => {
-											that.$request.baseRequest('post',
-													'/commonUser/getUserDefinedBean', {
-														accessToken: res.data,
-														imagePath: result
-													}).then(res1 => {
-													that.deptListurl.avatarUrl = result
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-										})
-										.catch(res => {
-											uni.$u.toast(res.message);
-										});
-								}
-							)
-						}
-					});
+				uni.chooseImage({
+					count: 1,
+					sizeType: ['compressed'],
+					// sourceType: that.$helper.chooseImage.sourceType,
+					success: function(res) {
+						uploadImage('image', res.tempFilePaths[0], 'appData/',
+							result => {
+								// 上传成功
+								that.$request.baseRequest('get', '/BDAccessToken/getAuth', {
+										apiKey: 'yNWLRW6unoUxo2KXiCZxOxGS',
+										secretKey: 'E8hqzKWdFdTGnFnpAwZ7ixtL89SN3deR'
+									}).then(res => {
+										that.$request.baseRequest('post',
+												'/commonUser/getUserDefinedBean', {
+													accessToken: res.data,
+													imagePath: result
+												}).then(res1 => {
+												that.deptListurl.avatarUrl = result
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+									})
+									.catch(res => {
+										uni.$u.toast(res.message);
+									});
+							}
+						)
+					}
+				});
 
 				// } else {
 				// 	uni.chooseImage({

+ 5 - 4
pages/news/index.vue

@@ -3,7 +3,7 @@
 		style="background-color: #F5F6FA;"> -->
 	<view>
 		<u-navbar title="消息中心" leftIconSize='0' :bgColor="bgColor" :placeholder='true' leftIconColor="#fff"
-			titleStyle='color:#fff' rightText='全部已读' @rightClick="rightClick">
+			titleStyle='color:#fff' rightText='一键已读' @rightClick="rightClick">
 		</u-navbar>
 		<view class="top-bgc"></view>
 		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
@@ -16,7 +16,8 @@
 						<image src="@/static/images/news/xt.png" class="img" v-else>
 						</image>
 					</view>
-					<view class="right" :style="{'border-bottom':index==news.length-1?'1px solid #fff':'1px solid #e6e6e6'}">
+					<view class="right"
+						:style="{'border-bottom':index==news.length-1?'1px solid #fff':'1px solid #e6e6e6'}">
 						<view class="row1 flex flex-space-between">
 							<view class="title">
 								{{item.newsType}}
@@ -315,7 +316,7 @@
 	}
 
 	.info-item {
-		padding: 0 30rpx 30rpx 30rpx;
+		padding: 20rpx 30rpx 30rpx 30rpx;
 
 		.img {
 			width: 80rpx;
@@ -363,4 +364,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 211 - 169
pages/order/confirmLoading.vue

@@ -88,8 +88,8 @@
 			<view class='row-between'>
 				<view class="">运输时长(小时)</view>
 				<view class="flex align-center">
-					<u--input placeholder="请输入运输时长" border="none" type="digit" v-model="detailData.transportationDuration" inputAlign='right'
-						clearable></u--input>
+					<u--input placeholder="请输入运输时长" border="none" type="digit"
+						v-model="detailData.transportationDuration" inputAlign='right' clearable></u--input>
 				</view>
 			</view>
 			<view class='s-flex'>
@@ -131,6 +131,7 @@
 	export default {
 		data() {
 			return {
+				firstAuthentication: {},
 				cyId: '',
 				localtion: {
 					city: '',
@@ -198,26 +199,24 @@
 				this.getInfo()
 			}
 			console.log(options)
-			var isContains = true;//隐私权政策是否包含高德开平隐私权政策  true是包含
-			var isShow = true;//隐私权政策是否弹窗展示告知用户 true是展示 
+			var isContains = true; //隐私权政策是否包含高德开平隐私权政策  true是包含
+			var isShow = true; //隐私权政策是否弹窗展示告知用户 true是展示 
 			sdkwx.updatePrivacyShow(isContains, isShow);
-			
-			var isAgree = true;//隐私权政策是否取得用户同意  true是用户同意
+
+			var isAgree = true; //隐私权政策是否取得用户同意  true是用户同意
 			sdkwx.updatePrivacyAgree(isAgree);
 			//检查定位权限
-			sdkwx.checkLocationPermission(function(res){
-				console.log(res);
-			});
+			// sdkwx.checkLocationPermission(function(res) {
+			// 	console.log(res);
+			// });
 			this.auth()
-			// this.detailData = JSON.parse(options.obj) ;
-			// console.log(this.detailData)
-			// CYHT20220317000001
 		},
 		onHide() {
 			uni.removeStorageSync(
 				"contractdata")
 		},
 		onShow() {
+			this.firstAuthentication = uni.getStorageSync("firstAuthentication")
 			if (uni.getStorageSync('contractdata')) {
 				this.id = uni.getStorageSync('contractdata').id
 				this.detailData.hyCarrierInfo.id = uni.getStorageSync('contractdata').carrierId
@@ -226,12 +225,13 @@
 			}
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo', "firstAuthentication"])
+			...mapState(['hasLogin', 'userInfo'])
 		},
 		methods: {
 			auth() { //授权
-				console.log("appid:" + this.appId + "安全码:" + this.appSecurity + "发送代码:" + this.enterpriseSenderCode)
-				let that = this
+				console.log("appid:" + this.appId + "安全码:" + this.appSecurity + "发送代码:" + this.enterpriseSenderCode +
+					"环境" + this.environment)
+				var that = this
 				sdkwx.auth(this.appId, this.appSecurity, this.enterpriseSenderCode, this.environment, function(res) {
 					if (res.type == "onSuccess") {
 						//成功
@@ -241,44 +241,49 @@
 						//失败
 						var errorCode = res.data.errorCode; //错误码
 						var errorMsg = res.data.errorMsg; //错误描述
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "管局授权失败-" + errorMsg
+						})
 						console.log("授权失败")
 						console.log(res)
 					}
-					// uni.showModal({
-					// 	content: JSON.stringify(res)
-					// });
 				});
 			},
-			start() { //开启定位
+			start(val) { //开启定位
+				var that = this
 				//车牌号 //司机姓名 //备注 //运单信息列表
-				console.log(this.detailData, "行政区划分")
-				this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
-				this.shippingNoteInfos[0].serialNumber = "0000", //分单号
-				this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.publishTaskInfo.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-				this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.publishTaskInfo.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-				this.shippingNoteInfos[0].startLongitude = this.detailData.publishTaskInfo.sendLongitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-				this.shippingNoteInfos[0].startLatitude =  this.detailData.publishTaskInfo.sendLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-				this.shippingNoteInfos[0].endLongitude =  this.detailData.publishTaskInfo.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-				this.shippingNoteInfos[0].endLatitude =  this.detailData.publishTaskInfo.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-				this.shippingNoteInfos[0].startLocationText = this.detailData.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-				this.shippingNoteInfos[0].endLocationText = this.detailData.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-				this.shippingNoteInfos[0].vehicleNumber = this.detailData.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
-				this.shippingNoteInfos[0].driverName = this.detailData.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+				this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo //运单号
+				this.shippingNoteInfos[0].serialNumber = "0000" //分单号
+				this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.publishTaskInfo
+					.sendAdCode //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+				this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.publishTaskInfo
+					.unsendAdCode //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+				this.shippingNoteInfos[0].startLongitude = this.detailData.publishTaskInfo
+					.sendLongitude //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+				this.shippingNoteInfos[0].startLatitude = this.detailData.publishTaskInfo
+					.sendLatitude //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+				this.shippingNoteInfos[0].endLongitude = this.detailData.publishTaskInfo
+					.unsendLongitude //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+				this.shippingNoteInfos[0].endLatitude = this.detailData.publishTaskInfo
+					.unsendLatitude //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+				this.shippingNoteInfos[0].startLocationText = this.detailData
+					.sendCity //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+				this.shippingNoteInfos[0].endLocationText = this.detailData
+					.unloadCity //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+				this.shippingNoteInfos[0].vehicleNumber = this.detailData
+					.carNumber //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+				this.shippingNoteInfos[0].driverName = this.detailData
+					.driverName //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
 				this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
 
 				//}],//运单信息列表,一辆车运单数最大支持数为 10
 				var remark = "测试"; //备注
-				let that = this
-				console.log("start this.shippingNoteInfos")
-				console.log(this.shippingNoteInfos)
 				var param = {}
 				param.carNo = this.detailData.carNo
 				param.driverName = this.firstAuthentication.driverName
 				param.remark = remark
 				param.shippingNoteInfos = this.shippingNoteInfos
-				// uni.setStorageSync("sdkStartParam",param)
-				// uni.setStorageSync("sdkStartParamOrderNum",this.detailData.orderNo)
-				// this.$helper.sdkStart(this.detailData.carNo, this.firstAuthentication.driverName, remark, this.shippingNoteInfos)
 				sdkwx.start(this.detailData.carNo, this.firstAuthentication.driverName, remark, this.shippingNoteInfos,
 					function(res) {
 						if (res.type == "onSuccess") {
@@ -286,34 +291,28 @@
 							console.log("开启定位成功!!!")
 							console.log(res)
 							var shippingNoteInfos = res.data[0]; //运单信息列表
-							console.log(shippingNoteInfos, "sdassss")
 							if (shippingNoteInfos) {
 								let dateTtime = Number(shippingNoteInfos.interval + 1000)
 								console.log("开始定时", dateTtime)
 								that.send()
-								// that.timer = setTimeout(() => {
-								// 	console.log("定时")
-								// 	that.send()
-								// }, dateTtime);
 							}
+							that.affirm(val) //管局上报成功后提交
 						} else if (res.type == "onFailure") {
 							//失败
 							console.log("开启定位失败!!!")
 							console.log(res)
 							var errorCode = res.data.errorCode; //错误码
 							var errorMsg = res.data.errorMsg; //错误描述
+							uni.hideLoading()
 							that.$refs.uToast.show({
 								type: 'error',
-								message: errorMsg
+								message: "管局上报-" + errorMsg
 							})
 							that.timer = setTimeout(() => {
 								console.log("定时")
 								that.send()
 							}, 915204);
 						}
-						// uni.showModal({
-						// 	content:JSON.stringify(res)
-						// });
 					});
 			},
 			send() { //发送定位
@@ -365,11 +364,11 @@
 					if (res.code == 200) {
 
 						this.detailData = res.data
-						if(res.data.hyCarrierInfo && res.data.hyCarrierInfo.transportationDuration){
+						if (res.data.hyCarrierInfo && res.data.hyCarrierInfo.transportationDuration) {
 							this.detailData.transportationDuration = res.data.hyCarrierInfo.transportationDuration
 						}
 						// #ifdef APP-PLUS
-						this.getLngLat();
+						// this.getLngLat();
 						// #endif
 						this.$request.baseRequest('get', '/carrierInfo/getHyCarrierInfo', {
 							orderId: this.detailData.id,
@@ -389,7 +388,7 @@
 								console.log(this.fileList1)
 								this.detailData.carNo = res.data.carNo
 								this.detailData.loadingDate = res.data.loadingDate
-							
+
 								if (res.data.loadingDate) {
 									this.detailData.loadingDate1 = res.data.loadingDate.split(' ')[0]
 								}
@@ -663,7 +662,7 @@
 						})
 						return
 					}
-					
+
 					this.alertTitle = '确定提交装车信息?'
 				}
 
@@ -723,7 +722,7 @@
 					})
 					return true
 				}
-				if (this.detailData.transportationDuration < 0 || this.detailData.transportationDuration >1000) {
+				if (this.detailData.transportationDuration < 0 || this.detailData.transportationDuration > 1000) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "运输时长输入错误!",
@@ -738,129 +737,172 @@
 					return true
 				}
 			},
-			confirmClick() {
-				uni.removeStorageSync('contractdata')
+			affirm(data) {
+				console.log("提交", data)
 				var that = this
-				this.isShowAlert = false
-				//1暂存
-				if (this.detailData.statusFlag == 1) {
-					delete this.detailData.hyCarrierInfo.loadingAreaLongitude;
-					delete this.detailData.hyCarrierInfo.loadingAreaLatitude;
-					delete this.detailData.hyCarrierInfo.sendCity;
-					delete this.detailData.hyCarrierInfo.sendArea;
-				}
-				uni.showLoading({
-					title: '加载中'
-				})
-				let time = new Date() //装车时间   去当前时间的时分秒
-				let h = time.getHours();
-				if (h < 10) {
-					h = "0" + h
-				}
-				let f = time.getMinutes();
-				if (f < 10) {
-					f = "0" + f
-				}
-				let m = time.getSeconds();
-				if (m < 10) {
-					m = "0" + m
-				}
-				var data = {
-					loadingImg: this.imgList.toString(),
-					statusFlag: this.detailData.statusFlag,
-					loadingDate: this.detailData.hyCarrierInfo.loadingDate.split(" ")[0] + " " + h + ":" + f + ":" + m,
-					loadingArea: this.detailData.loadingArea,
-					loadingCity: this.detailData.loadingCity,
-					loadingLongitude: this.detailData.loadingLongitude,
-					loadingLatitude: this.detailData.loadingLatitude,
-					id: this.detailData.hyCarrierInfo.id,
-					transportationDuration:this.detailData.transportationDuration
-				}
-
-				// console.log("查看id--------",this.detailData.hyCarrierInfo.id)
 				this.$request.baseRequest('post', '/carrierInfo/loadingAdd', data).then(res => {
-						if (res.code == 200) {
-							uni.hideLoading()
-							let _title = ''
-							if (that.detailData.statusFlag == 1) {
-								_title = '暂存成功!'
-							} else {
-								that.start() //开始授权并开始定位
-								_title = '提交成功!'
-							}
-							that.$helper.fUN_AmapLocation.start({
-									// intervalTime: 1000 * 60,
-									intervalTime: 5000,
-									// locationCacheEnable:true,
-									isReport: false
-									// url: 'http://192.168.0.66/fun/open/test_json.do',
-									// params: {
-									// 	a: 1,
-									// 	B: '测试',
-									// 	c: true
-									// },
-									// headers: {
-									// 	a: '123',
-									// 	B: 'abcd'
-									// }
-								},
-								res => {
-									// console.log('====确认装车开启连续定位====');
-									// console.log(res)
-									let _data = {
-										orderId: that.id,
-										longitude: res.longitude,
-										latitude: res.latitude,
-										province: res.province,
-										city: res.city,
-										area: res.district
-									}
-									if (this.shippingNoteInfos && this.shippingNoteInfos.length > 0) { //更新持续定位经纬度
-										for (let i = 0; i < this.shippingNoteInfos.length; i++) {
-											this.shippingNoteInfos[i].startLatitude = _data.latitude //纬度
-											this.shippingNoteInfos[i].startLocationText = _data.city //起点
-											this.shippingNoteInfos[i].startLongitude = _data.longitude //经度
-										}
-									}
-									this.$helper.gjList.push(_data)
-									uni.setStorageSync('mapGJ', this.$helper.gjList);
-									// console.log('this.$helper.gjList')
-									// console.log(this.$helper.gjList)
-									console.log("条数", uni.getStorageSync('mapGJ').length)
-									// console.log("条数", uni.getStorageSync('mapGJ'))
-									if (uni.getStorageSync('mapGJ').length > 100) {
-										// console.log(JSON.stringify(uni.getStorageSync('mapGJ')))
-										// that.send()
-										that.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo', {
-												orderId: that.id,
-												longitudeLatitude: JSON.stringify(uni.getStorageSync('mapGJ'))
-											}).then(res => {
-												console.log("已发送定位----------------",res)
-												uni.removeStorageSync('mapGJ');
-												that.$helper.gjList = []
-											})
-											.catch(res => {
-												uni.$u.toast(res.message);
-											});
+					console.log("提交状态", res)
+					uni.hideLoading()
+					if (res.code == 200) {
+						let _title = ''
+						if (that.detailData.statusFlag == 1) {
+							_title = '暂存成功!'
+							return
+						} else {
+							// that.start() //开始授权并开始定位
+							_title = '提交成功!'
+						}
+						that.$helper.fUN_AmapLocation.start({
+								// intervalTime: 1000 * 60,
+								intervalTime: 60000,
+								// locationCacheEnable:true,
+								isReport: false
+							},
+							res => {
+								// console.log('====确认装车开启连续定位====');
+								// console.log(res)
+								let _data = {
+									orderId: that.id,
+									longitude: res.longitude,
+									latitude: res.latitude,
+									province: res.province,
+									city: res.city,
+									area: res.district
+								}
+								if (this.shippingNoteInfos && this.shippingNoteInfos.length > 0) { //更新持续定位经纬度
+									for (let i = 0; i < this.shippingNoteInfos.length; i++) {
+										this.shippingNoteInfos[i].startLatitude = _data.latitude //纬度
+										this.shippingNoteInfos[i].startLocationText = _data.city //起点
+										this.shippingNoteInfos[i].startLongitude = _data.longitude //经度
 									}
-									//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
 								}
-							);
-							
-							this.$refs.uToast.show({
-								type: 'success',
-								message: _title,
-								complete() {
-									uni.switchTab({
-										url: '/pages/order/index'
-									})
+								this.$helper.gjList.push(_data)
+								uni.setStorageSync('mapGJ', this.$helper.gjList);
+								// console.log('this.$helper.gjList')
+								// console.log(this.$helper.gjList)
+								console.log("条数", uni.getStorageSync('mapGJ').length)
+								// console.log("条数", uni.getStorageSync('mapGJ'))
+								if (uni.getStorageSync('mapGJ').length > 100) {
+									// console.log(JSON.stringify(uni.getStorageSync('mapGJ')))
+									// that.send()
+									that.$request.baseRequest('post', '/hyOrderTravelPath/api/addInfo', {
+											orderId: that.id,
+											longitudeLatitude: JSON.stringify(uni.getStorageSync('mapGJ'))
+										}).then(res => {
+											console.log("已发送定位----------------", res)
+											uni.removeStorageSync('mapGJ');
+											that.$helper.gjList = []
+										})
+										.catch(res => {
+											console.log("0", res.message)
+											uni.$u.toast(res.message);
+										});
 								}
-							})
-						}
+								//判断缓存数据条数,超过reportInterval时清空缓存,重新存入缓存
+							}
+						);
+
+						that.$refs.uToast.show({
+							type: 'success',
+							message: _title,
+							complete() {
+								uni.switchTab({
+									url: '/pages/order/index'
+								})
+							}
+						})
+					} else {
+						console.log("1", res)
+						// uni.$u.toast(res.message);
+						that.$refs.uToast.show({
+							type: 'error',
+							message: res.message,
+						})
+					}
+				}).catch(res => {
+					uni.hideLoading()
+					console.log("2", res.message)
+					// uni.$u.toast(res.message);
+					that.$refs.uToast.show({
+						type: 'error',
+						message: res.message,
 					})
-					.catch(res => {
-						uni.$u.toast(res.message);
-					});
+				});
+			},
+			confirmClick() {
+				//判断有没有定位权限  没有 不让提交
+				// this.getLngLat()
+				let _dw = this.$tx.calculateDistance()
+				if (_dw.latitude) {
+					that.detailData.hyCarrierInfo.longitudeLatitude = res.longitude + ',' + res
+						.latitude
+					that.detailData.hyCarrierInfo.loadingAreaLongitude = res.longitude;
+					that.detailData.hyCarrierInfo.loadingAreaLatitude = res.latitude;
+					that.detailData.hyCarrierInfo.sendCity = that.$helper.filterUrban(res.address.city)
+					that.localtion.city = that.$helper.filterUrban(res.address.city)
+					that.$set(that.detailData, 'loadingArea', that.$helper.filterUrban(res.address
+						.district))
+					that.$set(that.detailData, 'loadingCity', that.$helper.filterUrban(res.address
+						.city))
+					that.localtion.sendArea = that.$helper.filterUrban(res.address.district)
+					// .loadingCity = that.$helper.filterUrban(res.address.city)
+					that.detailData.loadingLongitude = res.longitude;
+					that.detailData.loadingLatitude = res.latitude;
+					that.$forceUpdate()
+					uni.removeStorageSync('contractdata')
+					var that = this
+					this.isShowAlert = false
+					//1暂存
+					if (this.detailData.statusFlag == 1) {
+						delete this.detailData.hyCarrierInfo.loadingAreaLongitude;
+						delete this.detailData.hyCarrierInfo.loadingAreaLatitude;
+						delete this.detailData.hyCarrierInfo.sendCity;
+						delete this.detailData.hyCarrierInfo.sendArea;
+					}
+					uni.showLoading({
+						title: '加载中'
+					})
+					let time = new Date() //装车时间   去当前时间的时分秒
+					let h = time.getHours();
+					if (h < 10) {
+						h = "0" + h
+					}
+					let f = time.getMinutes();
+					if (f < 10) {
+						f = "0" + f
+					}
+					let m = time.getSeconds();
+					if (m < 10) {
+						m = "0" + m
+					}
+					var data = {
+						loadingImg: this.imgList.toString(),
+						statusFlag: this.detailData.statusFlag,
+						loadingDate: this.detailData.hyCarrierInfo.loadingDate.split(" ")[0] + " " + h + ":" + f +
+							":" + m,
+						loadingArea: this.detailData.loadingArea,
+						loadingCity: this.detailData.loadingCity,
+						loadingLongitude: this.detailData.loadingLongitude,
+						loadingLatitude: this.detailData.loadingLatitude,
+						id: this.detailData.hyCarrierInfo.id,
+						transportationDuration: this.detailData.transportationDuration
+					}
+					if (that.detailData.statusFlag == 1) { //暂存
+						console.log("暂存")
+						this.affirm(data)
+					} else { //提交
+						this.start(data) //先调用管局start
+					}
+
+				} else {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "未获取定位权限!",
+					})
+
+					return
+				}
+
 			}
 		},
 	}

+ 207 - 83
pages/order/confirmUnloading.vue

@@ -24,9 +24,18 @@
 			<view class='row-between'>
 				<view class="row-left-text">卸货地</view>
 				<view class="row-right-text place">
-					{{detailData.unloadPrivate}}{{detailData.unloadCity}}{{detailData.unloadArea}}{{detailData.unloadDetailedAddress}}
+					<view class="flex" style="justify-content: flex-end;" @click="selectMap">
+						{{detailData.unloadPrivate}}{{detailData.unloadCity}}{{detailData.unloadArea}}
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+					<view>
+						<u-input placeholder="请输入详细地址" border="none" v-model="detailData.unloadDetailedAddress"
+							inputAlign="right"></u-input>
+						<!-- @change="change" -->
+					</view>
 				</view>
 			</view>
+
 			<view class='row-between'>
 				<view class="row-left-text">货名</view>
 				<view class="row-right-text">{{detailData.goodsName}}</view>
@@ -45,8 +54,9 @@
 			<view class='row-between'>
 				<view class="row-left-text">卸车净重(吨)</view>
 				<view class="row-right-text">
-				<u--input placeholder="请输入卸车净重" border="none" type="number" v-model="detailData.unloadingWeight" inputAlign='right'
-					clearable></u--input></view>
+					<u--input placeholder="请输入卸车净重" border="none" type="number" v-model="detailData.unloadingWeight"
+						inputAlign='right' clearable></u--input>
+				</view>
 			</view>
 			<!-- 	<view class='row-between'>
 				<view class="row-left-text">卸车日期</view>
@@ -80,8 +90,8 @@
 			</view>
 			<view class='s-flex'>
 				<view class="row-left-text" style="margin:20rpx 0;">上传回单照片(磅单)</view>
-				<u-upload class="uview-upload" :fileList="fileList2" @afterRead="afterRead1($event)" @delete="deletePic1"
-					name="2" multiple :maxCount="3"></u-upload>
+				<u-upload class="uview-upload" :fileList="fileList2" @afterRead="afterRead1($event)"
+					@delete="deletePic1" name="2" multiple :maxCount="3"></u-upload>
 			</view>
 		</view>
 		<view class="bottom-btn">
@@ -95,9 +105,10 @@
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
 		</u-picker> -->
 		<!-- :endDate="array" -->
-		<itmister-date-picker :dateStatus="0" ref="dateEl"  :startYear="1999"  
-		:futureYear="30" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+		<itmister-date-picker :dateStatus="0" ref="dateEl" :startYear="1999" :futureYear="30"
+			@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<u-toast ref="uToast"></u-toast>
+		<u-modal :show="distance" :content="distanceTips" :showConfirmButton="false" :showCancelButton="true" :closeOnClickOverlay="true" @cancel="distance=false" @close="distance=false"></u-modal>
 	</view>
 </template>
 
@@ -111,23 +122,23 @@
 			return {
 				imgList: [],
 				fileList1: [],
-				fileList2:[],
+				fileList2: [],
 				validityPeriod: [],
 				sourceType: ['camera'],
-				imgList1:[],
+				imgList1: [],
 				detailData: {
 					addressUrl: '',
-					hyCarrierInfo:{},
-					totalFreight:''
+					hyCarrierInfo: {},
+					totalFreight: ''
 				},
-				defaultIndex:[],
+				defaultIndex: [],
 				action: this.$helper.ossUploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				isAdd: true,
 				isShowAlert: false,
 				alertContent: '',
 				alertTitle: '',
-				localtion:{},
+				localtion: {},
 				shippingNoteInfos: [{
 					shippingNoteNumber: '',
 					serialNumber: "",
@@ -143,36 +154,46 @@
 					driverName: "",
 					interval: "",
 				}],
+				// unsendLatitude: "",
+				// unsendLongitude: "",
+				distance:false,
+				distanceTips:"",
+				editPlace:true,//编辑卸车地点标识 true未编辑  false编辑
+				
 			}
 		},
 		onLoad(options) {
 			this.detailData = JSON.parse(options.obj)
-			console.log(this.detailData,"编号编号焦点方式规范化见到过")
-			this.fileList1=[]
-			this.fileList2=[]
-			if(this.detailData.hyCarrierInfo.unloadingImg){
-				this.imgList=this.detailData.hyCarrierInfo.unloadingImg.split(',')
-				var data=this.detailData.hyCarrierInfo.unloadingImg.split(',')
+			console.log(this.detailData)
+			this.fileList1 = []
+			this.fileList2 = []
+			if (this.detailData.hyCarrierInfo.unloadingImg) {
+				this.imgList = this.detailData.hyCarrierInfo.unloadingImg.split(',')
+				var data = this.detailData.hyCarrierInfo.unloadingImg.split(',')
 				for (var i = 0; i < data.length; i++) {
-					if(data[i]!=''){
-						this.fileList1.push({url:data[i]})
+					if (data[i] != '') {
+						this.fileList1.push({
+							url: data[i]
+						})
 					}
 				}
 			}
-			if(this.detailData.hyCarrierInfo.receiptImg){
-				this.imgList1=this.detailData.hyCarrierInfo.receiptImg.split(',')
-				var data=this.detailData.hyCarrierInfo.receiptImg.split(',')
+			if (this.detailData.hyCarrierInfo.receiptImg) {
+				this.imgList1 = this.detailData.hyCarrierInfo.receiptImg.split(',')
+				var data = this.detailData.hyCarrierInfo.receiptImg.split(',')
 				for (var i = 0; i < data.length; i++) {
-					if(data[i]!=''){
-						this.fileList2.push({url:data[i]})
+					if (data[i] != '') {
+						this.fileList2.push({
+							url: data[i]
+						})
 					}
 				}
 			}
-			if(this.detailData.hyCarrierInfo.totalFreight){
-				this.$set(this.detailData,'totalFreight',String(this.detailData.hyCarrierInfo.totalFreight))
+			if (this.detailData.hyCarrierInfo.totalFreight) {
+				this.$set(this.detailData, 'totalFreight', String(this.detailData.hyCarrierInfo.totalFreight))
 				// this.detailData.totalFreight=String(this.detailData.hyCarrierInfo.totalFreight)
-			}else{
-				this.$set(this.detailData,'totalFreight',String(this.detailData.freight))
+			} else {
+				this.$set(this.detailData, 'totalFreight', String(this.detailData.freight))
 				// this.detailData.totalFreight=String(this.detailData.freight)
 			}
 			this.detailData.carrierInfo = {
@@ -184,9 +205,9 @@
 				// unloadArea: '',
 				// unloadingImg: '',
 				// totalFreight: '',
-				unloadingImg:this.detailData.hyCarrierInfo.unloadingImg,
-				receiptImg:this.detailData.hyCarrierInfo.receiptImg,
-				id: this.detailData.carrierId?this.detailData.carrierId:this.detailData.hyCarrierInfo.id,
+				unloadingImg: this.detailData.hyCarrierInfo.unloadingImg,
+				receiptImg: this.detailData.hyCarrierInfo.receiptImg,
+				id: this.detailData.carrierId ? this.detailData.carrierId : this.detailData.hyCarrierInfo.id,
 			}
 			// #ifdef APP-PLUS
 			this.getLngLat();
@@ -194,40 +215,105 @@
 			this.getNowTime()
 		},
 		methods: {
-			stop(){//结束定位
-				this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
-					this.shippingNoteInfos[0].serialNumber = "0000", //分单号
-					this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-					this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
-					this.shippingNoteInfos[0].startLongitude = this.detailData.sendLongitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					this.shippingNoteInfos[0].startLatitude = this.detailData.sendLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					this.shippingNoteInfos[0].endLongitude = this.detailData.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					this.shippingNoteInfos[0].endLatitude = this.detailData.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					this.shippingNoteInfos[0].startLocationText = this.detailData.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					this.shippingNoteInfos[0].endLocationText = this.detailData.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
-					this.shippingNoteInfos[0].vehicleNumber = this.detailData.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
-					this.shippingNoteInfos[0].driverName = this.detailData.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
+			selectMap() {
+				let that = this
+				// this.isShowMap = true
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					altitude: true,
+					isHighAccuracy: true,
+					success: function(res) {
+						console.log('当前位置的经度:' + res.longitude);
+						console.log('当前位置的纬度:' + res.latitude);
+						uni.chooseLocation({
+							latitude: res.latitude,
+							longitude: res.longitude,
+							success: function(res) {
+								console.log(res);
+								console.log('位置名称:' + res.name);
+								console.log('详细地址:' + res.address);
+								console.log('纬度:' + res.latitude);
+								console.log('经度:' + res.longitude);
+								let _address = that.$helper.formatLocation(res.address)
+								that.detailData.unloadPrivate = _address.Province
+								that.detailData.unloadCity = _address.City
+								that.detailData.unloadArea = _address.Country
+								that.detailData.unloadDetailedAddress = _address.Village
+								// that.unsendLatitude = res.latitude
+								// that.unsendLongitude = res.longitude
+								that.editPlace = false
+								//获取行政区划代码
+								// uni.request({
+								// 	url: 'https://restapi.amap.com/v3/config/district?key=d29a9d10160efaca0dd616bbec936d7f&subdistrict=1&keywords=' +
+								// 		_address.City,
+								// 	success: (res) => {
+								// 	  for(let i = 0 ; i < res.data.districts[0].districts.length ; i++){
+								// 		  if(res.data.districts[0].districts[i].name == _address.Country){
+								// 			  that.addressInfo.adCode = res.data.districts[0].districts[i].adcode
+								// 			  console.log("行政区划代码"+that.addressInfo.adCode)
+								// 			  break
+								// 		  } 
+								// 	  }
+								// 	}
+								// });
+								that.$forceUpdate()
+							},
+							fail(err) {
+								console.log(err)
+							},
+							complete(res1) {
+								console.log(res1)
+							}
+						});
+					}
+				})
+			},
+			stop() { //结束定位
+				this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo //运单号
+					this.shippingNoteInfos[0].serialNumber = "0000" //分单号
+					this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData
+					.sendAdCode //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData
+					.unsendAdCode//到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
+					this.shippingNoteInfos[0].startLongitude = this.detailData
+					.sendLongitude //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].startLatitude = this.detailData
+					.sendLatitude //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLongitude = this.detailData
+					.unsendLongitude //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLatitude = this.detailData
+					.unsendLatitude //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].startLocationText = this.detailData
+					.sendCity //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].endLocationText = this.detailData
+					.unloadCity //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
+					this.shippingNoteInfos[0].vehicleNumber = this.detailData
+					.carNumber //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
+					this.shippingNoteInfos[0].driverName = this.detailData
+					.driverName //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
 					this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
 				// var shippingNoteInfos = this.shippingNoteInfos;//运单信息列表
-				console.log("查看结束参数",this.shippingNoteInfos)
-				
+				console.log("查看结束参数", this.shippingNoteInfos)
+
 				let remark = ""
-				sdkwx.stop(this.detailData.carNumber, this.detailData.driverName, remark, this.shippingNoteInfos, function(res) {
+				sdkwx.stop(this.detailData.carNumber, this.detailData.driverName, remark, this.shippingNoteInfos, function(
+					res) {
 					if (res.type == "onSuccess") {
-						console.log("结束成功!!!",res)
+						console.log("结束成功!!!", res)
 						//成功
-					} else if (res.type == "onFailure"){
-							console.log("结束成功!!!",res)
+					} else if (res.type == "onFailure") {
+						console.log("结束成功!!!", res)
 						//失败
-						var errorCode = res.data.errorCode;//错误码
-						var errorMsg = res.data.errorMsg;//错误描述
+						var errorCode = res.data.errorCode; //错误码
+						var errorMsg = res.data.errorMsg; //错误描述
 						this.$refs.uToast.show({
 							type: 'error',
 							message: errorMsg,
 						})
 						return
-					}	
-				});			
+					}
+				});
 			},
 			deletePic(event) {
 				console.log(this[`fileList${event.name}`])
@@ -250,8 +336,8 @@
 				this.detailData.carrierInfo.unloadingDate = defaultDate
 				// this.$forceUpdate()
 			},
-			eliminate(){
-				this.$set(this.detailData,'totalFreight','')
+			eliminate() {
+				this.$set(this.detailData, 'totalFreight', '')
 				// t.totalFreight=''
 				console.log(this.detailData.totalFreight)
 				console.log(this.detailData.totalFreight.length)
@@ -280,7 +366,7 @@
 				// 			console.log(this.detailData.carrierInfo.sendCity)
 				// 			console.log(this.detailData.carrierInfo.sendArea)
 				// 			this.$forceUpdate()
-			
+
 				// 		}
 				// 		this.$helper.fUN_AmapLocation.stop({}, result => {
 				// 				uni.hideLoading()
@@ -297,13 +383,15 @@
 							// that.detailData.hyCarrierInfo.loadingAreaLatitude = res.latitude;
 							that.detailData.carrierInfo.unloadingAreaLongitude = res.longitude;
 							that.detailData.carrierInfo.unloadingAreaLatitude = res.latitude;
-							console.log("1234567890")
 							that.detailData.carrierInfo.unloadCity = that.$helper.filterUrban(res.address.city)
-							that.detailData.carrierInfo.unloadArea = that.$helper.filterUrban(res.address.district)
+							that.detailData.carrierInfo.unloadArea = that.$helper.filterUrban(res.address
+								.district)
 							that.localtion.city = that.$helper.filterUrban(res.address.city)
 							that.localtion.sendArea = that.$helper.filterUrban(res.address.district)
-							that.detailData.carrierInfo.unloadingCity = that.$helper.filterUrban(res.address.city)
-							that.detailData.carrierInfo.unloadingArea = that.$helper.filterUrban(res.address.district)
+							that.detailData.carrierInfo.unloadingCity = that.$helper.filterUrban(res.address
+								.city)
+							that.detailData.carrierInfo.unloadingArea = that.$helper.filterUrban(res.address
+								.district)
 							that.detailData.carrierInfo.unloadingLongitude = res.longitude;
 							that.detailData.carrierInfo.unloadingLatitude = res.latitude;
 							that.$forceUpdate()
@@ -385,7 +473,7 @@
 			async afterRead(event) {
 				// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
 				let lists = [].concat(event.file)
-				
+
 				let fileListLen = this[`fileList${event.name}`].length
 				lists.map((item) => {
 					this[`fileList${event.name}`].push({
@@ -444,16 +532,34 @@
 						// 上传成功回调函数
 						console.log('图片地址', result)
 						this.imgList1.push(result)
-			
+
 					}
 				)
 			},
 			onProgress(e) {
 				console.log(e)
 			},
-
+			getDistance(lat1, lng1, lat2, lng2) {
+				var radLat1 = lat1 * Math.PI / 180.0;
+				var radLat2 = lat2 * Math.PI / 180.0;
+				var a = radLat1 - radLat2;
+				var b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
+				var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
+					Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
+				s = s * 6378.137; // EARTH_RADIUS;
+				s = Math.round(s * 10000) / 10000;
+				// // 纬度之差
+				// var a = lat1 - lat2;
+				// // 经度之差
+				// var b = lng1 - lng2;
+				// // 计算两点距离的公式
+				// var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
+				//         Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(b / 2), 2)));
+				// // 弧长乘地球半径, 返回单位: 千米
+				// s = s * 6378.137;
+				return s;
+			},
 			submit(type) {
-			
 				if (type == 1) {
 					this.alertContent = '确定暂存卸车信息?'
 				} else {
@@ -471,7 +577,7 @@
 						})
 						return
 					}
-					
+
 					if (this.fileList2.length == 0) {
 						this.$refs.uToast.show({
 							type: 'error',
@@ -488,11 +594,27 @@
 				// 	})
 				// 	return
 				// }
+				// this.detailData.publishTaskInfo.unsendLatitude //任务卸车所在地经纬度
+				// this.detailData.publishTaskInfo.unsendLongitude
+				 
+				var lat = this.detailData.carrierInfo.unloadingLatitude  //当前定位所在的经纬度
+				var lng = this.detailData.carrierInfo.unloadingLongitude
+				var endlat = this.detailData.publishTaskInfo?this.detailData.publishTaskInfo.unsendLatitude:this.detailData.unsendLatitude
+				var endlng = this.detailData.publishTaskInfo?this.detailData.publishTaskInfo.unloadingLongitude:this.detailData.unloadingLongitude
+				if(this.editPlace){//true 未编辑 判断当前定位与任务卸车地点距离  大于5KM提示,编辑卸车地点后不在判断
+				let juli = this.getDistance(endlat,endlng,lat,lng)
+					console.log("更改卸车地后距离",juli)
+					if(Number(juli)>5){
+						this.distanceTips="当前定位与运单卸货地不符,请在指定地点确认卸车,如果卸货地发生变化,请修改本页面基本信息中的卸货地址!",
+							this.distance = true
+						return
+					}
+				}
 				this.isShowAlert = true
 				this.detailData.statusFlag = type
 			},
 			confirmClick() {
-				var that=this
+				var that = this
 				if (this.detailData.statusFlag == 1) {
 					delete this.detailData.carrierInfo.unloadingAreaLongitude;
 					delete this.detailData.carrierInfo.unloadingAreaLatitude;
@@ -524,13 +646,11 @@
 				// 	});
 				// 	return
 				// }
-				
-				
 				this.isShowAlert = false
 				uni.showLoading({
-					title:'加载中'
+					title: '加载中'
 				})
-			
+
 				let time = new Date() //卸车时间   去当前时间的时分秒
 				let h = time.getHours();
 				if (h < 10) {
@@ -544,8 +664,9 @@
 				if (m < 10) {
 					m = "0" + m
 				}
-				if(this.detailData.carrierInfo.unloadingDate){//卸车时间 去当前时间的时分秒
-					this.detailData.carrierInfo.unloadingDate= this.detailData.carrierInfo.unloadingDate.split(" ")[0] + " " + h + ":" + f + ":" + m
+				if (this.detailData.carrierInfo.unloadingDate) { //卸车时间 去当前时间的时分秒
+					this.detailData.carrierInfo.unloadingDate = this.detailData.carrierInfo.unloadingDate.split(" ")[0] +
+						" " + h + ":" + f + ":" + m
 				}
 				// this.detailData.carrierInfo.totalFreight = this.detailData.totalFreight
 				this.detailData.carrierInfo.carNo = this.detailData.carNumber
@@ -567,9 +688,10 @@
 									uni.switchTab({
 										url: '/pages/order/index'
 									})
-									if(that.$helper.fUN_AmapLocation){
+									if (that.$helper.fUN_AmapLocation) {
 										that.$helper.fUN_AmapLocation.stop({}, result => {
-											console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
+											console.log('====fUN_AmapLocation定位stop====', JSON
+												.stringify(result));
 										});
 									}
 								}
@@ -656,13 +778,15 @@
 
 	.totalFreight-input {
 		text-align: right;
-		padding-right:18px;
+		padding-right: 18px;
 	}
-	.close{
-		position:absolute;
-		right:0;
-		width:15px;height:15px;
-		top:50%;
+
+	.close {
+		position: absolute;
+		right: 0;
+		width: 15px;
+		height: 15px;
+		top: 50%;
 		transform: translateY(-50%);
 	}
 </style>

+ 2 - 2
pages/public/register.vue

@@ -59,7 +59,7 @@
 					url="/pages/sale/webview?can_share=false&url=http://liangxin.zthymaoyi.com/cytScrectAgreement.html"
 					class="path" hover-class="navigator-hover">《隐私政策》</navigator>
 			</view>
-			
+
 		</view>
 	</view>
 </template>
@@ -271,7 +271,7 @@
 				}
 				if (this.password.length < 6) {
 					uni.showToast({
-						title: '密码输入错误',
+						title: '密码长度需大于6位',
 						icon: 'none',
 						duration: 2000
 					})

BIN
unpackage/res/icons/1024x1024.png


BIN
unpackage/res/icons/120x120.png


BIN
unpackage/res/icons/144x144.png


BIN
unpackage/res/icons/152x152.png


BIN
unpackage/res/icons/167x167.png


BIN
unpackage/res/icons/180x180.png


BIN
unpackage/res/icons/192x192.png


BIN
unpackage/res/icons/20x20.png


BIN
unpackage/res/icons/29x29.png


BIN
unpackage/res/icons/40x40.png


BIN
unpackage/res/icons/58x58.png


BIN
unpackage/res/icons/60x60.png


BIN
unpackage/res/icons/72x72.png


BIN
unpackage/res/icons/76x76.png


BIN
unpackage/res/icons/80x80.png


BIN
unpackage/res/icons/87x87.png


BIN
unpackage/res/icons/96x96.png


+ 72 - 0
util/dw.js

@@ -0,0 +1,72 @@
+const calculateDistance = (options) => {
+
+	return new Promise((resolve, reject) => {
+		uni.getLocation({
+			type: 'gcj02',
+			geocode: true,
+			success: res => {
+				if (res.latitude) {
+					resolve(res)
+					// that.detailData.hyCarrierInfo.longitudeLatitude = res.longitude + ',' + res
+					// 	.latitude
+					// that.detailData.hyCarrierInfo.loadingAreaLongitude = res.longitude;
+					// that.detailData.hyCarrierInfo.loadingAreaLatitude = res.latitude;
+					// that.detailData.hyCarrierInfo.sendCity = that.$helper.filterUrban(res.address.city)
+					// that.localtion.city = that.$helper.filterUrban(res.address.city)
+					// that.$set(that.detailData, 'loadingArea', that.$helper.filterUrban(res.address
+					// 	.district))
+					// that.$set(that.detailData, 'loadingCity', that.$helper.filterUrban(res.address
+					// 	.city))
+					// that.localtion.sendArea = that.$helper.filterUrban(res.address.district)
+					// // .loadingCity = that.$helper.filterUrban(res.address.city)
+					// that.detailData.loadingLongitude = res.longitude;
+					// that.detailData.loadingLatitude = res.latitude;
+					// that.$forceUpdate()
+					// uni.hideLoading()
+				} else {
+					reject(err)
+					// if (uni.getSystemInfoSync().platform == 'android') {
+					// 	var context = plus.android.importClass("android.content.Context");
+					// 	var locationManager = plus.android.importClass(
+					// 		"android.location.LocationManager");
+					// 	var main = plus.android.runtimeMainActivity();
+					// 	var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+					// 	that.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
+					// }
+					// if (that.bool === false) {
+					// 	uni.showModal({
+					// 		title: '提示',
+					// 		content: '请打开定位服务',
+					// 		success: ({
+					// 			confirm,
+					// 			cancel
+					// 		}) => {
+					// 			if (confirm) {
+					// 				if (uni.getSystemInfoSync().platform == 'android') {
+					// 					var Intent = plus.android.importClass(
+					// 						'android.content.Intent');
+					// 					var Settings = plus.android.importClass(
+					// 						'android.provider.Settings');
+					// 					var intent = new Intent(Settings
+					// 						.ACTION_LOCATION_SOURCE_SETTINGS);
+					// 					var main = plus.android.runtimeMainActivity();
+					// 					main.startActivity(intent); // 打开系统设置GPS服务页面
+					// 				}
+					// 			}
+					// 		}
+					// 	});
+					// 	uni.hideLoading()
+					// }
+				}
+			},
+			fail: res => {
+				reject(err)
+			}
+		});
+
+	})
+}
+
+export default {
+	calculateDistance
+}

Some files were not shown because too many files changed in this diff