gjy 3 éve
szülő
commit
7576f58e93
100 módosított fájl, 6018 hozzáadás és 3757 törlés
  1. 68 0
      .gitignore
  2. 103 63
      App.vue
  3. 3 2
      common/appUpdate.js
  4. 286 3
      common/helper.js
  5. 200 199
      components/data/data.js
  6. 0 1
      components/ossutil/uploadFile.js
  7. 2 3
      components/upload.vue
  8. 3 1
      config/index.js
  9. 19 10
      demo.vue
  10. 22 1
      main.js
  11. 87 16
      manifest.json
  12. 17 2
      pages.json
  13. 489 150
      pages/goodSource/index.vue
  14. 287 140
      pages/goodSource/selectCity.vue
  15. 192 39
      pages/goodSource/shippingDetails.vue
  16. 12 21
      pages/mine/driverCertification.vue
  17. 71 15
      pages/mine/driverCertificationNext.vue
  18. 42 10
      pages/mine/editDriverCertification.vue
  19. 21 9
      pages/mine/editDriverCertificationNext.vue
  20. 97 47
      pages/mine/index.vue
  21. 37 18
      pages/mine/manageBankCards/addBankCard.vue
  22. 4 3
      pages/mine/manageBankCards/editBankCard.vue
  23. 121 26
      pages/mine/manageBankCards/index.vue
  24. 1 3
      pages/mine/manageVehicles/addVehicle.vue
  25. 9 2
      pages/mine/manageVehicles/editVehicle.vue
  26. 62 26
      pages/mine/manageVehicles/index.vue
  27. 14 9
      pages/mine/set.vue
  28. 83 56
      pages/mine/settings/editAvatar.vue
  29. 278 157
      pages/mine/settings/editPassword.vue
  30. 137 41
      pages/news/index.vue
  31. 366 68
      pages/order/confirmLoading.vue
  32. 235 50
      pages/order/confirmUnloading.vue
  33. 433 76
      pages/order/index.vue
  34. 282 102
      pages/order/orderDetails.vue
  35. 553 0
      pages/order/signContract.vue
  36. 357 0
      pages/public/code.vue
  37. 0 208
      pages/public/lginOther.vue
  38. 379 183
      pages/public/login.vue
  39. 252 0
      pages/public/loginOther.vue
  40. 388 192
      pages/public/register.vue
  41. 1 1
      static/css/common.scss
  42. BIN
      static/images/goodSource/xf.png
  43. 0 0
      static/images/mine/bank/huaxia.png
  44. 0 0
      static/images/mine/bank/jh@2x.png
  45. 0 0
      static/images/mine/bank/nh@2x.png
  46. 0 0
      static/images/mine/bank/qt@2x.png
  47. 0 0
      static/images/mine/bank/xingye.png
  48. BIN
      static/logo.png
  49. BIN
      static/xiangpica@2x.png
  50. 1 1
      store/index.js
  51. 1 1
      uni_modules/mescroll-uni/components/mescroll-diy/beibei/mescroll-uni-option.js
  52. 1 1
      uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-uni-option.js
  53. 1 1
      uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni-option.js
  54. 1 1
      uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.js
  55. 0 0
      unpackage/dist/dev/.automator/app-plus/.automator.json
  56. 0 0
      unpackage/dist/dev/app-plus/__uniappchooselocation.js
  57. BIN
      unpackage/dist/dev/app-plus/__uniapperror.png
  58. 0 0
      unpackage/dist/dev/app-plus/__uniappes6.js
  59. 0 0
      unpackage/dist/dev/app-plus/__uniappopenlocation.js
  60. 0 0
      unpackage/dist/dev/app-plus/__uniapppicker.js
  61. 0 6
      unpackage/dist/dev/app-plus/__uniappquill.js
  62. 0 0
      unpackage/dist/dev/app-plus/__uniappquillimageresize.js
  63. 0 0
      unpackage/dist/dev/app-plus/__uniappscan.js
  64. BIN
      unpackage/dist/dev/app-plus/__uniappsuccess.png
  65. 0 25
      unpackage/dist/dev/app-plus/__uniappview.html
  66. 0 3
      unpackage/dist/dev/app-plus/app-config-service.js
  67. 0 154
      unpackage/dist/dev/app-plus/app-config.js
  68. 0 9
      unpackage/dist/dev/app-plus/app-service.js
  69. 0 1123
      unpackage/dist/dev/app-plus/app-view.js
  70. BIN
      unpackage/dist/dev/app-plus/components/bert-suggest/icons/contact.png
  71. BIN
      unpackage/dist/dev/app-plus/components/bert-suggest/icons/image.png
  72. BIN
      unpackage/dist/dev/app-plus/components/bert-suggest/icons/suggestion.png
  73. BIN
      unpackage/dist/dev/app-plus/hybrid/html/img/1.png
  74. 0 154
      unpackage/dist/dev/app-plus/hybrid/html/map.html
  75. 0 0
      unpackage/dist/dev/app-plus/manifest.json
  76. 0 96
      unpackage/dist/dev/app-plus/pages/mine/camera/idcard/idcard.js
  77. BIN
      unpackage/dist/dev/app-plus/static/ITkoala-amap/amap.png
  78. BIN
      unpackage/dist/dev/app-plus/static/ITkoala-amap/close.png
  79. BIN
      unpackage/dist/dev/app-plus/static/ITkoala-amap/selectedStart.png
  80. BIN
      unpackage/dist/dev/app-plus/static/ITkoala-amap/sharp.png
  81. BIN
      unpackage/dist/dev/app-plus/static/ITkoala-amap/start.png
  82. 0 209
      unpackage/dist/dev/app-plus/static/css/common.scss
  83. 0 20
      unpackage/dist/dev/app-plus/static/css/font.css
  84. BIN
      unpackage/dist/dev/app-plus/static/icon_delete.png
  85. BIN
      unpackage/dist/dev/app-plus/static/icon_down.png
  86. BIN
      unpackage/dist/dev/app-plus/static/images/common/bz@2x.png
  87. BIN
      unpackage/dist/dev/app-plus/static/images/common/cy@2x.png
  88. BIN
      unpackage/dist/dev/app-plus/static/images/common/dingdan@2x(1).png
  89. BIN
      unpackage/dist/dev/app-plus/static/images/common/dingdan@2x.png
  90. BIN
      unpackage/dist/dev/app-plus/static/images/common/huoyuan@2x(1).png
  91. BIN
      unpackage/dist/dev/app-plus/static/images/common/huoyuan@2x.png
  92. BIN
      unpackage/dist/dev/app-plus/static/images/common/iconmy@2x.png
  93. BIN
      unpackage/dist/dev/app-plus/static/images/common/jt.png
  94. BIN
      unpackage/dist/dev/app-plus/static/images/common/mesicon@2x.png
  95. BIN
      unpackage/dist/dev/app-plus/static/images/common/my@2x.png
  96. BIN
      unpackage/dist/dev/app-plus/static/images/common/quxiao@2x.png
  97. BIN
      unpackage/dist/dev/app-plus/static/images/common/tianjiazhaopian@2x.png
  98. BIN
      unpackage/dist/dev/app-plus/static/images/common/top@2x.png
  99. BIN
      unpackage/dist/dev/app-plus/static/images/common/xiaoxi@2x.png
  100. BIN
      unpackage/dist/dev/app-plus/static/images/goodSource/Mask@2x.png

+ 68 - 0
.gitignore

@@ -0,0 +1,68 @@
+HELP.md
+
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**
+!**/src/test/**
+
+config/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+#/build/
+
+### VS Code ###
+.vscode/
+
+### maven ###
+.mvn
+mvnw
+mvnw.cmd
+
+###properties###
+/unimall-launcher/src/main/resources/application-dev.properties
+/unimall-launcher/src/main/resources/application-prd.properties
+
+### target ###
+/target/
+/unpackage/cache/
+/unpackage/debug/
+/unpackage/dist/
+
+
+###node_modules###
+/node_modules/
+
+
+###logs###
+unimall.log
+unimall.log.*.gz
+unimall.log.*.tmp
+
+###templates###
+/templates/
+
+
+### plugins ###
+/plugins/
+/pages/plugins/
+/unimall-admin/src/views/plugins/

+ 103 - 63
App.vue

@@ -54,15 +54,54 @@
 			        }
 			    })
 			// #ifdef APP-PLUS
+			
+			var that = this
+			//判断该用户是否需要开启持续定位
+			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
 			console.log(type) 
 			if (type == "android") {
-				// appUpdate()
+				appUpdate()
 			}
-			var that = this
 			// plus.push.getClientInfoAsync((info) => {
 			// 	var name = 'clientId'
 			// 	var value = info.clientid
@@ -74,69 +113,69 @@
 			// 	console.log("info.clientid", info.clientid)
 			// }, err => {});
 			// 监听在线消息事件  
-			plus.push.addEventListener("receive", function(msg) {
-				var title = msg.content.split(':')[0]
-				var content = msg.content.split(':')[1]
+			// plus.push.addEventListener("receive", function(msg) {
+			// 	var title = msg.content.split(':')[0]
+			// 	var content = msg.content.split(':')[1]
 
-				let params = {
-					inApp: true, // app内横幅提醒
-					voice: true, // 声音提醒
-					vibration: true, // 振动提醒
-					messageType: "",
-					messageTitle: title,
-					messageContent: content,
-					messageImage: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/logo.png'
-				}
-				console.log("msg", msg)
-				new app_push({
-					...params
-				}).show();
-				var userInfo = uni.getStorageSync("userInfo")
-				var that = this
-				that.$request.baseRequest('get', '/notice/query/noticeNumber').then(res => {
-					if (res.data.data) {
-						let name = 'myTip';
-						let value = res.data.data.task;
-						that.$store.commit('$uStore', {
-							name,
-							value
-						});
-						if (value != 0 && value) {
-							uni.setTabBarBadge({
-								index: 4,
-								text: value + ""
-							})
-						}
-						name = 'taskTip';
-						value = res.data.data.task;
-						that.$store.commit('$uStore', {
-							name,
-							value
-						});
-						// name = 'contractTip';
-						// value = res.data.data.contractTip;
-						// that.$store.commit('$uStore', {
-						// 	name,
-						// 	value
-						// });
-					}
-				})
-				//其它逻辑  
-			}, false);
-			//监听系统通知栏消息点击事件  
-			plus.push.addEventListener('click', function(msg) {
-				//处理点击消息的业务逻辑代码  
-				if (msg.content && msg.content.contains("任务")) {
-					uni.navigateTo({
-						url: '/pages/task/my_task'
-					})
-				} else if (msg.content && (msg.content.contains("合同") || msg.content.contains("交易"))) {
-					uni.navigateTo({
-						url: '/pageB/contract/contract'
-					})
-				}
+			// 	let params = {
+			// 		inApp: true, // app内横幅提醒
+			// 		voice: true, // 声音提醒
+			// 		vibration: true, // 振动提醒
+			// 		messageType: "",
+			// 		messageTitle: title,
+			// 		messageContent: content,
+			// 		messageImage: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/logo.png'
+			// 	}
+			// 	console.log("msg", msg)
+			// 	new app_push({
+			// 		...params
+			// 	}).show();
+			// 	var userInfo = uni.getStorageSync("userInfo")
+			// 	var that = this
+			// 	that.$request.baseRequest('get', '/notice/query/noticeNumber').then(res => {
+			// 		if (res.data.data) {
+			// 			let name = 'myTip';
+			// 			let value = res.data.data.task;
+			// 			that.$store.commit('$uStore', {
+			// 				name,
+			// 				value
+			// 			});
+			// 			if (value != 0 && value) {
+			// 				uni.setTabBarBadge({
+			// 					index: 4,
+			// 					text: value + ""
+			// 				})
+			// 			}
+			// 			name = 'taskTip';
+			// 			value = res.data.data.task;
+			// 			that.$store.commit('$uStore', {
+			// 				name,
+			// 				value
+			// 			});
+			// 			// name = 'contractTip';
+			// 			// value = res.data.data.contractTip;
+			// 			// that.$store.commit('$uStore', {
+			// 			// 	name,
+			// 			// 	value
+			// 			// });
+			// 		}
+			// 	})
+			// 	//其它逻辑  
+			// }, false);
+			// //监听系统通知栏消息点击事件  
+			// plus.push.addEventListener('click', function(msg) {
+			// 	//处理点击消息的业务逻辑代码  
+			// 	if (msg.content && msg.content.contains("任务")) {
+			// 		uni.navigateTo({
+			// 			url: '/pages/task/my_task'
+			// 		})
+			// 	} else if (msg.content && (msg.content.contains("合同") || msg.content.contains("交易"))) {
+			// 		uni.navigateTo({
+			// 			url: '/pageB/contract/contract'
+			// 		})
+			// 	}
 
-			}, false);
+			// }, false);
 			// #endif
 			this.$socket.initWebIM(this.$ws, true, true)
 			let userInfo = uni.getStorageSync('userInfo') || '';
@@ -153,6 +192,7 @@
 		},
 		onShow: function() {
 			console.log('App Show')
+			
 		},
 		onHide: function() {
 			console.log('App Hide')

+ 3 - 2
common/appUpdate.js

@@ -6,11 +6,12 @@ export default function appUpdate() {
 		
 	let baseUrlNew = config.def().baseUrlNew
 	uni.request({
-	    url: baseUrlNew + '/appVersion/selectInfo',
+	    url: 'https://apitest.eliangeyun.com/appVersion/selectInfo',
 	    data: {
 	    	appid: plus.runtime.appid,
 	    	version: plus.runtime.version,
-	    	imei: "1"
+	    	imei: "1",
+			type:'sj'
 	    },
 	    method: 'GET',
 	    success: (res) => {			

+ 286 - 3
common/helper.js

@@ -38,6 +38,7 @@ const makeValidityPeriod = function(type) {
 	_list.push(_list1, _list2, _list3)
 	return _list
 }
+const fUN_AmapLocation = uni.requireNativePlugin('FUN-AmapLocation');
 
 const getListByUserId = function() {
 	let baseUrlNew = config.def().baseUrlNew
@@ -94,12 +95,289 @@ const setAudit = (item) => {
 }
 const contactCustomerService = (item) => {
 	console.log(item)
+	if (!item) {
+		item = '110'
+	}
 	console.log("联系客服")
 	uni.makePhoneCall({
-		phoneNumber: '114' //仅为示例
-	});
+		phoneNumber: item,
+		success: (res) => {
+			console.log('调用成功!')
+		},
 
+		// 失败回调
+		fail: (res) => {
+			console.log('调用失败!')
+			contactCustomerService(item)
+		}
+	});
+}
+// 获取市、区简称
+const filterUrban = (s) => {
+	if (s.lastIndexOf('市') != -1) {
+		return s.substring(0, s.length - 1)
+	}
+	return s
+}
+const filterArea = (q) => {
+	if (q.lastIndexOf('区') != -1) {
+		return q.substring(0, q.length - 1)
+	}
+	return q
+}
+// 根据当前时间获取本周一到本周日日期
+function getDates() {
+	// var new_Date = new Date(t2)
+	var new_Date = new Date()
+	var timesStamp = new_Date.getTime()
+	var currenDay = new_Date.getDay()
+	var dates = []
+	for (var i = 0; i < 7; i++) {
+		dates.push(new Date(timesStamp + 24 * 60 * 60 * 1000 * (i - (currenDay + 6) % 7)).toLocaleDateString().replace(
+			/[年月]/g, '-').replace(/[日上下午]/g, ''));
+	}
+	var weekStar = new Date(dates[0] + ' 00:00:00').getTime()
+	var weekEnd = new Date(dates[dates.length - 1] + ' 23:59:59').getTime()
+	var week = [weekStar, weekEnd]
+	return week
+}
+//判断是否是今天,昨天,明天
+function isToday(str,type) {
+	//type == 0 判断是否是今天,type == 1 判断是否是昨天,type == 2 判断是否是明天
+	if (type == 0){
+		if (new Date(str).toDateString() === new Date().toDateString()) {
+			// console.log('今天');
+		    return true
+		} else{
+			// console.log('不是今天');
+			return false
+		}
+	}if (type == 1) {
+		if (new Date(str).toDateString() === new Date(new Date().getTime() -1000 * 60 * 60 * 24).toDateString()) {
+			// console.log('昨天');
+		    return true
+		} else{
+			// console.log('不是昨天');
+			return false
+		}
+	}
+	if (type == 2) {
+		if (new Date(str).toDateString() === new Date(new Date().getTime() +1000 * 60 * 60 * 24).toDateString()) {
+			// console.log('明天');
+		    return true
+		} else{
+			// console.log('不是明天');
+			return false
+		}
+	}
+}
+const changeTime = (t1) => {
+	// t1截止时间  t2当前时间
+	// 调用getDtes函数把当前时间传过去,获取本周一和本周日时间戳
+	// var weeks = getDates(t2)
+	var weeks = getDates()
+	// console.log(weeks)
+	var dateBegin = new Date(t1.replace(/-/g,'/'))//解决ios时new Date(2021-04-17 09:50:20)报错
+	// var dateEnd = new Date(t2)
+	var dateEnd = new Date()
+	// 时间戳
+	var end = dateBegin.getTime()
+	// console.log(end)
+	var nows = dateEnd.getTime()
+	// console.log(nows)
+	// 获取当天0点时间戳todayStar
+	const start = new Date(new Date(dateEnd).toLocaleDateString())
+	start.setTime(start.getTime())
+	var todayStar = new Date(start).getTime()
+	// console.log(todayStar)
+	// 获取当天23点59分59秒时间戳todayEnd
+	var ends = new Date(new Date(new Date(dateEnd).toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1)
+	var todayEnd = new Date(ends).getTime()
+	// console.log(todayEnd)
+	// 时间差的毫秒数
+	var dateDiff = Math.abs(dateBegin.getTime() - dateEnd.getTime())
+	// 计算出相差天数
+	var dayDiff = Math.floor(dateDiff / (24 * 3600 * 1000))
+	// console.log(dayDiff);
+	// 计算天数后剩余的毫秒数
+	var leave1 = dateDiff % (24 * 3600 * 1000)
+	// 计算出小时数
+	var hours = Math.floor(leave1 / (3600 * 1000))
+	// console.log(hours);
+	// 计算相差分钟数
+	var leave2 = leave1 % (3600 * 1000) // 计算小时数后剩余的毫秒数
+	// 计算相差分钟数
+	var minutes = Math.floor(leave2 / (60 * 1000))
+	// console.log(minutes);
+	// t1截止时间  t2当前时间
+	
+	if (dateEnd < dateBegin) {
+		if ((dayDiff === 0)) {
+			if (hours === 0) {
+				if (minutes < 30 || minutes == 30) {
+					return minutes + '分钟后'
+				}else{
+					return '今天' + t1.substring(10, 16)
+				}
+			} else {
+				if (isToday(end,0)) {
+					return '今天' + t1.substring(10, 16)
+				}else{
+					return '明天' + t1.substring(10, 16)
+				}
+			}
+		} else if (dayDiff === 1) {
+			if (isToday(end,2)){
+				return '明天' + t1.substring(10, 16)
+			}else{
+				if ((weeks[0] < end || weeks[0] == end) && (weeks[1] > end || weeks[1] == end)) {
+					var weekArray = new Array('日', '一', '二', '三', '四', '五', '六')
+					var week = weekArray[new Date(t1.replace(/-/g,'/')).getDay()] // 注意此处必须是先new一个Date
+					return '周' + week + t1.substring(10, 16)
+				} else {
+					return t1.substring(0, 16).replace(/-/g, '/')
+				}
+			}
+		} else {
+			if ((weeks[0] < end || weeks[0] == end) && (weeks[1] > end || weeks[1] == end)) {
+				var weekArray = new Array('日', '一', '二', '三', '四', '五', '六')
+				var week = weekArray[new Date(t1.replace(/-/g,'/')).getDay()] // 注意此处必须是先new一个Date
+				return '周' + week + t1.substring(10, 16)
+			} else {
+				return t1.substring(0, 16).replace(/-/g, '/')
+			}
+		}
+	}
+	if (dateEnd === dateBegin) {
+		return '刚刚'
+	}
+	if (dateEnd > dateBegin) {
+		if (dayDiff === 0) {
+			if (hours === 0) {
+				if (minutes < 60 || minutes == 60) {
+					if (minutes < 5 || minutes == 5) {
+						return '刚刚'
+					} else {
+						return minutes + '分钟前'
+					}
+				} else {
+					return '今天' + t1.substring(10, 16)
+				}
+			} else {
+				if (isToday(end,0)) {
+					return hours+'小时前'
+				}else{
+					
+					return '昨天' + t1.substring(10, 16)
+				}
+			}
+		} else if (dayDiff === 1) {
+			if (isToday(end,1)){
+				// return '昨天' + t1.substring(10, 16)
+				return dayDiff + '天前'
+			}else{
+				if ((weeks[0] < end || weeks[0] == end) && (weeks[1] > end || weeks[1] == end)) {
+					var weekArray = new Array('日', '一', '二', '三', '四', '五', '六')
+					var week = weekArray[new Date(t1.replace(/-/g,'/')).getDay()] // 注意此处必须是先new一个Date
+					return '周' + week + t1.substring(10, 16)
+				} else {
+					return t1.substring(0, 16).replace(/-/g, '/')
+				}
+			}
+		}else if (dayDiff < 30){
+			// return  dayDiff +'天前'+ t1.substring(10, 16)
+			return  dayDiff +'天前'
+			
+		}else if (dayDiff > 30 && dayDiff < 365){
+			return t1.substring(5, 10)
+			
+		}else if (dayDiff > 365){
+			
+			return t1.substring(0, 4)
+			
+		}else {
+			if ((weeks[0] < end || weeks[0] == end) && (weeks[1] > end || weeks[1] == end)) {
+				var weekArray = new Array('日', '一', '二', '三', '四', '五', '六')
+				var week = weekArray[new Date(t1.replace(/-/g,'/')).getDay()] // 注意此处必须是先new一个Date
+				return '周' + week + t1.substring(10, 16)
+			} else {
+				return t1.substring(0, 16).replace(/-/g, '/')
+			}
+		}
+	}
 }
+//获取省份简称
+const getProvinceAbbreviation = (province) => {
+	if (province == "北京市" || province == "北京")
+		return "京";
+	else if (province == "天津市" || province == "天津")
+		return "津";
+	else if (province == "重庆市" || province == "重庆")
+		return "渝";
+	else if (province == "上海市" || province == "上海")
+		return "沪";
+	else if (province == "河北省" || province == "河北")
+		return "冀";
+	else if (province == "山西省" || province == "山西")
+		return "晋";
+	else if (province == "辽宁省" || province == "辽宁")
+		return "辽";
+	else if (province == "吉林省" || province == "吉林")
+		return "吉";
+	else if (province == "黑龙江省" || province == "黑龙江")
+		return "黑";
+	else if (province == "江苏省" || province == "江苏")
+		return "苏";
+	else if (province == "浙江省" || province == "浙江")
+		return "浙";
+	else if (province == "安徽省" || province == "安徽")
+		return "皖";
+	else if (province == "福建省" || province == "福建")
+		return "闽";
+	else if (province == "江西省" || province == "江西")
+		return "赣";
+	else if (province == "山东省" || province == "山东")
+		return "鲁";
+	else if (province == "河南省" || province == "河南")
+		return "豫";
+	else if (province == "湖北省" || province == "湖北")
+		return "鄂";
+	else if (province == "湖南省" || province == "湖南")
+		return "湘";
+	else if (province == "广东省" || province == "广东")
+		return "粤";
+	else if (province == "海南省" || province == "海南")
+		return "琼";
+	else if (province == "四川省" || province == "四川")
+		return "川";
+	else if (province == "贵州省" || province == "贵州")
+		return "贵";
+	else if (province == "云南省" || province == "云南")
+		return "云";
+	else if (province == "陕西省" || province == "陕西")
+		return "陕";
+	else if (province == "甘肃省" || province == "甘肃")
+		return "甘";
+	else if (province == "青海省" || province == "青海")
+		return "青";
+	else if (province == "台湾省" || province == "台湾")
+		return "台";
+	else if (province == "内蒙古自治区" || province == "内蒙古")
+		return "蒙";
+	else if (province == "广西壮族自治区" || province == "广西")
+		return "桂";
+	else if (province == "宁夏回族自治区" || province == "宁夏")
+		return "宁";
+	else if (province == "新疆维吾尔自治区" || province == "新疆")
+		return "新";
+	else if (province == "西藏自治区" || province == "西藏")
+		return "藏";
+	else if (province == "香港特别行政区" || province == "香港")
+		return "港";
+	else if (province == "澳门特别行政区" || province == "澳门")
+		return "澳";
+}
+
 export default {
 	getListByUserId,
 	setAudit,
@@ -108,5 +386,10 @@ export default {
 	chooseImage,
 	imgType,
 	imgTypeList,
-	makeValidityPeriod
+	makeValidityPeriod,
+	getProvinceAbbreviation,
+	filterUrban,
+	filterArea,
+	fUN_AmapLocation,
+	changeTime
 }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 200 - 199
components/data/data.js


+ 0 - 1
components/ossutil/uploadFile.js

@@ -21,7 +21,6 @@ const uploadFile = function (filePath, dir, successc, failc) {
     })
     return;
   }
-  
   //图片名字 可以自行定义,     这里是采用当前的时间戳 + 150内的随机数来给图片命名的
   const aliyunFileKey = dir + new Date().getTime() + Math.floor(Math.random() * 150) + '.png';
   

+ 2 - 3
components/upload.vue

@@ -170,7 +170,7 @@
 			// 成功背景颜色
 			checkBgColor:{
 				type: String,
-				default: '#22C572'
+				default: '#2772FB'
 			},
 			// 成功icon颜色
 			checkColor:{
@@ -313,7 +313,6 @@
 				uploading: false,
 				isSelectFile: false,
 				imgShow:false,
-				url:''
 			};
 		},
 		watch: {
@@ -666,7 +665,7 @@
 		top: 0rpx;
 		right: 0rpx;
 		z-index: 10;
-		background-color: $u-error;
+		background: rgba(17, 26, 52, 0.5);
 		border-radius:0 0 0 10rpx;
 		width: 44rpx;
 		height: 44rpx;

+ 3 - 1
config/index.js

@@ -1,5 +1,7 @@
 const dev = {
-	baseUrlNew: 'http://192.168.1.121:8090',
+	// baseUrlNew: 'https://apitest.eliangeyun.com',
+	baseUrlNew: 'http://192.168.1.114:8099',
+	// baseUrlNew: 'http://192.168.1.116:8999',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 19 - 10
demo.vue

@@ -18,6 +18,9 @@
 		15、组件传入当前对象
 		16、防止点击穿透
 		17、数组删除指定元素
+		18、缓存
+		19、主动刷新滚动数据
+		20、helper
 	</view>
 </template>
 
@@ -69,24 +72,16 @@
 				// this.$refs.uToast.show({
 				// 	type: 'error',
 				// 	message: "最多选择3个地区",
-				// })
-				// let params = {
-				// 		type: 'success',
-				// 		title: '成功主题(带图标)',
-				// 		message: "庄生晓梦迷蝴蝶",
-				// 		iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
-				// 	}
-				// this.$refs.uToast.show({
-				// 	...params,
 				// 	complete() {
 				// 		params.url && uni.navigateTo({
 				// 			url: params.url
 				// 		})
 				// 	}
 				// })
+	
 				// uni.$u.toast('倒计时结束后再发送');
 				// 9、
-				// <u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true' :showCancelButton='true' confirmColor='#22C572'  @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
+				// <u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true' :showCancelButton='true' confirmColor='#2772FB'  @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
 				// confirmClick(){
 				// 	this.isShowAlert = fasle
 				// },
@@ -118,6 +113,20 @@
 				// 15、$event
 				// 16、@click.stop
 				// 17、this.carList.splice(index,1)
+				// 18、
+				 // uni.setStorageSync('storage_key', 'hello');
+				 // uni.getStorageSync('storage_key');
+				 // 19、
+				 // mescrollInit(mescroll) {
+				 // 	this.mescroll = mescroll;
+				 // },
+				 // this.mescroll.resetUpScroll()
+				 // this.upCallback({
+				 // 	size: 10,
+				 // 	num: 1
+				 // })
+				 // 20、
+				 // import helper from '@/common/helper.js';
 			}
 		}
 	}

+ 22 - 1
main.js

@@ -24,7 +24,14 @@ Vue.config.productionTip = false
 
 App.mpType = 'app'
 Vue.use(uView)
-
+const logout = () => {
+	uni.removeStorage({
+		key: 'userInfo'
+	})
+}
+Vue.prototype.$api = {
+	logout,
+};
 // #ifdef MP
 // 引入uView对小程序分享的mixin封装
 const mpShare = require('@/uni_modules/uview-ui/libs/mixin/mpShare.js')
@@ -39,3 +46,17 @@ const app = new Vue({
 // require('./util/request/index')(app)
 
 app.$mount()
+// #ifdef APP-PLUS
+let main = plus.android.runtimeMainActivity(); 
+plus.runtime.quit = function() {
+    main.moveTaskToBack(false);
+};
+
+plus.nativeUI.toast = (function(str) {
+    if (str == '再按一次退出应用') {
+
+        main.moveTaskToBack(false);
+        return false;
+    }
+});
+// #endif

+ 87 - 16
manifest.json

@@ -1,14 +1,14 @@
 {
-    "name" : "uni-app开发模板",
-    "appid" : "__UNI__6485BEA",
+    "name" : "智运",
+    "appid" : "__UNI__9C76CB6",
     "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
+    "versionName" : "1.0.4",
+    "versionCode" : 104,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
         "usingComponents" : true,
-        "nvueStyleCompiler" : "uni-app",
+        "nvueStyleCompiler" : "智运",
         "compilerVersion" : 3,
         "splashscreen" : {
             "alwaysShowBeforeRender" : true,
@@ -17,33 +17,104 @@
             "delay" : 0
         },
         /* 模块配置 */
-        "modules" : {},
+        "modules" : {
+            "Maps" : {},
+            "Geolocation" : {},
+            "iBeacon" : {}
+        },
         /* 应用发布信息 */
         "distribute" : {
             /* android打包配置 */
             "android" : {
                 "permissions" : [
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                     "<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.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_ACCOUNTS\"/>",
+                    "<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.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
+                    "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
                 ]
             },
             /* ios打包配置 */
             "ios" : {},
             /* SDK配置 */
-            "sdkConfigs" : {}
+            "sdkConfigs" : {
+                "ad" : {},
+                "maps" : {
+                    "amap" : {
+                        "appkey_ios" : "450806e9eef29de257faad3a06ec7e9a",
+                        "appkey_android" : "dc40c1be0513c1c8e01eb560318dbc68"
+                    }
+                },
+                "geolocation" : {
+                    "amap" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appkey_ios" : "450806e9eef29de257faad3a06ec7e9a",
+                        "appkey_android" : "dc40c1be0513c1c8e01eb560318dbc68"
+                    }
+                }
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
+            }
+        },
+        "nativePlugins" : {
+            "FUN-AmapLocation" : {
+                "__plugin_info__" : {
+                    "name" : "持续定位、后台定位、高德定位",
+                    "description" : "持续定位、后台定位、高德定位, 后台保活,购前先测是否符合需求[反馈819589789@qq.com] ",
+                    "platforms" : "Android",
+                    "url" : "https://ext.dcloud.net.cn/plugin?id=2018",
+                    "android_package_name" : "uni.UNI9C76CB6",
+                    "ios_bundle_id" : "uni.UNI9C76CB6",
+                    "isCloud" : true,
+                    "bought" : 1,
+                    "pid" : "2018",
+                    "parameters" : {}
+                }
+            }
         }
     },
     /* 快应用特有相关 */

+ 17 - 2
pages.json

@@ -66,6 +66,12 @@
 				"navigationStyle": "custom"
 			}
 		},
+		{
+			"path": "pages/public/code",
+			"style": {
+				"navigationStyle": "custom"
+			}
+		},
 		{
 			"path": "pages/public/register",
 			"style": {
@@ -251,13 +257,22 @@
             
         }
         ,{
-            "path" : "pages/public/lginOther",
+            "path" : "pages/public/loginOther",
             "style" :                                                                                    
             {
               "navigationStyle": "custom"
             }
             
-        }
+        },
+		{
+		    "path" : "pages/order/signContract",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "签订合同",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 489 - 150
pages/goodSource/index.vue

@@ -5,98 +5,123 @@
 			<image class="banner-img" src="@/static/images/goodSource/banner@2x.png" mode='widthFix'></image>
 			<view class="head flex s-row paddingr35">
 				<view class="flex flex-space-between">
-					<view class="flex s-row item1">
+					<view class="flex s-row item1" @click="goCity(0)">
 						<view class="fontsize-28 gray">装车</view>
-						<view class="fontsize-46 fontweight-500 text" @click="goCity(0)">{{startPlace}}</view>
+						<view class="fontsize-46 fontweight-500 text">{{startPlace.selected}}</view>
 					</view>
 					<image class="change-btn item2" src="@/static/images/goodSource/change.png" mode='widthFix'
 						@click="changeCity"></image>
-					<view class="flex s-row item3">
+					<view class="flex s-row item3" @click="goCity(1)">
 						<view class="fontsize-28 gray text-align-right">卸车</view>
-						<view class="fontsize-46 fontweight-500 text" @click="goCity(1)">{{endPlace}}</view>
+						<view class="fontsize-46 fontweight-500 text">{{endPlace.selected}}</view>
 					</view>
 				</view>
 				<view>
-					<u-button type="" class="btn-color fontsize-36 m-top20"> 查询</u-button>
+					<u-button type="" class="btn-color fontsize-36 m-top20" @click="upCallback({size:10,num:1})"> 查询
+					</u-button>
 				</view>
 			</view>
 		</view>
 		<view :class="scrollTop>1200?'fixed1':''"></view>
-		<u-tabs :list="tabList" @click="clickTab" :lineColor="scrollTop>1200?'white':'#303133'" :current='tabIndex'
-			:inactiveStyle="{color: scrollTop>1200?'white':'',}" :activeStyle="{
-						color: scrollTop>1200?'white':'',
-						fontWeight: 'bold',
-						transform: 'scale(1.05)'
-					}" :class="scrollTop>1200?'fixed':''"></u-tabs>
+		<view class="tab-view">
+			<u-tabs :list="tabList" @click="clickTab" :lineColor="scrollTop>1200?'white':'#303133'" :current='tabIndex'
+				:inactiveStyle="{color: scrollTop>1200?'white':'',}" :activeStyle="{
+							color: scrollTop>1200?'white':'',
+							fontWeight: 'bold',
+							transform: 'scale(1.05)'
+						}" :class="scrollTop>1200?'fixed':''"></u-tabs>
+			<view class="tab-right" @click="selectType">
+				<view>{{pickerSelect}}</view>
+				<u-icon name="arrow-down" size="20"></u-icon>
+			</view>
+		</view>
+		<u-picker :show="show" :columns="columns" :closeOnClickOverlay='true' @close='selectTypeClose'
+			@cancel='selectTypeClose' @confirm='confirmSelectType'></u-picker>
 		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
-			<view :id="'good'+good.id" class="good-list" v-for="good in goods" :key="good.id"
-				@click="toDetail(good.id)">
-				<view style="padding: 0 35rpx 20rpx 35rpx;">
-					<view class="flex flex-space-between">
-						<view class="left flex flex-space-between">
-							<view class="ssx">辽</view>
-							<view class="level2-title">营口 鲅鱼圈</view>
-							<view>
-								<image class="jt-icon" src="@/static/images/goodSource/jt.png" mode='widthFix'></image>
+			<view v-for="(good,index) in goods" :key="index" @click="toDetail(good.id)">
+				<view v-if="good.peripheralInfo==1&&isFirstIndex==index" class="other-goods">周边货源</view>
+				<view class="good-list">
+					<view style="padding: 0 35rpx 20rpx 35rpx;position: relative;">
+						<image src="@/static/images/goodSource/xf.png" mode="widthFix" class="xf-iamge" v-if="good.freightAdvance==1"></image>
+						<view class="flex align-center">
+							<view class="item1">
+								<view class="ssx">{{$helper.getProvinceAbbreviation(good.sendPrivate)}}</view>
+								<view class="level2-title">{{$helper.filterUrban(good.sendCity)}}
+									{{$helper.filterArea(good.sendArea)}}
+								</view>
 							</view>
-							<view class="ssx">
-								京
+
+							<image class="jt-icon item2" src="@/static/images/goodSource/jt.png" mode='widthFix'>
+							</image>
+							<view class="item3">
+								<view class="ssx">{{$helper.getProvinceAbbreviation(good.unloadPrivate)}}</view>
+								<view class="level2-title">{{$helper.filterUrban(good.unloadCity)}}
+									{{$helper.filterArea(good.unloadArea)}}
+								</view>
 							</view>
-							<view class="level2-title">北京 通州</view>
 						</view>
 						<view class="right gray">
-							01.10
+							<!-- {{good.createDate}} -->
+							{{$helper.changeTime(good.createDate)}}
 						</view>
-					</view>
-					<view class="flex flex-space-between">
-						<view class="left">
-							<view class="flex">
-								<view class="fontsize-25 gray mr20">货距 10km</view>
-								<view class="fontsize-25 gray ">运距 35km</view>
+						<view class="flex flex-space-between yf-style">
+							<view class="left">
+								<view class="flex">
+									<view class="gray mr20">货距 {{good.cargoDistance}}km</view>
+									<view class="gray ">运距 {{good.distance}}km</view>
+								</view>
+								<view class="flex gray row">
+									<view>{{good.goodsName}} | </view>
+									<!-- <u-line direction="col"></u-line> -->
+									<view>{{carLength(good)}} | {{carType(good)}} | {{carWeight(good)}}</view>
+								</view>
+								<view class="flex row">
+									<view class="row-tips">{{good.taskDescription}}</view>
+								</view>
 							</view>
-							<view class="flex fontsize-25 gray row">
-								<view>玉米 | </view>
-								<view>3.8-5米 | </view>
-								<view>厢式/平板/高栏 | </view>
-								<view>10吨</view>
+							<view class="right flex h-color">
+								<view class="fontsize-46">
+									{{good.freightPrice}}
+								</view>
+								<view class="flex dw">元/吨</view>
 							</view>
-							<view class="flex row">
-								<view class="row-tips">运输过程中其他费用,发货方承担。</view>
-							</view>
-						</view>
-						<view class="right flex h-color">
-							<view class="fontsize-46">
-								300
-							</view>
-							<view class="flex dw">元/吨</view>
 						</view>
 					</view>
-				</view>
-				<view class="flex flex-space-between item-bottom">
-					<view class="left flex row">
-						<u--image :showLoading="true" :src="good.goodImg" width="70rpx" height="70rpx" shape="circle">
-						</u--image>
-						<view class="name">张颖</view>
-						<view class="hp flex fontsize-24">
-							<view class="gray">评分</view>
-							<view class="number-color">99%</view>
+					<view class="flex flex-space-between item-bottom">
+						<view class="left flex row">
+							<u--image
+								:src="good.cargoOwnerPortrait?good.cargoOwnerPortrait:'../../static/images/mine/tx.png'"
+								width='100rpx' height='100rpx' shape="circle">
+							</u--image>
+							<view class="name">{{good.cargoOwnerName}}</view>
+							<!-- <view class="hp flex fontsize-24">
+								<view class="gray">评分</view>
+								<view class="number-color">99%</view>
+							</view>
+							
+							<view class="sum flex fontsize-24">
+								<view class="gray">发运次数</view>
+								<view class="number-color">106</view>
+							</view> -->
 						</view>
-						<view class="sum flex fontsize-24">
-							<view class="gray">发运次数</view>
-							<view class="number-color">106</view>
+						<view class="right">
+							<view @click.stop="grabOrders(good)" class="qd" v-if='hasLogin'>抢单</view>
 						</view>
 					</view>
-					<view class="right">
-						<view @click.stop="grabOrders(good.id)" class="qd">抢单</view>
-					</view>
 				</view>
 			</view>
 		</mescroll-body>
-<u-toast ref="uToast"></u-toast>
+		<u-toast ref="uToast"></u-toast>
+		<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
+			confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
 	</view>
 </template>
 <script>
+	var that
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import {
+		mapState
+	} from 'vuex';
 	import {
 		apiGoods
 	} from "@/api/mock.js"
@@ -104,24 +129,42 @@
 		mixins: [MescrollMixin], // 使用mixin
 		data() {
 			return {
-				startPlace: '齐齐哈尔',
-				endPlace: '全国',
+				isFirstIndex: null,
+				ObjSelect: {},
+				isShowAlert: false,
+				alertTitle: '确定抢单?',
+				show: false,
+				columns: [
+					['全部类型', '运费先付']
+				],
+				startPlace: {},
+				endPlace: {},
+				otherGoods: [], // 数据列表
 				goods: [], // 数据列表
 				src: 'https://cdn.uviewui.com/uview/album/1.jpg',
 				height: "", // 需要固定swiper的高度
-				tabList: [{
-					name: '全部'
-				}, {
-					name: '推荐'
-				}, {
-					name: '按时间'
-				}, {
-					name: '按距离'
-				}, {
-					name: '运费先付'
-				}],
+				tabList: [
+					// 	{
+					// 	name: '全部'
+					// }, 
+					{
+						name: '推荐'
+					}, {
+						name: '按时间'
+					}, {
+						name: '按距离'
+					},
+					// {
+					// 	name: '运费先付'
+					// },
+				],
+				pickerSelect: '全部类型',
 				tabIndex: 0,
-				scrollTop: 0
+				scrollTop: 0,
+				count: 0,
+				lng: '',
+				lat: '',
+				bool: false,
 			}
 		},
 		onTabItemTap(e) {
@@ -130,27 +173,59 @@
 				scrollTop: 0,
 				duration: 300
 			});
-			console.log(e)
 		},
 		created() {
-		
+
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
+		},
+		onShow() {
+			//获取上一次点击起装卸地
+			if (uni.getStorageSync('fPlaceObj')) {
+				this.startPlace = uni.getStorageSync('fPlaceObj');
+			} else {
+				// #ifdef APP-PLUS
+				this.getLngLat();
+				// #endif
+			}
+			if (uni.getStorageSync('sPlaceObj')) {
+				this.endPlace = uni.getStorageSync('sPlaceObj');
+			} else {
+				this.endPlace.selected = '全国'
+			}
+			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+				reCommonId: this.userInfo.id,
+			}).then(res3 => {
+				if (res3.data) {
+					let name = 'myTip';
+					let value = res3.data
+					if (value == 0) {
+						uni.removeTabBarBadge({
+							index: 2
+						})
+					}
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if (value != 0 && value) {
+						uni.setTabBarBadge({
+							index: 2,
+							text: value + ""
+						})
+					}
+				}
+			})
+			// this.mescroll.resetUpScroll()
+
 		},
 		onLoad() {
-			//#ifdef APP-PLUS
-			this.getLngLat();
-			//#endif
-			// let _isHave = this.$utils.getRoles('aaa')
-			// console.log(_isHave)
-			  // var Ip=returnCitySN['cip']
-			  //     var cityname=returnCitySN['cname']
-			  //     localStorage.setItem('Ip', Ip)
-			  //     console.log(localStorage.getItem('Ip', Ip))
-			  //     localStorage.setItem('cityname', cityname)
-			  //     console.log(localStorage.getItem('cityname', cityname))
+			that = this
 		},
 		onPageScroll(res) {
 			this.scrollTop = res.scrollTop
-			console.log("页面滚动了", res.scrollTop)
+			// console.log("页面滚动了", res.scrollTop)
 			if (this.scrollTop > 1200) {
 				uni.setTabBarItem({
 					index: 0,
@@ -169,29 +244,151 @@
 
 		},
 		methods: {
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			confirmClick() {
+				let item = this.ObjSelect
+				let _obj = {
+					driverCommonId: this.firstAuthentication.commonId,
+					commonId: item.commonId,
+					cargoOwnerName: item.cargoOwnerName,
+					cargoOwner: item.cargoOwner,
+					sendPrivate: item.sendPrivate,
+					sendCity: item.sendCity,
+					sendArea: item.sendArea,
+					sendDetailedAddress: item.sendDetailedAddress,
+					unloadPrivate: item.unloadPrivate,
+					unloadCity: item.unloadCity,
+					unloadArea: item.unloadArea,
+					unloadDetailedAddress: item.unloadDetailedAddress,
+					goodsName: item.goodsName,
+					distance: item.distance,
+					freightPrice: item.freightPrice,
+					driverName: this.firstAuthentication.driverName,
+					driverPhone: this.firstAuthentication.driverPhone,
+					cargoOwnerPhone: item.cargoOwnerPhone
+				}
+
+				this.$request.baseRequest('post', '/publishTaskInfo/api/addOrder', _obj).then(res => {
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "抢单成功!",
+								complete() {
+									uni.switchTab({
+										url: "/pages/order/index"
+									})
+								}
+							})
+						}else{
+							this.$refs.uToast.show({
+								type: 'error',
+								message:res.message,
+							})
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+				this.isShowAlert = false
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			carLength(good) {
+				let length = ''
+				if (good.carLengthSmall && good.carLength) {
+					length = good.carLengthSmall + '~' + good.carLength + '米'
+				} else if (good.carLengthSmall && !good.carLength) {
+					length = "大于" + good.carLengthSmall + '米'
+				} else if (good.carLength && !good.carLengthSmall) {
+					length = "小于" + good.carLength + '米'
+				}
+				return length
+			},
+			carType(good) {
+				let _val = '';
+				if (good.carModel == 1) {
+					_val = '不限'
+				} else {
+					if (good.carModel.includes(2)) {
+						_val += '高栏/'
+					}
+					if (good.carModel.includes(3)) {
+						_val += '集装箱/'
+					}
+					if (good.carModel.includes(4)) {
+						_val += '自卸车'
+					}
+				}
+				return _val
+			},
+			carWeight(good) {
+				good.loadWeightSmall
+				good.loadWeight
+				let weight = ''
+				if (good.loadWeightSmall && good.loadWeight) {
+					weight = good.loadWeightSmall + '~' + good.loadWeight + '吨'
+				} else if (good.loadWeightSmall) {
+					weight = "大于" + good.loadWeightSmall + '吨'
+				} else if (good.loadWeight) {
+					weight = "小于" + good.loadWeight + '吨'
+				}
+				return weight
+			},
+			getdate() {
+				var date = new Date()
+				var year = date.getFullYear() //获取完整的年份(4位)
+				var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+				var datetime = date.getDate() //获取当前日(1-31)
+				if (mouth < 10) {
+					mouth = '0' + mouth
+				}
+				if (datetime < 10) {
+					datetime = '0' + datetime
+				}
+				return String(year) + String(mouth) + String(datetime)
+			},
+			grabOrders(item) {
+
+				this.isShowAlert = true
+				this.ObjSelect = item
+
+			},
+			confirmSelectType(val) {
+				this.pickerSelect = val.value[0]
+				this.show = false
+			},
+			selectTypeClose() {
+				this.show = false
+			},
+			selectType() {
+				this.show = true
+			},
 			getLngLat() {
-				console.log(11111111111111111111111111111111111111111111111111111)
+				uni.showLoading({
+					title: '获取定位信息'
+				})
 				uni.getLocation({
 					type: 'gcj02',
 					geocode: true,
 					success: res => {
-						console.log('--------------------------------')
-						console.log(res)
 						if (res.latitude) {
-							this.lat = res.latitude + ',' + res.longitude;
-							this.startPlace = res.address.city
-							// this.lng = res.longitude;
+							that.startPlace.selected = res.address.city
+							that.lng = res.longitude;
+							that.lat = res.latitude;
+							uni.hideLoading()
 						} else {
-							console.log(uni.getSystemInfoSync().platform)
 							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);
-								this.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
+								that.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
 							}
-							if (this.bool === false) {
+							if (that.bool === false) {
 								uni.showModal({
 									title: '提示',
 									content: '请打开定位服务',
@@ -214,78 +411,154 @@
 									}
 								});
 							}
+							uni.hideLoading()
 						}
 					}
 				});
 			},
 			toDetail(id) {
-				uni.$u.route('/pages/goodSource/shippingDetails', {
-					id: id,
-				});
+				//司机是否认证身份
+				if (this.firstAuthentication.authenticationStatus == '已认证') {
+					uni.$u.route('/pages/goodSource/shippingDetails', {
+						id: id,
+					});
+				} else if (this.firstAuthentication.authenticationStatus == '已过期') {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "证件已过期,请上传新证件!",
+					})
+				} else {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "请先完成司机认证!",
+					})
+				}
+
 			},
 			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
 			upCallback(page) {
-				// 此处可以继续请求其他接口
-				// if(page.num == 1){
-				// 	// 请求其他接口...
-				// }
-
-				// 如果希望先请求其他接口,再触发upCallback,可参考以下写法
-				// if(!this.isInitxx){
-				// 	apiGetxx().then(res=>{
-				// 		this.isInitxx = true
-				// 		this.mescroll.resetUpScroll() // 重新触发upCallback
-				// 	}).catch(()=>{
-				// 		this.mescroll.endErr()
-				// 	})
-				// 	return // 此处return,先获取xx
-				// }
-
-				//联网加载数据
-				apiGoods(page.num, page.size).then(res => {
-					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
-					//mescroll会根据传的参数,自动判断列表如果无任何数据,则提示空;列表无下一页数据,则提示无更多数据;
-
-					//方法一(推荐): 后台接口有返回列表的总页数 totalPage
-					//this.mescroll.endByPage(res.list.length, totalPage); //必传参数(当前页的数据个数, 总页数)
-
-					//方法二(推荐): 后台接口有返回列表的总数据量 totalSize
-					//this.mescroll.endBySize(res.list.length, totalSize); //必传参数(当前页的数据个数, 总数据量)
-
-					//方法三(推荐): 您有其他方式知道是否有下一页 hasNext
-					//this.mescroll.endSuccess(res.list.length, hasNext); //必传参数(当前页的数据个数, 是否有下一页true/false)
-
-					//方法四 (不推荐),会存在一个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据当前页的数据个数判断,则需翻到第三页才会知道无更多数据
-					this.mescroll.endSuccess(res.list.length);
-
-					//设置列表数据
-					if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
-					this.goods = this.goods.concat(res.list); //追加新数据
-				}).catch(() => {
-					//联网失败, 结束加载
-					this.mescroll.endErr();
+				let _pickerSelect;
+				if (this.pickerSelect == '运费先付') {
+					_pickerSelect = 1
+				} else {
+					_pickerSelect = 0
+				}
+				//选择省市区
+				let _data = {
+					searchKeyWord: this.tabIndex + 1,
+					searchType: _pickerSelect,
+					// loadingPlace: this.startPlace.selected,
+					// unLoadingPlace: this.endPlace.selected=="全国"?'':this.endPlace.selected,
+					pageSize: page.size,
+					currentPage: page.num,
+
+					// loadingPlaceCity: this.startPlace.fchoosecity,
+					// unLoadingPlaceCity: this.endPlace.schoosecity
+
+				}
+				if (this.tabIndex == 2) {
+					// #ifdef APP-PLUS
+					this.getLngLat();
+					// #endif
+					_data.driverLongitude = this.lng
+					_data.driverLatitude = this.lat
+				}
+				console.log('------')
+				console.log(_data)
+				if (uni.getStorageSync('fPlaceObj')) {
+					if (this.startPlace.fchoosearea && this.startPlace.fchoosearea == '全部' && this.startPlace
+						.fchoosearea != '请选择区') {
+						_data.loadingPlaceCity = this.startPlace.fchoosecity
+					} else if (this.startPlace.fchoosecity == '全部') {
+						_data.loadingPlace = this.startPlace.selected
+					} else {
+						_data.loadingPlaceCity = this.startPlace.fchoosecity
+						_data.loadingPlace = this.startPlace.fchoosearea
+					}
+
+				} else {
+					_data.loadingPlaceCity = this.startPlace.fchoosecity
+				}
+				if (uni.getStorageSync('sPlaceObj')) {
+					if (this.endPlace.schoosearea && this.endPlace.schoosearea == '全部' && this.endPlace.schoosearea !=
+						'请选择区') {
+						_data.unLoadingPlaceCity = this.endPlace.schoosecity
+					} else if (this.endPlace.schoosearea) {
+						_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+					} else {
+						_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+						_data.unLoadingPlaceCity = this.endPlace.schoosecity
+					}
+				} else {
+					_data.unLoadingPlace = this.endPlace.selected == "全国" ? '' : this.endPlace.selected
+				}
+				if (this.lng) {
+					_data.longitude = this.lng
+					_data.latitude = this.lat
+				}
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
 				})
+				this.$request.baseRequest('get', '/publishTaskInfo/selectGoodsSource', _data).then(res => {
+						if (res.code == 200) {
+							uni.hideLoading()
+							this.mescroll.endBySize(res.data.records.length, res.data.total);
+							if (page.num == 1) {
+								this.goods = [];
+								// this.otherGoods = []
+							}; //如果是第一页需手动制空列表
+							that.goods = that.goods.concat(res.data.records);
+							for (let i = 0; i < that.goods.length; i++) {
+								if (that.goods[i].peripheralInfo == 1) {
+									that.isFirstIndex = i
+									return
+								}
+							}
+						}
+						uni.hideLoading()
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+						this.mescroll.endErr();
+					});
 			},
 			clickTab(val) {
-				console.log(val)
+				this.tabIndex = val.index
+				this.upCallback({
+					size: 10,
+					num: 1,
+				})
 			},
 			changeCity() {
-				if(this.endPlace=='全国') {
+				if (this.endPlace.selected == '全国') {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "卸车地为全国不允许切换!",
 					})
 					return
 				}
-				[this.startPlace, this.endPlace] = [this.endPlace, this.startPlace];
+
+				[this.startPlace.fchooseprovince, this.endPlace.schooseprovince] = [this.endPlace.schooseprovince, this
+					.startPlace.fchooseprovince
+				];
+				[this.startPlace.fchoosecity, this.endPlace.schoosecity] = [this.endPlace.schoosecity, this.startPlace
+					.fchoosecity
+				];
+				[this.startPlace.fchoosearea, this.endPlace.schoosearea] = [this.endPlace.schoosearea, this.startPlace
+					.fchoosearea
+				];
+				[this.startPlace.selected, this.endPlace.selected] = [this.endPlace.selected, this.startPlace.selected];
+				// [this.startPlace, this.endPlace] = [this.endPlace, this.startPlace];
+				uni.setStorageSync('fPlaceObj', this.startPlace);
+				uni.setStorageSync('sPlaceObj', this.endPlace);
 			},
 			goCity(type) {
 				uni.$u.route('/pages/goodSource/selectCity', {
-					startPlace: this.startPlace,
-					endPlace: this.endPlace,
+					startPlace: JSON.stringify(this.startPlace),
+					endPlace: JSON.stringify(this.endPlace),
 					type: type
 				});
-				console.log(type)
 			},
 			swiperChange(e) {
 				this.tabIndex = e.detail.current
@@ -295,6 +568,9 @@
 </script>
 
 <style scoped lang="scss">
+	.content{
+		background: #F2F4F7;
+	}
 	.banner {
 		width: 100%;
 		position: relative;
@@ -356,10 +632,32 @@
 	}
 
 	.good-list {
-		background-color: white;
-		margin: 20rpx;
-		padding: 20rpx 0rpx 0 0;
-		border-radius: 20rpx;
+		    background-color: white;
+		    margin: 10px 10px 15px 10px;
+		    padding: 10px 0px 0px 0;
+		    border-radius: 30rpx;
+		    box-shadow: 0px 5rpx 20rpx #E3E3E3;
+
+		.item1,
+		.item3 {
+			// width: 40%;
+			display: flex;
+
+			.text {
+				text-overflow: ellipsis;
+				overflow: hidden;
+				white-space: nowrap;
+			}
+
+		}
+
+		.item1 .text {
+			text-align: left;
+		}
+
+		.item3 .text {
+			text-align: right;
+		}
 	}
 
 	.jt-icon {
@@ -378,7 +676,7 @@
 	.item-bottom {
 		background: #F0F5FF;
 		padding: 0 30rpx;
-
+		border-radius: 0 0 30rpx 30rpx;
 		.name {
 			font-size: 26rpx;
 			font-weight: 700;
@@ -412,4 +710,45 @@
 
 		height: var(--status-bar-height);
 	}
+
+	.tab-view {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+	}
+
+	.tab-right {
+		display: flex;
+		margin-right: 20rpx;
+		align-items: center;
+	}
+
+	.other-goods {
+		// background: red;
+		margin: 40rpx 0;
+		display: flex;
+		justify-content: center;
+		font-size: 36rpx;
+	}
+
+	.level2-title {
+		font-size: 28rpx;
+	}
+
+	.yf-style {
+		position: relative;
+
+		.h-color {
+			position: absolute;
+			right: 0;
+			top: -30rpx;
+		}
+	}
+	.xf-iamge{
+		width: 74rpx;
+		height: 43rpx;
+		position: absolute;
+		top: -20rpx;
+		right: 0;
+	}
 </style>

+ 287 - 140
pages/goodSource/selectCity.vue

@@ -11,16 +11,16 @@
 				<view class="content1" v-if="type==0">
 					<view class="history-city-title">历史发货地</view>
 					<view class="city-list">
-						<view class="city" v-for="(item,index) in historyFcityList" :key='index'>
-							{{item}}
+						<view class="city" v-for="(item,index) in historyFcityList" :key='index' @click="historyClick(0,item)">
+							{{item.selected}}
 						</view>
 					</view>
 				</view>
 				<view class="content2" v-if="type==1">
 					<view class="history-city-title">历史收货地</view>
 					<view class="city-list">
-						<view class="city" v-for="(item,index) in historyScityList" :key='index'>
-							{{item}}
+						<view class="city" v-for="(item,index) in historyScityList" :key='index' @click="historyClick(1,item)">
+							{{item.selected}}
 						</view>
 					</view>
 				</view>
@@ -29,15 +29,19 @@
 		<view class="page">
 			<view class="title flex flex-space-between">
 				<view class="flex nav-bag-left">
+					<!-- 省 -->
 					<view class="flex" :class="(type==0?fstatus:sstatus)==0?'select-active':''" @click="titleClick(0)">
 						<view class="tt point">{{type==0?fchooseprovince:schooseprovince}}</view>
 						<view v-if="type==0?fchooseprovince:schooseprovince" style="margin: 0 10rpx;">></view>
 					</view>
-					<view class="flex" v-if="(type==0?fchooseprovince:schooseprovince)!='选择'"
+					<!-- 市 -->
+					<view class="flex"
+						v-if="(type==0?fchooseprovince:schooseprovince)!='选择'&&(type==0?fchooseprovince:schooseprovince)!='全国'"
 						:class="(type==0?fstatus:sstatus)==1?'select-active':''" @click="titleClick(1)">
 						<view class="tt point nav-point">{{type==0?fchoosecity:schoosecity}}</view>
 						<view v-if="type==0?fchoosecity:schoosecity" style="margin: 0 10rpx;">></view>
 					</view>
+					<!-- 区 -->
 					<view class="tt area"
 						v-if="(type==0?fchooseprovince:schooseprovince)!='选择'&&(type==0?fchoosecity:schoosecity)!='请选择市'&&(type==0?fchoosecity:schoosecity)!='全部'"
 						:class="(type==0?fstatus:sstatus)==2?'select-active':''" @click="titleClick(2)">
@@ -117,6 +121,7 @@
 				count: 0,
 				ftitle: '',
 				stitle: '',
+				selectList: [],
 			}
 		},
 		created() {
@@ -128,29 +133,228 @@
 		onLoad(options) {
 			console.log(options)
 			this.type = options.type
-			this.title = options.startPlace + '→' + options.endPlace
+			this.title = JSON.parse(options.startPlace).selected + '→' + JSON.parse(options.endPlace).selected
+			//获取缓存收发地
+
+			if (uni.getStorageSync('fPlaceList')) {
+				this.historyFcityList = uni.getStorageSync('fPlaceList');
+			} else {
+				this.historyFcityList = []
+			}
+			if (uni.getStorageSync('sPlaceList')) {
+				this.historyScityList = uni.getStorageSync('sPlaceList');
+			} else {
+				this.historyScityList = []
+			}
+
+
+			//赋值地区
 		},
 		methods: {
-			confirmBtn() {
-				debugger
-				//判断是否点击了选项
-				if (this.fchooseprovince == '选择') {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "请选择省或直辖市",
-					})
+			historyClick(type,val){
+				console.log(type)
+				if(type==0){
+					this.historyFcityList.unshift(val)
+					let _newList = this.makeHistoryList(val)
+					uni.setStorageSync('fPlaceList', _newList);
+					uni.setStorageSync('fPlaceObj', val);
+				}else{
+					this.historyScityList.unshift(val)
+					let _newList = this.makeHistoryList(val)
+					uni.setStorageSync('sPlaceList', _newList);
+					uni.setStorageSync('sPlaceObj',val )
+			
+				}
+				uni.switchTab({
+					url: '/pages/goodSource/index'
+				});
+			},
+			// 历史收发地去重
+			makeHistoryList(val) {
+				if (this.type == 0) {
+					let _obj = {}
+					// for (let i = 0; i < this.historyScityList.length; i++) {
+					// 	// let _data = this.historyScityList[i]
+					// }
+					if (val.selected == '全国' || val.fchoosecity == '全部') {
+
+						this.historyFcityList = this.historyFcityList.reduce((cur, item) => {
+							_obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
+							return cur;
+						}, [])
+					} else {
+						this.historyFcityList = this.historyFcityList.reduce((cur, item) => {
+							if (item.fchoosecity == val.fchoosecity) {
+								_obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
+								return cur;
+							} else {
+								_obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
+								return cur;
+							}
+
+
+						}, [])
+					}
+					return this.historyFcityList
+				} else {
+					let _obj = {}
+					// for (let i = 0; i < this.historyScityList.length; i++) {
+					// 	// let _data = this.historyScityList[i]
+					// }
+					if (val.selected == '全国' || val.schoosecity == '全部') {
+
+						this.historyScityList = this.historyScityList.reduce((cur, item) => {
+							_obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
+							return cur;
+						}, [])
+					} else {
+						this.historyScityList = this.historyScityList.reduce((cur, item) => {
+							if (item.schoosecity == val.schoosecity) {
+								_obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
+								return cur;
+							} else {
+								_obj[item.selected] ? "" : _obj[item.selected] = true && cur.push(item);
+								return cur;
+							}
+
+
+						}, [])
+					}
+					return this.historyScityList
 				}
-				//设置地区
+			},
+			confirmBtn() {
+				//设置地区 0发货地 1收货地
 				if (this.type == 0) {
-					// this.fchooseprovince
-					// this.fchoosecity
-					// this.fchoosearea
+					if (this.fchooseprovince == '选择' ||(this.fchoosearea == '请选择区'&&this.fchoosecity!='全部')|| (this.fchoosecity == '请选择市' && this.fchooseprovince != '全国')) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请选择区域!",
+						})
+						return
+					}
+					console.log("省", this.fchooseprovince)
+					console.log("市", this.fchoosecity)
+					console.log("区", this.fchoosearea)
+					let _obj = {
+						fchooseprovince: this.fchooseprovince,
+						fchoosecity: this.fchoosecity,
+						fchoosearea: this.fchoosearea,
+						selected: ''
+					}
+					//选中全国
+					if (this.fchoosecity == '请选择市' && this.fchooseprovince == '全国') {
+						_obj.selected = this.fchooseprovince
+						this.historyFcityList.unshift(_obj)
+						let _newList = this.makeHistoryList(_obj)
+						uni.setStorageSync('fPlaceList', _newList);
 
+					}
+					//选择省
+					if (this.fchoosearea == '请选择区' && this.fchoosecity == '全部') {
+						_obj.selected = this.fchooseprovince
+						this.historyFcityList.unshift(_obj)
+						let _newList = this.makeHistoryList(_obj)
+
+						uni.setStorageSync('fPlaceList', _newList);
+					}
+					//选择市
+					if (this.fchoosearea == '全部') {
+						_obj.selected = this.fchoosecity
+						this.historyFcityList.unshift(_obj)
+						let _newList = this.makeHistoryList(_obj)
+						uni.setStorageSync('fPlaceList', _newList);
+					}
+					uni.setStorageSync('fPlaceObj', _obj);
+					//选择区
+					if (this.fchoosearea != '请选择区' && this.fchoosearea != '全部') {
+						let _list = this.fchoosearea.split(',')
+						let _newList
+						//设置历史收发地并去重,区重名判断是否是同一个市在去重
+						for (let i = 0; i < _list.length; i++) {
+							let _deepObj = uni.$u.deepClone(_obj)
+							_deepObj.selected = _list[i]
+							this.historyFcityList.unshift(_deepObj)
+							_newList = this.makeHistoryList(_deepObj)
 
+						}
+						console.log(_newList)
+						uni.setStorageSync('fPlaceList', this.historyFcityList);
+						uni.setStorageSync('fPlaceObj', {
+							fchooseprovince: this.fchooseprovince,
+							fchoosecity: this.fchoosecity,
+							fchoosearea: this.fchoosearea,
+							selected: this.fchoosearea
+						});
+					}
+					console.log(this.historyFcityList)
+					uni.switchTab({
+						url: '/pages/goodSource/index'
+					});
 				} else {
-					// schooseprovince
-					// schoosecity
-					// schoosearea
+					//收货地
+					if (this.schooseprovince == '选择' ||(this.schoosearea == '请选择区'&&this.schoosecity!='全部')|| (this.schoosecity == '请选择市' && this.schooseprovince != '全国')) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "请选择区域!",
+						})
+					}
+					console.log(this.schooseprovince)
+					console.log(this.schoosecity)
+					console.log(this.schoosearea)
+					let _obj = {
+						schooseprovince: this.schooseprovince,
+						schoosecity: this.schoosecity,
+						schoosearea: this.schoosearea,
+						selected: ''
+					}
+					//选中全国
+					if (this.schoosecity == '请选择市' && this.schooseprovince == '全国') {
+						_obj.selected = this.schooseprovince
+						this.historyScityList.unshift(_obj)
+						let _newList = this.makeHistoryList(_obj)
+						uni.setStorageSync('sPlaceList', _newList);
+					}
+					//选择省
+					if (this.schoosearea == '请选择区' && this.schoosecity == '全部') {
+						_obj.selected = this.schooseprovince
+						this.historyScityList.unshift(_obj)
+						let _newList = this.makeHistoryList(_obj)
+
+						uni.setStorageSync('sPlaceList', _newList);
+					}
+					//选择市
+					if (this.schoosearea == '全部') {
+						_obj.selected = this.schoosecity
+						this.historyScityList.unshift(_obj)
+						let _newList = this.makeHistoryList(_obj)
+						uni.setStorageSync('sPlaceList', _newList);
+					}
+					uni.setStorageSync('sPlaceObj', _obj);
+					//选择区
+					if (this.schoosearea != '请选择区' && this.schoosearea != '全部') {
+						let _list = this.schoosearea.split(',')
+						let _newList
+						for (let i = 0; i < _list.length; i++) {
+
+							let _deepObj = uni.$u.deepClone(_obj)
+							_deepObj.selected = _list[i]
+							this.historyScityList.unshift(_deepObj)
+							_newList = this.makeHistoryList(_deepObj)
+						}
+						console.log(_newList)
+						uni.setStorageSync('sPlaceList', this.historyScityList);
+						uni.setStorageSync('sPlaceObj', {
+							schooseprovince: this.schooseprovince,
+							schoosecity: this.schoosecity,
+							schoosearea: this.schoosearea,
+							selected: this.schoosearea
+						});
+					}
+					console.log(this.historyScityList)
+					uni.switchTab({
+						url: '/pages/goodSource/index'
+					});
 				}
 			},
 			//返回上一级
@@ -185,7 +389,6 @@
 			},
 			// 点击面包屑导航
 			titleClick(status) {
-				debugger
 				this.ftitle = ''
 				this.stitle = ''
 				this.count = 0
@@ -194,6 +397,7 @@
 					this.isfprovince = null
 					this.isfcity = null
 					this.isfarea = null
+
 					if (this.fchoosecity == '全部') return;
 				} else {
 					this.sstatus = status
@@ -202,8 +406,6 @@
 					this.issarea = null
 					if (this.fchoosecity == '全部') return;
 				}
-
-
 				if (status == 0) {
 					if (this.type == 0) {
 						this.fchooseprovince = '选择'
@@ -227,7 +429,6 @@
 			},
 			// 选择省
 			selectProvince(item, i, statusIndex) {
-				debugger
 				this.count = 0;
 				if (this.type == 0) {
 					if (i == 0) {
@@ -240,36 +441,44 @@
 					this.fchoosecity = '请选择市'
 					this.fchoosearea = '请选择区'
 					this.isfprovince = i
-				} else {
-					this.schoosecity = '请选择市'
-					this.schoosearea = '请选择区'
-					this.issprovince = i
-				}
-				if (item.child) {
-					if (this.type == 0) {
+					this.fchooseprovince = item.label
+					if (item.child) {
 						this.fcitylist = item.child
-					} else {
-						this.scitylist = item.child
 					}
-
-				}
-				// this.setchose(1)
-				if (this.type == 0) {
-					this.fchooseprovince = item.label
+					if (this.fchoosecity != '全部') {
+						this.fstatus = statusIndex + 1
+					}
 				} else {
+					this.issprovince = i
 					this.schooseprovince = item.label
-				}
-				if ((this.type == 0 ? this.fchoosecity : this.schoosecity) != '全部') {
-					if (this.type == 0) {
-						this.fstatus = statusIndex + 1
+					if (item.label == '全国') {
+						item.checked = !item.checked
+						if (!item.checked) {
+							this.issprovince = null
+						}
+						return
 					} else {
-						this.sstatus = statusIndex + 1
+						this.schoosecity = '请选择市'
+						this.schoosearea = '请选择区'
+						if (item.child) {
+							this.scitylist = item.child
+						}
+						if (this.schoosecity != '全部') {
+							this.sstatus = statusIndex + 1
+						}
 					}
 
 				}
 			},
 			// 选择市
 			selectCity(item, i, statusIndex) {
+			if(item.label=='全部'){
+				this.$refs.uToast.show({
+					type: 'error',
+					message: "不能选择全部,请重新选择!"
+				})
+				return
+			}
 				this.count = 0;
 				if (this.type == 0) {
 					this.isfcity = i
@@ -287,9 +496,6 @@
 					}
 
 				}
-				// this.setchose(2)
-				// if (item.label != '市辖区' && item.label != '特别行政区') {
-
 				if (this.type == 0) {
 					this.fchoosecity = item.label
 				} else {
@@ -305,33 +511,39 @@
 			},
 			//选择区
 			selectaArea(item, i) {
-				debugger
-
 				if (item.label == '全部') {
-					for (let i = 0; i < this.sarealist.length; i++) {
-						if (i != 0) {
-							this.sarealist[i].checked = false
+					if (this.type == 0) {
+						for (let i = 0; i < this.farealist.length; i++) {
+							if (i == 0) {
+								this.farealist[i].checked = true
+							} else {
+								this.farealist[i].checked = false
+							}
 						}
-
+						this.fchoosearea = '全部'
+						this.$forceUpdate()
+						return
+					} else {
+						for (let i = 0; i < this.sarealist.length; i++) {
+							if (i == 0) {
+								this.sarealist[i].checked = true
+							} else {
+								this.sarealist[i].checked = false
+							}
+						}
+						this.schoosearea = '全部'
+						this.$forceUpdate()
+						return
 					}
-					return
 				}
 
 				if (this.count < 3) {
-					this.$u.toast(item.label)
-					// if (item.checked) {
-					// 	item.checked = !item.checked
-					// 	return
-					// }else{
-					// 	// this.count--;
-					// }
 					item.checked = !item.checked
 					if (item.checked && this.count < 3) {
 						this.count++;
 					} else if (!item.checked && this.count < 3) {
 						this.count--;
 					}
-
 				} else {
 					if (item.checked) {
 						item.checked = !item.checked
@@ -342,12 +554,9 @@
 							message: "最多选择3个地区",
 						})
 					}
-
 				}
-
-
-
 				this.$forceUpdate()
+				//设置面包屑 0发货地 1收货地
 				if (this.type == 0) {
 					if (item.checked && !this.fchoosearea.includes(item.label)) {
 						if (this.ftitle) {
@@ -355,11 +564,9 @@
 						} else {
 							this.ftitle += item.label
 						}
-
 						this.fchoosearea = this.ftitle
 						console.log(this.fchoosearea)
 					} else {
-
 						if (this.ftitle.includes(',' + item.label)) {
 							this.ftitle = this.ftitle.replace(',' + item.label, '')
 							this.fchoosearea = this.fchoosearea.replace(',' + item.label, '')
@@ -373,11 +580,8 @@
 								this.ftitle = this.ftitle.replace(item.label + ',', '')
 								this.fchoosearea = this.fchoosearea.replace(item.label + ',', '')
 							}
-
 						}
-
 					}
-
 				} else {
 					if (item.checked && !this.schoosearea.includes(item.label)) {
 						if (this.stitle) {
@@ -385,14 +589,12 @@
 						} else {
 							this.stitle += item.label
 						}
-
 						this.schoosearea = this.stitle
 					} else {
 						if (this.stitle.includes(',' + item.label)) {
 							this.stitle = this.stitle.replace(',' + item.label, '')
 							this.schoosearea = this.schoosearea.replace(',' + item.label, '')
 						} else {
-
 							let _val = this.stitle.split(',')
 							let _len = _val.length;
 							if (_len == 1) {
@@ -402,51 +604,10 @@
 								this.stitle = this.stitle.replace(item.label + ',', '')
 								this.schoosearea = this.schoosearea.replace(item.label + ',', '')
 							}
-
 						}
 					}
-
-
 				}
-				// this.getchoose()
 			},
-			// getchoose() {
-			// 	const {
-			// 		chooseprovince,
-			// 		choosecity,
-			// 		choosearea
-			// 	} = this
-			// 	this.$emit('conceal', {
-			// 		chooseprovince,
-			// 		choosecity,
-			// 		choosearea
-			// 	})
-			// },
-			// setchose(id) {
-			// 	if (id == 1) {
-			// 		this.choosecity = ''
-			// 		this.choosearea = ''
-
-			// 		if (this.type == 0) {
-			// 			this.isfcity = null
-			// 		} else {
-			// 			this.isscity = null
-			// 		}
-			// 		if (this.type == 0) {
-			// 			this.isfarea = null
-			// 		} else {
-			// 			this.issarea = null
-			// 		}
-
-			// 	} else if (id == 2) {
-			// 		this.choosearea = ''
-			// 		if (this.type == 0) {
-			// 			this.isfarea = null
-			// 		} else {
-			// 			this.issarea = null
-			// 		}
-			// 	}
-			// },
 			changeCity(type) {
 				if (type == 0) {
 					this.type = 0
@@ -454,24 +615,6 @@
 					this.type = 1
 				}
 			},
-			// conceal1(param) {
-			// 	const {
-			// 		chooseprovince,
-			// 		choosecity,
-			// 		choosearea
-			// 	} = param
-			// 	// 获取到传过来的 省 市 区 县数据
-			// 	this.title1 = chooseprovince + choosecity + choosearea
-			// 	if (choosecity == '全部') {
-			// 		this.succeed()
-			// 	} else if (choosearea != '') {
-			// 		this.succeed()
-			// 	}
-			// },
-			//筛选框关闭
-			// succeed() {
-			// 	this.$refs.uDropdown.close();
-			// },
 			back() {
 				uni.navigateBack({
 
@@ -535,8 +678,8 @@
 	}
 
 	.city-list {
-		// height: 118rpx;
-		// overflow: hidden;
+		max-height: 118rpx;
+		overflow: hidden;
 	}
 
 	.city {
@@ -549,6 +692,7 @@
 		line-height: 33rpx;
 		border-radius: 4rpx;
 		background: #F7F8FA;
+
 	}
 
 	.content2 {
@@ -556,7 +700,11 @@
 	}
 
 	.container {
-		padding-left: 20rpx;
+		// width: 100%;
+		width: calc(100% - 40rpx);
+		display: inline-flex;
+		flex-flow: row wrap;
+		align-content: flex-start;
 	}
 
 	.select-active,
@@ -567,10 +715,8 @@
 
 	.content-item {
 		background: #F7F8FA;
-		display: inline-block;
-		width: calc(25% - 20rpx);
-		margin: 10rpx 20rpx 10rpx 0;
-		font-size: 26rpx;
+		margin: 10rpx;
+		font-size: 30rpx;
 		color: #333333;
 		text-align: center;
 		padding: 10rpx 0;
@@ -580,6 +726,7 @@
 		white-space: nowrap;
 		padding: 6rpx 8rpx;
 		box-sizing: border-box;
+		flex: 0 0 calc(25% - 20rpx);
 	}
 
 	.title {
@@ -603,7 +750,7 @@
 
 	.nav-bag-left {
 		width: 70%;
-		font-size: 28rpx;
+		font-size: 30rpx;
 	}
 
 	.btn {

+ 192 - 39
pages/goodSource/shippingDetails.vue

@@ -1,21 +1,24 @@
 <!-- 发运详情 -->
 <template>
 	<view class="content">
-		<u-navbar title="发运详情" :bgColor="bgColor" @leftClick='back' :placeholder='true' leftIconColor="#fff" titleStyle='color:#fff'
-			rightText='已关注'>
+		<!-- <u-navbar title="发运详情" :bgColor="bgColor" @leftClick='back' :placeholder='true' leftIconColor="#fff" titleStyle='color:#fff'
+			:rightText='caseText' @rightClick="rightClick">
+		</u-navbar> -->
+		<u-navbar title="发运详情" :bgColor="bgColor" @leftClick='back' :placeholder='true' leftIconColor="#fff"
+			titleStyle='color:#fff'>
 		</u-navbar>
 		<view class="top-bgc"></view>
 		<view class="content-move">
 			<view class="content1">
 				<view class="row1 flex flex-space-between">
 					<view class="left flex">
-						<u--image src="https://cdn.uviewui.com/uview/album/1.jpg" width='122rpx' height='122rpx'
-							shape="circle"></u--image>
-						<view class="fontsize-46 ml20">张三</view>
+						<u--image :src="detailData.cargoOwnerPortrait?detailData.cargoOwnerPortrait:'../../static/images/mine/tx.png'" width='122rpx' height='122rpx' shape="circle">
+						</u--image>
+						<view class="fontsize-46 ml20">{{detailData.cargoOwnerName}}</view>
 					</view>
 					<view class="right">
 						<view class="flex">
-							<view class="call fontsize-28" @click="call">
+							<view class="call fontsize-28" @click="$helper.contactCustomerService(detailData.cargoOwnerPhone)">
 								<u-icon name="phone-fill" color="#2772FB"></u-icon>联系货主
 							</view>
 						</view>
@@ -23,109 +26,204 @@
 				</view>
 				<view class="row">
 					<view class="flex">
-						黑龙江中天贸易有限公司
+						{{detailData.cargoOwner}}
 					</view>
 				</view>
+				<!-- 当前版本不做 -->
 				<view class="row3 flex fontsize-24">
-					<view class="item flex">
+					<!-- <view class="item flex">
 						<view class="gray">好评率</view>
 						<view class="number-color">99%</view>
-					</view>
-					<view class="item flex">
+					</view> -->
+					<!-- 	<view class="item flex">
 						<view class="gray">发运次数</view>
 						<view class="number-color">106</view>
-					</view>
-					<view class="item flex">
+					</view> -->
+					<!-- <view class="item flex">
 						<view class="gray">评价</view>
 						<view class="number-color">10</view>
-					</view>
+					</view> -->
 				</view>
 				<view class="row4">
 					<view class="flex fontsize-26">
 						<view class="left">装</view>
-						<view class="right flex align-center">辽宁省营口市鲅鱼圈区蝴蝶泉路116号</view>
+						<view class="right flex align-center">
+							{{detailData.sendPrivate}}{{detailData.sendCity}}{{detailData.sendArea}}{{detailData.sendDetailedAddress}}
+						</view>
 					</view>
 					<u-line class="line" margin="20rpx 0"></u-line>
 					<view class="flex fontsize-26">
 						<view class="left-x">卸</view>
-						<view class=" right align-center">黑龙江省齐齐哈尔市梅里斯达斡尔族区杜尔门沁达斡尔乡53农场</view>
+						<view class=" right align-center">
+							{{detailData.unloadPrivate}}{{detailData.unloadCity}}{{detailData.unloadArea}}{{detailData.unloadDetailedAddress}}
+						</view>
 					</view>
 				</view>
 			</view>
 			<view class="content2">
 				<view class="flex align-center">
 					<view class="left">货物</view>
-					<view>玉米|20吨</view>
+					<view class="flex">
+						<view>{{detailData.goodsName}}</view>
+						<view style='margin: 0 10rpx;'>|</view>
+						<view>{{detailData.weight}}吨</view>
+					</view>
+
 				</view>
 				<view class="flex align-center msx20">
 					<view class="left">距离</view>
 					<view class="right flex">
-						<view>运输距离月500公里</view>
+						<view>运输距离约{{detailData.distance}}公里</view>
 						<u-icon name="map-fill" color="#2772FB" @click="toMap()"></u-icon>
 					</view>
 				</view>
 				<view class="flex align-center">
 					<view class="left">运费</view>
-					<view class="right">100元/车</view>
+					<view class="right">{{detailData.freightPrice}}元/吨</view>
 				</view>
 				<view class="flex msx20">
 					<view class="left">日期</view>
 					<view class="right">
 						<view class="in-row flex">
-							<view class="text">发</view>
-							<view class="time">2022-01-27 15:15:15</view>
+							<view class="text">发</view>
+							<view class="time">{{detailData.createDate}}</view>
 						</view>
 						<view class="in-row flex">
 							<view class="text">装车</view>
-							<view class="time">2022-01-27~2022-01-30</view>
+							<view class="time">{{detailData.loadingDateStart}}~{{detailData.loadingDateEnd}}</view>
 						</view>
 					</view>
 				</view>
 				<view class="flex align-center">
 					<view class="left">车型</view>
-					<view class="right">10-15米 | 平板/高栏 | 约30吨</view>
+					<view class="right">{{carLength}} | {{carType}} | {{carWeight}}</view>
 				</view>
 				<view class="flex mt20">
 					<view class="left">描述</view>
 					<view class="right">
-						我是发运任务描述我是发运任务描述我是发运任务描述我是发运任务描述我是发运任务描述我是发运任务描述我是发运任务描述我是发运任务描述我是发运任务描述我是发运任务描述我是发运任务描述
+						{{detailData.taskDescription}}
 					</view>
 				</view>
 			</view>
 			<view class="content3">
-				<view class="left">运费<view class="text">100元/车</view></view>
+				<view class="left">运费<view class="text">{{detailData.freightPrice}}元/吨</view>
+				</view>
 				<view class="right">
-					<view class="btn">立即抢单</view>
+					<view class="btn" @click.stop="grabOrders()">立即抢单</view>
 				</view>
 				<!-- <view class="right">
 					<u-button type="error" text="已抢单" disabled></u-button>
 				</view> -->
 			</view>
-
+			 <u-toast ref="uToast"></u-toast>
+			<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
+				confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
 		</view>
 	</view>
 </template>
 
 <script>
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
+				isShowAlert: false,
+				alertTitle: '确定抢单?',
+				caseText: '关注',
 				bgColor: '#317AFE',
 				src: 'https://cdn.uviewui.com/uview/album/1.jpg',
+				id: '',
+				detailData: {},
 			};
 		},
 		onLoad(options) {
 			console.log(options)
+			this.id = options.id
+			this.init()
+
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication']),
+			carLength() {
+				let length = ''
+				if (this.detailData.carLengthSmall && this.detailData.carLength) {
+					length = this.detailData.carLengthSmall + '~' + this.detailData.carLength + '米'
+				} else if (this.detailData.carLengthSmall) {
+					length = "大于" + this.detailData.carLengthSmall + '米'
+				} else if (this.detailData.carLength) {
+					length = "小于" + this.detailData.carLength + '米'
+				}
+				return length
+			},
+			carType() {
+				let _val = '';
+				if (!this.detailData.carModel) this.detailData.carModel = ''
+				if (this.detailData.carModel == 1) {
+					_val = '不限'
+				} else {
+					if (this.detailData.carModel.includes(2)) {
+						_val += '高栏/'
+					}
+					if (this.detailData.carModel.includes(3)) {
+						_val += '集装箱/'
+					}
+					if (this.detailData.carModel.includes(4)) {
+						_val += '自卸车'
+					}
+				}
+				return _val
+			},
+			carWeight() {
+				this.detailData.loadWeightSmall
+				this.detailData.loadWeight
+				let weight = ''
+				if (this.detailData.loadWeightSmall && this.detailData.loadWeight) {
+					weight = this.detailData.loadWeightSmall + '~' + this.detailData.loadWeight + '吨'
+				} else if (this.detailData.loadWeightSmall) {
+					weight = "大于" + this.detailData.loadWeightSmall + '吨'
+				} else if (this.detailData.loadWeight) {
+					weight = "小于" + this.detailData.loadWeight + '吨'
+				}
+				return weight
+			},
 		},
 		methods: {
-			toMap(){
+			rightClick() {
+				uni.$u.toast('后台接口未写');
+				// 关注
+				// console.log(123)
+				// this.$request.baseRequest('get', '/publishTaskInfo/seeTask', {
+				// 		reCommonId: this.userInfo.id,
+				// 	}).then(res => {
+				// 		this.mescroll.resetUpScroll()
+				// 	})
+				// 	.catch(res => {
+				// 		uni.$u.toast(res.message);
+				// 	});
+			},
+			async init() {
+				await this.$request.baseRequest('get', '/publishTaskInfo/seeTask', {
+						id: this.id,
+						// id: '8f1f3c624d7946d79a9d44a4057d9623',
+					}).then(res => {
+						if (res.code == 200) {
+							this.detailData = res.data
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			toMap() {
 				uni.$u.route('/pages/goodSource/map', {
 					id: 1,
 				});
 			},
-			back(){
+			back() {
 				uni.navigateBack({
-					
+
 				})
 			},
 			call() {
@@ -133,6 +231,57 @@
 					phoneNumber: '114' //仅为示例
 				});
 			},
+			grabOrders() {
+				this.isShowAlert = true
+
+			},
+			confirmClick() {
+				let item = this.detailData
+				let _obj = {
+					driverCommonId: this.firstAuthentication.commonId,
+					commonId: item.commonId,
+					cargoOwnerName: item.cargoOwnerName,
+					cargoOwner: item.cargoOwner,
+					sendPrivate: item.sendPrivate,
+					sendCity: item.sendCity,
+					sendArea: item.sendArea,
+					sendDetailedAddress: item.sendDetailedAddress,
+					unloadPrivate: item.unloadPrivate,
+					unloadCity: item.unloadCity,
+					unloadArea: item.unloadArea,
+					unloadDetailedAddress: item.unloadDetailedAddress,
+					goodsName: item.goodsName,
+					distance: item.distance,
+					freightPrice: item.freightPrice,
+					driverName: this.firstAuthentication.driverName,
+					driverPhone: this.firstAuthentication.driverPhone,
+					cargoOwnerPhone: item.cargoOwnerPhone
+				}
+
+				this.$request.baseRequest('post', '/publishTaskInfo/api/addOrder', _obj).then(res => {
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "抢单成功!",
+								complete() {
+									uni.switchTab({
+										url: "/pages/order/index"
+									})
+								}
+							})
+
+						}
+
+
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+				this.isShowAlert = false
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 		}
 	}
 </script>
@@ -184,6 +333,7 @@
 		.row4 {
 			align-items: center;
 			padding-bottom: 20rpx;
+			margin-top: 20rpx;
 
 			.left {
 				display: flex;
@@ -241,24 +391,24 @@
 		padding: 30rpx;
 
 		.left {
-			font-size: 26rpx;
 			color: #666666;
 			margin-right: 20rpx;
 			box-sizing: border-box;
-			width: 10%;
+			width: 20%;
 		}
 
 		.right {
 			width: 90%;
-			font-size: 26rpx;
 		}
-		.in-row{
-			.text{
+
+		.in-row {
+			.text {
 				margin-right: 60rpx;
 			}
 		}
 	}
-	.content3{
+
+	.content3 {
 		position: fixed;
 		bottom: 0;
 		width: 100%;
@@ -268,15 +418,18 @@
 		padding: 30rpx 20rpx;
 		box-sizing: border-box;
 		align-items: center;
-		.left{
+
+		.left {
 			display: flex;
-			.text{
-				color:#FE6300 ;
+
+			.text {
+				color: #FE6300;
 				margin-left: 20rpx;
 			}
 		}
 	}
-	.btn{
+
+	.btn {
 		background: #2772FB;
 		color: white;
 		font-size: 28rpx;

+ 12 - 21
pages/mine/driverCertification.vue

@@ -74,12 +74,12 @@
 					</view>
 					<view class="flex row">
 						<view class="left-text">总质量(千克)</view>
-						<u--input placeholder="输入总质量" inputAlign='left' border="none" v-model="item.carTotalWeight">
+						<u--input placeholder="输入总质量" inputAlign='left' type="number" border="none" v-model="item.carTotalWeight">
 						</u--input>
 					</view>
 					<view class="flex row">
 						<view class="left-text">核定载质量(千克)</view>
-						<u--input placeholder="输入核定载质量" inputAlign='left' border="none"
+						<u--input placeholder="输入核定载质量" inputAlign='left' type="number" border="none"
 							v-model="item.carApprovedWeight">
 						</u--input>
 					</view>
@@ -88,7 +88,7 @@
 					</view>
 					<view class="flex row noborder input-ckg">
 						<view class="input-positon">
-							<u--input class="input" placeholder="长" inputAlign='left' border="none"
+							<u--input class="input" placeholder="长" type="number" inputAlign='left' border="none"
 								v-model="item.carLong">
 							</u--input>
 							<view class="position-right">
@@ -97,7 +97,7 @@
 						</view>
 						<view class="star">*</view>
 						<view class="input-positon">
-							<u--input placeholder="宽" inputAlign='left' border="none" v-model="item.carWidth">
+							<u--input placeholder="宽" type="number" inputAlign='left' border="none" v-model="item.carWidth">
 							</u--input>
 							<view class="position-right">
 								mm
@@ -105,7 +105,7 @@
 						</view>
 						<view class="star">*</view>
 						<view class="input-positon">
-							<u--input placeholder="高" inputAlign='left' border="none" v-model="item.carHeight">
+							<u--input placeholder="高" inputAlign='left' type="number" border="none" v-model="item.carHeight">
 							</u--input>
 							<view class="position-right">
 								mm
@@ -141,10 +141,10 @@
 				<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(1,index)"
 					class="preview-card-img picture">
 					<!-- <image class="card-img" :src="dataDetails.cardAddressUrl"></image> -->
-			<!-- 		<view @click.stop="delCard(1)">
+					<view @click.stop="delCard(1)">
 						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
 						</image>
-					</view> -->
+					</view>
 
 					<image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
 				</view>
@@ -204,12 +204,6 @@
 					</view>
 					<image class="" :src="item.payeeAddressUrl" mode="aspectFit"></image>
 				</view>
-
-
-
-
-
-
 				<view class="flex row">
 					<view class="left-text">银行卡卡号</view>
 					<view class="flex">
@@ -318,7 +312,6 @@
 						name: '女',
 						disabled: false
 					},
-
 				],
 				isFirstAuthentication: true,
 				bankType: [],
@@ -776,7 +769,6 @@
 							console.log('身份反面')
 							break
 						case 3:
-							debugger
 							uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=bank');
 							console.log('银行卡')
 
@@ -864,8 +856,7 @@
 				}
 			},
 			next(val) {
-				console.log(111111111111)
-				// if (this.validate()) return
+				if (this.validate()) return
 				uni.$u.route('/pages/mine/driverCertificationNext', {
 					data: JSON.stringify(this.dataDetails),
 				});
@@ -1153,7 +1144,7 @@
 		.picture {
 			width: 100%;
 			height: 440rpx;
-			background: red;
+			// background: red;
 			position: relative;
 
 			.text {
@@ -1224,11 +1215,11 @@
 		padding: 40rpx 20rpx 50rpx 20rpx;
 
 		.next-btn {
-			background: #F1F3F6;
+			background: #22C572;
 			width: 90%;
 			padding: 20rpx 20rpx;
 			text-align: center;
-			color: #C5CAD4;
+			color: #FFFFFF;
 			border-radius: 50rpx;
 		}
 	}
@@ -1243,7 +1234,7 @@
 
 	.preview-card-img {
 		/deep/uni-image>div, uni-image>img {
-		    transform: scale(1.5) rotate(-90deg);
+		    // transform: scale(1.5) rotate(-90deg);
 		}
 	}
 

+ 71 - 15
pages/mine/driverCertificationNext.vue

@@ -68,6 +68,11 @@
 					</view>
 					<image class="" :src="dataDetails.drivingLicenseBackPage" mode="aspectFit"></image>
 				</view>
+				<view class="flex row">
+					<view class="left-text">行驶证档案编号</view>
+					<u--input placeholder="输入行驶证档案编号" inputAlign='left' border="none" v-model="dataDetails.drivingLicenseNumber">
+					</u--input>
+				</view>
 
 				<view class="flex row">
 					<view class="left-text">行驶证有效期</view>
@@ -107,6 +112,11 @@
 						<image class="" :src="dataDetails.trailerLicenseBackPage" mode="aspectFit"></image>
 					</view>
 				</view>
+				<view class="flex row">
+					<view class="left-text">挂车行驶证档案编号</view>
+					<u--input placeholder="输入挂车行驶证档案编号" inputAlign='left' border="none" v-model="dataDetails.trailerLicenseNumber">
+					</u--input>
+				</view>
 
 				<view class="flex row" v-if="isGCar">
 					<view class="left-text">挂车行驶证有效期</view>
@@ -136,10 +146,10 @@
 					</view>
 				</view>
 
-				<view class="title">运营证</view>
+				<view class="title">道路运输证</view>
 				<view @click="uploadImg(8)" class="picture picture8" v-if="!dataDetails.operationCertificate">
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-					<view class="text">上传运营证</view>
+					<view class="text">上传道路运输证</view>
 				</view>
 				<view v-if="dataDetails.operationCertificate" @click.stop="uploadImg(1)"
 					class="preview-card-img picture">
@@ -150,18 +160,23 @@
 					<image class="" :src="dataDetails.operationCertificate" mode="aspectFit"></image>
 				</view>
 				<view class="flex row">
-					<view class="left-text">运营证有效期</view>
+					<view class="left-text">道路运输证号</view>
+					<u--input placeholder="输入道路运输证号" inputAlign='left' border="none" v-model="dataDetails.operationCertificateNumber">
+					</u--input>
+				</view>
+				<view class="flex row">
+					<view class="left-text">道路运输证有效期</view>
 					<view class="" @click="selectValidityPeriod(4)">
 						{{dataDetails.operationCertificateValidityDate?dataDetails.operationCertificateValidityDate:'选择有效期>'}}
 					</view>
 				</view>
 
 				<view v-if="isGCar">
-					<view class="title row flex">挂车运营证</view>
+					<view class="title row flex">挂车道路运输证</view>
 					<view @click="uploadImg(9)" class="picture picture9"
 						v-if="!dataDetails.trailerOperationCertificate">
 						<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
-						<view class="text">上传挂车运营证</view>
+						<view class="text">上传挂车道路运输证</view>
 					</view>
 					<view v-if="dataDetails.trailerOperationCertificate" @click.stop="uploadImg(1)"
 						class="preview-card-img picture">
@@ -172,9 +187,14 @@
 						<image class="" :src="dataDetails.trailerOperationCertificate" mode="aspectFit"></image>
 					</view>
 				</view>
+				<view class="flex row">
+					<view class="left-text">挂车道路运输证号</view>
+					<u--input placeholder="输入挂车道路运输证号" inputAlign='left' border="none" v-model="dataDetails.trailerOperationCertificateNumber">
+					</u--input>
+				</view>
 
 				<view class="flex row" v-if="isGCar">
-					<view class="left-text">挂车运营证有效期</view>
+					<view class="left-text">挂车道路运输证有效期</view>
 					<view class="" @click="selectValidityPeriod(5)">
 						{{dataDetails.trailerOperationCertificateValidityDate?dataDetails.trailerOperationCertificateValidityDate:'选择有效期>'}}
 					</view>
@@ -354,6 +374,7 @@
 											_this.dataDetails.trailerOperationCertificate = result
 											break;
 									}
+									_this.$forceUpdate()
 								}
 							)
 						}
@@ -409,7 +430,14 @@
 				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "行驶证副页不能为空!",
+						message: "行驶证有效期不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "行驶证档案编号不能为空!",
 					})
 					return true
 				}
@@ -420,7 +448,7 @@
 					})
 					return true
 				}
-				if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
+				if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "挂车行驶证副页不能为空!",
@@ -434,6 +462,13 @@
 					})
 					return true
 				}
+				if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "挂车行驶证档案编号不能为空!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -458,44 +493,65 @@
 				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "运营证不能为空!",
+						message: "道路运输证不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateNumber)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "道路运输证号不能为空!",
 					})
 					return true
 				}
 				if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "运营证有效期不能为空!",
+						message: "道路运输证有效期不能为空!",
 					})
 					return true
 				}
 				if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "挂车运营证不能为空!",
+						message: "挂车道路运输证不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "挂车道路运输证号不能为空!",
 					})
 					return true
 				}
 				if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "挂车运营证有效期不能为空!",
+						message: "挂车道路运输证有效期不能为空!",
 					})
 					return true
 				}
 				return false
 			},
 			submit() {
-				uni.switchTab({
-					url:'/pages/mine/index'
-				})
+				
+			
 				// 校验
 				if (this.validate()) return
+				debugger
 				if(this.dataDetails.driverSex=='男'){
 					this.dataDetails.driverCall = this.dataDetails.driverCall+'先生'
 				}else{
 					this.dataDetails.driverCall = this.dataDetails.driverCall+'女士'
 				}
+				if(!this.consentStatus){
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "请勾选协议!",
+					})
+					return
+				}
 
 
 

+ 42 - 10
pages/mine/editDriverCertification.vue

@@ -48,8 +48,6 @@
 				</view>
 				<view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(1,index)"
 					class="preview-card-img picture">
-
-
 					<image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
 				</view>
 
@@ -58,6 +56,10 @@
 					<image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
 					<view class="text">上传身份证国徽面</view>
 				</view>
+				<view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(1,index)"
+					class="preview-card-img picture">
+					<image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit" style=""></image>
+				</view>
 				<view class="flex row">
 					<view class="left-text">身份证号</view>
 					<u--input placeholder="请输入身份证号" inputAlign='left' border="none" v-model="dataDetails.numberCard">
@@ -71,6 +73,9 @@
 					</view>
 				</view>
 			</view>
+			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
+				@confirm="confirmValidityPeriod" @change="changeHandler">
+			</u-picker>
 			<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 				@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
 				@close="isShowimgType=false">
@@ -154,7 +159,7 @@
 				imagesrc: null
 			};
 		},
-		onLoad() {debugger
+		onLoad() {
 			_this = this;
 			console.log(this.userInfo)
 			//获取截止日期List数据
@@ -168,7 +173,27 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
-
+			changeHandler(e) {
+				const {
+					columnIndex,
+					value,
+					values,
+					index,
+					picker = this.$refs.uPicker
+				} = e
+
+				// if (columnIndex === 0) {
+				// 	debugger
+				// 	if (e.index != 0) {
+				// 		picker.setColumnValues(1, this.validityPeriod[1].shift())
+				// 	}
+
+				// } else if (columnIndex === 1) {
+				// 	if (e.index != 0) {
+				// 		picker.setColumnValues(2, this.validityPeriod[2].shift())
+				// 	}
+				// }
+			},
 			codeChange(text) {
 				this.tips = text;
 			},
@@ -217,12 +242,12 @@
 				this.dataDetails.driverSex = n
 			},
 			//判断是否是初次认证
-			getAuthenticationStatus() {debugger
+			getAuthenticationStatus() {
 				this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
 						driverPhone: this.userInfo.phone,
 					}).then(res => {
 						if (res.code == 200) {
-							 this.dataDetails = res.data
+							this.dataDetails = res.data
 							// this.dataDetails.driverName = res.data.driverName
 							// this.dataDetails.driverSex = res.data.driverSex
 							// this.dataDetails.driverCall = res.data.driverCall
@@ -242,6 +267,13 @@
 				if (e.value[0] == '长期') {
 					this.dataDetails.cardValidityDate = e.value[0]
 				} else {
+					if (!e.value[1] || !e.value[2]) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "日期格式错误,请重新选择!",
+						})
+						return
+					}
 					this.dataDetails.cardValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
 				}
 
@@ -676,10 +708,10 @@
 
 	.preview-card-img {
 
-		/deep/uni-image>div,
-		uni-image>img {
-			transform: scale(1.5) rotate(-90deg);
-		}
+		// /deep/uni-image>div,
+		// uni-image>img {
+		// 	transform: scale(1.5) rotate(-90deg);
+		// }
 	}
 
 	.del-card {

+ 21 - 9
pages/mine/editDriverCertificationNext.vue

@@ -222,7 +222,7 @@
 				:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
 			</u-picker>
 		</view>
- <!-- <u-modal :show="isShowAlert" :title="" :content='修改认证信息需要重新登录!' :closeOnClickOverlay='true' :showCancelButton='true' confirmColor='#22C572'  @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal> -->
+		<!-- <u-modal :show="isShowAlert" :title="" :content='修改认证信息需要重新登录!' :closeOnClickOverlay='true' :showCancelButton='true' confirmColor='#22C572'  @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal> -->
 	</view>
 </template>
 
@@ -233,7 +233,7 @@
 		components: {},
 		data() {
 			return {
-				isShowAlert:false,
+				isShowAlert: false,
 				consentStatus: false,
 				isGCar: true,
 				ValidityPeriodType: '',
@@ -530,7 +530,6 @@
 				return false
 			},
 			delSubmitObj() {
-				debugger
 				delete this.dataDetails.authenticationStatus
 				delete this.dataDetails.authenticationStatusKey
 				delete this.dataDetails.compId
@@ -544,17 +543,30 @@
 
 			},
 			submit() {
-
+				if (!this.consentStatus) {
+					uni.showToast({
+						title: '请勾选协议',
+						icon: 'none',
+						duration: 2000
+					})
+					return
+				}
 				// 校验
 				if (this.validate()) return
 				this.delSubmitObj()
 
 				this.$request.baseRequest('post', '/driverInfo/api/editInfo', this.dataDetails).then(res => {
-						if (res.code == 200) {debugger
-							
-							// uni.switchTab({
-							// 	url: '/pages/mine/index'
-							// })
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "提交成功!",
+								complete() {
+									uni.switchTab({
+										url: '/pages/mine/index'
+									})
+								}
+							})
+
 						}
 
 

+ 97 - 47
pages/mine/index.vue

@@ -12,7 +12,7 @@
 				</u--image>
 				<view class="right-text">
 					<view @click="toLogin" class="name">{{hasLogin? userName : '立即登录' }}</view>
-					<view @click="toLogin" class="phone" v-if="hasLogin">{{phone}}</view>
+					<view @click="toLogin" class="phone" v-if="hasLogin">{{starUserphone}}</view>
 				</view>
 
 			</view>
@@ -36,7 +36,7 @@
 					<image class="sfrz-icon" src="@/static/images/mine/pingjia@2x.png" mode='widthFix'>
 					</image>
 				</view>
-				<view class="right-text" @click="goDetailPage('/pages/mine/driverCertification')">
+				<view class="right-text">
 					<view class="top">货主评价</view>
 					<view class="bottom">看看货主对你的评价吧</view>
 				</view>
@@ -88,15 +88,15 @@
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
 			:showCancelButton='true' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
 			@cancel="cancelClick"></u-modal>
-			<u-toast ref="uToast"></u-toast>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
 <script>
+	var that;
 	import {
 		mapState
 	} from 'vuex';
-	var that;
 	export default {
 		data() {
 			return {
@@ -109,59 +109,108 @@
 				statusVal: '',
 				isFirstRZ: null,
 				driverCall: '',
-				isFirstSH:false
+				isFirstSH: false
 
 			};
 		},
 		onShow() {
-			console.log("111111111111111111111111111", this.firstAuthentication)
-			if (this.firstAuthentication) {
-				this.userName = this.firstAuthentication.driverCall
-				if (this.firstAuthentication.authenticationStatus == '审核中') {
-					this.statusVal = '身份认证审核中'
-				} else if (this.firstAuthentication.authenticationStatus == '未通过') {
-					this.statusVal = '身份认证未通过'
-				} else {
-					this.statusVal = '已认证'
-				}
-			} else {
-				this.statusVal = '你还没有完成身份认证'
-				this.userName = this.userInfo.userName
-				this.isFirstSH = true
+			// console.log("111111111111111111111111111", this.firstAuthentication)
+			//获取认证状态
+			// console.log(userInfo)
+			// console.log(hasLogin)
+			if (!this.hasLogin) {
+				this.isShowAlert = true
+				return
 			}
-			this.phone = this.userInfo.phone
-			if (this.userInfo) {
-				if (!this.userInfo.avatarUrl) {
-					this.headUrl = "../../static/images/myimg/YongHu@3x.png"
-				} else {
-					this.headUrl = this.userInfo.avatarUrl
+			this.getAuthenticationStatus()
+			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+				reCommonId: this.userInfo.id,
+			}).then(res3 => {
+				if (res3.data) {
+					let name = 'myTip';
+					let value = res3.data
+					if (value == 0) {
+						uni.removeTabBarBadge({
+							index: 2
+						})
+					}
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if (value != 0 && value) {
+						uni.setTabBarBadge({
+							index: 2,
+							text: value + ""
+						})
+					}
 				}
-				this.userphone = this.userInfo.phone
-
-			} else {
-				this.headUrl = "../../static/images/myimg/YongHu@3x.png"
-				this.username = "立即登录"
-			}
-
-
-
+			})
 		},
 		onLoad() {
 			that = this
 
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo', 'firstAuthentication']),
+			...mapState(['hasLogin', 'userInfo']),
 			// 手机号中间4位加*
-			// starUserphone() {
-			// 	let reg = /^(\d{3})\d{4}(\d{4})$/;
-			// 	if (this.userphone) {
-			// 		return this.userphone.replace(reg, "$1****$2");
-			// 	}
-			// }
+			starUserphone() {
+				let reg = /^(\d{3})\d{4}(\d{4})$/;
+				if (this.phone) {
+					return this.phone.replace(reg, "$1****$2");
+				}
+			}
 		},
 		methods: {
+			async getAuthenticationStatus() {
+
+				await this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
+						driverPhone: this.userInfo.phone,
+					}).then(res => {
+						debugger
+						this.firstAuthentication = res.data
+						console.log("this.firstAuthentication", this.firstAuthentication)
+						if (this.firstAuthentication) {
+							this.isFirstSH = false
+							if (this.firstAuthentication.driverSex == '女') {
+								this.userName = this.firstAuthentication.driverCall
+							} else {
+								this.userName = this.firstAuthentication.driverCall
+							}
+
+							if (this.firstAuthentication.authenticationStatus == '审核中') {
+								this.statusVal = '身份认证审核中'
+							} else if (this.firstAuthentication.authenticationStatus == '未通过') {
+								this.statusVal = '身份认证未通过'
+							}
+							 else if (this.firstAuthentication.authenticationStatus == '已过期') {
+							 	this.statusVal = '证件已过期'
+							 }else {
+								this.statusVal = '已认证'
+							}
+						} else {
+							this.statusVal = '你还没有完成身份认证'
+							this.userName = this.userInfo.userName
+							this.isFirstSH = true
+						}
+						this.phone = this.userInfo.phone
+						if (this.userInfo) {
+							if (!this.userInfo.avatarUrl) {
+								this.headUrl = "../../static/images/myimg/YongHu@3x.png"
+							} else {
+								this.headUrl = this.userInfo.avatarUrl
+							}
+							this.userphone = this.userInfo.phone
 
+						} else {
+							this.headUrl = "../../static/images/myimg/YongHu@3x.png"
+							this.username = "立即登录"
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
 			confirmClick() {
 				this.isShowAlert = false
 				uni.$u.route('/pages/public/login');
@@ -169,22 +218,23 @@
 			cancelClick() {
 				this.isShowAlert = false
 			},
-			goDetailPage(src,type) {
+			goDetailPage(src, type) {
 				if (!this.hasLogin) {
 					this.isShowAlert = true;
 				} else {
-					if(type==1&&this.statusVal == '已认证'){
-						src='/pages/mine/editDriverCertification'
+					if (type == 1 && this.statusVal == '已认证') {
+						src = '/pages/mine/editDriverCertification'
 					}
-					if((type==2||type==3)&&this.isFirstSH){
+					console.log('this.isFirstSH', this.isFirstSH)
+					if ((type == 2 || type == 3) && this.isFirstSH) {
 						this.$refs.uToast.show({
 							type: 'error',
 							message: "请先完成司机身份认证",
 						})
-					}else{
+					} else {
 						uni.$u.route(src);
 					}
-					
+
 				}
 
 			},

+ 37 - 18
pages/mine/manageBankCards/addBankCard.vue

@@ -30,13 +30,13 @@
 			</view>
 			<view class="flex row">
 				<view class="left-text khzh-styel">开户支行</view>
-				<view class="flex" v-if="isShowManualInput">
+				<view class="flex align-center" v-if="isShowManualInput">
 					<u--input class="select-bankzh point" placeholder="输入开户支行" inputAlign='left' border="none"
 						v-model="dataDetails.bankDepositBranch">
 					</u--input>
 					<view @click="manualInput" class="type">选择支行</view>
 				</view>
-				<view class="flex" v-if="!isShowManualInput">
+				<view class="flex align-center" v-if="!isShowManualInput">
 					<!-- 	<u--input  @click="selectZhbank" placeholder="选择开户支行" inputAlign='left' border="none" disabled>
 					</u--input> -->
 					<view class="select-bankzh" @click="selectZhbank">
@@ -203,7 +203,6 @@
 											'/driverInfo/bankShibie', {
 												bankImg: result,
 											}).then(res => {
-											debugger
 											console.log(res)
 
 
@@ -275,22 +274,41 @@
 				// })
 			},
 			submit() {
-				this.$request.baseRequest('post', '/driverPayeeInfo/api/addInfo', this.dataDetails).then(res => {
-						if (res.code == '200') {
-							let params = {
-								type: 'success',
-								message: "提交成功",
-							}
-							this.$refs.uToast.show({
-								...params
-							})
-							uni.$u.route('/pages/mine/manageBankCards/index');
+				// // 获取银行卡颜色
+				// let _obj = {
+				// 	"input":this.dataDetails.payeeAddressUrl
+				// }
+				// this.$request.baseRequest('post', '/ClothingColorController/recognition', _obj)
+				// 	.then(res => {
+				// 		if (res.code == '200') {
+				// 			this.dataDetails.cardColor = res.data
+
+				// 		} else {
+				// 			uni.$u.toast(res.message);
+				// 		}
 
-						} else {
-							uni.$u.toast(res.message);
-						}
+				// 	})
+				// 	.catch(res => {
+				// 		uni.$u.toast(res.message);
+				// 	});
+
+				this.$request.baseRequest('post', '/driverPayeeInfo/api/addInfo', this.dataDetails).then(
+						res => {
+							if (res.code == '200') {
+								let params = {
+									type: 'success',
+									message: "提交成功",
+								}
+								this.$refs.uToast.show({
+									...params
+								})
+								uni.$u.route('/pages/mine/manageBankCards/index');
 
-					})
+							} else {
+								uni.$u.toast(res.message);
+							}
+
+						})
 					.catch(res => {
 						uni.$u.toast(res.message);
 					});
@@ -372,7 +390,7 @@
 
 	.select-bankzh {
 		width: 230rpx;
-		height: 48rpx;
+		// height: 48rpx;
 	}
 
 	.type {
@@ -385,6 +403,7 @@
 		display: flex;
 		justify-content: center;
 		align-items: center;
+		height: 68rpx;
 	}
 
 	.submit-btn {

+ 4 - 3
pages/mine/manageBankCards/editBankCard.vue

@@ -23,13 +23,13 @@
 			</view>
 			<view class="flex row">
 				<view class="left-text khzh-styel">开户支行</view>
-				<view class="flex" v-if="isShowManualInput">
+				<view class="flex align-center" v-if="isShowManualInput">
 					<u--input class="select-bankzh" placeholder="输入开户支行" inputAlign='left' border="none"
 						v-model="dataDetails.bankDepositBranch">
 					</u--input>
 					<view @click="manualInput" class="type">选择支行</view>
 				</view>
-				<view class="flex" v-if="!isShowManualInput">
+				<view class="flex align-center" v-if="!isShowManualInput">
 					<!-- 	<u--input  @click="selectZhbank" placeholder="选择开户支行" inputAlign='left' border="none" disabled>
 					</u--input> -->
 					<view class="select-bankzh" @click="selectZhbank">选择开户支行</view>
@@ -283,7 +283,7 @@
 
 	.select-bankzh {
 		width: 230rpx;
-		height: 48rpx;
+		// height: 48rpx;
 	}
 
 	.type {
@@ -296,6 +296,7 @@
 		display: flex;
 		justify-content: center;
 		align-items: center;
+		height: 68rpx;
 	}
 
 	.submit-btn {

+ 121 - 26
pages/mine/manageBankCards/index.vue

@@ -13,10 +13,11 @@
 
 		</view>
 		<view class="card-list" v-for="(item,index) in bankList" :key='index'>
-			<view class="card-list-item">
-				<view class="flex flex-end number">{{item.bankCard}}</view>
+			<view class="card-list-item" :style='{"background-image":"url("+item.cardColor+")"}'>
+				<view class="flex flex-end number carNumber">{{item.bankCard}}</view>
 				<view class="flex align-center">
-					<image class="img left" src="@/static/images/mine/bank/gflogo@2x.png" mode='widthFix'>
+					<!-- @/static/images/mine/bank/gflogo@2x.png -->
+					<image class="img left" :src="item.imgLogo" mode='widthFix'>
 					</image>
 					<view class="right">
 						<view class="text1">{{item.bankDeposit}}</view>
@@ -36,6 +37,7 @@
 			</view>
 		</view>
 		<!-- <view @click="addBankCard">添加银行卡</view> -->
+		 <u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true' confirmColor='#2772FB'  @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -47,7 +49,11 @@
 	export default {
 		data() {
 			return {
-				bankList: []
+				bankList: [],
+				obj:{},
+				index:null,
+				isShowAlert:false,
+				alertTitle:'确认删除该银行卡?'
 			};
 		},
 		computed: {
@@ -60,7 +66,28 @@
 			this.init();
 		},
 		methods: {
-			radioChange(val) {debugger
+			confirmClick(){
+				this.isShowAlert = false
+				this.$request.baseRequest('post', '/driverPayeeInfo/api/deleteDriverPayee', {
+						id: this.obj.id
+					}).then(res => {
+						if (res.code == '200') {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "删除成功!",
+							})
+							this.bankList.splice(this.index, 1)
+						}
+				
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			cancelClick(){
+				this.isShowAlert = false
+			},
+			radioChange(val) {
 				for (let i = 0; i < this.bankList.length; i++) {
 					if (val.id == this.bankList[i].id) {
 						this.bankList[i].defaultFlag = 1
@@ -85,12 +112,87 @@
 					}
 				}
 			},
+			number(value){
+			  if(value&&value.length>8) {
+			    let reg = /^(\d{4})(\d*)(\d{4})$/;
+			    let str = value.replace(reg, (a, b, c, d)=> {
+			      return b + c.replace(/\d/g, "*") + d;
+			    });
+			    return str
+			  }else {
+			    return value
+			  }
+			},
 			init() {
 				this.$request.baseRequest('post', '/driverPayeeInfo/selectDriverPayee', {
 						driverId: this.userInfo.driverId,
 					}).then(res => {
 						if (res.code == '200') {
+							debugger
 							this.bankList = res.data
+							for (let i = 0; i < this.bankList.length; i++) {
+								let _obj = this.bankList[i]
+								_obj.bankCard = this.number(_obj.bankCard)
+								switch (_obj.bankDeposit) {
+									case "建设银行":
+										this.bankList[i].imgLogo = "../../../static/images/mine/bank/jiansheogo@2x.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/jh@2x.png"
+										break
+									case "招商银行":
+										this.bankList[i].imgLogo =
+											"../../../static/images/mine/bank/zhaoshang@2x(1).png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/zsbg.png"
+										break
+									case "中国银行":
+										this.bankList[i].imgLogo = "../../../static/images/mine/bank/zhongyin@2x.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/zsbg.png"
+										break
+									case "邮政银行":
+										this.bankList[i].imgLogo =
+											"../../../static/images/mine/bank/youzhenglogo@2x.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/nh@2x.png"
+										break
+									case "交通银行":
+										this.bankList[i].imgLogo =
+											"../../../static/images/mine/bank/jiaotognlogo@2x.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/jh@2x.png"
+										break
+									case "工商银行":
+										this.bankList[i].imgLogo = "../../../static/images/mine/bank/gslogo@2x.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/zsbg.png"
+										break
+									case "农业银行":
+										this.bankList[i].imgLogo = "../../../static/images/mine/bank/nongyelogo@2x.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/nh@2x.png"
+										break
+									case "民生银行":
+										this.bankList[i].imgLogo =
+											"../../../static/images/mine/bank/minshenglogo@2x.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/nh@2x.png"
+										break
+									case "中信银行":
+										this.bankList[i].imgLogo =
+											"../../../static/images/mine/bank/zhongxinlogo@2x.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/zsbg.png"
+										break
+									case "广发银行":
+										this.bankList[i].imgLogo = "../../../static/images/mine/bank/gflogo@2x.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/zsbg.png"
+										break
+									case "华夏银行":
+										this.bankList[i].imgLogo = "../../../static/images/mine/bank/huaxia.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/zsbg.png"
+										break
+									case "兴业银行":
+										this.bankList[i].imgLogo = "../../../static/images/mine/bank/xingye.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/jh@2x.png"
+										break
+									default:
+										this.bankList[i].imgLogo = "../../../static/images/mine/bank/qitalogo@2x.png"
+										this.bankList[i].cardColor = "../../../static/images/mine/bank/qt@2x.png"
+										break
+								}
+							}
 						} else {
 							uni.$u.toast(res.message);
 						}
@@ -115,21 +217,10 @@
 				})
 			},
 			del(val, index) {
-				this.$request.baseRequest('post', '/driverPayeeInfo/api/deleteDriverPayee', {
-						id: val.id
-					}).then(res => {
-						if (res.code == '200') {
-							this.$refs.uToast.show({
-								type: 'success',
-								message: "删除成功!",
-							})
-							this.bankList.splice(index, 1)
-						}
-
-					})
-					.catch(res => {
-						uni.$u.toast(res.message);
-					});
+				this.obj = val
+				this.index = index
+				this.isShowAlert = true
+		
 			}
 		},
 
@@ -179,9 +270,13 @@
 	}
 
 	.card-list-item {
-		background: url(../../../static/images/mine/bank/zsbg.png) center no-repeat;
-		background-size: 100% 100%;
+		// background: url(../../../static/images/mine/bank/zsbg.png) center no-repeat;
+		background-size: cover;
 		padding: 60rpx 43rpx 100rpx 43rpx;
+		border-radius: 20rpx;
+		.carNumber{
+			margin-bottom: 20rpx;
+		}
 
 		.img {
 			width: 80rpx;
@@ -191,13 +286,13 @@
 
 		.right {
 			.text1 {
-				font-size: 32rpx;
-				font-weight: 500;
+				font-size: 36rpx;
+				font-weight: 700;
 				color: #FFFFFF;
 			}
 
 			.text2 {
-				font-size: 24rpx;
+				// font-size: 24rpx;
 				color: #FFFFFF;
 				margin-top: 10rpx;
 			}
@@ -209,7 +304,7 @@
 	}
 
 	.default-card {
-		font-size: 28rpx;
+		// font-size: 28rpx;
 		color: #333333;
 	}
 </style>

+ 1 - 3
pages/mine/manageVehicles/addVehicle.vue

@@ -119,12 +119,10 @@
 			};
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo']),
+			...mapState(['hasLogin', 'userInfo','firstAuthentication']),
 		},
 		onLoad(options) {
-			debugger
 			_this = this;
-			console.log(options)
 			this.dataDetails.driverId = this.userInfo.driverId
 		},
 		methods: {

+ 9 - 2
pages/mine/manageVehicles/editVehicle.vue

@@ -6,7 +6,7 @@
 				<view class="left left-text">车牌号</view>
 				<view class="right flex">
 					<input class="car-uumber" v-model='dataDetails.carNumber' @click.stop="handleShowKeyboard(index)"
-						:disabled="true" placeholder="输入车牌号" name="input"></input>
+						:disabled="f" placeholder="输入车牌号" name="input" @focus='focus()' @blur='blur()'></input>
 
 				</view>
 			</view>
@@ -108,7 +108,7 @@
 				fileList1:[]
 			};
 		},
-		onLoad(options) {debugger
+		onLoad(options) {
 			_this = this;
 			console.log(options)
 			this.dataDetails = options
@@ -117,6 +117,13 @@
 			}]
 		},
 		methods: {
+			focus(e){
+				console.log('11111')
+				console.log(e)
+			},
+			blur(e){
+				console.log(e)
+			},
 			// 车型切换
 			changeCarModel(e) {
 				const {

+ 62 - 26
pages/mine/manageVehicles/index.vue

@@ -14,23 +14,33 @@
 
 		</view>
 		<view class="car-list" v-for="(item,index) in carList" :key="index">
+			<view class="left-img">
+				<image style="width: 100%;height:100%; background-color: #eeeeee;border-radius:10rpx;" mode="widthFix"
+					:src="item.addressUrl"></image>
+			</view>
 			<view class="car-list-item">
 				<view class="row1">
 					{{item.carNumber}}
 				</view>
 				<view class="row2">
-					<u-icon name="edit-pen" size="26" style="margin-right: 20rpx;" @click="edit(item)"></u-icon>
+					<u-icon name="edit-pen" size="26" style="margin-right: 20rpx;" @click="edit(item)"
+						v-if="item.status!='审核中'"></u-icon>
 					<u-icon name="trash" size="26" @click="del(item,index)"></u-icon>
 				</view>
 				<view class="row3">
 					<view class="text">车辆状态:</view>
-					<u-tag v-if="item.status=='已通过'" :text="item.status" type="success" plain plainFill size="mini"></u-tag>
-					<u-tag v-if="item.status=='未通过'" :text="item.status" type="error" plain plainFill size="mini"></u-tag>
-					<u-tag v-if="item.status=='审核中'" :text="item.status" type="warning" plain plainFill size="mini"></u-tag>
+					<u-tag v-if="item.status=='已认证'" :text="item.status" type="success" plain plainFill size="mini">
+					</u-tag>
+					<u-tag v-if="item.status=='未通过'" :text="item.status" type="error" plain plainFill size="mini">
+					</u-tag>
+					<u-tag v-if="item.status=='审核中'" :text="item.status" type="warning" plain plainFill size="mini">
+					</u-tag>
 				</view>
 			</view>
 		</view>
-<u-toast ref="uToast"></u-toast>
+		<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
+			confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -42,13 +52,18 @@
 	export default {
 		data() {
 			return {
-				carList:[],
+				carList: [],
+				obj: {},
+				index: null,
+				isShowAlert: false,
+				alertTitle: '确认删除该车辆?'
 			};
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo']),
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication']),
 		},
 		onLoad(options) {
+			console.log(this.firstAuthentication.id)
 			_this = this;
 			if (!this.hasLogin) {
 				uni.$u.route('/pages/public/login');
@@ -57,13 +72,36 @@
 			console.log(options)
 		},
 		methods: {
+			confirmClick() {
+				this.isShowAlert = false
+				this.$request.baseRequest('post', '/driverCarInfo/api/deleteDriverCar', {
+						id: this.obj.id
+					}).then(res => {
+						if (res.code == '200') {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "删除成功!",
+							})
+							this.carList.splice(this.index, 1)
+							uni.hideLoading()
+						}
+
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
 			init() {
-				this.$request.baseRequest('post', '/driverCarInfo/selectCar', {
+				this.$request.baseRequest('get', '/driverCarInfo/selectDriverCar', {
 						driverId: this.userInfo.driverId,
+						// driverId:this.firstAuthentication.id
 					}).then(res => {
 						if (res.code == '200') {
 							this.carList = res.data
-						}else{
+						} else {
 							uni.$u.toast(res.message);
 						}
 
@@ -76,24 +114,13 @@
 				uni.$u.route('/pages/mine/manageVehicles/addVehicle');
 			},
 			edit(val) {
-				uni.$u.route('/pages/mine/manageVehicles/editVehicle',val);
+				uni.$u.route('/pages/mine/manageVehicles/editVehicle', val);
 			},
-			del(val,index) {
-				this.$request.baseRequest('post', '/driverCarInfo/api/deleteDriverCar', {
-						id:val.id
-					}).then(res => {
-						if (res.code == '200') {
-							this.$refs.uToast.show({
-								type: 'success',
-								message: "删除成功!",
-							})
-								this.carList.splice(index,1)
-						}
-				
-					})
-					.catch(res => {
-						uni.$u.toast(res.message);
-					});
+			del(val, index) {
+			this.obj = val
+			this.index = index
+			this.isShowAlert = true
+
 			}
 		},
 	}
@@ -147,12 +174,14 @@
 
 	.car-list {
 		margin-bottom: 20rpx;
+		display: flex;
 	}
 
 	.car-list-item {
 		background: url(../../../static/images/mine/bgh.png) center no-repeat;
 		background-size: 100% 100%;
 		padding: 60rpx 43rpx;
+		width: 70%;
 
 		.row1 {
 			font-size: 36rpx;
@@ -169,4 +198,11 @@
 			display: flex;
 		}
 	}
+
+	.left-img {
+		width: 30%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
 </style>

+ 14 - 9
pages/mine/set.vue

@@ -17,24 +17,23 @@
 				<view>
 					<text>姓名</text>
 				</view>
-				<view style='align-items: center;' class="flex">
+				<view style='align-items: center;' class="flex" @click="editName">
 					<view class="username">
-						<!-- {{username}} -->
-						未认证
+						{{firstAuthentication.authenticationStatus=='已认证'?firstAuthentication.driverName:'未认证'}}
 					</view>
 					<!-- <image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image> -->
 				</view>
 			</view>
 		</view>
 		<view class="content2">
-
+<!-- 
 			<view class='flex flex-space-between' @click='UpdataAccount'>
 				<view>
 					<text>修改账号</text>
 				</view>
 				<image src="../../static/images/myimg/gengduo1@3x.png" class="arrow"></image>
-			</view>
-			<u-line color="#EEEEEE" class="line"></u-line>
+			</view> -->
+			<!-- <u-line color="#EEEEEE" class="line"></u-line> -->
 			<view class='flex flex-space-between' @click='UpdataPassword'>
 				<view>
 					<text>修改密码</text>
@@ -90,16 +89,23 @@
 			}
 		},
 		computed: {
-			// ...mapState(['hasLogin', 'userInfo'])
+			...mapState(['hasLogin', 'userInfo','firstAuthentication'])
 		},
 		onShow() {
 			this.getList()
 		},
 		onLoad() {
 			_this = this
+			console.log(this.userInfo)
+			console.log(this.hasLogin)
 		},
 		methods: {
-			
+				editName(){
+					uni.showToast({
+						icon:'none',
+						title:'可在司机认证中修改'
+					})
+				},
 			UpdataAccount() {
 				uni.navigateTo({
 					url: `/pages/mine/settings/editPhone`
@@ -149,7 +155,6 @@
 
 			},
 			getList() {
-				this.userInfo = uni.getStorageSync('userInfo')
 				this.headUrl = this.userInfo.avatarUrl
 				if (this.headUrl == null || this.headUrl == "") {
 					this.headUrl = "../../static/images/myimg/YongHu@3x.png"

+ 83 - 56
pages/mine/settings/editAvatar.vue

@@ -1,14 +1,14 @@
 <template>
 	<view class="content">
 		<view @click="upload" class="picture">
-			<image class="xj-image"  v-if="!deptListurl.avatarUrl" src="@/static/images/common/tianjiazhaopian@2x.png"></image>
+			<image class="xj-image" v-if="!deptListurl.avatarUrl" src="@/static/images/common/tianjiazhaopian@2x.png">
+			</image>
 			<image class="xj-image" :src="deptListurl.avatarUrl" v-if="deptListurl.avatarUrl"></image>
-			
+
 		</view>
-			<view @click="submit" class="submit">提交</view>
+		<view @click="submit" class="submit">提交</view>
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
-			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
-			@close="isShowimgType=false">
+			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
 		</u-action-sheet>
 	</view>
 </template>
@@ -22,12 +22,12 @@
 	export default {
 		data() {
 			return {
-					isShowimgType:false,
-					imgSrc:'',
-					deptListurl:{
-						avatarUrl:'',
-						id:''
-					}
+				isShowimgType: false,
+				imgSrc: '',
+				deptListurl: {
+					avatarUrl: '',
+					id: ''
+				}
 			}
 		},
 		onLoad() {
@@ -39,33 +39,53 @@
 		methods: {
 			upload() {
 				this.isShowimgType = true
-			
+
 			},
 			imgTypeSelect(val) {
 				console.log(val)
 				if (val.name == '相册') {
 					uni.chooseImage({
 						count: 1,
-						sourceType: this.$helper.chooseImage.sourceType,
+						sourceType: that.$helper.chooseImage.sourceType,
 						success: function(res) {
 							console.log(JSON.stringify(res.tempFilePaths));
 							uploadImage(res.tempFilePaths[0], 'appData/',
 								result => {
 									// 上传成功
 									console.log('图片地址', result)
-								that.deptListurl.avatarUrl = result
-			
+									that.$request.baseRequest('get', '/BDAccessToken/getAuth', {
+											apiKey: 'yNWLRW6unoUxo2KXiCZxOxGS',
+											secretKey: 'E8hqzKWdFdTGnFnpAwZ7ixtL89SN3deR'
+										}).then(res => {
+											console.log(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 {
-			
+
 				}
-			
+
 			},
-			submit(){
+			submit() {
 				this.deptListurl.id = this.userInfo.id
 				this.$request.baseRequest('post', '/commonUser/editUserInfo', this.deptListurl).then(res => {
 						uni.showToast({
@@ -73,7 +93,7 @@
 							icon: 'success',
 							duration: 2000,
 							success() {
-								setTimeout(()=>{
+								setTimeout(() => {
 									that.userInfo.avatarUrl = that.deptListurl.avatarUrl
 									var _student = uni.getStorageSync('userInfo');
 									_student.avatarUrl = that.deptListurl.avatarUrl;
@@ -84,17 +104,20 @@
 										name,
 										value
 									});
-									// this.$api.msg('修改成功2!')
+									this.$refs.uToast.show({
+										type: 'success',
+										message: "修改成功!",
+									})
 									uni.navigateBack({
-										delta:1
+										delta: 1
 									})
-								},2000)
+								}, 2000)
 							}
 						})
-				
+
 					})
 					.catch(res => {
-					uni.$u.toast( res.message);
+						uni.$u.toast(res.message);
 					});
 			}
 		}
@@ -102,38 +125,42 @@
 </script>
 
 <style>
-	.content{
+	.content {
 		background: white;
 		padding: 20rpx;
 	}
-.left-text {
-			width: 290rpx;
-			color: #333333;
-			display: flex;
-			align-items: center;
-		}
-		.picture {
-			margin-top: 20rpx;
-			background: #F5F6FA;
-			width: 212rpx;
-			height: 212rpx;
-			border-radius: 10rpx;
-			display: flex;
-			flex-direction: column;
-			justify-content: center;
-			align-items: center;
-			color: #6A7282;
-		}
-		.xj-image {
-			width: 100rpx;
-			height: 100rpx;
-		}
-		.submit{
-			margin-top: 20rpx;
-			background: #2772FB;
-			border-radius: 50rpx;
-			padding: 20rpx 0;
-			color: white;
-			text-align: center;
-		}
+
+	.left-text {
+		width: 290rpx;
+		color: #333333;
+		display: flex;
+		align-items: center;
+	}
+
+	.picture {
+		margin-top: 20rpx;
+		background: #F5F6FA;
+		width: 212rpx;
+		height: 212rpx;
+		border-radius: 10rpx;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		color: #6A7282;
+	}
+
+	.xj-image {
+		width: 100rpx;
+		height: 100rpx;
+	}
+
+	.submit {
+		margin-top: 20rpx;
+		background: #2772FB;
+		border-radius: 50rpx;
+		padding: 20rpx 0;
+		color: white;
+		text-align: center;
+	}
 </style>

+ 278 - 157
pages/mine/settings/editPassword.vue

@@ -1,180 +1,268 @@
 <template>
-	<view class="u-page content">
+	<view class="container">
 		<u-icon class="back-btn" name="arrow-left" color="black" size="20" @click="navBack"></u-icon>
 		<view class="wrapper">
-				<h2 class="Semibold">重置密码</h2>
-			<u--form labelPosition="left" :model="registerData" ref="registerForm" labelWidth="80">
-				<u-form-item label="电话" prop="phone" borderBottom>
-					<u--input v-model="registerData.phone" border="none" placeholder="请输入手机号码"></u--input>
-				</u-form-item>
-			
-				<u-form-item label="验证码" prop="code"borderBottom>
-					<u--input v-model="registerData.verifyCode" border="none" placeholder="请填写验证码"></u--input>
-					<u-button slot="right" @tap="getCode" :text="tips" size="mini" :disabled="disabled1" class="code-style">
-					</u-button>
-				</u-form-item>
-				<u-form-item label="新密码" prop="password" borderBottom>
-					<u--input v-model="registerData.password" border="none" placeholder="请输新入密码,6-16位字符"></u--input>
-				</u-form-item>
-			
-				<u-code ref="uCode" @change="codeChange" seconds="20" @start="disabled1 = true" @end="disabled1 = false">
-				</u-code>
-			</u--form>
-			<u-button class="code-style reset" @click='reset'>重置密码</u-button>
+			<h2>重置密码</h2>
+			<view style='width:100%;margin-top:50px;border-bottom:1px solid #E8E9ED;padding:10px;' class="flex">
+				<view style='width:15%;border-right:1px solid #E8E9ED;'>+86</view>
+				<view style='width:85%;'><input maxlength="11" @input='phoneinput' style='padding-left:10px;' v-model='phone' placeholder="请输入手机号码" type="text"></view>
+			</view>
+			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
+				<view style='width:85%;'><input v-model='verifyCode' placeholder="请输入验证码" type="text"></view>
+				<button @click='getcode' :class='status&&!sendDisabled?"active":""' class='getcode'>{{sendText}}</button>
+			</view>
+			<view style='border-bottom:1px solid #E8E9ED;padding:10px;position:relative;'>
+				<input class='password' style='height:30px;' v-model='password' placeholder="请输入新密码,6-16位字符" :type="type" value="" />
+				<view @click='switchover' style='position:absolute;right:0;top:38%;z-index:10;cursor:pointer;' class="iconfont " :class='type=="password"?"icon-yanjing-biyan":"icon-yanjing-zhengyan"'></view>
+			</view>
+			<button :class='phone!=""&&verifyCode!=""&&password!=""?"active":""' @click='reset' class='verificationCode'>重置密码</button>
 		</view>
-
-
 	</view>
 </template>
 
 <script>
 	import {
-		mapState
+		mapMutations
 	} from 'vuex';
-	var _this;
-	import helper from '@/common/helper.js';
+	// import { openFSqlite, createFSQL, selectFSQL, addFSQL } from '../../util/f.js'
+	// import { queryData, upData, initData } from '../../util/dbUtil.js'
 	export default {
 		data() {
 			return {
-				disabled1: false,
-				tips: '',
-				registerData: {
-					phone: '',
-					password: '',
-					verifyCode: '',
+				inputContent: null,
+				loginType: "wechat",
+				phone: '',
+				password: '',
+				logining: false,
+				isPhone: false,
+				isApple: true,
+				accessToken:'',
+				params:{
+					encryptedData:'',
+					session_key:'',
+					iv:'',
 				},
-				rules: {
-					phone: {
-						type: 'string',
-						required: true,
-						len: 11,
-						message: '请填写11位手机号',
-						trigger: ['blur']
-					},
-					verifyCode: {
-						type: 'string',
-						required: true,
-						len: 6,
-						message: '请填写6位验证码',
-						trigger: ['blur']
-					},
-				}
+				status:false,
+				userInfo:{
+					nickName:'',
+					avatarUrl:'',
+					gender:'',
+					phone:''
+				},
+				consentStatus:false,
+				type:'password',
+				inputStatus:'none',
+				verifyCode:null,
+				sendText:'获取验证码',
+				sendDisabled: false,
+				system:'',
+				platform:'',
+				userData:undefined,
+				canIUseProfile:false,
+				isPhone:""
 			}
 		},
-		computed: {
-			...mapState(['hasLogin', 'userInfo']),
-			// 手机号中间4位加*
-			// starUserphone() {
-			// 	let reg = /^(\d{3})\d{4}(\d{4})$/;
-			// 	if (this.userphone) {
-			// 		return this.userphone.replace(reg, "$1****$2");
-			// 	}
-			// }
-		},
-		onReady() {
-			// 如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则
-			this.$refs.registerForm.setRules(this.rules)
+		onShow() {
+			// this.loginType = "wechat"
+			this.$api.logout()
 		},
-		onLoad() {
-			_this = this
-			this.registerData.phone = this.userInfo.phone
+		onLoad(options) {
+			this.phone = options.phone //个人首页修改密码
+			// this.isPhone = options.phone //个人首页修改密码成功后自动退出重新登录
+			// if( wx.getUserProfile ){  
+			//     console.log('--check getUserProfile--OK');  
+			//     this.canIUseProfile = true;  
+			// } 
+			// console.log("login on load")
+			// var that = this
+			// that.$api.request('user', 'sendIsApple', {
+			// }).then(res => {
+			// 	that.isApple = res.data
+			// })
+			//  uni.getSystemInfo({
+			// 	success:(res) => {
+			// 		// console.log(res)
+			// 		this.system = res.system  // ios
+			// 		this.platform = res.platform  // 14.3
+			// 	}
+			// })
 		},
 		methods: {
-			navBack() {
-				uni.navigateBack();
-			},
-			codeChange(text) {
-				this.tips = text;
+			phoneinput(e){
+				if(e.detail.value.length==11){
+					this.status=true
+				}
 			},
-			// 获取验证码
-			getCode() {
-				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.registerData.phone)) {
-					if (this.$refs.uCode.canGetCode) {
-
-						// 模拟向后端请求验证码
-						uni.showLoading({
-							title: '正在获取验证码'
-						})
-						_this.$request.baseRequest('get', '/commonUser/sendVerifyCode', {
-								phone: this.registerData.phone
-							}).then(res => {
-								uni.hideLoading();
-								// 这里此提示会被this.start()方法中的提示覆盖
-								uni.$u.toast('验证码已发送');
-								// 通知验证码组件内部开始倒计时
-								this.$refs.uCode.start();
-
-							})
-							.catch(res => {
-								uni.$u.toast(res.message);
-							});
-
-						// setTimeout(() => {
-
-						// }, 2000);
-					} else {
-						uni.$u.toast('倒计时结束后再发送');
-					}
-				} else {
-					uni.$u.toast('请输入正确手机号');
+			getcode(e){
+				if(this.phone.length!=11){
+					uni.showToast({
+						title: '请输入正确的手机号',
+						icon:'none',
+						duration: 2000
+					})
+					return
+				}
+				if(/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.phone)){
+				var that=this
+					this.$request.baseRequest('get','/commonUser/sendVerifyCode',{phone:this.phone}).then(res => {
+					that.sendDisabled = true
+					let sec = 60
+					let interval = setInterval(() => {
+						sec--;
+						that.sendText = sec + 's后重发'
+						if (sec <= 0) {
+							that.sendDisabled = false
+							that.sendText = "获取验证码"
+							clearInterval(interval)
+						}
+					}, 1000)
+					})
+					.catch(res => {
+					    if(res.errmsg){
+					    	uni.showToast({
+					    		title: res.errmsg,
+					    		icon: 'none',
+					    		duration: 2000
+					    	})
+					    }
+					    else{
+					    	uni.showToast({
+					    		title: "系统异常,请联系管理员",
+					    		icon: 'none',
+					    		duration: 2000
+					    	})
+					    }
+					 });
+				}else{
+					uni.showToast({
+						title: '请输入正确的手机号',
+						icon:'none',
+						duration: 2000
+					})
 				}
-
 			},
-
-
-			//修改密码
-			reset() {
+			reset(){
+				var that = this
 				uni.showLoading({
-					title: '加载中1'
+					title: '重置密码中'
 				})
-				this.$refs.registerForm.validate().then(res => {
-					uni.$u.toast('校验通过')
-					_this.isLoading = true
-					_this.$request.baseRequest('post', '/commonUser/resetPassword', _this.registerData).then(
-						res => {
-							// 获得数据
-							if (res.code == 200) {
-								uni.clearStorageSync();
-								this.$request.baseRequest('post', '/auth/api/logout').then(res => {
-									
-								})
-								this.$store.commit('logout')
-								// this.$api.logout()
-									uni.showToast({
-										title: '修改成功',
-										icon: 'none',
-										duration: 2000
-									})
+				this.$request.baseRequest('post','/commonUser/resetPassword',{phone:this.phone,password:this.password,verifyCode:this.verifyCode}).then(res => {
+				    console.log("重置密码",res)
+					// 获得数据
+					if(res.data.code==200){
+						if(this.isPhone){//判断是否是在个人首页进来的(若是退出重进)
+							uni.clearStorageSync();
+							this.$request.baseRequest('post', '/auth/api/logout').then(res => {})
+							this.$store.commit('logout')
+							this.$api.logout()
+								setTimeout(() => {
+							uni.showToast({
+								title: '修改成功',
+								icon: 'none',
+								duration: 2000
+							})
+							},2000)
 							uni.navigateTo({
 								url: `/pages/public/login`
 							})
-							} else {
-								uni.showToast({
-									title: "系统异常或验证码已过期,请退出重试",
-									icon: 'none',
-									duration: 2000
-								})
-							}
-							uni.hideLoading()
+							
+						}else{
+							setTimeout(() => {
+								uni.navigateBack()
+						    }, 1000)
+						}
+						uni.showToast({
+							title: '重置成功',
+							icon: 'none',
+							duration: 2000
 						})
-						.catch(res => {
-							uni.$u.toast(res.message)
-						});
-				}).catch(errors => {
-					uni.$u.toast('校验失败')
+					}else{
+						uni.showToast({
+							title: "系统异常或验证码已过期,请退出重试",
+							icon:'none',
+							duration: 2000
+						})
+					}
+					uni.hideLoading()
 				})
+				.catch(res => {
+					console.log("重置密码",res)
+				    uni.showToast({
+				    	title: "系统异常,请联系管理员",
+				    	icon:'none',
+				    	duration: 2000
+				    })
+					uni.hideLoading()
+				});
+			},
+		
+			switchover(){
+				if(this.type=='password'){
+					this.type='text'
+				}else{
+					this.type='password'
+				}
 			},
+			cancel() {
+				this.inputShow = false
+				this.inputStatus = 'none'
+				this.isPhone = false
+			},
+			...mapMutations(['login']),
+			inputChange(e) {
+				const key = e.currentTarget.dataset.key;
+				this[key] = e.detail.value;
+			},
+			navBack() {
+				uni.navigateBack();
+			},
+
+	
+
+
 		},
+
 	}
 </script>
 
-<style lang="scss">
-	.content {
-		background: url(../../../static/images/mine/bg@2x.png);
-		background-size: 100% 100%;
-		height: 100vh;
+<style lang='scss' scoped>
+	
+	.apple{
+		background: #000;
+		width: 35px;
+		height: 35px;
+		padding: 8px;
+		border-radius: 50%;
+		vertical-align: middle;
+	}
+	page {
+		background: #fff;
+	}
+	.cuIcon-weixin{
+		background: #2772FB;
+		color: #fff;
+		font-size: 18px;
+		padding: 9px;
+		border-radius: 50%;
+		vertical-align: middle;
+		margin-right:5px;
+	}
+	.container {
 		padding-top: 85px;
 		position: relative;
+		width: 100vw;
+		height:calc(100vh - 85px);
+		overflow: hidden;
+			background: url('~@/static/images/mine/bg@2x.png');
+		background-size:100%;
+	}
+
+	.wrapper {
+		position: relative;
+		z-index: 90;
+		padding-bottom: 40upx;
+		height:100%;
+		padding:0 30px;
 	}
 
 	.back-btn {
@@ -184,25 +272,58 @@
 		padding-top: var(--status-bar-height);
 		top: 40upx;
 		font-size: 40upx;
-		color: red;
+		color:black;
 	}
-
-	.wrapper {
-		position: relative;
-		z-index: 90;
-		padding-bottom: 40upx;
-		height: 100%;
-		padding: 0 30px;
+	.verificationCode{
+		margin-top:20px;
+		background:#F5F6F9;
+		color:#AFB3BF;
 	}
-
-	.code-style {
-		background: #2772FB;
-		color: white;
+	.verificationCode:after{
+		border:none;
+	}
+	.verificationCode.active{
+		background:#2772FB;
+		color:#fff;
+	}
+	.register{
+		position:absolute;
+		bottom:20px;
+		left:50%;
+		transform: translateX(-50%);
+		color:#333333;
+		height:50px;
+		line-height:50px;
+		border-radius:30px;border: 1px solid #444444;
+	}
+	.register:after{
+		border:none;
+	}
+	.getcode{
+		font-size:14px;
+		position:absolute;
+		right:0;
+		top:50%;
+		transform: translateY(-50%);
+		color:#AFB3BF;
+		background:#F5F6F9;
+		height:30px;
+		line-height:30px;
+		
+	}
+	.password{
+		border:none;
+		outline: none;
+	}
+	.getcode:after{
+		border:none;
 	}
-	.reset{
-		margin-top: 50rpx;
+	.getcode.active{
+		background:#2772FB;
+		color:#fff;
 	}
-	.Semibold{
-		margin-bottom: 50rpx;
+	uni-navigator{
+		display:inline-block;
+		color:#2772FB;
 	}
 </style>

+ 137 - 41
pages/news/index.vue

@@ -2,28 +2,32 @@
 	<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
 		style="background-color: #F5F6FA;">
 		<u-navbar title="消息中心" leftIconSize='0' :bgColor="bgColor" :placeholder='true' leftIconColor="#fff"
-			titleStyle='color:#fff' rightText='一键已读'>
+			titleStyle='color:#fff' rightText='一键已读' @rightClick="rightClick">
 		</u-navbar>
 		<view class="top-bgc"></view>
 		<view class="content">
-			<view class="info-item flex" v-for="good in goods" :key="good.id">
+			<view class="info-item flex" v-for="(item,index) in news" :key="index" @click="read(item)">
 				<view class="left">
-					<u--image :showLoading="true" src="@/static/images/news/xt.png" width="80rpx" height="80rpx"></u--image>
+					<image src="@/static/images/news/cy.png" class="img" v-if="item.newsType=='承运通知'">
+					</image>
+					<image src="@/static/images/news/xt.png" class="img" v-else>
+					</image>
+
 				</view>
 				<view class="right">
 					<view class="row1 flex flex-space-between">
 						<view class="title">
-							系统消息
+							{{item.newsType}}
 						</view>
 						<view class="time">
-							11:00
+							{{item.updateDate}}
 						</view>
 					</view>
 					<view class="row2 flex flex-space-between align-center">
 						<view class="text point">
-							您的驾驶证即将到期,请尽快到“我的…您的驾驶证即将到期,请尽快到“我的…您的驾驶证即将到期,请尽快到“我的…您的驾驶证即将到期,请尽快到“我的…
+							{{item.newsContent}}
 						</view>
-						<view class="red-point"></view>
+						<view class="red-point" v-if="item.newsFlag==0"></view>
 					</view>
 				</view>
 				<!-- 	<view class="flex flex-space-between">
@@ -45,11 +49,11 @@
 </template>
 
 <script>
+	var that
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	import {
-		apiGoods
-	} from "@/api/mock.js"
-
+		mapState
+	} from 'vuex';
 	export default {
 		mixins: [MescrollMixin], // 使用mixin
 		data() {
@@ -57,16 +61,113 @@
 				src: 'https://cdn.uviewui.com/uview/album/1.jpg',
 				bgColor: '#317AFE',
 				value: 100,
-				goods: [], // 数据列表
-				badgeOffset: [0, -5]
+				news: [], // 数据列表
+				badgeOffset: [0, -5],
+				mescroll: null
 			}
 		},
+		onLoad() {
+			that = this
+		},
+		onShow() {
+			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+				reCommonId: this.userInfo.id,
+			}).then(res3 => {
+				if (res3.data) {
+					let name = 'myTip';
+					let value = res3.data
+					if (value == 0) {
+						uni.removeTabBarBadge({
+							index: 2
+						})
+					}
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if (value != 0 && value) {
+						uni.setTabBarBadge({
+							index: 2,
+							text: value + ""
+						})
+					}
+				}
+			})
+				// this.mescroll.resetUpScroll()
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
+		},
 		methods: {
+			rightClick() {
+				uni.showLoading({
+					title: '加载中',
+					mask: true
+				})
+				this.$request.baseRequest('post', '/newsInfo/api/editAllNewsInfo', {
+						reCommonId: this.userInfo.id,
+					}).then(res => {
+						this.mescroll.resetUpScroll()
+						uni.hideLoading()
+						uni.removeTabBarBadge({
+							index: 2
+						})
+
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			read(val) {
+				uni.showLoading({
+					title: '加载中',
+					mask: true
+				})
+				this.$request.baseRequest('post', '/newsInfo/api/editNewsInfo', {
+						id: val.id,
+					}).then(res => {
+						this.mescroll.resetUpScroll()
+						this.look()
+						uni.hideLoading()
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			look(){
+				that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+					reCommonId: this.userInfo.id,
+				}).then(res3 => {
+					
+					if (res3.data||res3.data==0) {
+						let name = 'myTip';
+						let value = res3.data
+						if (value == 0) {
+							uni.removeTabBarBadge({
+								index: 2
+							})
+						}
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						if (value != 0 && value) {
+							uni.setTabBarBadge({
+								index: 2,
+								text: value + ""
+							})
+						}
+					}
+				})
+			},
 			back() {
 				uni.navigateBack({
 
 				})
 			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
 			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
 			upCallback(page) {
 				// 此处可以继续请求其他接口
@@ -86,29 +187,17 @@
 				// }
 
 				//联网加载数据
-				apiGoods(page.num, page.size).then(res => {
-					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
-					//mescroll会根据传的参数,自动判断列表如果无任何数据,则提示空;列表无下一页数据,则提示无更多数据;
-
-					//方法一(推荐): 后台接口有返回列表的总页数 totalPage
-					//this.mescroll.endByPage(res.list.length, totalPage); //必传参数(当前页的数据个数, 总页数)
-
-					//方法二(推荐): 后台接口有返回列表的总数据量 totalSize
-					//this.mescroll.endBySize(res.list.length, totalSize); //必传参数(当前页的数据个数, 总数据量)
-
-					//方法三(推荐): 您有其他方式知道是否有下一页 hasNext
-					//this.mescroll.endSuccess(res.list.length, hasNext); //必传参数(当前页的数据个数, 是否有下一页true/false)
-
-					//方法四 (不推荐),会存在一个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据当前页的数据个数判断,则需翻到第三页才会知道无更多数据
-					this.mescroll.endSuccess(res.list.length);
-
-					//设置列表数据
-					if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
-					this.goods = this.goods.concat(res.list); //追加新数据
-				}).catch(() => {
-					//联网失败, 结束加载
-					this.mescroll.endErr();
-				})
+				this.$request.baseRequest('get', '/newsInfo/selectNewsInfo', {
+						reCommonId: this.userInfo.id,
+						pageSize: page.size,
+						currentPage: page.num,
+					}).then(res => {
+						this.news = res.data.records
+						this.mescroll.endBySize(res.data.records.length, res.data.total);
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
 			}
 		}
 	}
@@ -124,7 +213,7 @@
 		position: absolute;
 		width: 100%;
 		height: 519rpx;
-		background: linear-gradient(180deg, #317AFE 0%, #F8F9FC 100%);
+		// background: linear-gradient(180deg, #317AFE 0%, #F8F9FC 100%);
 
 	}
 
@@ -134,13 +223,19 @@
 		background: #FFFFFF;
 		margin: 20rpx;
 		width: calc(100% - 40rpx);
-		padding: 20rpx;
+		// padding: 20rpx;
 		box-sizing: border-box;
 		border-radius: 20rpx;
+		padding-top: 30rpx;
 	}
 
 	.info-item {
-		padding: 30rpx 0;
+		padding: 0 30rpx 30rpx 30rpx;
+
+		.img {
+			width: 80rpx;
+			height: 80rpx;
+		}
 
 		.left {
 			margin-right: 20rpx;
@@ -149,15 +244,16 @@
 		.right {
 			width: 100%;
 			border-bottom: 1px solid #E6E6E6;
+			padding-bottom: 20rpx;
 
 			.row1 {
 				.title {
-					font-size: 28rpx;
+					font-size: 32rpx;
 					color: #000000;
 				}
 
 				.time {
-					font-size: 24rpx;
+					font-size: 32rpx;
 					color: #999999;
 				}
 
@@ -165,7 +261,7 @@
 
 			.row2 {
 				.text {
-					font-size: 24rpx;
+					font-size: 28rpx;
 					color: #999999;
 					width: 500rpx;
 				}

+ 366 - 68
pages/order/confirmLoading.vue

@@ -4,82 +4,98 @@
 		<div class='content1'>
 			<view class="level2-title">承运合同</view>
 			<view class='row-between'>
-				<view class="row-left-text">合同编号</view>
-				<view class="row-right-text">未签订</view>
+				<view class="">合同编号</view>
+				<view class="">{{detailData.contractNo?detailData.contractNo:'未签订'}}</view>
 			</view>
 		</div>
 		<view class="content2">
 			<view class="level2-title">基本信息</view>
 			<view class='row-between'>
-				<view class="row-left-text">订单编号</view>
-				<view class="row-right-text">CY20220210666666</view>
+				<view class="">订单编号</view>
+				<view class="">{{detailData.orderNo}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text">货主</view>
-				<view class="row-right-text">张山</view>
+				<view class="">货主</view>
+				<view class="">{{detailData.cargoOwner}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text">货主单位</view>
-				<view class="row-right-text">辽宁省营口市鲅鱼圈区蝴蝶泉路116号</view>
+				<view class="">货主单位</view>
+				<view class="">{{detailData.compName?detailData.compName:'个人货主'}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text">发货地</view>
-				<view class="row-right-text place">黑龙江中天昊元贸易有限公司</view>
+				<view class="">发货地</view>
+				<view class=" place">
+					{{detailData.sendPrivate}}{{detailData.sendCity}}{{detailData.sendArea}}{{detailData.sendDetailedAddress}}
+				</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text">卸货地</view>
-				<view class="row-right-text place">黑龙江省齐齐哈尔市梅里斯达斡尔族区
-					杜尔门沁达斡尔乡53农场</view>
+				<view class="">卸货地</view>
+				<view class=" place">
+					{{detailData.unloadPrivate}}{{detailData.unloadCity}}{{detailData.unloadArea}}{{detailData.unloadDetailedAddress}}
+				</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text">货名</view>
-				<view class="row-right-text">玉米</view>
+				<view class="">货名</view>
+				<view class="">{{detailData.goodsName}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text">运费</view>
-				<view class="row-right-text">100元/车</view>
+				<view class="">运费</view>
+				<view class="">{{detailData.freight}}{{detailData.illingMethod==0?'元/吨':'元/车'}}</view>
 			</view>
 
 		</view>
 		<view class="content2">
 			<view class="level2-title">装车信息</view>
 			<view class='row-between'>
-				<view class="row-left-text">车牌号</view>
-				<view class="row-right-text">辽H111111</view>
+				<view class="">车牌号</view>
+				<input class="car-uumber input" v-model='detailData.carrierInfo.carNo' @click.stop="handleShowKeyboard"
+					:disabled="true" placeholder="输入车牌号" name="input"></input>
 			</view>
-			<view class='row-between'>
-				<view class="row-left-text">装车日期</view>
-				<view class="row-right-text">来自合同</view>
+			<view class='row-between' @click="selectDate">
+				<view class="">装车日期</view>
+				<view class="date-style">
+					{{detailData.carrierInfo.loadingDate?detailData.carrierInfo.loadingDate:'选择装车日期'}}
+				</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text">预计运费(元)</view>
-				<view class="row-right-text">来自合同</view>
+				<view class="">运费总额(元)</view>
+				<!-- {{detailData.carrierInfo.estimatedFreight}} -->
+				<view class=""><input class="input" type="text" value=""
+						v-model="detailData.carrierInfo.freight" placeholder="请输入运费"></view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text">定位</view>
-				<view class="row-right-text place">去授权</view>
-				<!-- <view class="row-right-text place">刷新</view> -->
+				<view class="">定位</view>
+				<view class="flex align-center">{{detailData.carrierInfo.sendCity}} {{detailData.carrierInfo.sendArea}}
+					<view class="sx-style" @click.stop="getLngLat()">刷新</view>
+				</view>
+
 			</view>
 			<view class='s-flex'>
-				<view class="row-left-text">上传装车照片</view>
+				<view class="" style="margin:20rpx 0;">上传装车照片</view>
 				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="3"
-					:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
-					@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
+					:size-type="['compressed']" @on-success="getImgUrl" @on-remove="onRemove"
+					@on-uploaded="isAdd = true" :sourceType='sourceType' :before-upload="filterFileType"
+					@on-progress="onProgress"></upload>
 			</view>
-			<view class='s-flex'>
-				<view class="row-left-text">上传装车磅单</view>
+			<!-- 			<view class='s-flex'>
+				<view class="">上传装车磅单</view>
 				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
 					:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
 					@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
-			</view>
+			</view> -->
 
 		</view>
 		<view class="bottom-btn">
-			<view class="store">暂存</view>
-			<view class="submit">提交</view>
+			<view class="store" @click="submit(1)">暂存</view>
+			<view class="submit" @click="submit(3)">提交</view>
 		</view>
-
-
+		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
+			:showCancelButton='true' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
+			@cancel="cancelClick"></u-modal>
+		<master-keyboard ref="keyboard" keyboardtype="car" :show="keyShow" :randomNumber="true" :newCar="false"
+			:defaultValue="carNumber" @keyboardClick="handleClick"></master-keyboard>
+		<u-toast ref="uToast"></u-toast>
+		<u-calendar :show="showDate" :mode="mode" @confirm="confirmDate"></u-calendar>
 	</view>
 </template>
 
@@ -91,8 +107,13 @@
 		},
 		data() {
 			return {
+				showDate: false,
+				mode: 'single',
+				id: '',
+				sourceType: ['camera'],
 				detailData: {
-					addressUrl: ''
+					carrierInfo: {},
+
 				},
 				action: this.$helper.ossUploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
@@ -100,12 +121,171 @@
 				isShowAlert: false,
 				alertContent: '',
 				alertTitle: '',
+				keyShow: false,
+				carNumber: '',
 			}
 		},
 		onLoad(options) {
+			debugger
+			// #ifdef APP-PLUS
+			this.getLngLat();
+			// #endif
 			console.log(options)
+			this.id = options.id
+			this.getInfo()
+			// this.detailData = options;
+			// CYHT20220317000001
+
+
 		},
 		methods: {
+			selectDate() {
+				this.showDate = true
+			},
+			confirmDate(e) {
+				this.detailData.carrierInfo.loadingDate = e[0]
+				this.showDate = false
+				console.log(e);
+			},
+			getInfo() {
+				this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
+					id: this.id,
+				}).then(res => {
+					if (res.code == 200) {
+						this.detailData = res.data
+						this.detailData.contractNo = 'CYHT20220317000001'
+						this.detailData.id = this.detailData.carrierId
+						this.detailData.carrierInfo.loadingDate = ''
+						this.detailData.carrierInfo.carNo = ''
+						this.detailData.carrierInfo.loadingAreaLongitude = ''
+						this.detailData.carrierInfo.loadingAreaLatitude = ''
+						this.detailData.carrierInfo.sendCity = '营口'
+						this.detailData.carrierInfo.sendArea = '鲅鱼圈'
+						this.detailData.carrierInfo.loadingImg = ''
+						// this.carrierInfo = res.data.carrierInfo
+						// this.freightInfo = res.data.freightInfo
+						// this.zcPhoneList = this.carrierInfo.loadingImg.split(',')
+						// if(res.data.orderStatus!="待货主确认"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="已终止"){
+						// 	this.status1 = true
+						// }
+						// if(res.data.orderStatus!="已终止"&&res.data.orderStatus!="平台驳回装车信息"&&res.data.orderStatus!="待平台确认装车"&&res.data.orderStatus!="待货主确认"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="待货主确认装车"&&res.data.orderStatus!="货主驳回装车信息"){
+						// 	this.status2 = true
+						// }
+					}
+
+				})
+			},
+			//车牌号弹出键盘
+			handleShowKeyboard() {
+				if (this.detailData.carrierInfo.carNo == '') {
+					this.carNumber = ''
+				} else {
+					this.carNumber = this.detailData.carrierInfo.carNo
+				}
+				if (this.$refs.keyboard.open) {
+					this.$refs.keyboard.open(false) //true 键盘显示 false 键盘隐藏
+				} else {
+					this.$refs.keyboard[0].open(false)
+				}
+				if (this.$refs.keyboard.open) {
+					this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
+				} else {
+					this.$refs.keyboard[0].open(true)
+				}
+			},
+			//车牌号弹出键盘
+			handleClick(e) {
+				this.carNumber = e.value
+				this.detailData.carrierInfo.carNo = e.value //键盘输入值
+			},
+			getLngLat() {
+				uni.showLoading({
+					title: '获取定位中',
+					mask: true
+				})
+				this.$helper.fUN_AmapLocation.start({
+						intervalTime: 1000 * 3,
+						isReport: false,
+					},
+					res => {
+						//见下方定位返回示例
+						console.log('====fUN_AmapLocation定位====', JSON.stringify(res));
+						if (res.latitude) {
+							this.detailData.carrierInfo.loadingAreaLongitude = res.longitude;
+							this.detailData.carrierInfo.loadingAreaLatitude = res.latitude;
+							this.detailData.carrierInfo.sendCity = this.$helper.filterUrban(res.city)
+							this.detailData.carrierInfo.sendArea = this.$helper.filterArea(res
+								.district);
+							console.log(this.detailData.carrierInfo.sendCity)
+							console.log(this.detailData.carrierInfo.sendArea)
+							this.$forceUpdate()
+
+						}
+						uni.hideLoading()
+
+						this.$helper.fUN_AmapLocation.stop({}, result => {
+							console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
+						});
+					}
+				);
+				// 	uni.getLocation({
+				// 		type: 'gcj02',
+				// 		geocode: true,
+				// 		success: res => {
+				// 			console.log('定位地址')
+				// 			console.log(res)
+				// 			if (res.latitude) {
+				// 				this.detailData.carrierInfo.loadingAreaLongitude = res.longitude;
+				// 				this.detailData.carrierInfo.loadingAreaLatitude = res.latitude;
+				// 				this.detailData.carrierInfo.sendCity = this.$helper.filterUrban(res.address.city)
+				// 				this.detailData.carrierInfo.sendArea = this.$helper.filterArea(res.address
+				// 					.district);
+				// 				console.log(this.detailData.carrierInfo.sendCity)
+				// 				console.log(this.detailData.carrierInfo.sendArea)
+				// 				this.$forceUpdate()
+				// 				uni.hideLoading()
+				// 			} else {
+				// 				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);
+				// 					this.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
+				// 				}
+				// 				if (this.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服务页面
+				// 								}
+				// 							}
+				// 						}
+				// 					});
+				// 				}
+				// 			}
+				// 		},
+				// 		fail: res => {
+				// 			console.log('定位失败')
+				// 			console.log(res)
+
+				// 		}
+				// 	});
+
+			},
 			alertBtn() {
 				// uni.navigateTo({
 				// 	url: '/pages/public/login'
@@ -115,15 +295,15 @@
 				this.isShowAlert = false
 			},
 			getImgUrl(res) {
-				this.detailData.addressUrl = res
+				this.detailData.carrierInfo.loadingImg += res + ','
 				console.log(res)
 				console.log('------------res-----------')
 			},
-			onError(error) {
-				alert(error)
-				console.log('------------error-----------')
-				console.log(error)
-			},
+			// onError(error) {
+			// 	alert(error)
+			// 	console.log('------------error-----------')
+			// 	console.log(error)
+			// },
 			onRemove(index) {},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -142,19 +322,20 @@
 			},
 			submit(type) {
 				console.log(type)
-				let params = {
-					type: 'success',
-					title: '成功主题(带图标)',
-					message: "庄生晓梦迷蝴蝶",
-					iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
-				}
-				if (type == 0) {
-
+				if (type == 1) {
+					if (!this.detailData.contractNo) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "合同未签订不能暂存!"
+						})
+						return
+					}
+					this.alertTitle = '确定暂存装车信息?'
 				} else {
-					this.alertContent = '确定提交装车信息?'
-					this.alertTitle = '提示'
-					this.isShowAlert = true
+					this.alertTitle = '确定提交装车信息?'
 				}
+				this.isShowAlert = true
+				this.detailData.statusFlag = type
 				// this.$refs.uToast.show({
 				// 	...params,
 				// 	complete() {
@@ -164,8 +345,104 @@
 				// 	}
 				// })
 			},
+			validate() {
+				if (uni.$u.test.isEmpty(this.detailData.carrierInfo.carNo)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "车牌号不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.detailData.carrierInfo.loadingDate)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "装车日期不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.detailData.carrierInfo.freight)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "运费总额不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.detailData.carrierInfo.sendCity)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "定位不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.detailData.carrierInfo.sendArea)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "定位不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.detailData.carrierInfo.loadingImg)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "装车照片不能为空!",
+					})
+					return true
+				}
+			},
 			confirmClick() {
-				console.log('提交')
+				this.validate()
+				this.isShowAlert = false
+				//1暂存
+				if (this.detailData.statusFlag == 1) {
+					delete this.detailData.carrierInfo.loadingAreaLongitude;
+					delete this.detailData.carrierInfo.loadingAreaLatitude;
+					delete this.detailData.carrierInfo.sendCity;
+					delete this.detailData.carrierInfo.sendArea;
+				}
+				this.detailData.carrierInfo.statusFlag = this.detailData.statusFlag
+				this.$request.baseRequest('post', '/carrierInfo/loadingAdd', this.detailData.carrierInfo).then(res => {
+						if (res.code == 200) {debugger
+							let _title = ''
+							if (this.detailData.statusFlag == 1) {
+								_title = '暂存成功!'
+							} else {
+								_title = '提交成功!'
+							}
+							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时清空缓存,重新存入缓存
+								}
+							);
+							this.$refs.uToast.show({
+								type: 'success',
+								message: _title,
+								complete() {
+									uni.switchTab({
+										url: '/pages/order/index'
+									})
+								}
+							})
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
 			}
 		},
 	}
@@ -173,9 +450,9 @@
 
 <style scoped lang="scss">
 	.content {
-		.row-left-text {
-			color: #333333;
-		}
+		// . {
+		// 	color: #333333;
+		// }
 	}
 
 	.level2-title {
@@ -194,32 +471,53 @@
 			text-align: right;
 		}
 	}
-	.upload{
-		
-	}
-	.bottom-btn{
+
+	.upload {}
+
+	.bottom-btn {
 		display: flex;
 		justify-content: space-around;
 		margin-bottom: 50rpx;
 		background: #FFFFFF;
 		padding: 40rpx 0;
 	}
-	.store{
+
+	.store {
 		padding: 20rpx 30rpx;
-		color:#2772FB;
+		color: #2772FB;
 		width: 40%;
 		background: #EEF4FF;
 		border-radius: 40rpx;
 		font-size: 36rpx;
 		text-align: center;
 	}
-	.submit{
+
+	.submit {
 		font-size: 36rpx;
 		padding: 20rpx 30rpx;
 		color: white;
 		width: 40%;
-		background:#2772FB ;
+		background: #2772FB;
 		border-radius: 40rpx;
-			text-align: center;
+		text-align: center;
+	}
+
+	.row-between {
+		margin: 20rpx 0;
+	}
+
+	.sx-style {
+		background: #2772FB;
+		color: white;
+		padding: 2rpx 16rpx;
+		box-sizing: border-box;
+		border-radius: 10rpx;
+		margin-left: 20rpx;
 	}
+
+	.input {
+		text-align: right;
+	}
+
+	.date-style {}
 </style>

+ 235 - 50
pages/order/confirmUnloading.vue

@@ -5,32 +5,35 @@
 			<view class="level2-title">基本信息</view>
 			<view class='row-between'>
 				<view class="row-left-text">订单编号</view>
-				<view class="row-right-text">CY20220210666666</view>
+				<view class="row-right-text">{{detailData.orderNo}}</view>
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text">货主</view>
-				<view class="row-right-text">张山</view>
+				<view class="row-right-text">{{detailData.cargoOwner}}</view>
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text">货主单位</view>
-				<view class="row-right-text">辽宁省营口市鲅鱼圈区蝴蝶泉路116号</view>
+				<view class="row-right-text">{{detailData.compName?detailData.compName:'个人货主'}}</view>
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text">发货地</view>
-				<view class="row-right-text place">黑龙江中天昊元贸易有限公司</view>
+				<view class="row-right-text place">
+					{{detailData.sendPrivate}}{{detailData.sendCity}}{{detailData.sendArea}}{{detailData.sendDetailedAddress}}
+				</view>
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text">卸货地</view>
-				<view class="row-right-text place">黑龙江省齐齐哈尔市梅里斯达斡尔族区
-					杜尔门沁达斡尔乡53农场</view>
+				<view class="row-right-text place">
+					{{detailData.unloadPrivate}}{{detailData.unloadCity}}{{detailData.unloadArea}}{{detailData.unloadDetailedAddress}}
+				</view>
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text">货名</view>
-				<view class="row-right-text">玉米</view>
+				<view class="row-right-text">{{detailData.goodsName}}</view>
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text">运费</view>
-				<view class="row-right-text">100元/车</view>
+				<view class="row-right-text">{{detailData.freight}}{{detailData.illingMethod==0?'元/吨':'元/车'}}</view>
 			</view>
 
 		</view>
@@ -38,34 +41,50 @@
 			<view class="level2-title">卸车信息</view>
 			<view class='row-between'>
 				<view class="row-left-text">车牌号</view>
-				<view class="row-right-text">辽H111111</view>
+				<view class="row-right-text">{{detailData.carrierInfo.carNo}}</view>
 			</view>
-			<view class='row-between'>
+			<!-- 	<view class='row-between'>
 				<view class="row-left-text">卸车日期</view>
-				<view class="row-right-text">2022-02-11</view>
+				<view class="row-right-text">{{detailData.carrierInfo.unloadingDate}}</view>
+			</view> -->
+			<view class="row-between">
+				<view class="left-text">卸车日期</view>
+				<view class="" @click="selectUnloadingDate">
+					{{detailData.carrierInfo.unloadingDate?detailData.carrierInfo.unloadingDate:'选择卸车日期'}}
+				</view>
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text">合计应付运费(元)</view>
-				<view class="row-right-text">输入合计应付运费</view>
+				<input class="totalFreight-input" placeholder="输入合计应付运费" v-model="detailData.carrierInfo.totalFreight"
+					type="number" />
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text">定位</view>
-				<view class="row-right-text place">去授权</view>
-				<!-- <view class="row-right-text place">刷新</view> -->
+				<view class="flex align-center">
+					{{detailData.carrierInfo.unloadCity}}{{detailData.carrierInfo.unloadArea}}
+					<view class="sx-style" @click.stop="getLngLat()">刷新</view>
+				</view>
+
 			</view>
 			<view class='s-flex'>
-				<view class="row-left-text">上传卸车照片(1-3张)</view>
+				<view class="row-left-text" style="margin:20rpx 0;">上传卸车照片(1-3张)</view>
 				<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="3"
 					:size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
-					@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
+					@on-uploaded="isAdd = true" :before-upload="filterFileType" :sourceType='sourceType'
+					@on-progress="onProgress"></upload>
 			</view>
 		</view>
 		<view class="bottom-btn">
-			<view class="store">暂存</view>
-			<view class="submit">提交</view>
+			<view class="store" @click="submit(1)">暂存</view>
+			<view class="submit" @click="submit(3)">提交</view>
 		</view>
-
-
+		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
+			:showCancelButton='true' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
+			@cancel="cancelClick"></u-modal>
+		<u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
+		</u-picker>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -77,6 +96,9 @@
 		},
 		data() {
 			return {
+				isShowValidity: false,
+				validityPeriod: [],
+				sourceType: ['camera'],
 				detailData: {
 					addressUrl: ''
 				},
@@ -89,9 +111,101 @@
 			}
 		},
 		onLoad(options) {
+			console.log('------------')
 			console.log(options)
+			this.detailData = options;
+			this.detailData.carrierInfo = {
+				carNo: '123',
+				unloadingDate: '',
+				estimatedFreight: '',
+				unloadingAreaLongitude: '',
+				unloadingAreaLatitude: '',
+				unloadCity: '沈阳',
+				unloadArea: '大东',
+				unloadingImg: '',
+				totalFreight: '100',
+				id: this.detailData.carrierId,
+
+			}
+			this.validityPeriod = this.$helper.makeValidityPeriod()
+			// #ifdef APP-PLUS
+			this.getLngLat();
+			// #endif
+			this.getNowTime()
 		},
 		methods: {
+			getNowTime() {
+				let now = new Date();
+				let year = now.getFullYear(); //得到年份
+				let month = now.getMonth(); //得到月份
+				let date = now.getDate(); //得到日期
+				month = month + 1;
+				month = month.toString().padStart(2, "0");
+				date = date.toString().padStart(2, "0");
+				let defaultDate = `${year}-${month}-${date}`
+				this.detailData.carrierInfo.unloadingDate = defaultDate
+				// this.$forceUpdate()
+			},
+			selectUnloadingDate() {
+				this.isShowValidity = true
+			},
+			getLngLat() {
+				uni.showLoading({
+					title: '获取定位中',
+					mask: true
+				})
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					success: res => {
+						console.log('定位地址')
+						console.log(res)
+						if (res.latitude) {
+							this.detailData.carrierInfo.loadingAreaLongitude = res.longitude;
+							this.detailData.carrierInfo.loadingAreaLatitude = res.latitude;
+							this.detailData.carrierInfo.sendCity = this.$helper.filterUrban(res.address.city)
+							this.detailData.carrierInfo.sendArea = this.$helper.filterArea(res.address
+								.district);
+							console.log(this.detailData.carrierInfo.sendCity)
+							console.log(this.detailData.carrierInfo.sendArea)
+							this.$forceUpdate()
+							uni.hideLoading()
+						} else {
+							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);
+								this.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
+							}
+							if (this.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服务页面
+											}
+										}
+									}
+								});
+							}
+						}
+					}
+				});
+			},
 			alertBtn() {
 				// uni.navigateTo({
 				// 	url: '/pages/public/login'
@@ -101,7 +215,7 @@
 				this.isShowAlert = false
 			},
 			getImgUrl(res) {
-				this.detailData.addressUrl = res
+				this.detailData.carrierInfo.unloadingImg += res + ','
 				console.log(res)
 				console.log('------------res-----------')
 			},
@@ -126,33 +240,85 @@
 			onProgress(e) {
 				console.log(e)
 			},
+
 			submit(type) {
 				console.log(type)
-				let params = {
-					type: 'success',
-					title: '成功主题(带图标)',
-					message: "庄生晓梦迷蝴蝶",
-					iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
-				}
-				if (type == 0) {
-
+				if (type == 1) {
+					this.alertContent = '确定暂存卸车信息?'
 				} else {
-					this.alertContent = '确定提交装车信息?'
-					this.alertTitle = '提示'
-					this.isShowAlert = true
+					this.alertContent = '确定提交卸车信息?'
 				}
-				// this.$refs.uToast.show({
-				// 	...params,
-				// 	complete() {
-				// 		params.url && uni.navigateTo({
-				// 			url: params.url
-				// 		})
-				// 	}
-				// })
+				this.isShowAlert = true
+				this.detailData.statusFlag = type
 			},
 			confirmClick() {
+				debugger
+				if (this.detailData.statusFlag == 1) {
+					delete this.detailData.carrierInfo.unloadingAreaLongitude;
+					delete this.detailData.carrierInfo.unloadingAreaLatitude;
+					delete this.detailData.carrierInfo.unloadCity;
+					delete this.detailData.carrierInfo.unloadArea;
+				}
+				this.detailData.carrierInfo.statusFlag = this.detailData.statusFlag
+				if (!this.detailData.carrierInfo.totalFreight) {
+					uni.showToast({
+						title: '运费不能为空!',
+						duration: 2000,
+						icon: "none",
+					});
+					return
+				}
+				if (
+					this.detailData.carrierInfo.totalFreight < 0 || this.detailData.carrierInfo.totalFreight > 100000 || (
+						String(this.detailData.carrierInfo.totalFreight).indexOf('.') != -1 && String(this.detailData
+							.carrierInfo.totalFreight).length - (String(this.detailData.carrierInfo.totalFreight).indexOf(
+							'.') + 1) > 2)
+				) {
+					uni.showToast({
+						title: '运费输入错误!',
+						duration: 2000,
+						icon: "none",
+					});
+					return
+				}
+				if (!this.detailData.carrierInfo.unloadingImg) {
+					uni.showToast({
+						title: '卸车照片不能为空!',
+						icon: "none",
+						duration: 2000
+					});
+					return
+				}
+				this.$request.baseRequest('post', '/carrierInfo/unLoadingAdd', this.detailData.carrierInfo).then(res => {
+						if (res.code == 200) {
+							let _title = ''
+							if (this.detailData.statusFlag == 1) {
+								_title = '暂存成功!'
+							} else {
+								_title = '提交成功!'
+							}
+							this.$refs.uToast.show({
+								type: 'success',
+								message: _title,
+								complete() {
+									uni.switchTab({
+										url: '/pages/order/index'
+									})
+								}
+							})
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
 				console.log('提交')
-			}
+			},
+			confirmValidityPeriod(e) {
+				console.log('confirm', e)
+				this.detailData.carrierInfo.unloadingDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+
+				this.isShowValidity = false
+			},
 		},
 	}
 </script>
@@ -180,32 +346,51 @@
 			text-align: right;
 		}
 	}
-	.upload{
-		
-	}
-	.bottom-btn{
+
+	.upload {}
+
+	.bottom-btn {
 		display: flex;
 		justify-content: space-around;
 		margin-bottom: 50rpx;
 		background: #FFFFFF;
 		padding: 40rpx 0;
 	}
-	.store{
+
+	.store {
 		padding: 20rpx 30rpx;
-		color:#2772FB;
+		color: #2772FB;
 		width: 40%;
 		background: #EEF4FF;
 		border-radius: 40rpx;
 		font-size: 36rpx;
 		text-align: center;
 	}
-	.submit{
+
+	.submit {
 		font-size: 36rpx;
 		padding: 20rpx 30rpx;
 		color: white;
 		width: 40%;
-		background:#2772FB ;
+		background: #2772FB;
 		border-radius: 40rpx;
-			text-align: center;
+		text-align: center;
+	}
+
+	.row-between {
+		margin: 20rpx 0;
+	}
+
+	.sx-style {
+		background: #2772FB;
+		color: white;
+		padding: 2rpx 16rpx;
+		box-sizing: border-box;
+		border-radius: 10rpx;
+		margin-left: 20rpx;
+	}
+
+	.totalFreight-input {
+		text-align: right;
 	}
 </style>

+ 433 - 76
pages/order/index.vue

@@ -8,11 +8,30 @@
 					<view>订单</view>
 					<u-icon class="search" name="search" color="" size="28" @click="search"></u-icon>
 				</view>
-				<u-tabs :list="tabList" @click="clickTab" lineColor='#2772FB' :current='tabIndex' :activeStyle="{
-								color: '#2772FB',
-								fontWeight: 'bold',
-								transform: 'scale(1.05)'
-							}"></u-tabs>
+				<view class="tab-content">
+					<u-tabs :list="tabList" @click="clickTab" lineColor='#2772FB' :current='tabIndex' :activeStyle="{
+									color: '#2772FB',
+									fontWeight: 'bold',
+									transform: 'scale(1.05)'
+								}"></u-tabs>
+					<view class="right-btn" @click="showMenu=true">
+						<view class="">
+							全部类型
+						</view>
+						<u-icon name="arrow-down-fill" color="#333333" size="12"></u-icon>
+					</view>
+				</view>
+			</view>
+			<view class="all-menu">
+				<u-transition :show="showMenu" mode="fade">
+					<view class="transition">
+						<view v-for="(item,index) in tabList" :key='index' class="transition-item-style"
+							:class="tabIndex==index?'menu-active':''" @click="clickTab({index:index})">
+							{{item.name}}
+						</view>
+					</view>
+				</u-transition>
+				<view class="modal-black" v-show="showMenu" @click="closeMenu"></view>
 			</view>
 			<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
 				class="mescroll">
@@ -21,24 +40,28 @@
 					<view style="padding: 0 35rpx 20rpx 35rpx;">
 						<view class="flex flex-space-between row1">
 							<view class="item1">
-								CY20220210666666 玉米
+								{{good.orderNo}} {{good.goodsName}}
 							</view>
 							<view class="item2">
-								待签约
+								{{good.orderStatus}}
 							</view>
 						</view>
 						<view class="flex row2">
 							<view class="left flex flex-space-between">
-								<view class="ssx">辽</view>
-								<view class="level2-title">营口 鲅鱼圈</view>
+								<view class="ssx">{{$helper.getProvinceAbbreviation(good.sendPrivate)}}</view>
+								<view class="level2-title">{{$helper.filterUrban(good.sendCity)}}
+									{{$helper.filterArea(good.sendArea)}}
+								</view>
 								<view>
 									<image class="jt-icon" src="@/static/images/goodSource/jt.png" mode='widthFix'>
 									</image>
 								</view>
 								<view class="ssx">
-									京
+									{{$helper.getProvinceAbbreviation(good.unloadPrivate)}}
+								</view>
+								<view class="level2-title">{{$helper.filterUrban(good.unloadCity)}}
+									{{$helper.filterArea(good.unloadArea)}}
 								</view>
-								<view class="level2-title">北京 通州</view>
 							</view>
 						</view>
 						<view class="flex row3">
@@ -46,29 +69,59 @@
 								<image class="hz" src="@/static/images/news/hz.png"></image>
 							</view>
 							<view class="right">
-								<view class="flex fontsize-26 row">
-									<view>中天昊元贸易有限公司</view>
+								<view class="flex row">
+									<view>{{good.compName}}</view>
 									<view class="sline"></view>
-									<view>李振华</view>
+									<view>{{good.cargoOwner}}</view>
 								</view>
 								<view class="flex align-center">
-									<view class="fontsize-26">货距 10km</view>
-									<view class="sline"></view>
-									<view class="fontsize-26 ">运距 35km</view>
+									<view class="">运距 {{good.distance}}km</view>
 								</view>
 							</view>
 						</view>
 						<view class="row4 flex flex-end align-center">
-							<view class="time">2022-02-10 10:08</view>
-							<view class="car">1000元/车</view>
+							<view class="time">{{good.updateDate}}</view>
+							<!-- 货主装车确认前运费 -->
+							<view class="car"
+								v-if="good.orderStatus=='待货主确认'||good.orderStatus=='未装车'||good.orderStatus=='待货主确认装车'||good.orderStatus=='货主驳回装车信息'||good.orderStatus=='已终止'">
+								{{good.freight}}{{good.illingMethod==0?'元/吨':'元/车'}}
+							</view>
+							<!-- 货主装车确认后卸车确认前运费 -->
+							<view class="car"
+								v-if="good.orderStatus=='待平台确认装车'||good.orderStatus=='平台驳回装车信息'||good.orderStatus=='运输中'||good.orderStatus=='待货主确认卸车'||good.orderStatus=='货主驳回卸车信息'">
+								{{good.estimatedFreight}}{{good.illingMethod==0?'元/吨':'元/车'}}
+							</view>
+							<!-- 货主装车卸车确认后 -->
+							<view class="car"
+								v-if="good.orderStatus=='待平台确认卸车'||good.orderStatus=='平台驳回卸车信息'||good.orderStatus=='待结算'||good.orderStatus=='已完结'||good.orderStatus=='结算中'||good.orderStatus=='待结算'">
+								{{good.totalFreight}}{{good.illingMethod==0?'元/吨':'元/车'}}
+							</view>
+							<view class='pay flex'
+								v-if="good.orderStatus=='运输中'||good.orderStatus=='待货主确认卸车'||good.orderStatus=='待平台确认卸车'||good.orderStatus=='货主驳回卸车信息'||good.orderStatus=='平台驳回卸车信息'||good.orderStatus=='结算中'||good.orderStatus=='待结算'">
+								<div>已付</div>
+								<div class='number'>¥{{good.totalRepayable}}</div>
+							</view>
 						</view>
 						<view class="row5 flex flex-end">
-							<view class="stop active">终止</view>
-							<view class="start normal">确认装车</view>
-							<!-- 	<view class="start">联系客服</view>
-							<view class="start">确认卸车</view>
-							<view class="start">评价</view>
-							<view class="start">完结</view> -->
+							<view class="stop active" @click.stop="stop(good)"
+								v-if="good.orderStatus=='待货主确认'||good.orderStatus=='未装车'">终止</view>
+					<!-- 		<view class="start normal" @click.stop="confirmLoading(good)"
+								v-if="good.orderStatus=='未装车'||good.orderStatus=='货主驳回装车信息'||good.orderStatus=='平台驳回装车信息'">
+								确认装车</view> -->
+										<view class="start normal" @click.stop="toDetail(good.id)"
+											v-if="good.orderStatus=='未装车'||good.orderStatus=='货主驳回装车信息'||good.orderStatus=='平台驳回装车信息'">
+											确认装车</view>
+								
+							<view class="start normal" v-if="good.orderStatus!='未装车'&&good.orderStatus!='待货主确认'"
+								@click.stop="$helper.contactCustomerService">联系客服
+							</view>
+							<view class="start normal" @click.stop="confirmUnLoading(good)"
+								v-if="good.orderStatus=='运输中'||good.orderStatus=='货主驳回卸车信息'||good.orderStatus=='平台驳回卸车信息'">
+								确认卸车</view>
+							<!-- 				<view class="start">评价</view>
+							-->
+							<view class="start normal" @click.stop="closed(good)" v-if="good.orderStatus=='结算中'">完结
+							</view>
 						</view>
 					</view>
 				</view>
@@ -76,9 +129,10 @@
 		</view>
 		<view v-else class="search-view">
 			<view class="flex">
-				<u-icon name="arrow-left" color="" size="20" class="back-icon"></u-icon>
+				<u-icon name="arrow-left" color="" size="20" class="back-icon" @click="back()"></u-icon>
 				<u-search placeholder="可按编号、货主、收发地查找" placeholderColor="#AFB3BF" :actionStyle="textColor"
-					bgColor="#F5F6FA" v-model="keyword" actionText='取消' @custom="cancel" @search="getSearch"></u-search>
+					bgColor="#F5F6FA" v-model="searchKeyWord" actionText='取消' @custom="cancel" @search="getSearch">
+				</u-search>
 			</view>
 			<view class="near-search">
 				<view class="flex flex-space-between">
@@ -86,20 +140,35 @@
 					<u-icon name="trash-fill" color="#AFB3BF" size="20" class="back-icon" @click="del"></u-icon>
 				</view>
 				<view class="">
-					<view v-for="(item,index) in 3" :key="index" class="item-style inline-block">
-						中天好远
+					<view v-for="(item,index) in useSearchList" :key="index" class="item-style inline-block">
+						{{item}}
 					</view>
 				</view>
 
 			</view>
 		</view>
-		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
-			:showCancelButton='true' @confirm="confirmClick" @close="cancelClick"
-			@cancel="cancelClick"></u-modal>
+		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
+			:closeOnClickOverlay='true' :showCancelButton='true' @confirm="confirmClick" @close="cancelClick"
+			@cancel="cancelClick" class="modal">
+			<u-radio-group v-model="radiovalue1" placement="" v-if='isShowTerminationReason' class='row'>
+				<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
+					:label="item.name" :name="item.name" @change="radioChange">
+				</u-radio>
+			</u-radio-group>
+			<u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
+				v-if='isShowTerminationReason'>
+			</u--textarea>
+		</u-modal>
+
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
 <script>
+	var that
+	import {
+		mapState
+	} from 'vuex';
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	import {
 		apiGoods
@@ -108,13 +177,50 @@
 		mixins: [MescrollMixin], // 使用mixin
 		data() {
 			return {
-				alertTitle:'',
-				alertContent:"确定删除全部历史记录?",
-				isShowAlert:false,
+				showMenu: false,
+				searchStyle: {
+					background: "#317AFE",
+					color: 'white',
+					position: "absolute",
+					right: "30rpx",
+					padding: "6rpx 20rpx",
+					"border-radius": '30rpx'
+				},
+				// isShowStopBtn: false,
+				// isConfirmLoadingBtn:false,
+				// isShowCustomerServiceBtn:false,
+				// isConfirmUnLoadingBtn:false,
+				// isClosedBtn:false,
+				searchKeyWord: '',
+				useSearchList: [],
+				mescroll: null,
+				isShowTerminationReason: false,
+				id: '',
+				value2: '',
+				radiolist1: [{
+						name: '已与货主协商',
+						disabled: false
+					},
+					{
+						name: '货主原因终止',
+						disabled: false
+					},
+					{
+						name: '司机个人原因终止',
+						disabled: false
+					}, {
+						name: '其他',
+						disabled: false
+					}
+				],
+				radiovalue1: '已与货主协商',
+				confirmText: '终止',
+				alertTitle: '确定终止订单?',
+				alertContent: "",
+				isShowAlert: false,
 				textColor: {
 					"color": "#AFB3BF"
 				},
-				keyword: '',
 				isSearch: false,
 				startPlace: '齐齐哈尔齐齐哈尔',
 				endPlace: '全国',
@@ -135,21 +241,23 @@
 					{
 						name: '已完结'
 					},
-					{
-						name: '评价'
-					},
+					// {
+					// 	name: '评价'
+					// },
 				],
 				tabIndex: 0,
 				scrollTop: 0
 			}
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
+		},
 		onTabItemTap(e) {
 			// tab 点击时执行,此处直接接收单击事件
 			uni.pageScrollTo({
 				scrollTop: 0,
 				duration: 300
 			});
-			console.log(e)
 		},
 		created() {
 			//#ifdef APP-PLUS
@@ -157,8 +265,39 @@
 			//#endif
 		},
 		onLoad() {
-			let _isHave = this.$utils.getRoles('aaa')
-			console.log(_isHave)
+			that = this
+			// let _isHave = this.$utils.getRoles('aaa')
+			// console.log(_isHave)
+
+		},
+		onShow() {
+			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+				reCommonId: this.userInfo.id,
+			}).then(res3 => {
+				if (res3.data) {
+					let name = 'myTip';
+					let value = res3.data
+					if (value == 0) {
+						uni.removeTabBarBadge({
+							index: 2
+						})
+					}
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if (value != 0 && value) {
+						uni.setTabBarBadge({
+							index: 2,
+							text: value + ""
+						})
+					}
+				}
+			})
+			// this.upCallback({
+			// 	size: 10,
+			// 	num: 1
+			// })
 		},
 		onPageScroll(res) {
 			this.scrollTop = res.scrollTop
@@ -181,15 +320,137 @@
 
 		},
 		methods: {
-			del(){
-				this.isShowAlert= true
+			closeMenu() {
+				this.showMenu = false
+			},
+			// 完结
+			closed(item) {
+				this.$request.baseRequest('post', '/orderInfo/api/editEnd', {
+						id: item.id,
+					}).then(res => {
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "提交成功",
+								complete() {
+									that.upCallback({
+										size: 10,
+										num: 1
+									})
+								}
+							})
+
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			confirmLoading(item) {
+				uni.$u.route('/pages/order/confirmLoading', item);
+			},
+			confirmUnLoading(item) {
+				uni.$u.route('/pages/order/confirmUnloading', item);
+			},
+			back() {
+				uni.navigateBack(-1)
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
 			},
-			confirmClick(){},
-			cancelClick(){
+			radioChange(n) {
+				console.log('radioChange', n);
+
+			},
+			stop(item) {
+				// 货主接单
+				if (item.orderStatusKey == 1) {
+					this.isShowTerminationReason = false
+				} else {
+					this.isShowTerminationReason = true
+				}
+				this.id = item.id
+				this.isShowAlert = true
+			},
+			init() {
+
+			},
+			del() {
+				this.isShowAlert = true
+				this.alertTitle = '确定删除全部历史记录?'
+				this.confirmText = '确定'
+			},
+			confirmClick() {
+				if (this.alertTitle == '确定删除全部历史记录?') {
+					uni.removeStorageSync('useSearchList');
+					this.useSearchList = [];
+					this.isShowAlert = false
+				} else {
+					console.log('终止', this.radiovalue1 == '其他' && !this.value2)
+					if (this.radiovalue1 == '其他' && !this.value2) {
+						uni.showToast({
+							title: '请填写终止原因描述',
+							icon: 'none',
+							duration: 2000
+						});
+						return
+					}
+					let _terminationReason = ''
+					if (this.radiovalue1 == '已与货主协商') {
+						_terminationReason = 1
+					} else if (this.radiovalue1 == '货主原因终止') {
+						_terminationReason = 2
+					} else if (this.radiovalue1 == '司机个人原因终止') {
+						_terminationReason = 3
+					} else if (this.radiovalue1 == '其他') {
+						_terminationReason = 4
+					}
+					this.$request.baseRequest('post', '/orderInfo/api/end', {
+							id: this.id,
+							terminator: 1,
+							terminationReason: _terminationReason,
+							terminationReasonDescription: this.value2
+						}).then(res => {
+							console.log(res)
+							if (res.code == 200) {
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "终止订单成功",
+									complete() {
+										that.mescroll.resetUpScroll()
+									}
+								})
+
+
+							} else {
+								uni.$u.toast("终止订单失败!");
+							}
+							this.isShowAlert = false
+
+						})
+						.catch(res => {
+							uni.$u.toast(res.message);
+						});
+				}
+
+			},
+			cancelClick() {
 				this.isShowAlert = false
 			},
-			getSearch() {
-				console.log("点击搜索")
+			getSearch(e) {
+				// = uni.getStorageSync('useSearchList')
+
+				this.useSearchList.unshift(e)
+				this.useSearchList=[...new Set(this.useSearchList)]
+				uni.setStorageSync("useSearchList", this.useSearchList)
+				if(this.useSearchList.length>9){
+					this.carList.splice(this.useSearchList.length,1)
+				}
+				console.log("点击搜索", e)
+				this.upCallback({
+					size: 10,
+					num: 1
+				})
 			},
 			cancel() {
 				this.isSearch = false
@@ -201,6 +462,13 @@
 			},
 			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
 			upCallback(page) {
+				// uni.$u.sleep(300).then(() => {
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				})
+				// })
+
 				// 此处可以继续请求其他接口
 				// if(page.num == 1){
 				// 	// 请求其他接口...
@@ -216,37 +484,45 @@
 				// 	})
 				// 	return // 此处return,先获取xx
 				// }
-
-				//联网加载数据
-				apiGoods(page.num, page.size).then(res => {
-					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
-					//mescroll会根据传的参数,自动判断列表如果无任何数据,则提示空;列表无下一页数据,则提示无更多数据;
-
-					//方法一(推荐): 后台接口有返回列表的总页数 totalPage
-					//this.mescroll.endByPage(res.list.length, totalPage); //必传参数(当前页的数据个数, 总页数)
-
-					//方法二(推荐): 后台接口有返回列表的总数据量 totalSize
-					//this.mescroll.endBySize(res.list.length, totalSize); //必传参数(当前页的数据个数, 总数据量)
-
-					//方法三(推荐): 您有其他方式知道是否有下一页 hasNext
-					//this.mescroll.endSuccess(res.list.length, hasNext); //必传参数(当前页的数据个数, 是否有下一页true/false)
-
-					//方法四 (不推荐),会存在一个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据当前页的数据个数判断,则需翻到第三页才会知道无更多数据
-					this.mescroll.endSuccess(res.list.length);
-
-					//设置列表数据
-					if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
-					this.goods = this.goods.concat(res.list); //追加新数据
-				}).catch(() => {
-					//联网失败, 结束加载
-					this.mescroll.endErr();
+				// 订单状态12345
+				this.$request.baseRequest('get', '/orderInfo/selectOrderInfo', {
+						commonId: this.userInfo.id,
+						searchKeyWord: this.searchKeyWord,
+						searchType: this.searchType,
+						pageSize: page.size,
+						currentPage: page.num
+					}).then(res => {
+						this.isSearch = false
+						if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
+						this.goods = this.goods.concat(res.data.records); //追加新数据
+						this.mescroll.endBySize(res.data.records.length, res.data.total);
+
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+				uni.$u.sleep(500).then(() => {
+					uni.hideLoading()
 				})
 			},
 			clickTab(val) {
+				uni.showLoading({
+					mask: true
+				})
 				console.log(val)
+				this.searchType = val.index
+				this.tabIndex = val.index
+				this.upCallback({
+					size: 10,
+					num: 1
+				})
+				this.showMenu = false
 			},
 			search() {
 				this.isSearch = true
+				//获取缓存搜索数据
+				this.useSearchList = uni.getStorageSync('useSearchList')
+				if (!this.useSearchList) this.useSearchList = [];
 			}
 		}
 	}
@@ -366,20 +642,28 @@
 			margin: 20rpx 0;
 
 			.time {
-				font-size: 26rpx;
 				color: #999999;
 				margin-right: 20rpx;
 			}
 
 			.car {
-				font-size: 28rpx;
 				color: #000000;
 			}
+
+			.pay {
+				margin-left: 20rpx;
+
+				.number {
+					color: #FE6300;
+					margin-left: 20rpx;
+				}
+			}
 		}
 
 		.row5 {
 			margin: 20rpx 0;
-font-size: 28rpx;
+			font-size: 28rpx;
+
 			.stop {
 				border-radius: 33px;
 				border: 1px solid #FE6300;
@@ -468,7 +752,7 @@ font-size: 28rpx;
 	}
 
 	.item-style {
-
+		margin-top: 20rpx;
 		background: #F5F6FA;
 		padding: 11rpx 24rpx;
 		margin-right: 20rpx;
@@ -476,4 +760,77 @@ font-size: 28rpx;
 		font-size: 26rpx;
 		color: #333333;
 	}
+
+	/deep/.u-modal__content {
+		flex-direction: column;
+	}
+
+	.tab-content {
+		position: relative;
+		padding-right: 200rpx;
+	}
+
+	.right-btn {
+		position: absolute;
+		background: #F3F3F3;
+		// box-shadow: -14px 0px 8px -8px rgba(0, 53, 149, 0.21);
+		display: flex;
+		right: 20rpx;
+		height: 60rpx;
+		top: 0;
+		bottom: 0;
+		margin: auto;
+		color: #333333;
+		align-items: center;
+		justify-content: center;
+		padding: 0rpx 20rpx;
+		box-sizing: border-box;
+		border-radius: 6rpx;
+	}
+
+	.all-menu {
+		position: absolute;
+		z-index: 99;
+		top: 136rrpx;
+	}
+
+	/deep/.u-transition {
+		border-radius: 0 0 50rpx 50rpx;
+	}
+
+	.transition {
+		background: white;
+		padding-bottom: 40rpx;
+
+		.transition-item-style {
+			display: inline-block;
+			width: calc(25% - 40rpx);
+			text-align: center;
+			box-sizing: border-box;
+			background: #F7F8FA;
+			border-radius: 6px;
+			margin: 20rpx 20rpx 0 20rpx;
+			padding: 16rpx 0;
+
+		}
+
+		.menu-active {
+			background: #2772FB;
+			color: white;
+		}
+	}
+
+	.modal-black {
+		background: black;
+		height: 100vh;
+		width: 100vw;
+		position: absolute;
+		z-index: 999;
+		opacity: 0.3;
+	}
+
+	.menu-active {
+		background: #2772FB;
+		color: white;
+	}
 </style>

+ 282 - 102
pages/order/orderDetails.vue

@@ -6,51 +6,40 @@
 			<view class='title flex flex-center'>
 				<u-icon class="back" name="arrow-left" color="" size="20" @click="back"></u-icon>
 				<view class="nav-title">订单</view>
-				<u-icon class="search" name="search" color="" size="28" @click="search"></u-icon>
+				<u-icon class="search" name="server-fill" color="" size="28" @click="$helper.contactCustomerService"></u-icon>
 			</view>
 		</view>
 		<view class="content1">
 			<view class="item1">
-				<!-- <view class="status">待货主确认</view>
-				<view class="status">未装车</view>
-				<view class="status">待货主确认装车</view>
-				<view class="status">货主驳回装车信息</view>
-				<view class="status">待平台确认装车</view>
-				<view class="status">平台驳回装车信息</view>
-				<view class="status">运输中</view>
-				<view class="status">待货主确认卸车</view>
-				<view class="status">货主驳回卸车信息</view>
-				<view class="status">待平台确认卸车</view>
-				<view class="status">平台驳回卸车信息</view>
-				<view class="status">待结算</view>
-				<view class="status">已结算</view>
-				<view class="status">已终止</view> -->
-				<view class="status">结算中</view>
-				<view class="status">已完结</view>
+				<view class="status">{{dataObj.orderStatus}}</view>
+
 			</view>
 			<!-- flex flex-space-between -->
 			<view class="item2">
-				<u-button class="btn" text="终止"></u-button>
-				<!-- <u-button class="btn" text="联系客服" @click="$helper.contactCustomerService"></u-button> -->
-				<u-button class="btn" text="确认装车" @click="goConfirmLoading()"></u-button>
-				<u-button class="btn" text="修改装车信息" @click=""></u-button>
-				<u-button class="btn" text="确认卸车" @click=""></u-button>
-				<u-button class="btn" text="修改卸车信息" @click=""></u-button>
-				<u-button class="btn" text="完结" @click=""></u-button>
+				<u-button class="btn" text="查看合同" @click="lookContract"></u-button>
+				<u-button class="btn" text="签订合同" @click="signContract" v-if="dataObj.cargoOwnerStatus=='未装车'&&dataObj.driverContract!='1'">
+				</u-button>
+				<u-button class="btn" text="终止" @click="stop"  v-if="dataObj.orderStatus=='待货主确认'||dataObj.orderStatus=='未装车'"></u-button>
+				<!-- <u-button class="btn" text="联系客服"  @click="$helper.contactCustomerService"></u-button> -->
+				<u-button class="btn" text="确认装车" @click="confirmLoading" v-if="dataObj.orderStatus=='未装车'&&dataObj.driverContract=='1'"></u-button>
+				<u-button class="btn" text="修改装车信息"  @click="confirmLoading" v-if="dataObj.orderStatus=='货主驳回装车信息'||dataObj.orderStatus=='平台驳回装车信息'"></u-button>
+				<u-button class="btn" text="确认卸车" @click="confirmUnLoading" v-if="dataObj.orderStatus=='运输中'"></u-button>
+				<u-button class="btn" text="修改卸车信息" @click="confirmUnLoading" v-if="dataObj.orderStatus=='货主驳回卸车信息'||dataObj.orderStatus=='平台驳回卸车信息'"></u-button>
+				<u-button class="btn" text="完结" @click="closed" v-if="dataObj.orderStatus=='结算中'"></u-button>
 			</view>
 			<view class="item3 flex flex-space-between align-center">
 				<view class="left flex align-center">
 					<u--image :showLoading="true" :src="src" width="44px" height="44px" @click="" shape='circle'>
 					</u--image>
-					<view class="name">李正华</view>
+					<view class="name">{{dataObj.cargoOwner}}</view>
 					<view class="flex align-center">
-						<view class="number">4.98</view>
-						<u-icon class="star" name="star-fill" color="#FEC823" size="20" @click="back"></u-icon>
+						<!-- <view class="number">4.98</view> -->
+						<!-- <u-icon class="star" name="star-fill" color="#FEC823" size="20" @click="back"></u-icon> -->
 					</view>
 				</view>
 				<view class="right flex s-row align-center phone">
 					<view class="bgc">
-						<u-icon class="phone" name="phone-fill" color="#2772FB" size="20" @click="back"></u-icon>
+						<u-icon class="phone" name="phone-fill" color="#2772FB" size="20" @click="toPhone"></u-icon>
 					</view>
 
 					<view class="hz-name">联系货主</view>
@@ -85,129 +74,124 @@
 		<view class="content2">
 			<view class="flex flex-space-between border">
 				<view class="flex s-row item1">
-					<view class="fontsize-46 fontweight-500 text">营口市</view>
+					<view class="fontsize-46 fontweight-500 text">{{dataObj.sendCity}}</view>
 
 					<view class="fontsize-28 gray">发货地</view>
 				</view>
 				<image class="change-btn" src="@/static/images/common/jt.png" mode='widthFix'></image>
 				<view class="flex s-row item2">
 
-					<view class="fontsize-46 fontweight-500 text" @click="">齐齐哈尔市</view>
+					<view class="fontsize-46 fontweight-500 text" @click="">{{dataObj.unloadCity}}</view>
 					<view class="fontsize-28 gray text-align-right">卸货地</view>
 				</view>
 			</view>
 			<view class="level2-title">基本信息</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">订单编号</view>
-				<view class="row-right-text">CY20220210666666</view>
-			</view>
-			<view class='row-between'>
-				<view class="row-left-text gray">货主</view>
-				<view class="row-right-text">张山</view>
+				<view class=" gray">订单编号</view>
+				<view class="">{{dataObj.orderNo}}</view>
 			</view>
+		<!-- 	<view class='row-between'>
+				<view class=" gray">货主</view>
+				<view class="">{{dataObj.cargoOwner}}</view>
+			</view> -->
 			<view class='row-between'>
-				<view class="row-left-text gray">货主单位</view>
-				<view class="row-right-text">辽宁省营口市鲅鱼圈区蝴蝶泉路116号</view>
+				<view class=" gray">货主单位</view>
+				<view class="">{{dataObj.compName?dataObj.compName:'个人货主'}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">发货地</view>
-				<view class="row-right-text place">黑龙江中天昊元贸易有限公司</view>
+				<view class=" gray">发货地</view>
+				<view class=" place">{{dataObj.sendPrivate}}{{dataObj.sendCity}}{{dataObj.sendArea}}{{dataObj.sendDetailedAddress}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">卸货地</view>
-				<view class="row-right-text place">黑龙江省齐齐哈尔市梅里斯达斡尔族区
-					杜尔门沁达斡尔乡53农场</view>
+				<view class=" gray">卸货地</view>
+				<view class=" place">{{dataObj.unloadPrivate}}{{dataObj.unloadCity}}{{dataObj.unloadArea}}{{dataObj.unloadDetailedAddress}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">货名</view>
-				<view class="row-right-text">玉米</view>
+				<view class=" gray">货名</view>
+				<view class="">{{dataObj.goodsName}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">距离</view>
-				<view class="row-right-text">约15公里</view>
+				<view class=" gray">距离</view>
+				<view class="">约{{dataObj.distance}}公里</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">运费</view>
-				<view class="row-right-text">100元/车</view>
+				<view class=" gray">运费</view>
+				<view class="">{{dataObj.freight}}{{dataObj.illingMethod==0?'元/吨':'元/车'}}</view>
 			</view>
-
 		</view>
-		<view class="content3">
+		<view class="content3" v-if='dataObj.orderStatus!="待货主确认"&&dataObj.orderStatus!="未装车"&&dataObj.orderStatus!="已终止"'>
 			<view class="level2-title">承运信息</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">合同编号</view>
-				<view class="row-right-text">132</view>
+				<view class=" gray">合同编号</view>
+				<view class="">{{carrierInfo.contractNo}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">车牌号</view>
-				<view class="row-right-text">京H12345</view>
+				<view class=" gray">车牌号</view>
+				<view class="">{{carrierInfo.carNo}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">预计运费</view>
-				<view class="row-right-text">1000元</view>
+				<view class=" gray">预计运费</view>
+				<view class="">{{carrierInfo.estimatedFreight}}元</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">装车时间</view>
-				<view class="row-right-text gray">2022-02-10 16:13:15</view>
+				<view class=" gray">装车时间</view>
+				<view class=" gray">{{carrierInfo.loadingDate}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">装车照片</view>
+				<view class=" gray">装车照片</view>
 				<view class="flex">
-					<u--image :showLoading="true" :src="src" width="40px" height="40px"></u--image>
-					<u--image :showLoading="true" :src="src" width="40px" height="40px"></u--image>
+					<u--image :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in zcPhoneList"></u--image>
 				</view>
 			</view>
-			<view class='row-between'>
-				<view class="row-left-text gray">计应付运费</view>
-				<view class="row-right-text">1100元</view>
-			</view>
-			<view class='row-between'>
-				<view class="row-left-text gray">卸车时间</view>
-				<view class="row-right-text gray">2022-02-10 16:13:15</view>
-			</view>
-			<view class='row-between'>
-				<view class="row-left-text gray">卸车照片</view>
-				<view class="flex">
-					<u--image :showLoading="true" :src="src" width="40px" height="40px"></u--image>
-					<u--image :showLoading="true" :src="src" width="40px" height="40px"></u--image>
+			<view v-if='dataObj.orderStatus!="待货主确认"&&dataObj.orderStatus!="未装车"&&dataObj.orderStatus!="待货主确认装车"&&dataObj.orderStatus!="货主驳回装车信息"&&dataObj.orderStatus!="待平台确认装车"&&dataObj.orderStatus!="平台驳回装车信息"&&dataObj.orderStatus!="运输中"&&dataObj.orderStatus!="已终止"'>
+				<view class='row-between'>
+					<view class=" gray">合计应付运费</view>
+					<view class="">{{carrierInfo.totalFreight}}元</view>
+				</view>
+				<view class='row-between'>
+					<view class=" gray">卸车时间</view>
+					<view class=" gray">{{carrierInfo.loadingDate}}</view>
+				</view>
+				<view class='row-between'>
+					<view class=" gray">卸车照片</view>
+					<view class="flex">
+						<u--image :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in xcPhoneList"></u--image>
+					</view>
 				</view>
 			</view>
+	
 		</view>
-		<view class="content4">
+		<!-- v-if="status2 -->
+		<view class="content4" v-if='dataObj.orderStatus!="待货主确认"&&dataObj.orderStatus!="未装车"&&dataObj.orderStatus!="待货主确认装车"&&dataObj.orderStatus!="货主驳回装车信息"&&dataObj.orderStatus!="待平台确认装车"&&dataObj.orderStatus!="平台驳回装车信息"&&dataObj.orderStatus!="已终止"'>
 			<view class="level2-title gray">运费信息(单位:元)</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">预付运费</view>
-				<view class="row-right-text">2000</view>
+				<view class=" gray">预付运费</view>
+				<view class="">{{freightInfo.prepaidFreight}}</view>
 			</view>
 			<view class='flex flex-end'>
-				<view class="gray row-right-text">2022-02-11 15:15:15</view>
-			</view>
-			<view class='row-between'>
-				<view class="row-left-text gray">运费尾款</view>
-				<view class="row-right-text">未支付</view>
-			</view>
-			<view class='row-between mx row-left-text gray'>
-				明细:预付2000元,扣款200元,服务费150元,尾款2000元,合计收款4000元。
+				<view class="gray ">{{freightInfo.prepaidFreightDate}}</view>
 			</view>
 			<view class='row-between'>
-				<view class="row-left-text gray">运费</view>
-				<view class="row-right-text">2000</view>
+				<view class=" gray">运费尾款</view>
+				<view class="">{{freightInfo.freightBalance?freightInfo.freightBalance:'未支付'}}</view>
 			</view>
-			<view class='flex flex-end'>
-				<view class="gray row-right-text">2022-02-11 15:15:15</view>
-			</view>
-			<view class='row-between'>
-				<view class="row-left-text gray">运费</view>
-				<view class="row-right-text">2000</view>
-			</view>
-			<view class='flex flex-end'>
-				<view class="gray row-right-text">2022-02-11 15:15:15</view>
-			</view>
-			<view class='row-between'>
-				<view class="row-left-text gray">合计</view>
-				<view class="row-right-text">4000</view>
+			<view class='row-between mx  gray'>
+				明细:预付{{freightInfo.prepaidFreight}}元,扣款{{freightInfo.deduction}}元,服务费{{freightInfo.serviceCharge}}元,尾款{{freightInfo.freightBalance}}元,合计收款{{freightInfo.totalCollection}}元。
 			</view>
 		</view>
+		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
+			:closeOnClickOverlay='true' :showCancelButton='true' @confirm="confirmClick" @close="cancelClick"
+			@cancel="cancelClick" class="modal">
+			<u-radio-group v-model="radiovalue1" placement="" v-if='isShowTerminationReason' class='row'>
+				<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
+					:label="item.name" :name="item.name" @change="radioChange">
+				</u-radio>
+			</u-radio-group>
+			<u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'
+				v-if='isShowTerminationReason'>
+			</u--textarea>
+		</u-modal>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -215,17 +199,209 @@
 	export default {
 		data() {
 			return {
+				zcPhoneList:[],
+				xcPhoneList:[],
+				carrierInfo:{},
+				freightInfo:{},
 				cyinfoStatus: '未装车',
 				src: 'https://cdn.uviewui.com/uview/album/1.jpg',
-				id: 1
+				isShowTerminationReason: false,
+				dataObj:{},
+				status1:false,
+				status2:false,
+				id: '',
+				value2: '',
+				radiolist1: [{
+						name: '已与货主协商',
+						disabled: false
+					},
+					{
+						name: '货主原因终止',
+						disabled: false
+					},
+					{
+						name: '司机个人原因终止',
+						disabled: false
+					}, {
+						name: '其他',
+						disabled: false
+					}
+				],
+				radiovalue1: '已与货主协商',
+				confirmText: '终止',
+				alertTitle: '确定终止订单?',
+				alertContent: "",
+				isShowAlert: false,
 			}
 
 		},
+		onLoad(options) {
+			this.id = options.id
+		},
+		onShow() {
+			this.getList()
+		},
 		methods: {
+			lookContract(){
+				this.$request.baseRequest('get', '/orderInfo/setPdf', {
+					}).then(res => {
+						if (res.code == 200) {
+							debugger
+							this.contractSrc = res.data
+							uni.downloadFile({
+							  url: res.data,
+							  success: function (res) {
+							    var filePath = res.tempFilePath;
+							    uni.openDocument({
+							      filePath: filePath,
+							      showMenu: true,
+							      success: function (res) {
+							        console.log('打开文档成功');
+							      }
+							    });
+							  }
+							});
+							// this.$refs.uToast.show({
+							// 	type: 'success',
+							// 	message: "提交成功",
+							// 	complete() {
+							// 		that.upCallback({
+							// 			size: 10,
+							// 			num: 1
+							// 		})
+							// 	}
+							// })
+				
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			signContract() {
+				// this.lookAlert = true
+				uni.$u.route('/pages/order/signContract', this.dataObj
+				);
+				
+			},
+			// 完结
+			closed() {
+				let item = this.dataDetails
+				let that = this
+				this.$request.baseRequest('post', '/orderInfo/api/editEnd', {
+						id: item.id,
+					}).then(res => {
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "提交成功",
+								complete() {
+									that.upCallback({
+										size: 10,
+										num: 1
+									})
+								}
+							})
+			
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			confirmLoading() {
+				uni.$u.route('/pages/order/confirmLoading', {id:this.id});
+			},
+			confirmUnLoading() {
+				let item = this.dataDetails
+				uni.$u.route('/pages/order/confirmUnloading', item);
+			},
+			confirmClick() {
+				let  that = this
+				console.log('终止')
+				if (this.radiovalue1 == '其他' && !this.value2) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "请填写终止原因描述!",
+					})
+					return
+				}
+				let _terminationReason = ''
+				if (this.radiovalue1 == '已与货主协商') {
+					_terminationReason = 1
+				} else if (this.radiovalue1 == '货主原因终止') {
+					_terminationReason = 2
+				} else if (this.radiovalue1 == '司机个人原因终止') {
+					_terminationReason = 3
+				} else if (this.radiovalue1 == '其他') {
+					_terminationReason = 4
+				}
+				this.$request.baseRequest('post', '/orderInfo/api/end', {
+						id: this.id,
+						terminationReason: _terminationReason,
+						terminationReasonDescription: this.value2,
+						terminator:1
+					}).then(res => {
+						console.log(res) 
+						this.isShowAlert = false
+						// this.mescroll.resetUpScroll()
+						this.$refs.uToast.show({
+							type: 'success',
+							message: "提交成功!",
+							complete() {
+								that.getList()
+							}
+						})
+			
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			stop() {
+				let item = this.dataObj
+				// 货主接单
+				if (item.orderStatusKey == 1) {
+					this.isShowTerminationReason = false
+				} else {
+					this.isShowTerminationReason = true
+				}
+				this.id = item.id
+				this.isShowAlert = true
+			},
+			toPhone(){
+				uni.makePhoneCall({
+				    phoneNumber: this.dataObj.cargoOwnerPhone
+				});
+			},
 			back() {
 				uni.navigateBack()
 			},
+			getList(){
+				this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
+						id: this.id,
+						
+					}).then(res => {
+						if(res.code==200){
+							this.dataObj = res.data
+							this.carrierInfo = res.data.carrierInfo
+							this.freightInfo =  res.data.freightInfo
+							this.zcPhoneList = this.carrierInfo.loadingImg.split(',')
+							// if(res.data.orderStatus!="待货主确认"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="已终止"){
+							// 	this.status1 = true
+							// }
+							// if(res.data.orderStatus!="已终止"&&res.data.orderStatus!="平台驳回装车信息"&&res.data.orderStatus!="待平台确认装车"&&res.data.orderStatus!="待货主确认"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="待货主确认装车"&&res.data.orderStatus!="货主驳回装车信息"){
+							// 	this.status2 = true
+							// }
+						}
+						
+					})
+			},
 			goConfirmLoading(id) {
+				
 				console.log('点击详情id:', id)
 				uni.$u.route('/pages/order/confirmLoading', {
 					id: this.id,
@@ -293,6 +469,7 @@
 
 		.btn {
 			width: 40%;
+			margin-top: 20rpx;
 		}
 
 		.item2 {
@@ -414,4 +591,7 @@
 			margin: 10rpx 0;
 		}
 	}
+	/deep/.u-modal__content {
+		flex-direction: column;
+	}
 </style>

+ 553 - 0
pages/order/signContract.vue

@@ -0,0 +1,553 @@
+<template>
+	<view class="content">
+<!-- 		<view class="content1">
+			<view style='width:70px'>付款方式</view>
+			<u-radio-group v-model="dataDetails.advanceFreightService" placement="row">
+				<u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
+					:label="item.name" :name="item.name" @change="radioChange">
+				</u-radio>
+			</u-radio-group>
+
+		</view> -->
+		<view class="content2">
+			<view class="title">
+				合同摘要
+			</view>
+			<view class='row-between'>
+				<view class="gray">发货单位</view>
+				<view class="">{{dataDetails.compName?dataDetails.compName:'个人货主'}}</view>
+			</view>
+			<view class='row-between'>
+				<view class="gray">发货地</view>
+				<view class="place">
+					{{dataDetails.sendPrivate}}{{dataDetails.sendCity}}{{dataDetails.sendArea}}{{dataDetails.sendDetailedAddress}}
+				</view>
+			</view>
+			<view class='row-between'>
+				<view class="gray">卸货地</view>
+				<view class=" place">
+					{{dataDetails.unloadPrivate}}{{dataDetails.unloadCity}}{{dataDetails.unloadArea}}{{dataDetails.unloadDetailedAddress}}
+				</view>
+			</view>
+			<view class='row-between'>
+				<view class="gray">货名</view>
+				<view class="">{{dataDetails.goodsName}}</view>
+			</view>
+			<view class='row-between'>
+				<view class="gray">距离</view>
+				<view class="">约{{dataDetails.distance}}公里</view>
+			</view>
+			<view class='row-between'>
+				<view class="gray">运费</view>
+				<view class="">{{dataDetails.freight}}{{dataDetails.illingMethod==0?'元/吨':'元/车'}}</view>
+				<!-- 				<view class="flex"><input type="text" placeholder="请输入运费" v-model="dataDetails.freight"
+						class="text-align-right yf-input">{{dataDetails.freight}}元/车</view> -->
+			</view>
+		</view>
+		<view class="wrapper content3">
+			<view class="qm-row">
+				<view class="handTitle">手写签名</view>
+				<image src="@/static/xiangpica@2x.png" mode="widthFix" @click="retDraw" class="retDraw-image"></image>
+				<!-- <button @click="retDraw" class="delBtn">重写</button> -->
+			</view>
+
+			<view class="handCenter">
+				<canvas class="handWriting" :disable-scroll="true" @touchstart="uploadScaleStart"
+					@touchmove="uploadScaleMove" canvas-id="handWriting"></canvas>
+			</view>
+			<view class="handRight">
+
+			</view>
+			<view class="handBtn">
+				<!-- 			<image @click="selectColorEvent('black','#1A1A1A')"
+					:src="selectColor === 'black' ? '/static/other/color_black_selected.png' : '/static/other/color_black.png'"
+					:class="[selectColor === 'black' ? 'color_select' : '', 'black-select']"></image>
+				<image @click="selectColorEvent('red','#ca262a')"
+					:src="selectColor === 'red' ? '/static/other/color_red_selected.png' : '/static/other/color_red.png'"
+					:class="[selectColor === 'red' ? 'color_select' : '', 'black-select']"></image> -->
+
+				<!-- <button @click="saveCanvasAsImg" class="saveBtn">保存</button> -->
+				<view @click="submit" class="saveBtn">提交</view>
+				<!-- <button @click="previewCanvasImg" class="previewBtn">预览</button> -->
+				<!-- <button @click="subCanvas" class="subBtn">完成</button> -->
+			</view>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	var that;
+	import uploadImage from '@/components/ossutil/uploadFile.js';
+	export default {
+		data() {
+			return {
+				isScaleStart: false,
+				radioCustomStyle: {
+					margin: '0 0 0 10rpx'
+				},
+				canvasName: 'handWriting',
+				ctx: '',
+				startX: null,
+				startY: null,
+				canvasWidth: 0,
+				canvasHeight: 0,
+				selectColor: 'black',
+				lineColor: '#1A1A1A', // 颜色
+				lineSize: 5, // 笔记倍数
+				value: true,
+				dataDetails: {},
+				radiolist1: [{
+						name: '平台垫付运费',
+						disabled: false
+					},
+					{
+						name: '无需平台垫付运费',
+						disabled: false
+					},
+				],
+			};
+		},
+		onLoad(options) {
+			that = this
+			console.log(options)
+			this.dataDetails = options
+			this.dataDetails.advanceFreightService = '平台垫付运费'
+			this.ctx = uni.createCanvasContext("handWriting");
+			this.$nextTick(() => {
+				uni.createSelectorQuery().select('.handCenter').boundingClientRect(rect => {
+						this.canvasWidth = rect.width;
+						this.canvasHeight = rect.height;
+						/* 将canvas背景设置为 白底,不设置  导出的canvas的背景为透明 */
+						this.setCanvasBg('#fff');
+					})
+					.exec();
+			});
+		},
+		methods: {
+			submit() {
+				if (!that.isScaleStart) {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "手写签名不能为空!",
+					})
+					return
+				}
+				// if (uni.$u.test.isEmpty(that.dataDetails.freight)) {
+				// 	that.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "运费不能为空!",
+				// 	})
+				// 	return
+				// }
+				uni.canvasToTempFilePath({
+					canvasId: 'handWriting',
+					fileType: 'png',
+					quality: 1, //图片质量
+					success(res) {
+						console.log(res.tempFilePath, 'canvas生成图片地址');
+						uploadImage('image', res.tempFilePath, 'appData/',
+							result => {
+								// 上传成功
+								console.log('图片地址', result)
+								that.dataDetails.cargoOwnerAutograph = result
+
+
+								uni.showLoading({
+									title: '加载中',
+									mask: true
+								})
+
+								that.$request.baseRequest('get', '/orderInfo/setPdf', that.dataDetails).then(res => {
+										if (res.code == 200) {
+											debugger
+											// that.contractSrc = res.data
+											// uni.downloadFile({
+											// 	url: res.data,
+											// 	success: function(res) {
+											// 		var filePath = res.tempFilePath;
+											// 		uni.openDocument({
+								   //  		filePath: filePath,
+											// 			showMenu: true,
+								   // 			success: function(res) {
+											// 				console.log('打开文档成功');
+											// 			}
+											// 		});
+											// 	}
+											// });
+											// this.$refs.uToast.show({
+											// 	type: 'success',
+											// 	message: "提交成功",
+											// 	complete() {
+											// 		that.upCallback({
+											// 			size: 10,
+											// 			num: 1
+											// 		})
+											// 	}
+											// })
+
+										}
+									})
+									.catch(res => {
+										uni.$u.toast(res.message);
+									});
+							}
+						)
+
+					}
+				});
+			},
+			// change(e){
+			// 	if(this.value){
+			// 		this.$set(this.dataDetails,'advanceFreightService',1)
+			// 	}else{
+			// 		this.$set(this.dataDetails,'advanceFreightService',0)
+			// 	}
+			// },
+			// 笔迹开始
+			uploadScaleStart(e) {
+				this.isScaleStart = true
+				this.startX = e.changedTouches[0].x
+				this.startY = e.changedTouches[0].y
+				//设置画笔参数
+				//画笔颜色
+				this.ctx.setStrokeStyle(this.lineColor)
+				//设置线条粗细
+				this.ctx.setLineWidth(this.lineSize)
+				//设置线条的结束端点样式
+				this.ctx.setLineCap("round") //'butt'、'round'、'square'
+				//开始画笔
+				this.ctx.beginPath()
+			},
+			// 笔迹移动
+			uploadScaleMove(e) {
+				//取点
+				let temX = e.changedTouches[0].x
+				let temY = e.changedTouches[0].y
+				//画线条
+				this.ctx.moveTo(this.startX, this.startY)
+				this.ctx.lineTo(temX, temY)
+				this.ctx.stroke()
+				this.startX = temX
+				this.startY = temY
+				this.ctx.draw(true)
+			},
+			/**
+			 * 重写
+			 */
+			retDraw() {
+				this.ctx.clearRect(0, 0, 700, 730);
+				this.ctx.draw();
+				//设置canvas背景
+				this.setCanvasBg('#fff');
+			},
+			/**
+			 * @param {Object} str
+			 * @param {Object} color
+			 * 选择颜色
+			 */
+			selectColorEvent(str, color) {
+				this.selectColor = str;
+				this.lineColor = color;
+			},
+			//完成
+			subCanvas() {
+				uni.canvasToTempFilePath({
+					canvasId: 'handWriting',
+					fileType: 'png',
+					quality: 1, //图片质量
+					success(res) {
+						// console.log(res.tempFilePath, 'canvas生成图片地址');
+						uni.showToast({
+							title: '以保存'
+						});
+						//保存到系统相册
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath,
+							success(res) {
+								uni.showToast({
+									title: '已成功保存到相册',
+									duration: 2000
+								});
+							}
+						});
+					}
+				});
+			},
+			//保存到相册
+			saveCanvasAsImg() {
+				uni.canvasToTempFilePath({
+					canvasId: 'handWriting',
+					fileType: 'png',
+					quality: 1, //图片质量
+					success(res) {
+						console.log(res.tempFilePath, 'canvas生成图片地址');
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath,
+							success(res) {
+								uni.showToast({
+									title: '已保存到相册',
+									duration: 2000
+								});
+							}
+						});
+					}
+				});
+			},
+			//预览
+			previewCanvasImg() {
+				uni.canvasToTempFilePath({
+					canvasId: 'handWriting',
+					fileType: 'jpg',
+					quality: 1, //图片质量
+					success(res) {
+						uni.previewImage({
+							urls: [res.tempFilePath] //预览图片 数组
+						});
+					}
+				});
+			},
+			//设置canvas背景色  不设置  导出的canvas的背景为透明
+			//@params:字符串  color
+			setCanvasBg(color) {
+
+				/* 将canvas背景设置为 白底,不设置  导出的canvas的背景为透明 */
+				//rect() 参数说明  矩形路径左上角的横坐标,左上角的纵坐标, 矩形路径的宽度, 矩形路径的高度
+				//这里是 canvasHeight - 4 是因为下边盖住边框了,所以手动减了写
+				this.ctx.rect(0, 0, this.canvasWidth, this.canvasHeight - 4);
+				// ctx.setFillStyle('red')
+				this.ctx.setFillStyle(color);
+				this.ctx.fill(); //设置填充
+				this.ctx.draw(); //开画
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	page {
+		background: #fbfbfb;
+		height: auto;
+	}
+
+	.content1 {
+		background: white;
+		border-radius: 20rpx;
+		margin: 20rpx;
+		padding: 30rpx 20rpx;
+		display: flex;
+		justify-content: space-between;
+
+		.right {
+			display: flex;
+		}
+	}
+
+	.content2 {
+		background: white;
+		border-radius: 20rpx;
+		margin: 20rpx;
+		padding: 30rpx 20rpx;
+
+		.title {
+			font-size: 36rpx;
+			font-weight: 700;
+			margin-bottom: 20rpx;
+		}
+
+		.row-between {
+			margin-bottom: 20rpx;
+		}
+
+		.left-text {
+			margin-right: 20rpx;
+		}
+
+		.yf-input {
+			padding-right: 10rpx;
+		}
+	}
+
+	.content3 {
+		background: white;
+		border-radius: 20rpx;
+		margin: 20rpx;
+		padding: 30rpx 20rpx;
+	}
+
+	.place {
+		width: 80%;
+		text-align: right;
+	}
+
+	.handCenter {
+		border: 4rpx dashed #e9e9e9;
+		overflow: hidden;
+		box-sizing: border-box;
+		height: 500rpx;
+	}
+
+	.handWriting {
+		background: #F9F9FB;
+		width: 100%;
+		height: 100%;
+	}
+
+	.handRight {
+		display: inline-flex;
+		align-items: center;
+	}
+
+	.handCenter {
+		border: 4rpx dashed #e9e9e9;
+		flex: 5;
+		overflow: hidden;
+		box-sizing: border-box;
+	}
+
+	.handTitle {
+		font-size: 36rpx;
+		color: #666;
+		font-weight: 700;
+		color: #333333;
+		margin-bottom: 20rpx;
+	}
+
+	.retDraw-image {
+		width: 50rpx;
+
+	}
+
+	.qm-row {
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.saveBtn {
+		width: 80%;
+		background: #2772FB;
+		color: white;
+		text-align: center;
+		border-radius: 50rpx;
+		padding: 20rpx;
+	}
+
+	.handBtn {
+		display: flex;
+		justify-content: center;
+	}
+
+	/* 
+	.wrapper {
+		width: 100%;
+		height: 95vh;
+		margin: 30rpx 0;
+		overflow: hidden;
+		display: flex;
+		align-content: center;
+		flex-direction: row;
+		justify-content: center;
+		font-size: 28rpx;
+	}
+
+
+
+
+	.handBtn button {
+		font-size: 28rpx;
+	}
+
+	.handBtn {
+		height: 95vh;
+		display: inline-flex;
+		flex-direction: column;
+		justify-content: space-between;
+		align-content: space-between;
+		flex: 1;
+	}
+
+	.delBtn {
+		position: absolute;
+		top: 250rpx;
+		left: 0rpx;
+		transform: rotate(90deg);
+		color: #666;
+	}
+
+	.delBtn image {
+		position: absolute;
+		top: 13rpx;
+		left: 25rpx;
+	}
+
+	.subBtn {
+		position: absolute;
+		bottom: 52rpx;
+		left: -3rpx;
+		display: inline-flex;
+		transform: rotate(90deg);
+		background: #008ef6;
+		color: #fff;
+		margin-bottom: 30rpx;
+		text-align: center;
+		justify-content: center;
+	}
+
+
+
+	.saveBtn {
+		position: absolute;
+		top: 375rpx;
+		left: 0rpx;
+		transform: rotate(90deg);
+		color: #666;
+	}
+
+	.previewBtn {
+		position: absolute;
+		top: 500rpx;
+		left: 0rpx;
+		transform: rotate(90deg);
+		color: #666;
+	}
+
+	.uploadBtn {
+		position: absolute;
+		top: 625rpx;
+		left: 0rpx;
+		transform: rotate(90deg);
+		color: #666;
+	}
+
+
+
+	.black-select {
+		width: 60rpx;
+		height: 60rpx;
+		position: absolute;
+		top: 30rpx;
+		left: 25rpx;
+	}
+
+	.black-select.color_select {
+		width: 90rpx;
+		height: 90rpx;
+		top: 100rpx;
+		left: 10rpx;
+	}
+
+	.red-select {
+		width: 60rpx;
+		height: 60rpx;
+		position: absolute;
+		top: 140rpx;
+		left: 25rpx;
+	}
+
+	.red-select.color_select {
+		width: 90rpx;
+		height: 90rpx;
+		top: 120rpx;
+		left: 10rpx;
+	} */
+</style>

+ 357 - 0
pages/public/code.vue

@@ -0,0 +1,357 @@
+<template>
+	<view class="top">
+		<view class="back-btn cuIcon-back" @click="navBack"></view>
+		<!-- 文字 -->
+		<view class="top_one">请输入验证码</view>
+		<view class="top_two">验证码已发送到<text class="text">{{phone}}</text></view>
+		<!-- 六个显示框 -->
+		<view class="top_three">
+			<view :class="[ !inputList[0]||inputList.length>0 ? 'inb' : '' ]" class="input">
+				<text>{{inputList[0]}}</text>
+				<view v-if="!inputList[0]" class="fours"></view>
+			</view>
+			<view :class="[ inputList[0] && !inputList[1]||inputList.length>1 ? 'inb' : '' ]" class="input">
+				<text>{{inputList[1]}}</text>
+				<view v-if="inputList[0] && !inputList[1]" class="fours"></view>
+			</view>
+			<view :class="[ inputList[1] && !inputList[2]||inputList.length>2 ? 'inb' : '' ]" class="input">
+				<text>{{inputList[2]}}</text>
+				<view v-if="inputList[1] && !inputList[2]" class="fours"></view>
+			</view>
+			<view :class="[ inputList[2] && !inputList[3]||inputList.length>3 ? 'inb' : '' ]" class="input">
+				<text>{{inputList[3]}}</text>
+				<view v-if="inputList[2] && !inputList[3]" class="fours"></view>
+			</view>
+			<view :class="[ inputList[3] && !inputList[4]||inputList.length>4 ? 'inb' : '' ]" class="input">
+				<text>{{inputList[4]}}</text>
+				<view v-if="inputList[3] && !inputList[4]" class="fours"></view>
+			</view>
+			<view :class="[ inputList[4] && !inputList[5]||inputList.length>5 ? 'inb' : '' ]" class="input">
+				<text>{{inputList[5]}}</text>
+				<view v-if="inputList[4] && !inputList[5]" class="fours"></view>
+			</view>
+		</view>
+		<!-- 隐藏的input -->
+		<view class="top_four">
+			<input type="number" class="input_show" maxlength="6" @input='submit' v-model="inputList" focus="true" />
+		</view>
+		<!-- 重新获取 -->
+		<view class="top_five" @click='regain' :class="!status ? 'active' : '' "><text v-if="!status">重新发送</text><text
+				v-if="status">{{count_down}}秒后重新发送</text></view>
+	</view>
+</template>
+
+<script>
+	import helper from '@/common/helper.js';
+	export default {
+		data() {
+			return {
+				// 电话
+				phone: '',
+				// 跟隐藏input绑定的数组
+				inputList: [],
+				//计时器
+				count_down: 60,
+				status: false
+			}
+		},
+		onLoad(options) {
+			console.log("options", options.phone)
+			this.phone = options.phone
+			console.log("phone:", this.phone);
+			if (this.phone) {
+				this.regain()
+			} else {
+				uni.showToast({
+					title: '请输入正确的手机号',
+					icon: 'none',
+					duration: 2000
+				})
+			}
+		},
+		methods: {
+			navBack() {
+				uni.navigateBack();
+			},
+			regain() {
+				console.log("regain", this.phone);
+				this.status = true
+				// console.log(e)150500
+				// 设定一个定时器 1000是1秒的意思
+				var interval = setInterval(() => {
+					--this.count_down
+				}, 1000)
+				if (this.count_down == 0) {
+					this.status = false
+				}
+				// 设定一个定时器 60000就是六十秒
+				setTimeout(() => {
+					this.status = false
+					clearInterval(interval) //括号里面的名字要与setInterval定义的相同
+				}, 60000)
+				this.$request.baseRequest('get', '/commonUser/sendVerifyCode', {
+						phone: this.phone
+					}).then(res => {
+						// 获得数据
+						if (res.code != 200) {
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						}
+						console.log(res);
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.errMsg,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			submit(e) {
+				if (e.detail.value.length == 6) {
+					var that = this
+					uni.showLoading({
+						title: '登录中',
+						mask: true
+					})
+					that.$request.baseRequest('get', '/commonUser/loginVerifyCode', {
+							phone: this.phone,
+							verifyCode: this.inputList,
+							loginFlag: 2
+						}).then(res => {
+							if (res.code == 200) {
+								that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
+									mobilePhone: this.phone,
+									veriCode: "123456",
+									loginFlag: 2
+								}).then(res1 => {
+									that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+										reCommonId: this.userInfo.id,
+									}).then(res3 => {
+										if (res3.data) {
+											let name = 'myTip';
+											let value = res3.data
+											if (value == 0) {
+												uni.removeTabBarBadge({
+													index: 2
+												})
+											}
+											that.$store.commit('$uStore', {
+												name,
+												value
+											});
+											if (value != 0 && value) {
+												uni.setTabBarBadge({
+													index: 2,
+													text: value + ""
+												})
+											}
+										}
+									})
+									if (res1.code == 200) {
+										uni.setStorageSync('pcuserInfo', res1.data)
+										helper.getListByUserId()
+									} else {
+										that.$api.doRequest('post', '/commonUser/api/loginQuickly', {
+											mobilePhone: '14444444444',
+											veriCode: "123456",
+											loginFlag: 2
+										}).then(res2 => {
+											that.$request.baseRequest('get',
+											'/newsInfo/unreadMessage', {
+												reCommonId: this.userInfo.id,
+											}).then(res3 => {
+												if (res3.data) {
+													let name = 'myTip';
+													let value = res3.data
+													if (value == 0) {
+														uni.removeTabBarBadge({
+															index: 2
+														})
+													}
+													that.$store.commit('$uStore', {
+														name,
+														value
+													});
+													if (value != 0 && value) {
+														uni.setTabBarBadge({
+															index: 2,
+															text: value + ""
+														})
+													}
+												}
+											})
+											uni.setStorageSync('pcuserInfo', res2.data)
+											helper.getListByUserId()
+										})
+									}
+								})
+								uni.setStorageSync('userInfo', res.data)
+								helper.getListByUserId()
+								that.$store.commit('login', res.data)
+								// that.liangxinLogin()
+								uni.switchTab({
+									url: '/pages/goodSource/index'
+								});
+								uni.hideLoading()
+							} else {
+								uni.hideLoading()
+								uni.showToast({
+									title: res.message,
+									icon: 'none',
+									duration: 2000
+								})
+							}
+						})
+						.catch(res => {
+							uni.showToast({
+								title: res.message,
+								icon: 'none',
+								duration: 2000
+							})
+						});
+				}
+			}
+
+		}
+	}
+</script>1
+
+<style>
+	.top {
+		padding-top: 85px;
+		position: relative;
+		width: 100vw;
+		height: calc(100vh - 85px);
+		overflow: hidden;
+		background: url('~@/static/images/mine/bg@2x.png');
+		background-size: 100%;
+	}
+
+	.back-btn {
+		position: absolute;
+		left: 40upx;
+		z-index: 9999;
+		padding-top: var(--status-bar-height);
+		top: 40upx;
+		font-size: 40upx;
+		color: $font-color-dark;
+	}
+
+	/* 文字 */
+	.top_one {
+		/* margin-top: 85px; */
+		width: 90%;
+		height: 90rpx;
+		line-height: 90rpx;
+		font-size: 44rpx;
+		margin: auto;
+		font-weight: bold;
+	}
+
+	.top_two {
+		width: 90%;
+		height: 40rpx;
+		line-height: 40rpx;
+		font-size: 24rpx;
+		margin: auto;
+		color: #545454;
+	}
+
+	.text {
+		font-weight: bold;
+	}
+
+	/* 六个显示框容器 */
+	.top_three {
+		width: 80%;
+		height: 200rpx;
+		margin: auto;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	/* 六个框显示框 */
+	.input {
+		width: 14%;
+		height: 80rpx;
+		background-color: #F5F5F5;
+		margin-right: 12rpx;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: 50rpx;
+		border-radius: 3px;
+		color: #181818;
+	}
+
+	/* 模拟的焦点 */
+	.inb {
+		background: #FFFFFF;
+		box-shadow: 0px 9px 10px 4px rgba(0, 0, 0, 0.07);
+	}
+
+	.fours {
+		width: 5rpx;
+		height: 40rpx;
+		margin: auto;
+		background-color: #000000;
+		margin-top: 20rpx;
+		animation: show .8s linear infinite;
+	}
+
+	/* 模拟焦点动画  更改animation以更改动画样式*/
+	@keyframes show {
+		from {
+			background-color: #000000;
+		}
+
+		to {
+			background-color: #ffffff;
+		}
+	}
+
+	/* 隐藏的inpit容器 */
+	.top_four {
+		width: 80%;
+		height: 100rpx;
+		margin: auto;
+		margin-top: -140rpx;
+	}
+
+	.input_show {
+		width: 100%;
+		height: 100rpx;
+		border-bottom: 2rpx solid #000000;
+		margin: auto;
+		opacity: 0;
+		background-color: #c6c6c6;
+	}
+
+	/* 重新获取 */
+	.top_five {
+		width: 100%;
+		height: 60rpx;
+		margin-top: 180rpx;
+		text-align: center;
+		line-height: 60rpx;
+		color: #959595;
+	}
+
+	/* 定时器结束的字体样式 */
+	.active {
+		color: #22C572;
+	}
+
+	.button {
+		width: 80%;
+		height: 100rpx;
+		line-height: 100rpx;
+		background-color: #5473E8;
+		border-radius: 60rpx;
+
+	}
+</style>

+ 0 - 208
pages/public/lginOther.vue

@@ -1,208 +0,0 @@
-<template>
-	<view class="u-page content">
-		<u-icon class="back-btn" name="arrow-left" color="black" size="20" @click="navBack"></u-icon>
-		<view class="wrapper">
-			<image style='width:38px;height:38px;margin-bottom:10px;' src='@/static/logo.png'></image>
-			<h2 class="title">欢迎使用网络货运</h2>
-			<u--form labelPosition="left" :model="dataDetails" ref="loginForm" labelWidth="80">
-				<u-form-item label="电话" prop="phone" borderBottom>
-					<u--input v-model="dataDetails.phone" @input='passwordInput' border="none" placeholder="请输入手机号码">
-					</u--input>
-				</u-form-item>
-				<u-form-item label="密码" prop="password" borderBottom>
-					<u--input v-model="dataDetails.password" @input='passwordInput' border="none"
-						placeholder="请输入密码,6-16位字符"></u--input>
-				</u-form-item>
-			</u--form>
-			<u-button @tap="login" class="code-style submit" :disabled="isdisabled">登录</u-button>
-			<u-button @click='goregister' class="code-style submit">手机号一键注册</u-button>
-			<view class='flex' style='color:#6A6A6A;margin-top:10px;'>
-				<view style='flex:1;text-align:center;border-right:1px solid #E8E9ED;' class="Regular"
-					@click="forgetpass()">忘记密码</view>
-				<view @click='gocode' style='flex:1;text-align:center;' class="Regular">验证码登录</view>
-			</view>
-		</view>
-		<u-toast ref="uToast"></u-toast>
-	</view>
-</template>
-
-<script>
-	var _this
-	import helper from '@/common/helper.js';
-	export default {
-		data() {
-			return {
-				isdisabled: true,
-				dataDetails: {
-					phone: '',
-					password: ''
-				},
-				rules: {
-					phone: [{
-							required: true,
-							message: '请输入手机号',
-							trigger: ['blur'],
-						},
-						{
-							// 自定义验证函数,见上说明
-							validator: (rule, value, callback) => {
-								// 上面有说,返回true表示校验通过,返回false表示不通过
-								// uni.$u.test.mobile()就是返回true或者false的
-								return uni.$u.test.mobile(value);
-							},
-							message: '手机号码不正确',
-							// 触发器可以同时用blur和change
-							trigger: ['blur'],
-						}
-					],
-					password: {
-						type: 'string',
-						required: true,
-						min: 6,
-						max: 16,
-						message: '长度在6-16位字符之间',
-						trigger: ['blur'],
-					},
-				}
-			}
-		},
-		onReady() {
-			// 如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则
-			this.$refs.loginForm.setRules(this.rules)
-		},
-		onLoad() {
-			_this = this
-		},
-		methods: {
-			passwordInput() {
-				if (this.dataDetails.password && this.dataDetails.phone) {
-					this.isdisabled = false
-				} else {
-					this.isdisabled = true
-				}
-			},
-			forgetpass() {
-				uni.navigateTo({
-					url: '/pages/mine/settings/editPassword'
-				})
-			},
-			goregister() {
-				uni.navigateTo({
-					url: '/pages/public/register'
-				})
-			},
-			gocode() {
-				uni.navigateTo({
-					url: '/pages/public/login'
-				})
-			},
-			navBack() {
-				uni.navigateBack();
-			},
-			codeChange(text) {
-				this.tips = text;
-			},
-
-			login() {
-				// 如果有错误,会在catch中返回报错信息数组,校验通过则在then中返回true
-				this.$refs.loginForm.validate().then(res => {
-					uni.showLoading({
-						title: '登录中',
-						mask:true
-					})
-					_this.$request.baseRequest('get', '/commonUser/login', _this.dataDetails).then(res => {
-							_this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
-									driverPhone: _this.dataDetails.phone,
-								}).then(res1 => {
-									uni.setStorageSync('pcUserInfo', res.data)
-									uni.setStorageSync('userInfo', res.data)
-									uni.setStorageSync('firstAuthentication', res1.data)
-									helper.getListByUserId()
-									_this.$store.commit('login', res.data)
-									// that.liangxinLogin()
-									uni.switchTab({
-										url: '/pages/goodSource/index'
-									});
-									uni.hideLoading()
-									// 
-									// 
-								})
-								.catch(res => {
-									uni.$u.toast(res.message);
-								});
-						})
-						.catch(res => {
-							uni.showToast({
-								title: res.message,
-								icon: 'none',
-								duration: 2000
-							})
-						});
-				}).catch(errors => {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "校验失败",
-					})
-				})
-			},
-			reset() {
-				const validateList = ['userInfo.name', 'userInfo.sex', 'radiovalue1', 'checkboxValue1', 'intro',
-					'hotel', 'code', 'userInfo.birthday'
-				]
-				this.$refs.form1.resetFields()
-				this.$refs.form1.clearValidate()
-				setTimeout(() => {
-					this.$refs.form1.clearValidate(validateList)
-					// 或者使用 this.$refs.form1.clearValidate()
-				}, 10)
-			},
-			hideKeyboard() {
-				uni.hideKeyboard()
-			},
-			goregister() {
-				uni.$u.route('/pages/public/register');
-			},
-		},
-	}
-</script>
-
-<style lang="scss">
-	.content {
-		background: url(../../static/images/mine/bg@2x.png);
-		background-size: 100% 100%;
-		height: 100vh;
-		padding-top: 85px;
-		position: relative;
-	}
-
-	.back-btn {
-		position: absolute;
-		left: 40upx;
-		z-index: 9999;
-		padding-top: var(--status-bar-height);
-		top: 40upx;
-		font-size: 40upx;
-		color: red;
-	}
-
-	.wrapper {
-		position: relative;
-		z-index: 90;
-		padding-bottom: 40upx;
-		height: 100%;
-		padding: 0 30px;
-	}
-
-	.code-style {
-		background: #2772FB;
-		color: white;
-	}
-
-	.use-password {
-		margin-top: 31rpx;
-	}
-
-	.submit {
-		margin-top: 40rpx;
-	}
-</style>

+ 379 - 183
pages/public/login.vue

@@ -1,217 +1,386 @@
 <template>
-	<view class="u-page content">
+	<view class="container">
 		<u-icon class="back-btn" name="arrow-left" color="black" size="20" @click="navBack"></u-icon>
 		<view class="wrapper">
-			<image style='width:38px;height:38px;margin-bottom:10px;' src='@/static/logo.png'></image>
-			<h2 class="title">欢迎使用网络货运</h2>
-			<u--form labelPosition="left" :model="dataDetails" ref="loginForm" labelWidth="80">
-				<u-form-item label="电话" prop="phone" borderBottom>
-					<u--input v-model="dataDetails.phone" border="none" placeholder="请输入手机号码"></u--input>
-				</u-form-item>
-
-				<u-form-item label="验证码" prop="code" labelWidth="80" borderBottom>
-					<u--input v-model="dataDetails.code" border="none" placeholder="请填写验证码"></u--input>
-					<u-button slot="right" @tap="getCode" :text="tips" class="code-style" size="mini"
-						:disabled="disabled1">
-					</u-button>
-				</u-form-item>
-				<u-code ref="uCode" @change="codeChange" seconds="20" @start="disabled1 = true"
-					@end="disabled1 = false">
-				</u-code>
-			</u--form>
-			<u-button  @tap="login"class="code-style submit">登录</u-button>
-			<view @click='gonumber' class="use-password" style='text-align:center;color:#6A6A6A;'>使用账号密码登录</view>
-			<!-- <u-button type="primary" text="登录" customStyle="margin-top: 50px" @click="login()"></u-button>
-			<u-button type="primary" @click='goregister'>手机号一键注册</u-button> -->
-			<!-- <u-loading-page :loading="isLoading" bg-color="#e8e8e8"></u-loading-page> -->
+			<image style='width:38px;height:38px;margin:223rpx 0 20px 0;' src='@/static/logo.png'></image>
+			<h2 class="title Semibold">欢迎使用智运</h2>
+			<view
+				style='position:relative;width:100%;margin-top:50px;border-bottom:1px solid #E8E9ED;padding:10px;align-items: center;'
+				class="flex">
+				<view class="phone-before-num NumberMedium">+86</view>
+				<view style='width:85%;'>
+					<!-- <u--input class="phone-number" border="none" maxlength='11' v-model='phone'
+						placeholder="请输入手机号码" type="number"></u--input>
+					<u-input /> -->
+					<u--input v-model="phone" border="none" type='number' placeholder="请输入手机号码" class="phone-number"
+						maxlength='11' :clearable='true'></u--input>
+				</view>
+			</view>
+			<view style='margin-top:20px;border-bottom:1px solid #E8E9ED;position:relative;height:40px'>
+				<!-- <u--input class='password' border="none" v-model='password'
+					placeholder="请输入密码,6-16位字符" :type="type" value="">
+					</u--input> -->
+				<u-input v-if="isShowPassword=='password'" class='password' border="none" v-model='password' placeholder="请输入密码,6-16位字符"
+					type="password" :clearable='true'>
+					<template slot="suffix">
+						<u-icon name="eye-fill" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(1)"
+							v-if="isShowPassword=='password'"></u-icon>
+						<u-icon name="eye-off" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(2)" v-else>
+						</u-icon>
+					</template>
+				</u-input>
+				<u-input v-else class='password' border="none" v-model='password' placeholder="请输入密码,6-16位字符"
+					type="text" :clearable='true'>
+					<template slot="suffix">
+						<u-icon name="eye-fill" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(1)"
+							v-if="isShowPassword=='password'"></u-icon>
+						<u-icon name="eye-off" color="rgb(192, 196, 204)" size="24" @click="passWordStatus(2)" v-else>
+						</u-icon>
+					</template>
+				</u-input>
+			</view>
+			<button :class='phone!=""&&password!=""?"active":""' @click='passlogin'
+				class='Regular verificationCode'>登录</button>
+			<button @click='goregister' class='verificationCode active Regular'>手机号一键注册</button>
+			<view class='flex' style='color:#6A6A6A;margin-top:10px;'>
+				<view style='flex:1;text-align:center;border-right:1px solid #E8E9ED;' class="Regular"
+					@click="forgetpass()">忘记密码</view>
+				<view @click='gocode' style='flex:1;text-align:center;' class="Regular">验证码登录</view>
+			</view>
 		</view>
-		<u-toast ref="uToast"></u-toast>
+	</view>
 	</view>
 </template>
 
 <script>
-	var _this
+	import {
+		mapMutations
+	} from 'vuex';
+	import {
+		openFSqlite,
+		createFSQL,
+		selectFSQL,
+		addFSQL
+	} from '../../util/f.js'
 	import helper from '@/common/helper.js';
+	import {
+		queryData,
+		upData,
+		initData
+	} from '../../util/dbUtil.js'
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
-				isLoading: false,
-				disabled1: false,
-				tips: '',
-				showCalendar: false,
-				showBirthday: false,
-				dataDetails: {
-					phone: '',
-					code: ''
+				isShowPassword: 'password',
+				inputContent: null,
+				loginType: "wechat",
+				phone: '',
+				password: '',
+				logining: false,
+				isPhone: false,
+				isApple: true,
+				accessToken: '',
+				params: {
+					encryptedData: '',
+					session_key: '',
+					iv: '',
 				},
-				rules: {
-					phone: [
-						{
-							required: true,
-							message: '请输入手机号',
-							trigger: ['change', 'blur'],
-						},
-						{
-							// 自定义验证函数,见上说明
-							validator: (rule, value, callback) => {
-								// 上面有说,返回true表示校验通过,返回false表示不通过
-								// uni.$u.test.mobile()就是返回true或者false的
-								return uni.$u.test.mobile(value);
-							},
-							message: '手机号码不正确',
-							// 触发器可以同时用blur和change
-							trigger: [ 'blur'],
-						}
-					],
-					code: {
-						type: 'string',
-						required: true,
-						len: 6,
-						message: '请填写6位验证码',
-						trigger: ['blur'],
-					},
-				}
+				userInfo: {
+					nickName: '',
+					avatarUrl: '',
+					gender: '',
+					phone: ''
+				},
+				type: 'password',
+				inputStatus: 'none',
+				verifyCode: null,
+				sendText: '获取验证码',
+				sendDisabled: false,
+				system: '',
+				platform: '',
+				userData: undefined,
+				canIUseProfile: false
 			}
 		},
-		onReady() {
-			// 如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则
-			this.$refs.loginForm.setRules(this.rules)
+		computed: {
+			...mapState(['clientId'])
 		},
-		onLoad() {
-			_this = this
+		onShow() {
+			// this.loginType = "wechat"
+			this.$api.logout()
+		},
+		onLoad(options) {
+
+			if (wx.getUserProfile) {
+				console.log('--check getUserProfile--OK');
+				this.canIUseProfile = true;
+			}
+			console.log("login on load")
+			// var that = this
+			// that.$request.baseRequest('user', 'sendIsApple', {
+			// }).then(res => {
+			// 	that.isApple = res.data
+			// })
+			//  uni.getSystemInfo({
+			// 	success:(res) => {
+			// 		// console.log(res)
+			// 		this.system = res.system  // ios
+			// 		this.platform = res.platform  // 14.3
+			// 	}
+			// })
 		},
 		methods: {
-			gonumber(){
-				uni.navigateTo({
-					url:'/pages/public/lginOther'
-				})
-			},
-			navBack() {
-				uni.navigateBack();
-			},
-			codeChange(text) {
-				this.tips = text;
-			},
-			getCode() {
-				if (this.dataDetails.phone.length != 11) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "手机号输入错误",
-					})
+			passWordStatus(type) {
+				if (type == 1) {
+					this.isShowPassword = 'text'
 				} else {
-					if (this.$refs.uCode.canGetCode) {
-						// 模拟向后端请求验证码
-						uni.showLoading({
-							title: '正在获取验证码'
-						})
-						_this.$request.baseRequest('get', '/commonUser/sendVerifyCode', {
-								phone: this.dataDetails.phone
-							}).then(res => {
-								uni.hideLoading();
-								// 这里此提示会被this.start()方法中的提示覆盖
-								uni.$u.toast('验证码已发送');
-								// 通知验证码组件内部开始倒计时
-								this.$refs.uCode.start();
-
-							})
-							.catch(res => {
-								uni.$u.toast(res.message);
-							});
-					} else {
-						uni.$u.toast('倒计时结束后再发送');
-					}
+					this.isShowPassword = 'password'
 				}
-
 			},
-
-			login() {
-				// 如果有错误,会在catch中返回报错信息数组,校验通过则在then中返回true
-				this.$refs.loginForm.validate().then(res => {
-					uni.$u.toast('校验通过')
-					this.isLoading = true
-					_this.$request.baseRequest('get', '/commonUser/loginVerifyCode', {
-							phone: _this.dataDetails.phone,
-							verifyCode: _this.dataDetails.code
-						}).then(res => {
-							_this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
-									driverPhone: _this.dataDetails.phone,
-								}).then(res1 => {
-									uni.setStorageSync('pcUserInfo', res.data)
-									uni.setStorageSync('userInfo', res.data)
-									uni.setStorageSync('firstAuthentication', res1.data)
-									helper.getListByUserId()
-									_this.$store.commit('login', res.data)
-									// that.liangxinLogin()
-									uni.switchTab({
-										url: '/pages/goodSource/index'
+			passlogin(e) {
+				var that = this
+				uni.showLoading({
+					title: '登录中',
+					mask: true
+				})
+				console.log("clinetId", this.clientId)
+				that.$request.baseRequest('get', '/commonUser/login', {
+						phone: this.phone,
+						password: this.password,
+						loginFlag: 2
+					}).then(res => {
+						if (res.code == 200) {
+							console.log("userInfo", res.data)
+							uni.setStorageSync('userInfo', res.data)
+							that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+								reCommonId: this.userInfo.id,
+							}).then(res3 => {
+								if (res3.data) {
+									let name = 'myTip';
+									let value = res3.data
+									if (value == 0) {
+										uni.removeTabBarBadge({
+											index: 2
+										})
+									}
+									that.$store.commit('$uStore', {
+										name,
+										value
 									});
-									_this.isLoading = false
-									// 
-									// 
-								})
-								.catch(res => {
-									uni.$u.toast(res.message);
+									if (value != 0 && value) {
+										uni.setTabBarBadge({
+											index: 2,
+											text: value + ""
+										})
+									}
+								}
+							})
+							that.$request.baseRequest('get', '/driverInfo/firstAuthentication', {
+								driverPhone: this.phone,
+							}).then(res2 => {
+								uni.setStorageSync('pcuserInfo', res.data)
+								uni.setStorageSync('userInfo', res.data)
+								uni.setStorageSync('firstAuthentication', res2.data)
+								helper.getListByUserId()
+								that.$store.commit('login', res.data)
+								// that.liangxinLogin()
+								uni.switchTab({
+									url: '/pages/goodSource/index'
 								});
-
-
-							// that.$request.TokenRequest('post', '/commonUser/api/loginQuickly', {
-							// 	mobilePhone: that.model1.phone,
-							// 	veriCode: that.model1.code
+								uni.hideLoading()
+								// 
+								// 
+							})
+							// that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
+							// 	mobilePhone: this.phone,
+							// 	veriCode: "123456",
+							// 	loginFlag: 2
 							// }).then(res1 => {
-							// 	uni.setStorageSync('pcUserInfo', res1.data)
-							// 	uni.setStorageSync('userInfo', res.data)
-							// 	helper.getListByUserId()
-							// 	that.$store.commit('login', res.data)
-							// 	// that.liangxinLogin()
-							// 	uni.switchTab({
-							// 		url: '/pages/index/index'
-							// 	});
-							// 	this.isLoading = false
+							// 	console.log("loginQuickly", res)
+							// 	if (res1.code == 200) {
+							// 		uni.setStorageSync('pcuserInfo', res1.data)
+							// 		that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+							// 			reCommonId: this.userInfo.id,
+							// 		}).then(res3 => {
+							// 			if (res3.data) {
+							// 				let name = 'myTip';
+							// 				let value = res3.data
+							// 				if (value == 0) {
+							// 					uni.removeTabBarBadge({
+							// 						index: 2
+							// 					})
+							// 				}
+							// 				that.$store.commit('$uStore', {
+							// 					name,
+							// 					value
+							// 				});
+							// 				if (value != 0 && value) {
+							// 					uni.setTabBarBadge({
+							// 						index: 2,
+							// 						text: value + ""
+							// 					})
+							// 				}
+							// 			}
+							// 		})
+							// 		helper.getListByUserId()
+							// 	} else {
+							// 		that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
+							// 			mobilePhone: '14444444444',
+							// 			veriCode: "123456",
+							// 			loginFlag: 2
+							// 		}).then(res2 => {
+							// 			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+							// 				reCommonId: this.userInfo.id,
+							// 			}).then(res3 => {
+							// 				if (res3.data) {
+							// 					let name = 'myTip';
+							// 					let value = res3.data
+							// 					if (value == 0) {
+							// 						uni.removeTabBarBadge({
+							// 							index: 2
+							// 						})
+							// 					}
+							// 					that.$store.commit('$uStore', {
+							// 						name,
+							// 						value
+							// 					});
+							// 					if (value != 0 && value) {
+							// 						uni.setTabBarBadge({
+							// 							index: 2,
+							// 							text: value + ""
+							// 						})
+							// 					}
+							// 				}
+							// 			})
+							// 			uni.setStorageSync('pcuserInfo', res2.data)
+							// 			helper.getListByUserId()
+							// 		})
+							// 	}
+
 							// })
+							that.$store.commit('login', res.data)
+							var name = 'userInfo';
+							var value = res.data;
+							that.$store.commit('$uStore', {
+								name,
+								value
+							});
+							// that.liangxinLogin()
 
-						})
-						.catch(res => {
+							uni.switchTab({
+								url: '/pages/goodSource/index'
+							});
+							uni.hideLoading()
+						} else {
+							uni.hideLoading()
 							uni.showToast({
 								title: res.message,
 								icon: 'none',
 								duration: 2000
 							})
-						});
-				}).catch(errors => {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "校验失败",
+						}
 					})
-				})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
 			},
-			reset() {
-				const validateList = ['userInfo.name', 'userInfo.sex', 'radiovalue1', 'checkboxValue1', 'intro',
-					'hotel', 'code', 'userInfo.birthday'
-				]
-				this.$refs.form1.resetFields()
-				this.$refs.form1.clearValidate()
-				setTimeout(() => {
-					this.$refs.form1.clearValidate(validateList)
-					// 或者使用 this.$refs.form1.clearValidate()
-				}, 10)
+			gocode() {
+				uni.navigateTo({
+					url: '/pages/public/loginOther'
+				})
 			},
-			hideKeyboard() {
-				uni.hideKeyboard()
+			forgetpass() {
+				uni.navigateTo({
+					url: '/pages/mine/settings/editPassword'
+				})
 			},
 			goregister() {
-				uni.$u.route('/pages/public/register');
+				uni.navigateTo({
+					url: '/pages/public/register'
+				})
+			},
+
+			...mapMutations(['login']),
+			navBack() {
+				uni.navigateBack();
 			},
 		},
+
 	}
 </script>
 
-<style lang="scss">
-	.content {
-		background: url(../../static/images/mine/bg@2x.png);
-		background-size: 100% 100%;
+<style lang='scss' scoped>
+	.apple {
+		background: #000;
+		width: 35px;
+		height: 35px;
+		padding: 8px;
+		border-radius: 50%;
+		vertical-align: middle;
+	}
+
+	page {
+		background: #fff;
+	}
+
+	.close {
+		width: 20px;
+		height: 20px;
+		position: absolute;
+		right: 0px;
+	}
+
+	.close1 {
+		width: 20px;
+		height: 20px;
+		position: absolute;
+		right: 10px;
+		top: 0;
+	}
+
+	.close2 {
+		width: 15px;
+		height: 15px;
+		position: absolute;
+		right: 19px;
+		top: 50%;
+		transform: translateY(-45%);
+	}
+
+	.password {
+		border: none;
+		outline: none;
+	}
+
+	.cuIcon-weixin {
+		background: #2772FB;
+		color: #fff;
+		font-size: 18px;
+		padding: 9px;
+		border-radius: 50%;
+		vertical-align: middle;
+		margin-right: 5px;
+	}
+
+	.container {
+		/* padding-top: 85px; */
+		position: relative;
+		width: 100vw;
 		height: 100vh;
-		padding-top: 85px;
+		overflow: hidden;
+		background: url('~@/static/images/mine/bg@2x.png');
+		background-size: cover;
+	}
+
+	.wrapper {
 		position: relative;
+		z-index: 90;
+		padding-bottom: 40upx;
+		height: 100%;
+		padding: 0 30px;
 	}
 
 	.back-btn {
@@ -224,22 +393,49 @@
 		color: red;
 	}
 
-	.wrapper {
-		position: relative;
-		z-index: 90;
-		padding-bottom: 40upx;
-		height: 100%;
-		padding: 0 30px;
+	.verificationCode {
+		margin-top: 20px;
+		background: #F5F6F9;
+		color: #AFB3BF;
 	}
 
-	.code-style {
+	.verificationCode:after {
+		border: none;
+	}
+
+	.verificationCode.active {
 		background: #2772FB;
-		color: white;
+		color: #fff;
+	}
+
+	.register {
+		/* position:absolute; */
+		bottom: 20px;
+		left: 50%;
+		transform: translateX(-50%);
+		color: #333333;
+		height: 50px;
+		line-height: 50px;
+		border-radius: 30px;
+		border: 1px solid #444444;
 	}
-	.use-password{
-		margin-top: 31rpx;
+
+	.register:after {
+		border: none;
 	}
-	.submit{
-		margin-top: 40rpx;
+
+	.phone-before-num {
+		font-size: 34rpx;
+		color: #333333;
+		border-right: 1px solid #E8E9ED;
+		padding-right: 20rpx;
+	}
+
+	.phone-number {
+		margin-left: 20rpx;
+		font-size: 34rpx;
+		font-family: DINPro-Medium, DINPro;
+		font-weight: 500;
+		color: #333333;
 	}
 </style>

+ 252 - 0
pages/public/loginOther.vue

@@ -0,0 +1,252 @@
+<template>
+	<view class="container">
+		<u-icon class="back-btn" name="arrow-left" color="black" size="20" @click="navBack"></u-icon>
+		<!-- 设置白色背景防止软键盘把下部绝对定位元素顶上来盖住输入框等 -->
+		<view class="wrapper">
+			<image style='width:38px;height:38px;margin:223rpx 0 20px 0;' src='@/static/logo.png'></image>
+			<h2 class="title Semibold">欢迎使用智运</h2>
+			<view style='width:100%;margin-top:50px;border-bottom:1px solid #E8E9ED;padding:10px;' class="flex">
+				<view class="phone-before-num NumberMedium">+86</view>
+
+				<view style='width:85%;'>
+					<!-- <u--input style='padding-left:10px;' class="NumberMedium" v-model='phone' @input='changephone' placeholder="请输入手机号码" type="number" maxlength="11" :clearable='true'></u--input> -->
+					<input style='padding-left:10px;' class="NumberMedium" v-model='phone' @input='changephone'
+						placeholder="请输入手机号码" type="number" maxlength="11">
+				</view>
+				<!-- <image v-if='phone!=""' @click='phone=""' class='close' src='../../static/img/login/guanbi@2x.png'></image> -->
+			</view>
+			<button @click='gocode' :class='codestatus?"active":""' class='verificationCode'>获取验证码</button>
+			<view @click='gonumber' class="Regular use-password" style='text-align:center;color:#6A6A6A;'>使用账号密码登录
+			</view>
+
+			<button v-if='tabbar' @click='goregister' class='Regular register active'>手机号一键注册</button>
+		</view>
+		<view v-if="loginType === 'phone'" class="register-section">
+			还没有账号?
+			<text @click="toRegist">马上注册</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapMutations
+	} from 'vuex';
+	import {
+		openFSqlite,
+		createFSQL,
+		selectFSQL,
+		addFSQL
+	} from '../../util/f.js'
+	import {
+		queryData,
+		upData,
+		initData
+	} from '../../util/dbUtil.js'
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				inputContent: null,
+				loginType: "wechat",
+				phone: '',
+				password: '',
+				logining: false,
+				isPhone: false,
+				isApple: true,
+				accessToken: '',
+				phone: '',
+				params: {
+					encryptedData: '',
+					session_key: '',
+					iv: '',
+				},
+				userInfo: {
+					nickName: '',
+					avatarUrl: '',
+					gender: '',
+					phone: ''
+				},
+				inputStatus: 'none',
+				verifyCode: null,
+				sendText: '获取验证码',
+				sendDisabled: false,
+				system: '',
+				platform: '',
+				userData: undefined,
+				tabbar: true,
+				windowHeight: '',
+				canIUseProfile: false,
+				codestatus: false
+			}
+		},
+		computed: {
+			...mapState(['clientId'])
+		},
+		onShow() {
+			// this.loginType = "wechat"
+			this.$api.logout()
+		},
+		onLoad(options) {
+		},
+		methods: {
+			changephone(e) {
+				if (e.detail.value.length > 11) {
+					this.codestatus = true
+				} else if (e.detail.value.length < 11) {
+					this.codestatus = false
+				} else {
+					this.codestatus = true
+				}
+			},
+			gonumber() {
+				uni.navigateTo({
+					url: '/pages/public/login'
+				})
+			},
+			forgetpass() {
+				uni.navigateTo({
+					url: '/pages/public/reset'
+				})
+			},
+			gocode() {
+				if (this.phone.length == 11 && /^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.phone)) {
+					uni.navigateTo({
+						url: '/pages/public/code?phone=' + this.phone
+					})
+				} else if (this.phone.length == 0) {
+					uni.showToast({
+					 title: '手机号不能为空',
+						icon: 'none'
+					})
+				} else {
+					uni.showToast({
+						title: '请输入正确的手机号',
+						icon: 'none'
+					})
+				}
+
+			},
+			goregister() {
+				uni.navigateTo({
+					url: '/pages/public/register'
+				})
+			},
+			...mapMutations(['login']),
+			navBack() {
+				uni.navigateBack();
+			},
+			
+		},
+
+	}
+</script>
+
+<style lang='scss' scoped>
+	.apple {
+		background: #000;
+		width: 35px;
+		height: 35px;
+		padding: 8px;
+		border-radius: 50%;
+		vertical-align: middle;
+	}
+
+	page {
+		background: #fff;
+	}
+
+	.cuIcon-weixin {
+		background: #2772FB;
+		color: #fff;
+		font-size: 18px;
+		padding: 9px;
+		border-radius: 50%;
+		vertical-align: middle;
+		margin-right: 5px;
+	}
+
+	.close {
+		width: 20px;
+		height: 20px;
+		position: absolute;
+		right: 30px;
+	}
+
+	.container {
+		/* padding-top: 223rpx; */
+		position: relative;
+		width: 100vw;
+		height: 100vh;
+		overflow: hidden;
+		background: url('~@/static/images/mine/bg@2x.png');
+		background-size: cover;
+	}
+
+	.wrapper {
+		position: relative;
+		z-index: 90;
+		padding-bottom: 40upx;
+		height: 100%;
+		padding: 0 30px;
+	}
+
+	.back-btn {
+		position: absolute;
+		left: 40upx;
+		z-index: 9999;
+		padding-top: var(--status-bar-height);
+		top: 40upx;
+		font-size: 40upx;
+		color: red;
+	}
+
+	.verificationCode {
+		margin-top: 20px;
+		background: #F5F6F9;
+		color: #AFB3BF;
+	}
+
+	.verificationCode.active {
+		background: #2772FB;
+		color: #fff;
+	}
+
+	.verificationCode:after {
+		border: none;
+	}
+
+	.register {
+		position: absolute;
+		bottom: 136rpx;
+		left: 50%;
+		transform: translateX(-50%);
+		color: #333333;
+		border-radius: 43rpx;
+		border: 1px solid #444444;
+		font-size: 28rpx;
+		padding: 0rpx 49rpx;
+
+	}
+
+	.register:after {
+		border: none;
+	}
+
+	.title {
+		font-size: 46rpx;
+	}
+
+	.phone-before-num {
+		font-size: 34rpx;
+		font-family: DINPro-Medium, DINPro;
+		font-weight: 500;
+		color: #333333;
+	}
+
+	.use-password {
+		margin-top: 31rpx;
+	}
+</style>

+ 388 - 192
pages/public/register.vue

@@ -1,31 +1,40 @@
 <template>
-	<view class="u-page content">
+	<view class="container">
 		<u-icon class="back-btn" name="arrow-left" color="black" size="20" @click="navBack"></u-icon>
 		<view class="wrapper">
 			<h2 class="Semibold">手机号注册</h2>
-			<u--form labelPosition="left" :model="registerData" ref="registerForm" labelWidth="80">
-				<u-form-item label="电话" prop="phone" borderBottom>
-					<u--input v-model="registerData.phone" border="none" placeholder="请输入手机号码"></u--input>
-				</u-form-item>
-			
-				<u-form-item label="验证码" prop="code" labelWidth="80" borderBottom>
-					<u--input v-model="registerData.verifyCode" border="none" placeholder="请填写验证码"></u--input>
-					<u-button slot="right" @tap="getCode" :text="tips"  size="mini" :disabled="disabled1" class="code-style">
-					</u-button>
-				</u-form-item>
-				<u-form-item label="密码" prop="password" borderBottom>
-					<u--input v-model="registerData.password" border="none" placeholder="请输入密码,6-16位字符"></u--input>
-				</u-form-item>
-			
-				<u-code ref="uCode" @change="codeChange" seconds="20" @start="disabled1 = true" @end="disabled1 = false">
-				</u-code>
-			</u--form>
-			<u-button class="code-style register" @click='register'>注册</u-button>
-			<view class="flex service align-center">
+			<view style='width:100%;margin-top:50px;border-bottom:1px solid #E8E9ED;padding:10px;position:relative;'
+				class="flex">
+				<view class="NumberMedium" style='width:15%;border-right:1px solid #E8E9ED;'>+86</view>
+				<view style='width:85%;'>
+					<u-input border="none" maxlength="11" v-model='phone' @input='phoneinput' style='padding-left:10px;'
+						placeholder="请输入手机号码" type="number" class="Regular" />
+				</view>
+				<!-- <image v-if='phone!=""' @click='phone=""' class='close' src='../../static/img/login/guanbi@2x.png'></image> -->
+			</view>
+			<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
+				<view style='width:70%;position:relative;'>
+					<u-input border="none" v-model='verifyCode' class="Regular" placeholder="请输入验证码" type="number" />
+					<!-- <image v-if='verifyCode' @click='verifyCode=""' class='close1' src='../../static/img/login/guanbi@2x.png'></image> -->
+				</view>
+				<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
+					class='getcode Regular'>{{sendText}}</button>
+			</view>
+			<view style='border-bottom:1px solid #E8E9ED;padding:10px;position:relative;'>
+				<u-input border="none" maxlength='16' class='Regular input-style' style='height:30px;'
+					v-model='password' placeholder="请输入密码,6-16位字符" :type="type" />
+				<!-- 				<input maxlength='16' class='password Regular input-style' style='height:30px;' v-model='password' placeholder="请输入密码,6-16位字符" :type="type"> -->
+				<!-- <image v-if='password!=""' @click='password=""' class='close2' src='../../static/img/login/guanbi@2x.png'></image> -->
+				<!-- <view @click='switchover' style='position:absolute;right:0;top:38%;z-index:10;cursor:pointer;' class="iconfont " :class='type=="password"?"icon-yanjing-biyan":"icon-yanjing-zhengyan"'></view> -->
+			</view>
+			<button :class='phone!=""&&verifyCode!=""&&password!=""?"active":""' @click='register'
+				class='verificationCode'>注册</button>
+			<view
+				style='color:#6A6A6A;margin-top:10px;font-size:30rpx;display:flex;justify-content:center;align-items: center;'>
 				<u--image @click='consent'
 					:src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
-					width="12px" height="12px"></u--image>
-				我已阅读并同意
+					width="17px" height="17px"></u--image>
+				已阅读并同意
 				<navigator
 					url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/userAgreement.html"
 					class="path" hover-class="navigator-hover">《服务协议》</navigator>和<navigator
@@ -33,130 +42,87 @@
 					class="path" hover-class="navigator-hover">《隐私政策》</navigator>
 			</view>
 		</view>
-	
 	</view>
 </template>
 
 <script>
-	var _this
+	import {
+		mapMutations
+	} from 'vuex';
+	import {
+		openFSqlite,
+		createFSQL,
+		selectFSQL,
+		addFSQL
+	} from '../../util/f.js'
 	import helper from '@/common/helper.js';
+	import {
+		queryData,
+		upData,
+		initData
+	} from '../../util/dbUtil.js'
 	export default {
 		data() {
 			return {
-				disabled1: false,
-				tips: '',
+				inputContent: null,
+				loginType: "wechat",
+				phone: '',
+				password: '',
+				logining: false,
+				isPhone: false,
+				isApple: true,
+				accessToken: '',
+				params: {
+					encryptedData: '',
+					session_key: '',
+					iv: '',
+				},
+				userInfo: {
+					nickName: '',
+					avatarUrl: '',
+					gender: '',
+					phone: ''
+				},
 				consentStatus: false,
 				codestatus: false,
-				registerData: {
-					phone: '',
-					password: '',
-					verifyCode: '',
-				},
-				rules: {
-					phone: [
-						{
-							required: true,
-							message: '请输入手机号',
-							trigger: ['change', 'blur'],
-						},
-						{
-							// 自定义验证函数,见上说明
-							validator: (rule, value, callback) => {
-								// 上面有说,返回true表示校验通过,返回false表示不通过
-								// uni.$u.test.mobile()就是返回true或者false的
-								return uni.$u.test.mobile(value);
-							},
-							message: '手机号码不正确',
-							// 触发器可以同时用blur和change
-							trigger: [ 'blur'],
-						}
-					],
-					code: {
-						type: 'string',
-						required: true,
-						len: 6,
-						message: '请填写6位验证码',
-						trigger: ['blur'],
-					},
-					password: {
-						type: 'string',
-						required: true,
-						min: 6,
-						max: 16,
-						message: '长度在6-16位字符之间',
-						trigger: ['blur'],
-					}
-				}
+				type: 'password',
+				inputStatus: 'none',
+				verifyCode: null,
+				sendText: '获取验证码',
+				sendDisabled: false,
+				system: '',
+				platform: '',
+				canIUseProfile: false
 			}
 		},
-		onReady() {
-			// 如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则
-			this.$refs.registerForm.setRules(this.rules)
+		onShow() {
+			// this.loginType = "wechat"
+
+			// this.$api.logout()
 		},
-		onLoad() {
-			_this = this
+		onLoad(options) {
+			if (wx.getUserProfile) {
+				console.log('--check getUserProfile--OK');
+				this.canIUseProfile = true;
+			}
+			console.log("login on load")
+			var that = this
+			// that.$api.request('user', 'sendIsApple', {}).then(res => {
+			// 	that.isApple = res.data
+			// })
+			// uni.getSystemInfo({
+			// 	success: (res) => {
+			// 		// console.log(res)
+			// 		this.system = res.system // ios
+			// 		this.platform = res.platform // 14.3
+			// 	}
+			// })
 		},
 		methods: {
-			navBack() {
-				uni.navigateBack();
-			},
-			codeChange(text) {
-				this.tips = text;
-			},
-			// 获取验证码
-			getCode() {
-				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.registerData.phone)) {
-					if (this.$refs.uCode.canGetCode) {
-
-						// 模拟向后端请求验证码
-						uni.showLoading({
-							title: '正在获取验证码'
-						})
-						_this.$request.baseRequest('get', '/commonUser/sendVerifyCode', {
-								phone: this.registerData.phone
-							}).then(res => {
-								uni.hideLoading();
-								// 这里此提示会被this.start()方法中的提示覆盖
-								uni.$u.toast('验证码已发送');
-								// 通知验证码组件内部开始倒计时
-								this.$refs.uCode.start();
-
-							})
-							.catch(res => {
-								uni.$u.toast(res.message);
-							});
-
-						// setTimeout(() => {
-
-						// }, 2000);
-					} else {
-						uni.$u.toast('倒计时结束后再发送');
-					}
-				} else {
-					uni.$u.toast('请输入正确手机号');
-				}
-
-			},
-			consent() {
-				this.consentStatus = !this.consentStatus
-				uni.setStorage({
-					key: 'policyStorageKey',
-					data: this.consentStatus
-				});
-			},
 			// 随机数
 			randomAccess(min, max) {
 				return Math.floor(Math.random() * (min - max) + max)
 			},
-			getRandomName(NameLength) {
-				let name = ""
-				for (let i = 0; i < NameLength; i++) {
-					let unicodeNum = ""
-					unicodeNum = this.randomAccess(0x4e00, 0x9fa5).toString(16)
-					name += this.decodeUnicode(unicodeNum)
-				}
-				return name
-			},
 			// 解码
 			decodeUnicode(str) {
 				//Unicode显示方式是\u4e00
@@ -168,8 +134,67 @@
 				str = str.replace(/%/g, "\\");
 				return str;
 			},
-			//注册
+			/*
+			 *@param Number NameLength 要获取的名字长度
+			 */
+			getRandomName(NameLength) {
+				let name = ""
+				for (let i = 0; i < NameLength; i++) {
+					let unicodeNum = ""
+					unicodeNum = this.randomAccess(0x4e00, 0x9fa5).toString(16)
+					name += this.decodeUnicode(unicodeNum)
+				}
+				return name
+			},
+			phoneinput(e) {
+				if (e.length == 11) {
+					this.codestatus = true
+				}
+			},
+			getcode() {
+				var that = this
+				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.phone)) {
+					that.$request.baseRequest('get', '/commonUser/sendVerifyCode', {
+							phone: this.phone
+						}).then(res => {
+							if (res.code == 200) {
+								that.sendDisabled = true
+								let sec = 60
+								let interval = setInterval(() => {
+									sec--;
+									that.sendText = sec + 's后重发'
+									if (sec <= 0) {
+										that.sendDisabled = false
+										that.sendText = "获取验证码"
+										clearInterval(interval)
+									}
+								}, 1000)
+							} else {
+								uni.showToast({
+									title: res.message,
+									icon: 'none',
+									duration: 2000
+								})
+							}
+						})
+						.catch(res => {
+							uni.showToast({
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
+							})
+						});
+				} else {
+					uni.showToast({
+						title: '请输入正确的手机号',
+						icon: 'none',
+						duration: 2000
+					})
+				}
+
+			},
 			register() {
+				var that = this
 				if (!this.consentStatus) {
 					uni.showToast({
 						title: '请勾选协议',
@@ -178,72 +203,189 @@
 					})
 					return
 				}
-				this.$refs.registerForm.validate().then(res => {
-					_this.registerData.userName = _this.getRandomName(3)
-					uni.$u.toast('校验通过')
-					_this.isLoading = true
-					_this.$request.baseRequest('post', '/commonUser/register', _this.registerData).then(res => {
-							if (res.data.code == '11002') {
-								uni.$u.toast('验证码错误或过期,请重新获取')
-
-								return
-							} else if (res.data.code == '11004') {
-								uni.$u.toast('该手机号已注册,可直接登录')
-
-								return
-							} 
+				if (this.verifyCode.length > 6) {
+					uni.showToast({
+						title: '验证码错误',
+						icon: 'none',
+						duration: 2000
+					})
+					return
+				}
+				if (this.password.length < 6) {
+					uni.showToast({
+						title: '请输入正确的密码格式',
+						icon: 'none',
+						duration: 2000
+					})
+					return
+				}
+				var username = this.getRandomName(3)
+				that.$request.baseRequest('post', '/commonUser/register', {
+						phone: this.phone,
+						password: this.password,
+						verifyCode: this.verifyCode,
+						userName: username
+					}).then(res => {
+						if (res.code == '11002') {
+							uni.showToast({
+								title: '验证码错误或过期,请重新获取',
+								icon: 'none',
+								duration: 2000
+							})
+							return
+						} else if (res.code == '11004') {
+							uni.showToast({
+								title: '该手机号已注册,可直接登录',
+								icon: 'none',
+								duration: 2000
+							})
+							return
+						} else {
 							uni.showLoading({
 								title: '登录中',
 								mask: true
 							})
-							_this.$request.baseRequest('get', '/commonUser/login', {
-								phone: _this.registerData.phone,
-								password: _this.registerData.password,
-								cid: uni.getStorageSync("clientId")
-							}).then(res => {
-								uni.hideLoading()
-								uni.setStorageSync('userInfo', res.data)
-								_this.$store.commit('login', res.data)
-								uni.switchTab({
-									url: '/pages/goodSource/index'
-								});
-									
+							that.$request.baseRequest('get', '/commonUser/login', {
+									phone: this.phone,
+									password: this.password,
+									loginFlag: 2
+								}).then(res => {
+									debugger
+									if (res.code == 200) {
+										// // pc登录
+										// that.$request.baseRequest('post', '/commonUser/api/loginQuickly', {
+										// 	mobilePhone: this.phone,
+										// 	veriCode: "123456",
+										// }).then(res1 => {
+										// 	if (res1.code == 200) {
+										// 		uni.setStorageSync('pcUserInfo', res1.data)
+
+										// 		helper.getListByUserId()
+										// 	} else {
+										// 		that.$api.doRequest('post',
+										// 			'/commonUser/api/loginQuickly', {
+										// 				mobilePhone: '14444444444',
+										// 				veriCode: "123456",
+										// 			}).then(res2 => {
+										// 			uni.setStorageSync('pcUserInfo', res2
+										// 				.data)
+										// 			helper.getListByUserId()
+										// 		})
+										// 	}
+										// })
+										uni.setStorageSync('userInfo', res.data)
+										that.$store.commit('login', res.data)
+										uni.switchTab({
+											url: '/pages/goodSource/index'
+										});
+									} else {
+										uni.showToast({
+											title: res.message,
+											icon: 'none',
+											duration: 2000
+										})
+									}
+									uni.hideLoading()
 								})
 								.catch(res => {
-									uni.$u.toast(res.message)
+									console.log(res);
 								});
-							
-							
-							
-						})
-						.catch(res => {
-							uni.$u.toast(res.message)
-						});
-				}).catch(errors => {
-					uni.$u.toast('校验失败')
-				})
+						}
+					})
+					.catch(res => {
+						console.log(res);
+					});
+			},
+			consent() {
+				this.consentStatus = !this.consentStatus
+				uni.setStorage({
+					key: 'policyStorageKey',
+					data: this.consentStatus
+				});
+			},
+			switchover() {
+				if (this.type == 'password') {
+					this.type = 'text'
+				} else {
+					this.type = 'password'
+				}
+			},
+			...mapMutations(['login']),
+			navBack() {
+				uni.navigateBack();
 			},
 		},
+
 	}
 </script>
 
-<style lang="scss">
-	.content {
-		background: url(../../static/images/mine/bg@2x.png);
-		background-size: 100% 100%;
-		height: 100vh;
+<style lang='scss' scoped>
+	uni-navigator {
+		display: inline-block;
+		color: #2772FB;
+	}
+
+	.password {
+		border: none;
+		outline: none;
+
+	}
+
+	.apple {
+		background: #000;
+		width: 35px;
+		height: 35px;
+		padding: 8px;
+		border-radius: 50%;
+		vertical-align: middle;
+	}
+
+	page {
+		background: #fff;
+	}
+
+	.cuIcon-weixin {
+		background: #2772FB;
+		color: #fff;
+		font-size: 18px;
+		padding: 9px;
+		border-radius: 50%;
+		vertical-align: middle;
+		margin-right: 5px;
+	}
+
+	.container {
 		padding-top: 85px;
 		position: relative;
+		width: 100vw;
+		height: calc(100vh - 85px);
+		overflow: hidden;
+		background: url('~@/static/images/mine/bg@2x.png');
+		background-size: 100%;
 	}
 
-	.back-btn {
+	.close {
+		width: 20px;
+		height: 20px;
 		position: absolute;
-		left: 40upx;
-		z-index: 9999;
-		padding-top: var(--status-bar-height);
-		top: 40upx;
-		font-size: 40upx;
-		color: red;
+		right: 0px;
+	}
+
+	.close1 {
+		width: 20px;
+		height: 20px;
+		position: absolute;
+		right: 10px;
+		top: 0;
+	}
+
+	.close2 {
+		width: 15px;
+		height: 15px;
+		position: absolute;
+		right: 19px;
+		top: 50%;
+		transform: translateY(-45%);
 	}
 
 	.wrapper {
@@ -254,26 +396,80 @@
 		padding: 0 30px;
 	}
 
-	.code-style {
+	.back-btn {
+		position: absolute;
+		left: 40upx;
+		z-index: 9999;
+		padding-top: var(--status-bar-height);
+		top: 40upx;
+		font-size: 40upx;
+		color: black;
+	}
+
+	.verificationCode {
+		margin-top: 20px;
+		background: #F5F6F9;
+		color: #AFB3BF;
+	}
+
+	.verificationCode:after {
+		border: none;
+	}
+
+	.register {
+		position: absolute;
+		bottom: 20px;
+		left: 50%;
+		transform: translateX(-50%);
+		color: #333333;
+		height: 50px;
+		line-height: 50px;
+		border-radius: 30px;
+		border: 1px solid #444444;
+	}
+
+	.register:after {
+		border: none;
+	}
+
+	.verificationCode.active {
 		background: #2772FB;
-		color: white;
+		color: #fff;
 	}
-	.register{
-		margin-top: 50rpx;
+
+	.getcode {
+		font-size: 14px;
+		position: absolute;
+		right: 0;
+		top: 50%;
+		transform: translateY(-50%);
+		color: #AFB3BF;
+		background: #F5F6F9;
+		height: 30px;
+		line-height: 30px;
+
 	}
-	.service {
-		font-size: 24rpx;
-		margin: 20rpx;
-		justify-content: center;
-	
-		/deep/.u-image {
-			margin: 0 20rpx;
-		}
+
+	.getcode:after {
+		border: none;
 	}
-	.path{
+
+	uni-navigator {
+		display: inline-block;
 		color: #2772FB;
 	}
-	.Semibold{
-		margin-bottom: 50rpx;
+
+	.getcode.active {
+		background: #2772FB;
+		color: #fff;
+	}
+
+	.NumberMedium {
+		display: flex;
+		align-items: center;
+	}
+
+	.flex {
+		align-items: center;
 	}
 </style>

+ 1 - 1
static/css/common.scss

@@ -150,7 +150,7 @@ color: #000000;
 	white-space: nowrap;
 }
 .row-left-text{
-	font-size:28rpx;
+	// font-size:28rpx;
 	// color: #8F8F8F;
 }
 .row-right-text{

BIN
static/images/goodSource/xf.png


+ 0 - 0
static/images/mine/bank/minshenglogo@2x(1).png → static/images/mine/bank/huaxia.png


+ 0 - 0
static/images/mine/bank/建设银行@2x.png → static/images/mine/bank/jh@2x.png


+ 0 - 0
static/images/mine/bank/农业银行@2x.png → static/images/mine/bank/nh@2x.png


+ 0 - 0
static/images/mine/bank/其他@2x.png → static/images/mine/bank/qt@2x.png


+ 0 - 0
static/images/mine/bank/qitalogo@2x(1).png → static/images/mine/bank/xingye.png


BIN
static/logo.png


BIN
static/xiangpica@2x.png


+ 1 - 1
store/index.js

@@ -128,7 +128,7 @@ const store = new Vuex.Store({
 			state.firstAuthentication = {};
 			uni.removeStorageSync('userInfo')
 			uni.removeStorageSync('firstAuthentication')
-			uni.removeStorageSync('pcUserInfo')
+			uni.removeStorageSync('pcuserInfo')
 		},
 		configfreightTransport(state,flag){
 			state.isConfigfreightTransport = flag

+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-diy/beibei/mescroll-uni-option.js

@@ -27,7 +27,7 @@ const GlobalOption = {
 		zh: {
 			up: {
 				textLoading: '加载中 ...', // 加载中的提示文本
-				textNoMore: '-- END --', // 没有更多数据的提示文本
+				textNoMore: '-- 没有更多了~ --', // 没有更多数据的提示文本
 				empty: {
 					tip: '~ 暂无相关数据 ~' // 空提示
 				}

+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-uni-option.js

@@ -35,7 +35,7 @@ const GlobalOption = {
 			},
 			up: {
 				textLoading: '加载中 ...', // 加载中的提示文本
-				textNoMore: '-- END --', // 没有更多数据的提示文本
+				textNoMore: '-- 没有更多了~ --', // 没有更多数据的提示文本
 				empty: {
 					tip: '~ 空空如也 ~' // 空提示
 				}

+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni-option.js

@@ -35,7 +35,7 @@ const GlobalOption = {
 			},
 			up: {
 				textLoading: '加载中 ...', // 加载中的提示文本
-				textNoMore: '-- END --', // 没有更多数据的提示文本
+				textNoMore: '-- 没有更多了~ --', // 没有更多数据的提示文本
 				empty: {
 					tip: '~ 空空如也 ~' // 空提示
 				}

+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.js

@@ -95,7 +95,7 @@ MeScroll.prototype.extendUpScroll = function(optUp) {
 		noMoreSize: 5, // 如果列表已无数据,可设置列表的总数量要大于等于5条才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看
 		offset: 150, // 距底部多远时,触发upCallback,仅mescroll-uni生效 ( mescroll-body配置的是pages.json的 onReachBottomDistance )
 		textLoading: '加载中 ...', // 加载中的提示文本
-		textNoMore: '-- END --', // 没有更多数据的提示文本
+		textNoMore: '-- 没有更多了~ --', // 没有更多数据的提示文本
 		bgColor: "transparent", // 背景颜色 (建议在pages.json中再设置一下backgroundColorBottom)
 		textColor: "gray", // 文本颜色 (当bgColor配置了颜色,而textColor未配置时,则textColor会默认为白色)
 		inited: null, // 初始化完毕的回调

+ 0 - 0
unpackage/dist/dev/.automator/app-plus/.automator.json


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/__uniappchooselocation.js


BIN
unpackage/dist/dev/app-plus/__uniapperror.png


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/__uniappes6.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/__uniappopenlocation.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/__uniapppicker.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 6
unpackage/dist/dev/app-plus/__uniappquill.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/__uniappquillimageresize.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/__uniappscan.js


BIN
unpackage/dist/dev/app-plus/__uniappsuccess.png


+ 0 - 25
unpackage/dist/dev/app-plus/__uniappview.html

@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh-CN">
-
-  <head>
-    <meta charset="UTF-8" />
-    <script>
-      var __UniViewStartTime__ = Date.now();
-      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
-        CSS.supports('top: constant(a)'))
-      document.write(
-        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
-        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
-    </script>
-    <title>View</title>
-    <link rel="stylesheet" href="view.css" />
-  </head>
-
-  <body>
-    <div id="app"></div>
-    <script src="__uniappes6.js"></script>
-    <script src="view.umd.min.js"></script>
-    <script src="app-view.js"></script>
-  </body>
-
-</html>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 3
unpackage/dist/dev/app-plus/app-config-service.js


+ 0 - 154
unpackage/dist/dev/app-plus/app-config.js

@@ -1,154 +0,0 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ 	// install a JSONP callback for chunk loading
-/******/ 	function webpackJsonpCallback(data) {
-/******/ 		var chunkIds = data[0];
-/******/ 		var moreModules = data[1];
-/******/ 		var executeModules = data[2];
-/******/
-/******/ 		// add "moreModules" to the modules object,
-/******/ 		// then flag all "chunkIds" as loaded and fire callback
-/******/ 		var moduleId, chunkId, i = 0, resolves = [];
-/******/ 		for(;i < chunkIds.length; i++) {
-/******/ 			chunkId = chunkIds[i];
-/******/ 			if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
-/******/ 				resolves.push(installedChunks[chunkId][0]);
-/******/ 			}
-/******/ 			installedChunks[chunkId] = 0;
-/******/ 		}
-/******/ 		for(moduleId in moreModules) {
-/******/ 			if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ 				modules[moduleId] = moreModules[moduleId];
-/******/ 			}
-/******/ 		}
-/******/ 		if(parentJsonpFunction) parentJsonpFunction(data);
-/******/
-/******/ 		while(resolves.length) {
-/******/ 			resolves.shift()();
-/******/ 		}
-/******/
-/******/ 		// add entry modules from loaded chunk to deferred list
-/******/ 		deferredModules.push.apply(deferredModules, executeModules || []);
-/******/
-/******/ 		// run deferred modules when all chunks ready
-/******/ 		return checkDeferredModules();
-/******/ 	};
-/******/ 	function checkDeferredModules() {
-/******/ 		var result;
-/******/ 		for(var i = 0; i < deferredModules.length; i++) {
-/******/ 			var deferredModule = deferredModules[i];
-/******/ 			var fulfilled = true;
-/******/ 			for(var j = 1; j < deferredModule.length; j++) {
-/******/ 				var depId = deferredModule[j];
-/******/ 				if(installedChunks[depId] !== 0) fulfilled = false;
-/******/ 			}
-/******/ 			if(fulfilled) {
-/******/ 				deferredModules.splice(i--, 1);
-/******/ 				result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
-/******/ 			}
-/******/ 		}
-/******/
-/******/ 		return result;
-/******/ 	}
-/******/
-/******/ 	// The module cache
-/******/ 	var installedModules = {};
-/******/
-/******/ 	// object to store loaded and loading chunks
-/******/ 	// undefined = chunk not loaded, null = chunk preloaded/prefetched
-/******/ 	// Promise = chunk loading, 0 = chunk loaded
-/******/ 	var installedChunks = {
-/******/ 		"app-config": 0
-/******/ 	};
-/******/
-/******/ 	var deferredModules = [];
-/******/
-/******/ 	// The require function
-/******/ 	function __webpack_require__(moduleId) {
-/******/
-/******/ 		// Check if module is in cache
-/******/ 		if(installedModules[moduleId]) {
-/******/ 			return installedModules[moduleId].exports;
-/******/ 		}
-/******/ 		// Create a new module (and put it into the cache)
-/******/ 		var module = installedModules[moduleId] = {
-/******/ 			i: moduleId,
-/******/ 			l: false,
-/******/ 			exports: {}
-/******/ 		};
-/******/
-/******/ 		// Execute the module function
-/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ 		// Flag the module as loaded
-/******/ 		module.l = true;
-/******/
-/******/ 		// Return the exports of the module
-/******/ 		return module.exports;
-/******/ 	}
-/******/
-/******/
-/******/ 	// expose the modules object (__webpack_modules__)
-/******/ 	__webpack_require__.m = modules;
-/******/
-/******/ 	// expose the module cache
-/******/ 	__webpack_require__.c = installedModules;
-/******/
-/******/ 	// define getter function for harmony exports
-/******/ 	__webpack_require__.d = function(exports, name, getter) {
-/******/ 		if(!__webpack_require__.o(exports, name)) {
-/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ 		}
-/******/ 	};
-/******/
-/******/ 	// define __esModule on exports
-/******/ 	__webpack_require__.r = function(exports) {
-/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ 		}
-/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
-/******/ 	};
-/******/
-/******/ 	// create a fake namespace object
-/******/ 	// mode & 1: value is a module id, require it
-/******/ 	// mode & 2: merge all properties of value into the ns
-/******/ 	// mode & 4: return value when already ns object
-/******/ 	// mode & 8|1: behave like require
-/******/ 	__webpack_require__.t = function(value, mode) {
-/******/ 		if(mode & 1) value = __webpack_require__(value);
-/******/ 		if(mode & 8) return value;
-/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ 		var ns = Object.create(null);
-/******/ 		__webpack_require__.r(ns);
-/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ 		return ns;
-/******/ 	};
-/******/
-/******/ 	// getDefaultExport function for compatibility with non-harmony modules
-/******/ 	__webpack_require__.n = function(module) {
-/******/ 		var getter = module && module.__esModule ?
-/******/ 			function getDefault() { return module['default']; } :
-/******/ 			function getModuleExports() { return module; };
-/******/ 		__webpack_require__.d(getter, 'a', getter);
-/******/ 		return getter;
-/******/ 	};
-/******/
-/******/ 	// Object.prototype.hasOwnProperty.call
-/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ 	// __webpack_public_path__
-/******/ 	__webpack_require__.p = "/";
-/******/
-/******/ 	var jsonpArray = this["webpackJsonp"] = this["webpackJsonp"] || [];
-/******/ 	var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
-/******/ 	jsonpArray.push = webpackJsonpCallback;
-/******/ 	jsonpArray = jsonpArray.slice();
-/******/ 	for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
-/******/ 	var parentJsonpFunction = oldJsonpFunction;
-/******/
-/******/
-/******/ 	// run deferred modules from other chunks
-/******/ 	checkDeferredModules();
-/******/ })
-/************************************************************************/
-/******/ ([]);

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 9
unpackage/dist/dev/app-plus/app-service.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 1123
unpackage/dist/dev/app-plus/app-view.js


BIN
unpackage/dist/dev/app-plus/components/bert-suggest/icons/contact.png


BIN
unpackage/dist/dev/app-plus/components/bert-suggest/icons/image.png


BIN
unpackage/dist/dev/app-plus/components/bert-suggest/icons/suggestion.png


BIN
unpackage/dist/dev/app-plus/hybrid/html/img/1.png


+ 0 - 154
unpackage/dist/dev/app-plus/hybrid/html/map.html

@@ -1,154 +0,0 @@
-<!doctype html>
-<html>
-	<head>
-		<meta charset="utf-8">
-		<meta http-equiv="X-UA-Compatible" content="IE=edge">
-		<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
-		<link rel="stylesheet" href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css" />
-		<style>
-			* {
-				margin: 0;
-				padding: 0;
-			}
-
-			html,
-			body,
-			#container {
-				height: 100%;
-				width: 100%;
-			}
-
-			.distance {
-				background-color: #00000061;
-				position: absolute;
-				bottom: 20px;
-				right: 20px;
-				color: white;
-				padding: 6px 10px;
-				border-radius: 6px;
-			}
-		</style>
-	</head>
-	<body>
-		<div id="container"></div>
-		<div id="distance" class='distance'></div>
-		<script
-			src="https://webapi.amap.com/maps?v=2.0&key=211dd6f989e719022aaf47ddb0659c47&plugin=AMap.Scale,AMap.ToolBar,AMap.Geocoder,AMap.Geolocation,Geolocation,AMap.Driving">
-		</script>
-		<script src="https://webapi.amap.com/loca?v=2.0.0&key=211dd6f989e719022aaf47ddb0659c47"></script>
-		<script>
-			function getQuery(name) {
-				// 正则:[找寻'&' + 'url参数名字' = '值' + '&']('&'可以不存在)
-				let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
-				let r = window.location.search.substr(1).match(reg);
-				console.log(r);
-				if (r != null) {
-					// 对参数值进行解码
-					return decodeURIComponent(r[2]);
-				}
-				return null;
-			}
-			// let starLnglat = getQuery('lat').toString().split(',');
-			let starLnglat = [40.243655, 122.114407]
-			console.log('---------------------')
-			console.log(starLnglat)
-			var map = new AMap.Map('container', {
-				zoom: 12,
-				center: [starLnglat[1], starLnglat[0]],
-				resizeEnable: true
-			});
-			map.clearMap();
-			var startIcon = new AMap.Icon({
-				size: new AMap.Size(25, 25),
-				image: './img/1.png',
-				imageSize: new AMap.Size(25, 25),
-			});
-			/*
-			 * 驾车策略 
-			 * AMap.DrivingPolicy.LEAST_TIME           最快捷模式
-			 * AMap.DrivingPolicy.LEAST_FEE            最经济模式
-			 * AMap.DrivingPolicy.LEAST_DISTANCE       最短距离模式
-			 * AMap.DrivingPolicy.REAL_TRAFFIC         考虑实时路况
-			 */
-			var drivingOption = {
-				policy: AMap.DrivingPolicy
-					.LEAST_TIME, // 其它policy参数请参考 https://lbs.amap.com/api/javascript-api/reference/route-search#m_DrivingPolicy
-				ferry: 1, // 是否可以使用轮渡
-				map: map,
-				hideMarkers: false, // 设置隐藏路径规划的起始点图标
-				autoFitView: true
-			}
-			var dis = getDistance(122.114407, 40.243655, 122.114407, 42.243655)
-			document.getElementById("distance").innerHTML = dis
-			console.log(dis)
-			render(122.114407, 42.243655)
-
-			function getDistance(lat1, lng1, lat2, lng2) {
-				function Rad(d) {
-					return d * Math.PI / 180.0;
-				}
-				if (!lat1 || !lng1) {
-					return '';
-				}
-				// lat1用户的纬度
-				// lng1用户的经度
-				// lat2商家的纬度
-				// lng2商家的经度
-				let radLat1 = Rad(lat1);
-				let radLat2 = Rad(lat2);
-				let a = radLat1 - radLat2;
-				let b = Rad(lng1) - Rad(lng2);
-				let 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;
-				s = Math.round(s * 10000) / 10000;
-				s = '距离' + s.toFixed(2) + '公里' //保留两位小数
-				return s
-			}
-
-			function render(endLng, endLat) {
-				// 构造路线导航类
-				var driving = new AMap.Driving(drivingOption)
-				// 根据起终点经纬度规划驾车导航路线
-				driving.search(new AMap.LngLat(starLnglat[1], starLnglat[0]), new AMap.LngLat(endLng, endLat), function(status,
-					result) {
-					if (status === 'complete') {
-						console.log('绘制驾车路线完成')
-					} else {
-						console.log('获取驾车数据失败:' + result)
-					}
-				});
-				// var capitals = [{
-				// 	center: [116.42, 39.93123],
-				// }, {
-				// 	center: [116.41, 39.92132],
-				// }, {
-				// 	center: [116.40, 39.91122],
-				// }];
-				var capitals = [];
-				var facilities = [];
-				for (var i = 0; i < capitals.length; i++) {
-					var marker = new AMap.Marker({
-						position: new AMap.LngLat(capitals[i].center[0], capitals[i].center[1]),
-						offset: new AMap.Pixel(-10, -10),
-						icon: startIcon,
-					});
-					facilities.push(marker);
-				}
-				map.add(facilities);
-			}
-			// map.on('click', clickHandler)
-
-			function clickHandler(e) {
-				map.clearMap();
-				var endLng = e.lnglat.getLng();
-				var endLat = e.lnglat.getLat();
-				render(endLng, endLat)
-			}
-		</script>
-
-		<script>
-		</script>
-	</body>
-</html>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 96
unpackage/dist/dev/app-plus/pages/mine/camera/idcard/idcard.js


BIN
unpackage/dist/dev/app-plus/static/ITkoala-amap/amap.png


BIN
unpackage/dist/dev/app-plus/static/ITkoala-amap/close.png


BIN
unpackage/dist/dev/app-plus/static/ITkoala-amap/selectedStart.png


BIN
unpackage/dist/dev/app-plus/static/ITkoala-amap/sharp.png


BIN
unpackage/dist/dev/app-plus/static/ITkoala-amap/start.png


+ 0 - 209
unpackage/dist/dev/app-plus/static/css/common.scss

@@ -1,209 +0,0 @@
-// 全局公共样式
-.content{
-	background: $ac-bgc;
-	// padding:$uni-spacing-row-base;
-	overflow: hidden;
-	position: relative;
-	
-}
-// 常用公共样式
-// 布局相关 start
-.flex{
-	display: flex;
-}
-.align-center{
-	align-items: center;
-}
-.inline-block{
-	display: inline-block;
-}
-.s-row{
-	display: flex;
-	flex-direction: column;
-}
-
-.flex-center{
-	justify-content: center;
-	align-items: center;
-}
-.flex-space-between{
-	justify-content: space-between;
-	align-items: center;
-}
-.flex-space-around{
-	justify-content: space-around;
-	align-items: center;
-}
-.flex-space-evenly{
-	justify-content: space-evenly;
-	align-items: center;
-}
-.flex-end{
-	    justify-content: flex-end;
-}
-.flex-start{
-	    justify-content: flex-start;
-}
-.m-top20{
-	margin-top: 20rpx;
-}
-.paddingr20{
-	padding:20rpx;
-}
-.paddingr35{
-	padding:35rpx;
-}
-.lr-paddingr20{
-	padding: 0 20rpx;
-}
-.fixed{
-	position: fixed;
-}
-.row-between{
-	display: flex;
-	justify-content: space-between;
-}
-.content-other{
-	background: white;
-	padding:10rpx 20rpx;
-	border-radius: 10rpx;
-}
-.width100{
-	width: 100%;
-}
-.mr20{
-	margin-right: 20rpx;
-}
-.ml20{
-	margin-left: 20rpx;
-}
-.msx20{
-	margin:20rpx 0;
-}
-.mt20{
-	margin-top:20rpx;
-}
-.text-align-right{
-	text-align: right;
-}
-// 布局相关 end
-
-// 边线相关start
-.border-bottom{
-	border-bottom: 1px solid $uni-border-color;
-	padding-bottom: 10rpx;
-}
-// 边线相关end
-
-
-// 颜色相关start
-.red{
-	background: red;
-}
-.yellow{
-	background:yellow;
-}
-.btn-color{
-	background: #2772FB!important;
-	color: white!important;
-}
-.h-color{
-	color: #FE6300;
-}
-.number-color{
-	color:#2772FB;
-}
-// 颜色相关end
-// 文字相关start
-.level2-title{
-font-size: 32rpx;
-font-weight: 700;
-color: #000000;
-}
-.fontsize-24{
-	font-size: 24rpx;
-}
-.fontsize-25{
-	font-size: 25rpx;
-}
-.fontsize-26{
-	font-size: 26rpx;
-}
-.fontsize-28{
-	font-size: 28rpx;
-}
-.fontsize-36{
-	font-size: 36rpx!important;
-}
-.fontsize-46{
-	font-size: 46rpx;
-}
-.gray{
-	color: #BBBBBB;
-}
-.fontweight-500{
-	font-weight: 500;
-}
-.point{
-	text-overflow: ellipsis;
-	overflow: hidden;
-	white-space: nowrap;
-}
-.row-left-text{
-	font-size:28rpx;
-	// color: #8F8F8F;
-}
-.row-right-text{
-	font-size:28rpx;
-}
-// 文字相关end
-// 边线相关start
-.noborder{
-	border-bottom: none!important;
-}
-// 边线相关start
-
-// other
-.ssx{
-	width: 40rpx;
-	height: 40rpx;
-	background: linear-gradient(180deg, #C8D7E5 0%, #AFC1D6 100%);
-	font-size: 26rpx;
-	font-family: PingFangSC-Medium, PingFang SC;
-	font-weight: 500;
-	color: #FFFFFF;
-	border-radius: 50%;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	margin-right: 10rpx;
-}
-.row-tips{
-font-size: 26rpx;
-font-weight: 400;
-color: #FE7F1A;
-background: #FFEEE1;
-padding: 4rpx 11rpx;
-border-radius: 4px;
-}
-.xj-image{
-	width:46rpx;
-	height: 46rpx;
-}
-/deep/.u-modal__content__text{
-	text-align: center;
-}
-.preview-img{
-	margin-top: 20rpx;
-	width: 212rpx;
-	height: 212rpx;
-	border-radius: 10rpx;
-}
-.uview-upload{
-	margin-top: 20rpx;
-}
-.card-img{
-	width: 100%;
-	height: 440rpx;
-	
-}

+ 0 - 20
unpackage/dist/dev/app-plus/static/css/font.css

@@ -1,20 +0,0 @@
-@font-face {
-	font-family: "PingFang SC";
-	src: url('https://taohaoliang.oss-accelerate.aliyuncs.com/app/tmp/PingFang-Bold.ttf'),
-/* 		url('https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/PingFang-ExtraLight.ttf'),
-		url('https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/PingFang-Heavy.ttf'),
-		url('https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/PingFang-Light.ttf'), */
-		url('https://taohaoliang.oss-accelerate.aliyuncs.com/app/tmp/PingFang-Medium.ttf'),
-		url('https://taohaoliang.oss-accelerate.aliyuncs.com/app/tmp/PingFang-Regular.ttf');
-		font-weight: normal;
-	font-style: normal;
-}
-@font-face {
-	font-family: "DINPro";
-	src:url('https://taohaoliang.oss-accelerate.aliyuncs.com/app/tmp/DINPro-Bold.ttf'),
-		/* url('https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/tmp/DINPro-Light.ttf'), */
-		url('https://taohaoliang.oss-accelerate.aliyuncs.com/app/tmp/DINPro-Medium.ttf');
-		font-weight: normal;
-	font-style: normal;
-}
-

BIN
unpackage/dist/dev/app-plus/static/icon_delete.png


BIN
unpackage/dist/dev/app-plus/static/icon_down.png


BIN
unpackage/dist/dev/app-plus/static/images/common/bz@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/common/cy@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/common/dingdan@2x(1).png


BIN
unpackage/dist/dev/app-plus/static/images/common/dingdan@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/common/huoyuan@2x(1).png


BIN
unpackage/dist/dev/app-plus/static/images/common/huoyuan@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/common/iconmy@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/common/jt.png


BIN
unpackage/dist/dev/app-plus/static/images/common/mesicon@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/common/my@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/common/quxiao@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/common/tianjiazhaopian@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/common/top@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/common/xiaoxi@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/goodSource/Mask@2x.png


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott