achao 3 år sedan
förälder
incheckning
bc68b10f78
74 ändrade filer med 8312 tillägg och 1083 borttagningar
  1. 116 73
      common/helper.js
  2. 1 1
      config/index.js
  3. 52 15
      demo.vue
  4. 147 0
      hybrid/html/base64.js
  5. 273 0
      hybrid/html/crypto.js
  6. BIN
      hybrid/html/img/1.png
  7. 179 0
      hybrid/html/map.html
  8. 280 0
      hybrid/html/video.html
  9. 0 0
      hybrid/html/video.js
  10. 5 0
      hybrid/html/vue.min.js
  11. 12 2
      manifest.json
  12. 88 20
      pages.json
  13. 135 0
      pages/mine/agentCargoOwner.vue
  14. 259 0
      pages/mine/camera/video/video.nvue
  15. 177 109
      pages/mine/cargoowner/cargoowner.vue
  16. 301 166
      pages/mine/company/addcompany.vue
  17. 32 12
      pages/mine/company/addcompanythree.vue
  18. 30 18
      pages/mine/company/editcompany.vue
  19. 13 1
      pages/mine/company/editcompanythree.vue
  20. 11 9
      pages/mine/company/index.vue
  21. 41 25
      pages/mine/index.vue
  22. 1 1
      pages/mine/settings/editPassword.vue
  23. 166 40
      pages/news/index.vue
  24. 334 128
      pages/order/index.vue
  25. 75 0
      pages/order/map.vue
  26. 90 49
      pages/order/orderDetails.vue
  27. 2 2
      pages/public/login.vue
  28. 178 0
      pages/release/addAddress.vue
  29. 180 0
      pages/release/editAddress.vue
  30. 697 0
      pages/release/editRelease.vue
  31. 447 0
      pages/release/lookRelease.vue
  32. 19 0
      pages/release/map.vue
  33. 615 0
      pages/release/record.vue
  34. 520 100
      pages/release/release.vue
  35. 472 0
      pages/release/selectAddress.vue
  36. 13 1
      static/css/common.scss
  37. BIN
      static/images/common/sh.png
  38. BIN
      static/images/common/sx.png
  39. BIN
      static/images/common/tg.png
  40. BIN
      static/images/common/wtg.png
  41. BIN
      static/images/mine/bg@2x.png
  42. BIN
      static/images/mine/duihao@2x.png
  43. BIN
      static/images/mine/wxz.png
  44. BIN
      static/images/order/good-img.png
  45. BIN
      static/images/order/jt.png
  46. BIN
      static/images/order/position.png
  47. 0 0
      unpackage/dist/dev/app-plus/app-config-service.js
  48. 0 0
      unpackage/dist/dev/app-plus/app-service.js
  49. 596 291
      unpackage/dist/dev/app-plus/app-view.js
  50. 147 0
      unpackage/dist/dev/app-plus/hybrid/html/base64.js
  51. 273 0
      unpackage/dist/dev/app-plus/hybrid/html/crypto.js
  52. BIN
      unpackage/dist/dev/app-plus/hybrid/html/img/1.png
  53. 179 0
      unpackage/dist/dev/app-plus/hybrid/html/map.html
  54. 268 0
      unpackage/dist/dev/app-plus/hybrid/html/oss - 副本.js
  55. 265 0
      unpackage/dist/dev/app-plus/hybrid/html/oss.js
  56. 212 0
      unpackage/dist/dev/app-plus/hybrid/html/video - 副本.js
  57. 280 0
      unpackage/dist/dev/app-plus/hybrid/html/video.html
  58. 0 0
      unpackage/dist/dev/app-plus/hybrid/html/video.js
  59. 5 0
      unpackage/dist/dev/app-plus/hybrid/html/vue.min.js
  60. 0 0
      unpackage/dist/dev/app-plus/manifest.json
  61. 1 9
      unpackage/dist/dev/app-plus/pages/mine/camera/idcard/idcard.js
  62. 96 0
      unpackage/dist/dev/app-plus/pages/mine/camera/video/video.js
  63. 13 1
      unpackage/dist/dev/app-plus/static/css/common.scss
  64. BIN
      unpackage/dist/dev/app-plus/static/images/common/sh.png
  65. BIN
      unpackage/dist/dev/app-plus/static/images/common/sx.png
  66. BIN
      unpackage/dist/dev/app-plus/static/images/common/tg.png
  67. BIN
      unpackage/dist/dev/app-plus/static/images/common/wtg.png
  68. BIN
      unpackage/dist/dev/app-plus/static/images/mine/bg@2x.png
  69. BIN
      unpackage/dist/dev/app-plus/static/images/mine/duihao@2x.png
  70. BIN
      unpackage/dist/dev/app-plus/static/images/mine/wxz.png
  71. BIN
      unpackage/dist/dev/app-plus/static/images/order/good-img.png
  72. BIN
      unpackage/dist/dev/app-plus/static/images/order/jt.png
  73. BIN
      unpackage/dist/dev/app-plus/static/images/order/position.png
  74. 16 10
      util/request.js

+ 116 - 73
common/helper.js

@@ -14,7 +14,7 @@ const imgTypeList = [{
 		name: '拍照',
 	}
 ]
-const makeValidityPeriod = function(type) {
+const makeValidityPeriod = function(type,name) {
 	//获取当前年
 	let nowDate = new Date();
 	let year = nowDate.getFullYear()
@@ -31,7 +31,7 @@ const makeValidityPeriod = function(type) {
 		_list1.push(year + i)
 	}
 	if (type == 0) {
-		_list1.unshift('长期')
+		_list1.unshift(name)
 		_list2.unshift('')
 		_list3.unshift('')
 	}
@@ -99,79 +99,120 @@ const contactCustomerService = (item) => {
 		phoneNumber: '114' //仅为示例
 	});
 }
+// const getAddress = (item) => {
+// 	let regex = "(?<province>[^省]+省|.+自治区)(?<city>[^自治州]+自治州|[^市]+市|[^盟]+盟|[^地区]+地区|.+区划)(?<county>[^市]+市|[^县]+县|[^旗]+旗|.+区)?(?<town>[^区]+区|.+镇)?(?<village>.*)";
+// 	return item.match(regex).groups
+// }
+
+const formatLocation = (res) => {
+	var regex = /^(北京市|天津市|重庆市|上海市|香港特别行政区|澳门特别行政区)/;
+	var REGION_PROVINCE = [];
+	var addressBean = {
+		REGION_PROVINCE: null,
+		REGION_COUNTRY: null,
+		REGION_CITY: null,
+		ADDRESS: null
+	};
+
+	function regexAddressBean(address, addressBean) {
+		// regex = /^(.*?[市州]|.*?地区|.*?特别行政区)(.*?[市区县])(.*?)$/g;
+		regex = /^(.*?[市]|.*?地区|.*?特别行政区)(.*?[市区县])(.*?)$/g;
+		var addxress = regex.exec(address);
+		addressBean.REGION_CITY = addxress[1];
+		addressBean.REGION_COUNTRY = addxress[2];
+		addressBean.ADDRESS = addxress[3] + "(" + res.name + ")";
+		// console.log(addxress);
+	};
+	if (!(REGION_PROVINCE = regex.exec(res.address))) {
+		regex = /^(.*?(省|自治区))(.*?)$/;
+		REGION_PROVINCE = regex.exec(res.address);
+		addressBean.REGION_PROVINCE = REGION_PROVINCE[1];
+		regexAddressBean(REGION_PROVINCE[3], addressBean);
+	} else {
+		addressBean.REGION_PROVINCE = REGION_PROVINCE[1];
+		regexAddressBean(res.address, addressBean);
+	}
+	return addressBean
+
+}
+
+
+
 //获取省份简称
 const getProvinceAbbreviation = (province) => {
-	console.log(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 "澳";
-	
+	// console.log(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,
@@ -181,5 +222,7 @@ export default {
 	imgType,
 	imgTypeList,
 	makeValidityPeriod,
-	getProvinceAbbreviation
+	getProvinceAbbreviation,
+	// getAddress,
+	formatLocation
 }

+ 1 - 1
config/index.js

@@ -1,5 +1,5 @@
 const dev = {
-	baseUrlNew: 'http://192.168.0.17:8090',
+	baseUrlNew: 'http://192.168.0.17:8091',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 52 - 15
demo.vue

@@ -12,6 +12,16 @@
 		9、弹框提示
 		10、请求方法
 		11、loading
+		12、data强制刷新方法
+		13、数组添加元素
+		14、条件编译
+		15、组件传入当前对象
+		16、防止点击穿透
+		17、数组删除指定元素
+		18、缓存
+		19、主动刷新滚动数据
+		20、helper
+		21、加载中
 	</view>
 </template>
 
@@ -60,43 +70,70 @@
 				// 8、
 				// default/error/success/loading
 				// <u-toast ref="uToast"></u-toast>
-				// let params = {
-				// 		type: 'success',
-				// 		title: '成功主题(带图标)',
-				// 		message: "庄生晓梦迷蝴蝶",
-				// 		iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
-				// 	}
 				// this.$refs.uToast.show({
-				// 	...params,
+				// 	type: 'error',
+				// 	message: "最多选择3个地区",
 				// 	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
+				// },
+				// cancelClick(){
+				// 	this.isShowAlert = false
+				// },
 				// 10、
-				// that.$request.baseRequest('get', '/commonUser/loginVerifyCode', {
+				// this.$request.baseRequest('get', '/commonUser/loginVerifyCode', {
 				// 		phone: that.model1.phone,
 				// 		verifyCode: that.model1.code
 				// 	}).then(res => {
 							
-				
 				// 	})
 				// 	.catch(res => {
-				// 		uni.showToast({
-				// 			title: res.message,
-				// 			icon: 'none',
-				// 			duration: 2000
-				// 		})
+					// uni.$u.toast( res.message);
 				// 	});
 				// 11、
 				// 	uni.showLoading({
 				// 				title: '登录中',
 				// 				mask: true
 				// 			})
+				// 12、
+				// _this.$forceUpdate()
+				// 13、
+				// 开头添加 unshift
+				// 14、
+				// #ifdef APP-PLUS
+				// #endif
+				// 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';
+				 // 21、
+				 uni.showLoading({
+				 	mask:true,
+				 	title:'加载中...'
+				 })
+				 uni.hideLoading()
 			}
 		}
 	}

+ 147 - 0
hybrid/html/base64.js

@@ -0,0 +1,147 @@
+(function() {
+	var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+	var base64DecodeChars = new Array(
+		-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+		-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+		-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
+		52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
+		-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+		15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
+		-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+		41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
+	 Window.base64 = {
+		encode: function encode(str) {
+			var out, i, len;
+			var c1, c2, c3;
+			len = str.length;
+			i = 0;
+			out = "";
+			while (i < len) {
+				c1 = str.charCodeAt(i++) & 0xff;
+				if (i == len) {
+					out += base64EncodeChars.charAt(c1 >> 2);
+					out += base64EncodeChars.charAt((c1 & 0x3) << 4);
+					out += "==";
+					break;
+				}
+				c2 = str.charCodeAt(i++);
+				if (i == len) {
+					out += base64EncodeChars.charAt(c1 >> 2);
+					out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
+					out += base64EncodeChars.charAt((c2 & 0xF) << 2);
+					out += "=";
+					break;
+				}
+				c3 = str.charCodeAt(i++);
+				out += base64EncodeChars.charAt(c1 >> 2);
+				out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
+				out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
+				out += base64EncodeChars.charAt(c3 & 0x3F);
+			}
+			return out;
+		},
+		decode: function decode(str) {
+			var c1, c2, c3, c4;
+			var i, len, out;
+			len = str.length;
+			i = 0;
+			out = "";
+			while (i < len) {
+				/* c1 */
+				do {
+					c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
+				} while (i < len && c1 == -1);
+				if (c1 == -1)
+					break;
+				/* c2 */
+				do {
+					c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
+				} while (i < len && c2 == -1);
+				if (c2 == -1)
+					break;
+				out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
+				/* c3 */
+				do {
+					c3 = str.charCodeAt(i++) & 0xff;
+					if (c3 == 61)
+						return out;
+					c3 = base64DecodeChars[c3];
+				} while (i < len && c3 == -1);
+				if (c3 == -1)
+					break;
+				out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
+				/* c4 */
+				do {
+					c4 = str.charCodeAt(i++) & 0xff;
+					if (c4 == 61)
+						return out;
+					c4 = base64DecodeChars[c4];
+				} while (i < len && c4 == -1);
+				if (c4 == -1)
+					break;
+				out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
+			}
+			return out;
+		},
+		utf16to8: function utf16to8(str) {
+			var out, i, len, c;
+			out = "";
+			len = str.length;
+			for (i = 0; i < len; i++) {
+				c = str.charCodeAt(i);
+				if ((c >= 0x0001) && (c <= 0x007F)) {
+					out += str.charAt(i);
+				} else if (c > 0x07FF) {
+					out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
+					out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
+					out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
+				} else {
+					out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
+					out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
+				}
+			}
+			return out;
+		},
+		utf8to16: function utf8to16(str) {
+			var out, i, len, c;
+			var char2, char3;
+			out = "";
+			len = str.length;
+			i = 0;
+			while (i < len) {
+				c = str.charCodeAt(i++);
+				switch (c >> 4) {
+					case 0:
+					case 1:
+					case 2:
+					case 3:
+					case 4:
+					case 5:
+					case 6:
+					case 7:
+						// 0xxxxxxx
+						out += str.charAt(i - 1);
+						break;
+					case 12:
+					case 13:
+						// 110x xxxx 10xx xxxx
+						char2 = str.charCodeAt(i++);
+						out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
+						break;
+					case 14:
+						// 1110 xxxx 10xx xxxx 10xx xxxx
+						char2 = str.charCodeAt(i++);
+						char3 = str.charCodeAt(i++);
+						out += String.fromCharCode(((c & 0x0F) << 12) |
+							((char2 & 0x3F) << 6) |
+							((char3 & 0x3F) << 0));
+						break;
+				}
+			}
+			return out;
+		}
+	}
+console.log('base64')
+console.log(Window.base64)
+	return Window.base64
+})()

+ 273 - 0
hybrid/html/crypto.js

@@ -0,0 +1,273 @@
+
+
+(function() {
+Window.Crypto = {};
+	var base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+
+	// Crypto utilities
+	var util = Window.Crypto.util = {
+
+		// Bit-wise rotate left
+		rotl: function(n, b) {
+			return (n << b) | (n >>> (32 - b));
+		},
+
+		// Bit-wise rotate right
+		rotr: function(n, b) {
+			return (n << (32 - b)) | (n >>> b);
+		},
+
+		// Swap big-endian to little-endian and vice versa
+		endian: function(n) {
+
+			// If number given, swap endian
+			if (n.constructor == Number) {
+				return util.rotl(n, 8) & 0x00FF00FF |
+					util.rotl(n, 24) & 0xFF00FF00;
+			}
+
+			// Else, assume array and swap all items
+			for (var i = 0; i < n.length; i++)
+				n[i] = util.endian(n[i]);
+			return n;
+
+		},
+
+		// Generate an array of any length of random bytes
+		randomBytes: function(n) {
+			for (var bytes = []; n > 0; n--)
+				bytes.push(Math.floor(Math.random() * 256));
+			return bytes;
+		},
+
+		// Convert a string to a byte array
+		stringToBytes: function(str) {
+			var bytes = [];
+			for (var i = 0; i < str.length; i++)
+				bytes.push(str.charCodeAt(i));
+			return bytes;
+		},
+
+		// Convert a byte array to a string
+		bytesToString: function(bytes) {
+			var str = [];
+			for (var i = 0; i < bytes.length; i++)
+				str.push(String.fromCharCode(bytes[i]));
+			return str.join("");
+		},
+
+		// Convert a string to big-endian 32-bit words
+		stringToWords: function(str) {
+			var words = [];
+			for (var c = 0, b = 0; c < str.length; c++, b += 8)
+				words[b >>> 5] |= str.charCodeAt(c) << (24 - b % 32);
+			return words;
+		},
+
+		// Convert a byte array to big-endian 32-bits words
+		bytesToWords: function(bytes) {
+			var words = [];
+			for (var i = 0, b = 0; i < bytes.length; i++, b += 8)
+				words[b >>> 5] |= bytes[i] << (24 - b % 32);
+			return words;
+		},
+
+		// Convert big-endian 32-bit words to a byte array
+		wordsToBytes: function(words) {
+			var bytes = [];
+			for (var b = 0; b < words.length * 32; b += 8)
+				bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
+			return bytes;
+		},
+
+		// Convert a byte array to a hex string
+		bytesToHex: function(bytes) {
+			var hex = [];
+			for (var i = 0; i < bytes.length; i++) {
+				hex.push((bytes[i] >>> 4).toString(16));
+				hex.push((bytes[i] & 0xF).toString(16));
+			}
+			return hex.join("");
+		},
+
+		// Convert a hex string to a byte array
+		hexToBytes: function(hex) {
+			var bytes = [];
+			for (var c = 0; c < hex.length; c += 2)
+				bytes.push(parseInt(hex.substr(c, 2), 16));
+			return bytes;
+		},
+
+		// Convert a byte array to a base-64 string
+		bytesToBase64: function(bytes) {
+
+			// Use browser-native function if it exists
+			// if (typeof btoa == "function") return btoa(util.bytesToString(bytes));
+
+			var base64 = [],
+				overflow;
+
+			for (var i = 0; i < bytes.length; i++) {
+				switch (i % 3) {
+					case 0:
+						base64.push(base64map.charAt(bytes[i] >>> 2));
+						overflow = (bytes[i] & 0x3) << 4;
+						break;
+					case 1:
+						base64.push(base64map.charAt(overflow | (bytes[i] >>> 4)));
+						overflow = (bytes[i] & 0xF) << 2;
+						break;
+					case 2:
+						base64.push(base64map.charAt(overflow | (bytes[i] >>> 6)));
+						base64.push(base64map.charAt(bytes[i] & 0x3F));
+						overflow = -1;
+				}
+			}
+
+			// Encode overflow bits, if there are any
+			if (overflow != undefined && overflow != -1)
+				base64.push(base64map.charAt(overflow));
+
+			// Add padding
+			while (base64.length % 4 != 0) base64.push("=");
+
+			return base64.join("");
+
+		},
+
+		// Convert a base-64 string to a byte array
+		base64ToBytes: function(base64) {
+
+			// Use browser-native function if it exists
+			if (typeof atob == "function") return util.stringToBytes(atob(base64));
+
+			// Remove non-base-64 characters
+			base64 = base64.replace(/[^A-Z0-9+\/]/ig, "");
+
+			var bytes = [];
+
+			for (var i = 0; i < base64.length; i++) {
+				switch (i % 4) {
+					case 1:
+						bytes.push((base64map.indexOf(base64.charAt(i - 1)) << 2) |
+							(base64map.indexOf(base64.charAt(i)) >>> 4));
+						break;
+					case 2:
+						bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0xF) << 4) |
+							(base64map.indexOf(base64.charAt(i)) >>> 2));
+						break;
+					case 3:
+						bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0x3) << 6) |
+							(base64map.indexOf(base64.charAt(i))));
+						break;
+				}
+			}
+
+			return bytes;
+
+		}
+
+	};
+
+	Window.Crypto.HMAC = function(hasher, message, key, options) {
+
+		// Allow arbitrary length keys
+		key = key.length > hasher._blocksize * 4 ?
+			hasher(key, {
+				asBytes: true
+			}) :
+			util.stringToBytes(key);
+
+		// XOR keys with pad constants
+		var okey = key,
+			ikey = key.slice(0);
+		for (var i = 0; i < hasher._blocksize * 4; i++) {
+			okey[i] ^= 0x5C;
+			ikey[i] ^= 0x36;
+		}
+
+		var hmacbytes = hasher(util.bytesToString(okey) +
+			hasher(util.bytesToString(ikey) + message, {
+				asString: true
+			}), {
+				asBytes: true
+			});
+		return options && options.asBytes ? hmacbytes :
+			options && options.asString ? util.bytesToString(hmacbytes) :
+			util.bytesToHex(hmacbytes);
+
+	};
+	// The core
+	var SHA1 = Window.Crypto.SHA1 = function (message, options) {
+		var digestbytes = util.wordsToBytes(SHA1._sha1(message));
+		return options && options.asBytes ? digestbytes :
+		       options && options.asString ? util.bytesToString(digestbytes) :
+		       util.bytesToHex(digestbytes);
+	};
+	SHA1._sha1 = function(message) {
+
+		var m = util.stringToWords(message),
+			l = message.length * 8,
+			w = [],
+			H0 = 1732584193,
+			H1 = -271733879,
+			H2 = -1732584194,
+			H3 = 271733878,
+			H4 = -1009589776;
+
+		// Padding
+		m[l >> 5] |= 0x80 << (24 - l % 32);
+		m[((l + 64 >>> 9) << 4) + 15] = l;
+
+		for (var i = 0; i < m.length; i += 16) {
+
+			var a = H0,
+				b = H1,
+				c = H2,
+				d = H3,
+				e = H4;
+
+			for (var j = 0; j < 80; j++) {
+
+				if (j < 16) w[j] = m[i + j];
+				else {
+					var n = w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16];
+					w[j] = (n << 1) | (n >>> 31);
+				}
+
+				var t = ((H0 << 5) | (H0 >>> 27)) + H4 + (w[j] >>> 0) + (
+					j < 20 ? (H1 & H2 | ~H1 & H3) + 1518500249 :
+					j < 40 ? (H1 ^ H2 ^ H3) + 1859775393 :
+					j < 60 ? (H1 & H2 | H1 & H3 | H2 & H3) - 1894007588 :
+					(H1 ^ H2 ^ H3) - 899497514);
+
+				H4 = H3;
+				H3 = H2;
+				H2 = (H1 << 30) | (H1 >>> 2);
+				H1 = H0;
+				H0 = t;
+
+			}
+
+			H0 += a;
+			H1 += b;
+			H2 += c;
+			H3 += d;
+			H4 += e;
+
+		}
+
+		return [H0, H1, H2, H3, H4];
+
+	};
+
+	// Package private blocksize
+	SHA1._blocksize = 16;
+
+	// Crypto mode namespace
+	Window.Crypto.mode = {};
+	console.log("Window.Crypto")
+	console.log(Window.Crypto)
+	return Window.Crypto;
+})();

BIN
hybrid/html/img/1.png


+ 179 - 0
hybrid/html/map.html

@@ -0,0 +1,179 @@
+<!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%;
+			}
+			.content{
+				background-color: white;
+				position: absolute;
+				top: 20px;
+				padding: 6px 10px;
+				border-radius: 6px;
+				width: 90%;
+				margin-left: 5%;
+				display: flex;
+				align-items: center;
+			}
+			.start,.end{
+				display: flex;
+				flex-direction: column;
+			}
+			.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 class='content'>
+			<div class='start'>
+				<div>武汉</div>
+				<div>江汉</div>
+			</div>
+			<div>------></div>
+			<div class='end'>
+				<div>沈阳</div>
+				<div>和平</div>
+			</div>
+		</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>

+ 280 - 0
hybrid/html/video.html

@@ -0,0 +1,280 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="utf-8">
+		<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+		<title></title>
+		<style>
+
+		</style>
+	</head>
+	<body>
+		<div id='app'>
+			<div class="verify-placeholder">
+				<div class="verify-placeholder-img"></div>
+				<p class="verify-placeholder-text">正面平视手机、保证光线充足<br>请勿遮挡面部</p>
+			</div>
+			<div class="verify-bottom">
+				<ul class="verify-process">
+					<li>
+						<span class="num">1</span>
+						<p class="text">人脸放入框内,点击开始录制</p>
+					</li>
+					<li>
+						<span class="num">2</span>
+						<p class="text">录制倒计时<span class="text-tips">(8s)</span>,点击立即结束</p>
+					</li>
+					<li>
+						<span class="num">3</span>
+						<p class="text">完成录制,等待验证结果</p>
+					</li>
+				</ul>
+				<button class="verify-btn" @click="getCamera">开始录制</button>
+			</div>
+			<div class="btn-submit">
+				<button class="app-button-warning" size="small" @click="$router.back(-1)">上一步</button>
+				<button type="primary" size="small" class="btn">下一步</button>
+			</div>
+			<!--    人脸检测-->
+			<div class="video" v-show="showVideo">
+				<div class="video-cover"></div>
+				<video :src="url" ref="videoRef" autoplay playsinline x5-video-player-type="h5"></video>
+				<!-- 关闭按钮 -->
+				<button class="video-close" @click="closeVideo">×</button>
+				<button class="video-save" @click="saveVideo">
+					{{ isAlreadyRecord ? '结束录制(' + count + 's)' : '开始录制' }}</button>
+			</div>
+			<video ref="videob" controls="" name="media" v-show="!showVideo" width="100%" height="400"></video>
+		</div>
+	</body>
+	<script src="vue.min.js"></script>
+	<script src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/jquery.min.js"></script>
+	<script src="base64.js"></script>
+	<script src="crypto.js"></script>
+	<!-- <script src="oss.js"></script> -->
+	<!-- <script src="video.js"></script> -->
+	<script>
+		new Vue({
+			el: '#app',
+			data: {
+				url: '',
+				showVideo: false,
+				mediaRecorder: null,
+				MediaStreamTrack: null,
+				isAlreadyRecord: false,
+				count: 8,
+				countTimer: null,
+				recordedBlobs: [],
+				compId: ''
+			},
+			beforeDestroy() {
+				this.MediaStreamTrack && this.MediaStreamTrack.stop()
+				this.countTimer && clearTimeout(this.countTimer)
+			},
+			computed: {},
+
+			mounted() {
+
+			},
+			watch: {},
+			methods: {
+				getPolicyBase64() {
+					let date = new Date();
+					date.setHours(date.getHours() + 87600);
+					let srcT = date.toISOString();
+					const policyText = {
+						"expiration": srcT, //设置该Policy的失效时间,超过这个失效时间之后,就没有办法通过这个policy上传文件了 
+						"conditions": [
+							["content-length-range", 0, 5 * 1024 * 1024] // 设置上传文件的大小限制,5mb
+						]
+					};
+
+					const policyBase64 = Window.base64.encode(JSON.stringify(policyText));
+					console.log(policyBase64);
+					return policyBase64;
+				},
+				getSignature(policyBase64) {
+					const accesskey = 'FpClTp4OVrRRtHEfi3lBOWUoLxKieW';
+					// console.log('video.js')
+					// console.log(Crypto)
+					const bytes = Window.Crypto.HMAC(Window.Crypto.SHA1, policyBase64, accesskey, {
+						asBytes: true
+					})
+					const signature = Window.Crypto.util.bytesToBase64(bytes);
+					// console.log(signature);
+					return signature;
+				},
+				uploadFile(policyBase64) {
+					var formdata = new FormData()
+					// const policyBase64 = this.getPolicyBase64();
+
+					console.log("policyBase64-----------------------")
+					console.log(policyBase64)
+					const signature = this.getSignature(policyBase64); //获取签名
+					console.log("signatur--------------------------------------e")
+					console.log(signature)
+					formdata.append("key", "https://taohaoliang.oss-cn-beijing.aliyuncs.com")
+					formdata.append("policy", policyBase64)
+					formdata.append("OSSAccessKeyId", 'LTAI4G9c14PgKvM23WZ9zrpc')
+					formdata.append("signature", signature)
+					formdata.append("success_action_status", '200')
+					$.ajax({
+						type: "POST",
+						contentType: "application/json;charset=UTF-8",
+						url: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com',
+						success: function(result) {
+							console.log("result", result);
+
+
+						},
+						//请求失败,包含具体的错误信息
+						error: function(e) {
+							console.log(e);
+							console.log(e.status);
+							console.log(e.responseText);
+						}
+					});
+				},
+				// 调用摄像头 开始录制
+				getCamera() {
+					// 注意本例需要在HTTPS协议网站中运行,新版本Chrome中getUserMedia接口在http下不再支持。
+					let constraints = {
+						audio: true,
+						video: {
+							facingMode: 'user' // 优先调前置摄像头
+						}
+					}
+					console.log('--------------')
+					console.log(navigator)
+					// 老的浏览器可能根本没有实现 mediaDevices,所以我们可以先设置一个空的对象
+					if (navigator.mediaDevices === undefined) {
+						navigator.mediaDevices = {}
+					}
+					// 一些浏览器部分支持 mediaDevices。我们不能直接给对象设置 getUserMedia
+					// 因为这样可能会覆盖已有的属性。这里我们只会在没有getUserMedia属性的时候添加它。
+					if (navigator.mediaDevices.getUserMedia === undefined) {
+						navigator.mediaDevices.getUserMedia = function(constraints) {
+							// 首先,如果有getUserMedia的话,就获得它
+							//   var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia
+							var getUserMedia = navigator.getUserMedia ||
+								navigator.webkitGetUserMedia ||
+								navigator.mozGetUserMedia
+							// 一些浏览器根本没实现它 - 那么就返回一个error到promise的reject来保持一个统一的接口
+							if (!getUserMedia) {
+								this.$messageBox.alert('该浏览器不支持getUserMedia,请使用其他浏览器')
+								return Promise.reject(new Error(
+									'getUserMedia is not implemented in this browser'))
+							}
+							// 否则,为老的navigator.getUserMedia方法包裹一个Promise
+							return new Promise(function(resolve, reject) {
+								getUserMedia.call(navigator, constraints, resolve, reject)
+							})
+						}
+					}
+					navigator.mediaDevices.getUserMedia(constraints)
+						.then((stream) => {
+							this.MediaStreamTrack = typeof stream.stop === 'function' ? stream : stream
+								.getTracks()[0]
+							console.log(stream)
+							console.log(this.MediaStreamTrack)
+							// 显示录制框
+							this.showVideo = true
+							this.isAlreadyRecord = false
+							let winURL = window.URL || window.webkitURL
+							if ('srcObject' in this.$refs.videoRef) {
+								this.$refs.videoRef.srcObject = stream
+							} else {
+								this.$refs.videoRef.src = winURL.createObjectURL(stream)
+							}
+							console.log(this.$refs.videoRef)
+							this.$refs.videoRef.onloadedmetadata = e => {
+								// 播放视频
+								this.$refs.videoRef.play()
+							}
+							let options = {
+								videoBitsPerSecond: 2500000
+							}
+							this.mediaRecorder = new MediaRecorder(stream, options)
+						})
+						.catch((err) => {
+							console.log(err)
+							this.$messageBox.alert('摄像头开启失败,请检查摄像头是否授权或是否可用!')
+						})
+				},
+				// 关闭活体检测
+				closeVideo() {
+					this.recordedBlobs = ''
+					this.isAlreadyRecord = false
+					this.MediaStreamTrack && this.MediaStreamTrack.stop()
+					this.countTimer && clearTimeout(this.countTimer)
+					this.$router.go(0)
+				},
+				// 录制倒计时
+				countDown() {
+					let that = this
+					let sendTime = Math.round(+new Date() / 1000)
+					return function walk() {
+						that.countTimer = setTimeout(function() {
+							that.countTimer && clearTimeout(that.countTimer)
+							let diff = sendTime + 8 - Math.round(+new Date() / 1000)
+							if (diff > 0) {
+								that.count = diff
+								walk()
+							} else {
+								console.log('倒计时结束')
+								this.showVideo = false
+								console.log(this.url)
+								console.log(this.MediaStreamTrack)
+							}
+						}, 1000)
+					}
+				},
+				// 保存录制视频
+				saveVideo() {
+					if (this.isAlreadyRecord) {
+						this.countTimer && clearTimeout(this.countTimer)
+						this.showVideo = false
+						//当录制的数据可用时
+						this.mediaRecorder.ondataavailable = (e) => {
+							if (e.data && e.data.size > 0) {
+								this.recordedBlobs.push(e.data)
+							}
+						}
+						this.mediaRecorder.stop()
+						setTimeout(() => {
+							var blob = new Blob(this.recordedBlobs, {
+								type: 'video/mp4'
+							})
+
+							// console.log(blob)
+							this.isAlreadyRecord = false
+							this.MediaStreamTrack && this.MediaStreamTrack.stop()
+							var reader = new FileReader();
+							reader.readAsDataURL(blob, 'utf-8')
+							reader.onload = () => {
+
+								console.log('11111111111111111')
+								console.log(reader.result); // base64格式
+								this.$refs.videob.src = reader.result
+								this.uploadFile(reader.result)
+
+								console.log(reader)
+
+							}
+						}, 1000)
+					} else {
+						this.count = 8
+						this.isAlreadyRecord = true
+						this.mediaRecorder.start(8000)
+						this.countDown()()
+					}
+				},
+				changeVideo(e) {
+					let file = this.$refs.videoFile.files
+					console.log(file)
+				}
+			}
+		})
+	</script>
+
+</html>

+ 0 - 0
新建文本文档.txt → hybrid/html/video.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 5 - 0
hybrid/html/vue.min.js


+ 12 - 2
manifest.json

@@ -17,7 +17,10 @@
             "delay" : 0
         },
         /* 模块配置 */
-        "modules" : {},
+        "modules" : {
+            "Maps" : {},
+            "VideoPlayer" : {}
+        },
         /* 应用发布信息 */
         "distribute" : {
             /* android打包配置 */
@@ -43,7 +46,14 @@
             /* ios打包配置 */
             "ios" : {},
             /* SDK配置 */
-            "sdkConfigs" : {}
+            "sdkConfigs" : {
+                "maps" : {
+                    "amap" : {
+                        "appkey_ios" : "64541bb9b52fe4d41d8ac5c1959cf4b9",
+                        "appkey_android" : "8a601d5716a812aaf65291da18dae719"
+                    }
+                }
+            }
         }
     },
     /* 快应用特有相关 */

+ 88 - 20
pages.json

@@ -47,23 +47,23 @@
 	},
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
-			"path": "pages/goodSource/index",
+			"path": "pages/order/index",
 			"style": {
-				"navigationBarTitleText": "开发中"
+				"navigationStyle": "custom"
+				// "navigationBarTitleText": ""
 			}
-		}, {
-			"path": "pages/order/index",
+		},
+		{
+			"path": "pages/goodSource/index",
 			"style": {
-				  "navigationStyle": "custom"
+				"navigationBarTitleText": "开发中"
 			}
-
 		}
-
 		, {
 			"path": "pages/news/index",
 			"style": {
-				"navigationBarTitleText": "消息",
-				"enablePullDownRefresh": false
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
 			}
 
 		},
@@ -207,7 +207,16 @@
 				"backgroundColor": "#000000"
 			}
 
-		}, {
+		}, 
+		{
+			"path": "pages/mine/camera/video/video",
+			"style": {
+				"navigationStyle": "custom",
+				"backgroundColor": "#000000"
+			}
+		
+		},
+		{
 			"path": "pages/mine/agency/agency",
 			"style": {
 				"navigationBarTitleText": "",
@@ -315,20 +324,79 @@
 				"navigationStyle": "custom"
 			}
 
+		}, {
+			"path": "pages/release/release",
+			"style": {
+				"navigationStyle": "custom"
+			}
+
+		}, {
+			"path": "pages/release/selectAddress",
+			"style": {
+				"navigationBarTitleText": "地址簿",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/release/addAddress",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/release/map",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/release/record",
+			"style": {
+				"navigationStyle": "custom"
+			}
+
+		}, {
+			"path": "pages/release/lookRelease",
+			"style": {
+				"navigationBarTitleText": "任务详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/release/editAddress",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/release/editRelease",
+			"style": {
+				"navigationStyle": "custom"
+			}
+
+		}, {
+			"path": "pages/mine/agentCargoOwner",
+			"style": {
+				"navigationBarTitleText": "代理货主",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/order/map",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
 		}
-	    ,{
-            "path" : "pages/release/release",
-            "style" :                                                                                    
-            {
-               "navigationStyle": "custom"
-            }
-            
-        }
-    ],
+	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",
-		"navigationBarBackgroundColor": "#F8F8F8",
+		"navigationBarBackgroundColor": "white",
 		"backgroundColor": "#F8F8F8"
 	}
 }

+ 135 - 0
pages/mine/agentCargoOwner.vue

@@ -0,0 +1,135 @@
+<template>
+	<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
+		<view class="good-list">
+			<view class="good-li" v-for="(good,index) in goods" :key="index">
+				<view class="row flex flex-space-between">
+					<view class="left flex">
+						<view class="name">{{good.name}}</view>
+						<view class="name">{{good.phone}}</view>
+					</view>
+					<view class="right">{{good.status}}</view>
+				</view>
+				<view class="row flex flex-space-between">
+					<view class="left flex">
+						<view class="name">{{good.company}}</view>
+					</view>
+					<view class="right">授权书</view>
+				</view>
+				<view class="row flex flex-end">
+					<view class="btn" @click="configAuthorize(good,1)">授权</view>
+					<view class="btn" @click="configAuthorize(good,2)">驳回</view>
+					<view class="btn" @click="del(good)">删除</view>
+					<view class="btn" @click="configAuthorize(good,3)">撤销授权</view>
+				</view>
+			</view>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+	</mescroll-body>
+</template>
+
+<script>
+	var that;
+	import {
+		mapState
+	} from 'vuex';
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import {
+		apiGoods
+	} from "@/api/mock.js"
+
+	export default {
+		mixins: [MescrollMixin], // 使用mixin
+		data() {
+			return {
+				goods: [] // 数据列表
+			}
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		onLoad() {
+			that = this
+		},
+		methods: {
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			configAuthorize(val, type) {
+				this.$request.baseRequest('post', '/agentCargoOwnerInfo/api/editAgentCargoOwner', {
+						id: val.id,
+						grantFlag: type,
+					}).then(res => {
+						if (res.code == 200) {
+							that.$refs.uToast.show({
+								type: 'success',
+								message: "操作成功!",
+								complete() {
+									that.mescroll.resetUpScroll()
+									// uni.switchTab({
+									// 	url: "/pages/order/index"
+									// })
+								}
+							})
+						}
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+						this.mescroll.endErr();
+					});
+			},
+			del(val) {
+				this.$request.baseRequest('post', '/agentCargoOwnerInfo/api/deleteAgentCargoOwner', {
+						id: val.id,
+					}).then(res => {
+						that.$refs.uToast.show({
+							type: 'success',
+							message: "刪除成功!",
+							complete() {
+								that.mescroll.resetUpScroll()
+							}
+						})
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+						this.mescroll.endErr();
+					});
+			},
+			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+			upCallback(page) {
+				this.$request.baseRequest('get', '/agentCargoOwnerInfo/selectAgentCargoOwner', {
+						commonId: this.userInfo.id,
+						pageSize: page.size,
+						currentPage: page.num,
+					}).then(res => {
+						debugger
+						this.mescroll.endBySize(res.data.records.length, res.data.total);
+						if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
+						this.goods = this.goods.concat(res.data.records); //追加新数据
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+						this.mescroll.endErr();
+					});
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 259 - 0
pages/mine/camera/video/video.nvue

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

+ 177 - 109
pages/mine/cargoowner/cargoowner.vue

@@ -1,42 +1,84 @@
 <template>
 	<view class='content'>
-		<view @click='goDetailPage("/pages/mine/cargoowner/editpersonalinformation")' :class="[statustext == '审核中'?'identity2':'identity']" class=' flex items-center'>
-			<view style='width:100%;' class='flex items-center'>
-				<u--image style='margin-right:5px;' class='image' :showLoading="true" :src="status?'../../../static/mine/huozhurenzheng/shenfen2.png':'../../../static/mine/huozhurenzheng/shenfen.png'" width="32px"
-				height="32px"></u--image>
+<!-- 		<view @click='goDetailPage("/pages/mine/cargoowner/editpersonalinformation")'
+			:class="[statustext == '审核中'?'identity2':'identity']" class=' flex items-center'>
+			<view style='width:100%;' class='flex items-center content1'>
+				<u--image style='margin-right:5px;' class='image' :showLoading="true"
+					:src="status?'../../../static/mine/huozhurenzheng/shenfen2.png':'../../../static/mine/huozhurenzheng/shenfen.png'"
+					width="32px" height="32px"></u--image>
 				<view style='width:100%;'>
 					<view v-if='!datastatus' style='font-size:21px;'>身份信息</view>
 					<view v-else style='font-size:21px;'>{{personage.name}}</view>
-					<view v-if='!datastatus' class='flex flex-space-between' style='width:100%;color:#999999;font-size:14px;'>您还未认证身份信息<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
-					<view v-else class='flex flex-space-between' style='width:100%;color:#999999;font-size:14px;'>{{phone}}<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
+					<view v-if='!datastatus' class='flex flex-space-between'
+						style='width:100%;color:#999999;font-size:14px;'>您还未认证身份信息<u-icon name="arrow-right"
+							color="#7E7E7E" size="10"></u-icon>
+					</view>
+					<view v-else class='flex flex-space-between' style='width:100%;color:#999999;font-size:14px;'>
+						{{phone}}
+						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+					</view>
 				</view>
 			</view>
-		</view>
+		</view> -->
+		 <!-- @click='goDetailPage("/pages/mine/cargoowner/editpersonalinformation")' -->
+				<view class=' flex items-center identity'>
+					<view style='width:100%;' class='flex items-center content1'>
+						<u--image style='margin-right:5px;' class='image' :showLoading="true"
+							:src="personage.authenticationStatus=='已认证'?'../../../static/mine/huozhurenzheng/shenfen2.png':'../../../static/mine/huozhurenzheng/shenfen.png'"
+							width="32px" height="32px"></u--image>
+						<view style='width:100%;'>
+							<view v-if='!personage' style='font-size:21px;'>身份信息</view>
+							<view v-else style='font-size:21px;'>{{personage.name}}</view>
+							<view v-if="personage.authenticationStatus!='已认证'" class='flex flex-space-between'
+								style='width:100%;color:#999999;font-size:14px;'>您的身份信息{{personage.authenticationStatus}}状态<u-icon name="arrow-right"
+									color="#7E7E7E" size="10"></u-icon>
+							</view>
+							<view v-else class='flex flex-space-between' style='width:100%;color:#999999;font-size:14px;'>
+								{{phone}}
+								<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+							</view>
+						</view>
+					</view>
+				</view>
 		<view>
-			<view>所属企业 <text style='color:#999;'>({{enterprise.length}})</text></view>
+			<view class="content2-title">所属企业 <text style='color:#999;'>({{enterprise.length}})</text></view>
 			<view v-if='enterprise.length>0'>
 				<view v-for='item in enterprise' class='wrap'>
 					<view class='flex flex-space-between'>
 						<view>{{item.company}}</view>
-						<view v-if='item.status=="已通过"' class='status passed'>{{item.status}}</view>
-						<view v-if='item.status=="审核中"' class='status aduit'>{{item.status}}</view>
-						<view v-if='item.status=="已驳回"' class='status reject'>{{item.status}}</view>
+						<view v-if='item.status=="企业已驳回"' class='status wtg-color'>{{item.status}}</view>
+						<view v-if='item.status=="企业审核中"' class='status number-color'>{{item.status}}</view>
+						<view v-if='item.status=="平台审核中"' class='status number-color'>{{item.status}}</view>
+						<view v-if='item.status=="平台已驳回"' class='status wtg-color'>{{item.status}}</view>
+						<view v-if='item.status=="已认证"' class='status ytg-color'>{{item.status}}</view>
+						<view v-if='item.status=="授权已过期"' class='status shz-color'>{{item.status}}</view>
+						<view v-if='item.status=="企业暂不可用"' class='status wtg-color'>{{item.status}}</view>
+						<view v-if='item.status=="企业不存在"' class='status shz-color'>{{item.status}}</view>
+						<view v-if='item.status=="授权已撤销"' class='status shz-color'>{{item.status}}</view>
+					</view>
+					<view class="row2">
+						{{item.advanceFreightService==1?'可垫付运费':'不可垫付运费'}}
 					</view>
-					
-					
-					<view style='position: absolute;bottom:10px;width:95%;text-align:right;'>
-						<image v-if='item.status!="审核中"' @click='edit(item)' style='width:17px;height:17px;margin:0 10px;' src="@/static/mine/company/edit.png"></image>
-						<image @click='del(item)' style='width:17px;height:17px;margin:0 10px;' src="@/static/mine/company/del.png"></image>
+					<view class="row3">
+						<view class="right">
+							<image v-if='item.status!="平台审核中"&&item.status!="企业审核中"&&item.status!="企业暂不可用"&&item.status!="企业不存在"&&item.status!="授权已撤销"' @click='edit(item)'
+								style='width:17px;height:17px;margin:0 10px;' src="@/static/mine/company/edit.png">
+							</image>
+							<image @click='del(item)' style='width:17px;height:17px;margin:0 10px;'
+								src="@/static/mine/company/del.png"></image>
+						</view>
 					</view>
 				</view>
-				
+
 			</view>
 			<view v-else style='text-align:center;'>
-				<image class='image weibangding' :showLoading="true" src="../../../static/mine/huozhurenzheng/weibangding.png"></image>
+				<image class='image weibangding' :showLoading="true"
+					src="../../../static/mine/huozhurenzheng/weibangding.png"></image>
 				<view style='font-size:12px;color:#999;'>您还未认证企业信息</view>
 			</view>
 			<view class='footer'>
-				<view @click='goDetailPage("/pages/mine/cargoowner/addEnerprise",1)' class='newlyIncreased'>新增</view>
+				<view @click='goDetailPage("/pages/mine/cargoowner/addEnerprise",1)' class='newlyIncreased' v-if='enterprise.authenticationStatus'>新增</view>
+				<view @click='goDetailPage("/pages/mine/cargoowner/editpersonalinformation")' class='newlyIncreased' v-if="enterprise.authenticationStatus=='未认证'">去认证</view>
 			</view>
 		</view>
 	</view>
@@ -49,12 +91,12 @@
 	export default {
 		data() {
 			return {
-				personage:{},
-				phone:'',
-				status:false,
-				datastatus:false,
-				statustext:'未认证',
-				enterprise:[]
+				personage: {},
+				phone: '',
+				status: false,
+				datastatus: false,
+				statustext: '未认证',
+				enterprise: []
 			}
 		},
 		onLoad() {
@@ -68,50 +110,57 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
-			goDetailPage(src,status) {
-				if(status){
+			edit(){
+				
+			},
+			del(){},
+			goDetailPage(src, status) {
+				if (status) {
 					uni.setStorageSync('cargoOwnerId', this.personage.id)
 				}
 				uni.$u.route(src);
 			},
-			getList(){
+			getList() {
 				uni.showLoading({
 					title: '加载中',
-					mask:true
+					mask: true
 				})
-				this.$request.baseRequest('get', '/cargoOwnerInfo/selectCargoOwner',{commonId:this.userInfo.id} ).then(res => {
-					uni.hideLoading()
-					if(res.data){
-						this.datastatus=true
-						this.personage=res.data
-						if(res.data.cargoOwnerCompInfoList){
-							this.enterprise=res.data.cargoOwnerCompInfoList
-						}
-						if(this.personage){
-							this.statustext=this.personage.authenticationStatus
-							if(this.personage.authenticationStatus=='审核中'||this.personage.authenticationStatus=='已驳回'){
-								this.status=false
-							}else{
-								this.status=true
+				this.$request.baseRequest('get', '/cargoOwnerInfo/selectCargoOwner', {
+						commonId: this.userInfo.id
+					}).then(res => {
+						uni.hideLoading()
+						if (res.data) {
+							this.datastatus = true
+							this.personage = res.data
+							if (res.data.cargoOwnerCompInfoList) {
+								this.enterprise = res.data.cargoOwnerCompInfoList
 							}
-							this.phone=this.personage.phone.replace(this.personage.phone.substring(3,7), "****")
+							if (this.personage) {
+								// this.statustext = this.personage.authenticationStatus
+								// if (this.personage.authenticationStatus == '审核中' || this.personage
+								// 	.authenticationStatus == '已驳回') {
+								// 	this.status = false
+								// } else {
+								// 	this.status = true
+								// }
+								this.phone = this.personage.phone.replace(this.personage.phone.substring(3, 7), "****")
+							}
+
+						} else {
+							this.datastatus = false
 						}
-						
-					}else{
-						this.datastatus=false
-					}
-				})
-				.catch(res => {
-					uni.hideLoading()
-					uni.showToast({
-						title: res.message,
-						icon: 'none',
-						duration: 2000
 					})
-				});
+					.catch(res => {
+						uni.hideLoading()
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
 				uni.showLoading({
 					title: '加载中',
-					mask:true
+					mask: true
 				})
 				// this.$request.baseRequest('get', '/cargoOwnerCompInfo/api/addCargoOwnerComp',{commonId:this.userInfo.id} ).then(res => {
 				// 	uni.hideLoading()
@@ -133,72 +182,91 @@
 </script>
 
 <style lang="scss" scoped>
-	.content{
-		height:90vh;
+	.content {
+		height: 90vh;
 	}
-	.wrap{
-		position:relative;
+
+	.identity {
+		background: linear-gradient(150deg, #FFFFFF 0%, #F8FCFF 100%);
+		box-shadow: 9rpx 10rpx 17rpx 0px rgba(53, 105, 255, 0.06), inset 2rpx 4rpx 0px 0px rgba(255, 255, 255, 0.5);
+		padding: 60rpx;
+		display: flex;
+		align-items: center;
+		margin: 20rpx;
+		border-radius: 20rpx;
 	}
-	.identity{
-		background: url('~@/static/mine/huozhurenzheng/bg.png') no-repeat;
-		background-size:100%;
-		height:120px;
-		padding:0 30px;
+
+	.content1 {
+		display: flex;
+		align-items: center;
 	}
-	.identity2{
-		background: url('~@/static/mine/huozhurenzheng/bg2.png') no-repeat;
-		background-size:100%;
-		height:120px;
-		padding:0 30px;
+
+	.content2-title {
+		margin: 20rpx;
 	}
-	.weibangding{
-		width:141px;
-		height:141px;
+
+	.weibangding {
+		width: 141px;
+		height: 141px;
 	}
-	.footer{
-		position:fixed;
-		background:#fff;
-		width:100%;
-		bottom:0;
-		left:0;
-		padding:15px 15px 30px;
+
+	.footer {
+		position: fixed;
+		background: #fff;
+		width: 100%;
+		bottom: 0;
+		left: 0;
+		padding: 15px 15px 30px;
 		box-sizing: border-box;
 	}
-	.newlyIncreased{
-		width:100%;
-		margin:0 auto;
-		text-align:center;
-		height:46px;
+
+	.newlyIncreased {
+		width: 100%;
+		margin: 0 auto;
+		text-align: center;
+		height: 46px;
 		line-height: 46px;
-		color:#fff;
-		background:url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
-		background-size:100%;
+		color: #fff;
+		background: url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
+		background-size: 100%;
 	}
-	.wrap{
-		width:100%;
-		height:228rpx;
-		background:#fff;
-		border-radius:10rpx;
-		padding:24rpx;
+
+	.wrap {
+		background: #fff;
+		border-radius: 10rpx;
+		padding: 24rpx;
 		box-sizing: border-box;
-		position:relative;
+		margin: 20rpx;
+		.row2{
+			margin: 20rpx 0;
+			color: #AFB3BF;
+		}
+		.row3 {
+			display: flex;
+			justify-content: flex-end;
+			margin-top: 20rpx;
+		}
 	}
-	.status{
-		font-size:26rpx;
-		padding:5rpx 18rpx;
-		color:#fff;
-		border-radius:20rpx;
+
+	.status {
+		font-size: 26rpx;
+		padding: 5rpx 18rpx;
+		border-radius: 20rpx;
 	}
-	.status.passed{
-		background:#25E491;
+
+	.status.passed {
+		background: #25E491;
 	}
-	.status.aduit{
-		background:#FE8031;
+
+	.status.aduit {
+		background: #FE8031;
 	}
-	.status.reject{
-		background:#FC5A51;
+
+	.status.reject {
+		background: #FC5A51;
 	}
-	.content{
-		margin-bottom:200rpx;
+
+	.content {
+		margin-bottom: 200rpx;
 	}
 </style>

+ 301 - 166
pages/mine/company/addcompany.vue

@@ -1,42 +1,45 @@
 <template>
-	<view>
+	<view class="content">
 		<u-navbar leftText="返回" title="企业认证" :safeAreaInsetTop="false">
 			<view class="u-nav-slot" slot="left">
-		        <u-icon @click='navback' name="arrow-left" size="19"></u-icon>
-		    </view>
+				<u-icon @click='navback' name="arrow-left" size="19"></u-icon>
+			</view>
 			<view class="u-nav-slot" slot="right">
-				<view @click="goDetailPage('/pages/mine/company/addcompanytwo')" class='next'>下一步</view>
+				<view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='next'>下一步</view>
 			</view>
 		</u-navbar>
 		<view style='margin:50px 0 0 19px;font-size:12px;color:#EF4034;'>注:企业认证仅限该企业法定代表人本人完成。</view>
 		<view class='wrap'>
-			<view style='padding:5px 0 10px;border-bottom:1px solid #eee;' class="flex items-center width100">
-				<view style='width:100px;font-size:14px;'>企业名称</view>
-				<view class="flex">
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">企业名称</view>
+				<view class="flex right">
 					<u--input placeholder="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName">
 					</u--input>
 				</view>
 			</view>
-			<view style='padding:10px 0 10px;border-bottom:1px solid #eee;' class="flex items-center width100">
-				<view style='width:100px;font-size:14px;'>法定代表人姓名</view>
-				<view class="flex">
-					<u--input placeholder="输入法定代表人姓名" inputAlign='left' border="none" v-model="dataDetails.legalPersonName">
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">法定代表人姓名</view>
+				<view class="flex right">
+					<u--input placeholder="输入法定代表人姓名" inputAlign='left' border="none"
+						v-model="dataDetails.legalPersonName">
 					</u--input>
 				</view>
 			</view>
-			<view style='padding:10px 0 10px;border-bottom:1px solid #eee;' class="flex items-center width100">
-				<view style='width:100px;font-size:14px;'>联系电话</view>
-				<view class="flex">
-					<u--input disabledColor='#fff' disabled placeholder="输入联系电话" inputAlign='left' border="none" v-model="dataDetails.phone">
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">联系电话</view>
+				<view class="flex right">
+					<u--input disabledColor='#fff' disabled placeholder="输入联系电话" inputAlign='left' border="none"
+						v-model="dataDetails.phone">
 					</u--input>
 				</view>
 			</view>
-			<view style='padding:10px 0 5px;' class="flex items-center width100">
-				<view style='width:100px;font-size:14px;'>注册实缴金额</view>
-				<view class="flex">
-					<u--input placeholder="输入企业注册实缴金额" inputAlign='left' border="none" v-model="dataDetails.registeredPaidAmount">
+			<view class="flex mt20 align-center">
+				<view class="left">注册实缴金额</view>
+				<view class="flex right align-center">
+					<u--input placeholder="输入企业注册实缴金额" inputAlign='left' border="none"
+						v-model="dataDetails.registeredPaidAmount">
 					</u--input>
-					万元
+					<view>万元</view>
 				</view>
 			</view>
 		</view>
@@ -48,52 +51,98 @@
 					<view class="text">上传营业执照</view>
 				</view>
 				<view v-if='dataDetails.businessLicenseAddressUrl' @click.stop="uploadImg(1)"
-				class="preview-card-img picture ">
-				<view @click.stop="delCard(1)">
-					<image class='del-card' src="@/static/images/common/quxiao@2x.png">
-					</image>
+					class="preview-card-img picture ">
+					<view @click.stop="delCard(1)">
+						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+						</image>
+					</view>
+					<image class="" :src="dataDetails.businessLicenseAddressUrl" mode="aspectFit"></image>
 				</view>
-				<image class="" :src="dataDetails.businessLicenseAddressUrl" mode="aspectFit"></image>
-			</view>
 			</view>
 			<view class="flex row">
 				<view class="left-text">营业期限截止日期</view>
-				<view style='font-size:16px;width:50%;' class='flex flex-space-between'  @click="selectValidityPeriod">
-					<view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">{{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}</view>
-					<view><u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
+				<view style='font-size:16px;width:50%;' class='flex flex-space-between'
+					@click="selectValidityPeriod(0)">
+					<view :style="{'color':dataDetails.businessTermDate ? '#000':'#C6CBD5'}">
+						{{dataDetails.businessTermDate?dataDetails.businessTermDate:'选择期限截止日期'}}
+					</view>
+					<view>
+						<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
+					</view>
 				</view>
 			</view>
 			<view class="flex row noborder">
 				<view class="left-text">统一社会信用代码</view>
-				<u--input placeholder="请输入统一社会信用代码" inputAlign='left' border="none" v-model="dataDetails.unifiedSocialCreditCode">
+				<u--input placeholder="请输入统一社会信用代码" inputAlign='left' border="none"
+					v-model="dataDetails.unifiedSocialCreditCode">
 				</u--input>
 			</view>
 			<view class="flex row noborder">
 				<view class="left-text">企业用地是否自有</view>
-				<view style='margin:0 10px;' class='flex items-center'>
-					<u--image style='margin-right:5px;' @click='checkedchange'
-					:src="checked?'../../../static/mine/duihao@2x.png':'../../../static/mine/wxz.png'"
-					width="15px" height="15px"></u--image>
-					自有
+				<u-radio-group placement="row" class="select-type" v-model="dataDetails.landOwnership">
+					<u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
+						:label="item.name" :name="item.name" @change="radioChange($event,item)" labelSize='12px'
+						:iconSize='4'>
+					</u-radio>
+				</u-radio-group>
+			</view>
+		</view>
+		<view class='content2'>
+			<view class="title">{{dataDetails.landOwnership=='自有'?'上传房产证':'上传租赁合同(扫描件或图片)'}}</view>
+			<view style='position:relative;'>
+				<view v-if='!dataDetails.propertyAddressUrl' @click="uploadImg(2)" class="picture">
+					<image class="xj-image" src="@/static/mine/company/tianjiazhaopian@3x.png"></image>
 				</view>
-				<view style='margin:0 10px;' class='flex items-center'>
-					<u--image style='margin-right:5px;' @click='checkedchange1'
-					:src="checked1?'../../../static/mine/duihao@2x.png':'../../../static/mine/wxz.png'"
-					width="15px" height="15px"></u--image>
-					租赁
+				<view v-if='dataDetails.propertyAddressUrl' @click.stop="uploadImg(2)" class="preview-card-img picture">
+					<view @click.stop="delCard(2)">
+						<image class='del-card' src="@/static/images/common/quxiao@2x.png">
+						</image>
+					</view>
+					<image class="uploadimage" :src="dataDetails.propertyAddressUrl" mode="aspectFit"></image>
 				</view>
 			</view>
-			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
-				@confirm="confirmValidityPeriod" @change="changeHandler"  @cancel="clickcancel">
-			</u-picker>
-			
 		</view>
-		<view class='footer'>
-			<view @click="goDetailPage('/pages/mine/company/addcompanytwo')" class='newlyIncreased'>下一步</view>
+		<view class='content3' v-if="dataDetails.landOwnership=='租赁'">
+			<view class="flex row flex-space-between">
+				<view class="left-text">场地租赁截止日期</view>
+				<view class='flex flex-space-between' @click="selectValidityPeriod(1)">
+					<view :style="{'color':dataDetails.siteLeaseDate ? '#000':'#C6CBD5'}">
+						{{dataDetails.siteLeaseDate?dataDetails.siteLeaseDate:'选择日期'}}
+					</view>
+					<view>
+						<u-icon name="arrow-right" color="#7E7E7E" size="12"></u-icon>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="content4">
+			<view class="flex row noborder mt20 flex-space-between">
+				<view class="left-text">申请开通平台垫付运费业务</view>
+				<view>
+					<u-switch @change="change" v-model="value" inactiveColor='#ABB0BB' size="20"></u-switch>
+				</view>
+			</view>
+			<view class="flex service align-center">
+				<u--image @click='consent'
+					:src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
+					width="12px" height="12px"></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
+					url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/screctAgreement.html"
+					class="path" hover-class="navigator-hover">《隐私政策》</navigator>
+			</view>
 		</view>
 		
-		<u-action-sheet  :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
-			@select="imgTypeSelect" :closeOnClickOverlay="false" :closeOnClickAction="true"  @close="isShowimgType=false">
+		<view class='footer'>
+			<view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view>
+		</view>
+		<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
+			@change="changeHandler" @cancel="isShowcardValidity=false">
+		</u-picker>
+		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
+			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
 		</u-action-sheet>
 	</view>
 </template>
@@ -105,61 +154,97 @@
 	import upload from '@/components/upload.vue';
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	export default {
-		components:{
-		},
+		components: {},
 		data() {
 			return {
-				isShowcardValidity:false,
-				uploadType:'',
-				index:'',
-				isShowimgType:false,
-				validityPeriod:[],
-				checked:false,
-				checked1:false,
-				dataDetails:{
-					phone:'',
-					businessLicenseAddressUrl:'',
-					propertyAddressUrl:'',
-					advanceFreightService:1
+				consentStatus: false,
+				ValidityPeriodType: '',
+				value: true,
+				radioCustomStyle: {
+					margin: '0 0 0 20rpx'
+				},
+				radiolist1: [{
+						name: '自有',
+						disabled: false
+					},
+					{
+						name: '租赁',
+						disabled: false
+					},
+
+				],
+				isShowcardValidity: false,
+				uploadType: '',
+				index: '',
+				isShowimgType: false,
+				validityPeriod: [],
+				checked: false,
+				checked1: false,
+				dataDetails: {
+					phone: '',
+					businessLicenseAddressUrl: '',
+					propertyAddressUrl: '',
+					advanceFreightService: 1,
+					landOwnership: '自有'
+
 				}
 			}
 		},
-		onLoad(){
-			this.validityPeriod = this.$helper.makeValidityPeriod(0,30)
+		onLoad() {
+			this.validityPeriod = this.$helper.makeValidityPeriod(0, '长期')
 			console.log(this)
-			this.dataDetails.commonId=this.userInfo.id
-			this.dataDetails.phone=this.userInfo.phone
+			this.dataDetails.commonId = this.userInfo.id
+			this.dataDetails.phone = this.userInfo.phone
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			consent() {
+				this.consentStatus = !this.consentStatus
+			},
+			change(e) {
+				if (this.value) {
+					this.$set(this.dataDetails, 'advanceFreightService', 1)
+				} else {
+					this.$set(this.dataDetails, 'advanceFreightService', 0)
+				}
+			},
+			radioChange(n) {
+				console.log('radioChange', n);
+				this.dataDetails.landOwnership = n
+				console.log('this.dataDetails.landOwnership', this.dataDetails.landOwnership);
+			},
+			delCard() {
+				this.dataDetails.businessLicenseAddressUrl = ''
+				this.$forceUpdate()
+			},
 			navBack() {
 				uni.navigateBack();
 			},
-			checkedchange(){
-				this.checked=!this.checked
-				if(this.checked){
-					this.dataDetails.landOwnership=0
-					this.checked1=false
-				}else{
-					
+			checkedchange() {
+				this.checked = !this.checked
+				if (this.checked) {
+					this.dataDetails.landOwnership = 0
+					this.checked1 = false
+				} else {
+
 				}
 			},
-			checkedchange1(){
-				this.checked1=!this.checked1
-				if(this.checked1){
-					this.dataDetails.landOwnership=1
-					this.checked=false
-				}else{
-					
+			checkedchange1() {
+				this.checked1 = !this.checked1
+				if (this.checked1) {
+					this.dataDetails.landOwnership = 1
+					this.checked = false
+				} else {
+
 				}
 			},
-			clickcancel(){
-				this.isShowcardValidity=false
+			clickcancel() {
+				this.isShowcardValidity = false
 			},
 			imgTypeSelect(val) {
-				var _this=this
+				var _this = this
 				if (val.name == '相册') {
 					uni.chooseImage({
 						count: 1,
@@ -170,8 +255,21 @@
 								result => {
 									// 上传成功回调函数
 									console.log('图片地址', result)
-									_this.dataDetails.businessLicenseAddressUrl=result
-									console.log(_this.dataDetails.businessLicenseAddressUrl)
+
+									switch (_this.uploadType) {
+										// 身份正面
+										case 1:
+											_this.dataDetails.businessLicenseAddressUrl = result
+											console.log(_this.dataDetails.businessLicenseAddressUrl)
+											break
+											// 身份反面
+										case 2:
+											_this.dataDetails.propertyAddressUrl = result
+											console.log(_this.dataDetails.propertyAddressUrl)
+											break
+										case 3:
+											break;
+									}
 								}
 							)
 						}
@@ -186,33 +284,49 @@
 								result => {
 									// 上传成功回调函数
 									console.log('图片地址', result)
-									_this.dataDetails.businessLicenseAddressUrl=result
+									_this.dataDetails.businessLicenseAddressUrl = result
 								}
 							)
 						}
 					});
 				}
 			},
-			uploadImg(type, index) {
+			uploadImg(type) {
 				this.uploadType = type
 				this.isShowimgType = true
-				this.index = index
+				// this.index = index
 			},
 			goDetailPage(src) {
-				uni.setStorage({key: 'companydata',data: JSON.stringify(this.dataDetails)});
+				uni.setStorage({
+					key: 'companydata',
+					data: JSON.stringify(this.dataDetails)
+				});
 				uni.$u.route(src);
 			},
-			selectValidityPeriod() {
+			selectValidityPeriod(type) {
+				this.ValidityPeriodType = type
 				this.isShowcardValidity = true
 			},
 			confirmValidityPeriod(e) {
-				console.log('confirm', e)
-				if (e.value[0] == '长期') {
-					this.dataDetails.businessTermDate = e.value[0]
-				} else {
-					this.dataDetails.businessTermDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+				switch (this.ValidityPeriodType) {
+					case 0:
+						if (e.value[0] == '长期') {
+							this.dataDetails.businessTermDate = e.value[0]
+						} else {
+							this.dataDetails.businessTermDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						}
+						break
+					case 1:
+						if (e.value[0] == '长期') {
+							this.dataDetails.siteLeaseDate = e.value[0]
+						} else {
+							this.dataDetails.siteLeaseDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						}
+						break
 				}
-			
+				console.log('confirm', e)
+
+
 				this.isShowcardValidity = false
 			},
 			changeHandler(e) {
@@ -223,13 +337,13 @@
 					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())
@@ -240,25 +354,43 @@
 	}
 </script>
 
-<style  lang="scss" scoped>
-	page{
-		background:#F5F6FA;
+<style lang="scss" scoped>
+	.content {
+		padding-bottom: 200rpx;
 	}
-	.next{
-		color:#2772FB;
-		font-size:13px;
+
+	page {
+		background: #F5F6FA;
 	}
-	.wrap{
-		background:#fff;
-		padding:20rpx 30rpx;
-		border-radius:5px;
-		margin:20rpx;
+
+	.next {
+		color: #2772FB;
+		font-size: 13px;
 	}
-	.preview-card-img {
-		/deep/uni-image>div, uni-image>img {
-		    transform: scale(1.5) rotate(-90deg);
+
+	.wrap {
+		background: #fff;
+		padding: 20rpx 30rpx;
+		border-radius: 5px;
+		margin: 20rpx;
+
+		.left {
+			width: 240rpx;
+			font-size: 28rpx;
+		}
+
+		.right {
+			font-size: 28rpx;
+			width: calc(100% - 240rpx);
 		}
 	}
+
+	.preview-card-img {
+		// /deep/uni-image>div, uni-image>img {
+		//     transform: scale(1.5) rotate(-90deg);
+		// }
+	}
+
 	.picture {
 		margin-top: 20rpx;
 		background: #F5F6FA;
@@ -271,27 +403,29 @@
 		align-items: center;
 		color: #6A7282;
 	}
+
 	.content1 {
-		background:#fff;
-		padding:40rpx 20rpx 20rpx;
-		margin:20rpx 20rpx 200rpx;
+		background: #fff;
+		padding: 20rpx;
+		margin: 20rpx;
 		border-radius: 10rpx;
+
 		.row {
 			border-bottom: 1px solid #EEEEEE;
 			padding-bottom: 28rpx;
 			margin-top: 26rpx;
-	
+
 		}
-	
+
 		.left-text {
 			// background: red;
 			width: 320rpx;
 			color: #333333;
 			display: flex;
 			align-items: center;
-			font-size:14px;
+			font-size: 14px;
 		}
-	
+
 		.picture {
 			position: relative;
 			width: 100%;
@@ -300,56 +434,45 @@
 			justify-content: center;
 			flex-direction: column;
 			align-items: center;
-	
+
 			.text {
 				margin-top: 20rpx;
 			}
 		}
+
 		.picture7 {
 			background: url(../../../static/mine/cy.png);
 			background-size: 100% 100%;
 		}
-	
-	
+
+
 		.xj-image {
 			width: 100rpx;
 			height: 100rpx;
 		}
-	
+
 		.title {
 			color: #999999;
 			margin: 20rpx 0;
 		}
 	}
-	.u-input{
-		font-size:16px;
+
+	.content2,
+	.content3,.content4 {
+		background: #fff;
+		padding: 20rpx;
+		margin: 20rpx;
+		border-radius: 10rpx;
+	}
+
+	.u-input {
+		font-size: 16px;
 	}
+
 	.content4 {
-		position:fixed;
-		bottom:0;
-		background: white;
-		width:100%;
-		text-align:center;
-		left:0;
-		box-sizing: border-box;;
-		padding:10px 15px;
-		.line{
-			position:absolute;
-			left:0;
-			margin-top:-9px;
-			border-top:1px solid #eee;
-			width:100%;
-		}
-		.next-btn {
-			background: #F1F3F6;
-			width: 85%;
-			padding: 20rpx 20rpx;
-			text-align: center;
-			color: #C5CAD4;
-			border-radius: 50rpx;margin:0 auto;
-			margin-top:10px;
-		}
+
 	}
+
 	.del-card {
 		position: absolute;
 		top: -10rpx;
@@ -358,26 +481,38 @@
 		height: 80rpx;
 		z-index: 9;
 	}
-	.footer{
-		position:fixed;
-		background:#fff;
-		width:100%;
-		bottom:0;
-		left:0;
-		padding:15px 15px 30px;
+
+	.footer {
+		position: fixed;
+		background: #fff;
+		width: 100%;
+		bottom: 0;
+		left: 0;
+		padding: 15px 15px 30px;
 		box-sizing: border-box;
 	}
-	.newlyIncreased{
-		width:100%;
-		margin:0 auto;
-		text-align:center;
-		height:46px;
+
+	.newlyIncreased {
+		width: 100%;
+		margin: 0 auto;
+		text-align: center;
+		height: 46px;
 		line-height: 46px;
-		color:#fff;
-		background:url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
-		background-size:100%;
+		color: #fff;
+		background: url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
+		background-size: 100%;
 	}
-	.u-checkbox-label--left{
-		margin:0 10px;
+
+	.u-checkbox-label--left {
+		margin: 0 10px;
+	}
+	.service {
+		font-size: 24rpx;
+		margin: 20rpx;
+		justify-content: center;
+	
+		/deep/.u-image {
+			margin: 0 20rpx;
+		}
 	}
 </style>

+ 32 - 12
pages/mine/company/addcompanythree.vue

@@ -1,8 +1,9 @@
 <template>
 	<view>
-		<view style='text-align:center;height:90vh;'>
+		<web-view id="mapContainer" :src="srcHandler()"></web-view>
+	<!-- 	<view style='text-align:center;height:90vh;'>
 			<view style='transform: translateY(50%);'>
-				<image class="xj-image" src="@/static/mine/company/shipinrenzheng.png"></image>
+				<image class="xj-image" src="@/static/mine/company/shipinrenzheng.png" @click="openVideo"></image>
 				<view class='hinttext'>请打开摄像头并阅读提示文字</view>
 			</view>
 		</view>
@@ -17,7 +18,8 @@
 			<view class="next-btn" :class="checked?'active':'' " @click="goDetailPage('/pages/mine/company/companyvideo')">
 				开始
 			</view>
-		</view>
+		</view> -->
+		
 	</view>
 </template>
 
@@ -29,15 +31,33 @@
 			}
 		},
 		methods: {
-			consent(){
-				this.checked=!this.checked
-			},
-			goDetailPage(src) 
-			{
-				if(this.checked){
-					uni.$u.route(src);
-				}
-			},
+		srcHandler() {
+			// 
+			return `/hybrid/html/video.html`
+		},
+			// openVideo(){
+			// 		uni.$u.route('/pages/mine/camera/video/video?dotype=idcardface');
+			// 	// console.log(uni)
+			// 	// uni.chooseVideo({
+			// 	//   count: 1,
+			// 	//   mediaType: ['video'],
+			// 	//   sourceType: ['camera'],
+			// 	//   maxDuration: 30,
+			// 	//   camera: 'back',
+			// 	//   success(res) {
+			// 	//     console.log(res.tempFilest)
+			// 	//   }
+			// 	// })
+			// },
+			// consent(){
+			// 	this.checked=!this.checked
+			// },
+			// goDetailPage(src) 
+			// {
+			// 	if(this.checked){
+			// 		uni.$u.route(src);
+			// 	}
+			// },
 		}
 	}
 </script>

+ 30 - 18
pages/mine/company/editcompany.vue

@@ -10,33 +10,33 @@
 		</u-navbar>
 		<view style='margin:50px 0 0 19px;font-size:12px;color:#EF4034;'>注:企业认证仅限该企业法定代表人本人完成。</view>
 		<view class='wrap'>
-			<view style='padding:5px 0 10px;border-bottom:1px solid #eee;' class="flex items-center width100">
-				<view style='width:100px;font-size:14px;'>企业名称</view>
-				<view class="flex">
+			<view class="flex border-bottom mt20 align-center">
+				<view class="left">企业名称</view>
+				<view class="flex right">
 					<u--input placeholder="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName">
 					</u--input>
 				</view>
 			</view>
-			<view style='padding:10px 0 10px;border-bottom:1px solid #eee;' class="flex items-center width100">
-				<view style='width:100px;font-size:14px;'>法定代表人姓名</view>
-				<view class="flex">
+			<view  class="flex border-bottom mt20 align-center">
+				<view class="left">法定代表人姓名</view>
+				<view class="flex right">
 					<u--input placeholder="输入法定代表人姓名" inputAlign='left' border="none" v-model="dataDetails.legalPersonName">
 					</u--input>
 				</view>
 			</view>
-			<view style='padding:10px 0 10px;border-bottom:1px solid #eee;' class="flex items-center width100">
-				<view style='width:100px;font-size:14px;'>联系电话</view>
-				<view class="flex">
+			<view  class="flex border-bottom mt20 align-center">
+				<view class="left">联系电话</view>
+				<view class="flex right">
 					<u--input disabledColor='#fff' disabled placeholder="输入联系电话" inputAlign='left' border="none" v-model="dataDetails.phone">
 					</u--input>
 				</view>
 			</view>
-			<view style='padding:10px 0 5px;' class="flex items-center width100">
-				<view style='width:100px;font-size:14px;'>注册实缴金额</view>
-				<view class="flex">
+			<view  class="flex mt20 align-center">
+				<view class="left">注册实缴金额</view>
+				<view class="flex right align-center">
 					<u--input placeholder="输入企业注册实缴金额" inputAlign='left' border="none" v-model="dataDetails.registeredPaidAmount">
 					</u--input>
-					万元
+					<view>万元</view>
 				</view>
 			</view>
 		</view>
@@ -120,6 +120,10 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			delCard() {
+				this.dataDetails.businessLicenseAddressUrl = ''
+				this.$forceUpdate()
+			},
 			navBack() {
 				uni.navigateBack();
 			},
@@ -240,11 +244,20 @@
 		padding:20rpx 30rpx;
 		border-radius:5px;
 		margin:20rpx;
+		.left{
+			width: 240rpx;
+			font-size: 28rpx;
+		}
+		.right{
+			font-size: 28rpx;
+			width: calc(100% - 240rpx);
+		}
 	}
+	
 	.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);
+		// }
 	}
 	.picture {
 		margin-top: 20rpx;
@@ -271,7 +284,6 @@
 		}
 	
 		.left-text {
-			// background: red;
 			width: 320rpx;
 			color: #333333;
 			display: flex;
@@ -287,7 +299,7 @@
 			justify-content: center;
 			flex-direction: column;
 			align-items: center;
-	
+			overflow: hidden;
 			.text {
 				margin-top: 20rpx;
 			}

+ 13 - 1
pages/mine/company/editcompanythree.vue

@@ -3,7 +3,7 @@
 		<view style='text-align:center;height:90vh;'>
 			<view style='transform: translateY(50%);'>
 				<image class="xj-image" src="@/static/mine/company/shipinrenzheng.png"></image>
-				<view class='hinttext'>请打开摄像头并阅读提示文字</view>
+				<view class='hinttext' @click="openVideo">请打开摄像头并阅读提示文字</view>
 			</view>
 		</view>
 		<view class="content4">
@@ -29,6 +29,18 @@
 			}
 		},
 		methods: {
+			openVideo(){
+				uni.chooseMedia({
+				  count: 1,
+				  mediaType: ['video'],
+				  sourceType: ['camera'],
+				  maxDuration: 30,
+				  camera: 'back',
+				  success(res) {
+				    console.log(res.tempFilest)
+				  }
+				})
+			},
 			consent(){
 				this.checked=!this.checked
 			},

+ 11 - 9
pages/mine/company/index.vue

@@ -6,17 +6,15 @@
 			<view @click="goDetailPage('/pages/mine/company/addcompany')" class='add'>去添加</view>
 		</view>
 		<view v-else class='content'>
-			<view style='margin-bottom:10px;'>所属公司({{company.length}})</view>
+			<view class='content1'>所属公司({{company.length}})</view>
 			<view v-for='item in company' class='wrap'>
 				<view class='flex flex-space-between'>
 					<view>{{item.companyName}}</view>
-					<view v-if='item.status=="已通过"' class='status passed'>{{item.status}}</view>
+					<view v-if='item.status=="已认证"' class='status passed'>{{item.status}}</view>
 					<view v-if='item.status=="审核中"' class='status aduit'>{{item.status}}</view>
 					<view v-if='item.status=="已驳回"' class='status reject'>{{item.status}}</view>
 				</view>
-				
-				
-				<view style='position: absolute;bottom:10px;width:95%;text-align:right;'>
+				<view class="row2">
 					<image v-if='item.status!="审核中"' @click='edit(item)' style='width:17px;height:17px;margin:0 10px;' src="@/static/mine/company/edit.png"></image>
 					<image @click='del(item)' style='width:17px;height:17px;margin:0 10px;' src="@/static/mine/company/del.png"></image>
 				</view>
@@ -120,13 +118,17 @@
 		line-height:42px ;
 	}
 	.wrap{
-		width:100%;
-		height:228rpx;
 		background:#fff;
 		border-radius:10rpx;
 		padding:24rpx;
 		box-sizing: border-box;
-		position:relative;
+		margin-top: 20rpx;
+		.row2{
+			margin-top: 112rpx;
+			display: flex;
+			justify-content: flex-end;
+		}
+		
 	}
 	.status{
 		font-size:26rpx;
@@ -144,7 +146,7 @@
 		background:#FC5A51;
 	}
 	.content{
-		margin-bottom:200rpx;
+		padding: 20rpx;
 	}
 	.footer{
 		position:fixed;

+ 41 - 25
pages/mine/index.vue

@@ -31,7 +31,7 @@
 				</view>
 			</view>
 			<view class='flex operate flex-space-around'>
-				<view class='flex items-center'>
+				<view class='flex items-center' @click="toMyRelease">
 					<u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/wodefabu.png" width="42px"
 						height="42px"></u--image>我发布的
 				</view>
@@ -42,31 +42,32 @@
 				</view>
 			</view>
 			<view class="content1">
+				<view class="flex flex-space-between content1-item" @click="goDetailPage('/pages/mine/company/index')">
+					<view class='flex items-center'><u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/wodegongsi.png" width="20px"
+						height="20px"></u--image>我的公司</view>
+					<view class='flex'> <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
+				</view>
 				<view class="flex flex-space-between content1-item" @click="goDetailPage('/pages/mine/cargoowner/cargoowner')">
 					<view class='flex items-center'><u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/huozhu.png" width="20px"
 						height="20px"></u--image>货主认证</view>
 					<view class='flex'> <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
 				</view>
-				<view class="flex flex-space-between content1-item" @click="goDetailPage('/pages/mine/company/index')">
-					<view class='flex items-center'><u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/wodegongsi.png" width="20px"
-						height="20px"></u--image>我的公司</view>
-					<view class='flex'> <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon></view>
+				<view class="flex flex-space-between content1-item" @click="goDetailPage('/pages/mine/helpDescription')">
+					<view class='flex items-center'><u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/bangzhushuoming.png" width="20px"
+						height="20px"></u--image>帮助说明</view>
+					<view> <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> </view>
 				</view>
-				<view class="flex flex-space-between content1-item" @click="goDetailPage('/pages/mine/manageVehicles/index')">
+				<view class="flex flex-space-between content1-item" @click="goDetailPage('/pages/mine/agentCargoOwner')">
 					<view class='flex items-center'><u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/dailihuozhu.png" width="20px"
 						height="20px"></u--image>代理货主</view>
 					<view> <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> </view>
 				</view>
-				<view class="flex flex-space-between content1-item" @click="$helper.contactCustomerService">
-					<view class='flex items-center'><u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/kefu.png" width="20px"
-						height="20px"></u--image>联系客服</view>
-					<view> <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> </view>
-				</view>
-				<view class="flex flex-space-between content1-item" @click="goDetailPage('/pages/mine/helpDescription')">
-					<view class='flex items-center'><u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/bangzhushuoming.png" width="20px"
-						height="20px"></u--image>帮助说明</view>
+<view class="flex flex-space-between content1-item" @click="goDetailPage('/pages/mine/set')">
+					<view class='flex items-center'><u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/dailihuozhu.png" width="20px"
+						height="20px"></u--image>设置</view>
 					<view> <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> </view>
 				</view>
+				
 			</view>
 		</view>
 	</view>
@@ -126,6 +127,9 @@
 			// }
 		},
 		methods: {
+			toMyRelease(){
+				uni.$u.route('/pages/release/record');
+			},
 			goDetailPage(src) {
 				uni.$u.route(src);
 			},
@@ -171,19 +175,28 @@
 		margin:0 0 10px 17px;
 	}
 	.currectstatus{
-		font-size:10px;
-		color:#D6B798;background:#161111;
-		padding:1px 6px;
-		border-radius:10px;
-		margin:0 6px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 100rpx;
+		height: 40rpx;
+		background: #161111;
+		border-radius: 16px;
+		color: #D6B798;
+		font-size: 24rpx;
+		margin-left: 10rpx;
 	}
 	.currectstatus1{
-		font-size:10px;
-		color:#fff;
-		background: linear-gradient(145deg, #C1C3CC 0%, #85909E 100%);
-		padding:1px 6px;
-		border-radius:10px;
-		margin:0 6px;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 100rpx;
+		height: 40rpx;
+		background: linear-gradient(145deg, #C1C3CC 0%, #85909E 100%);;
+		border-radius: 16px;
+		color: #D6B798;
+		font-size: 24rpx;
+		margin-left: 10rpx;
 	}
 	.phone{
 		color:#8F97AB;
@@ -221,4 +234,7 @@
 		border-radius:15px;
 		background: linear-gradient(327deg, #EDBB63 0%, #FFDEA5 100%);;
 	}
+	.items-center{
+		align-items: center;
+	}
 </style>

+ 1 - 1
pages/mine/settings/editPassword.vue

@@ -170,7 +170,7 @@
 
 <style lang="scss">
 	.content {
-		background: url(~@/static/mine/bg@3x.png);
+		background: url(../../../static/images/mine/bg@2x.png);
 		background-size: 100% 100%;
 		height: 100vh;
 		padding-top: 85px;

+ 166 - 40
pages/news/index.vue

@@ -1,11 +1,39 @@
 <template>
-	 <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback">
+	<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='一键已读' @rightClick="rightClick">
+		</u-navbar>
+		<view class="top-bgc"></view>
 		<view class="content">
-			<view class="info-item" v-for="good in goods" :key="good.id">
-				<view class="flex flex-space-between">
+			<view class="info-item flex" v-for="(item,index) in news" :key="index" @click="read(item)">
+				<view class="left">
+					<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">
+							{{item.updateDate}}
+						</view>
+					</view>
+					<view class="row2 flex flex-space-between align-center">
+						<view class="text point">
+							{{item.newsContent}}
+						</view>
+						<view class="red-point" v-if="item.newsFlag==0"></view>
+					</view>
+				</view>
+				<!-- 	<view class="flex flex-space-between">
 					<view class="left">
 						<view>系统消息</view>
-						 <u-badge :isDot="true" bgColor='red' :absolute='true' :offset='badgeOffset'></u-badge>
+						<u-badge :isDot="true" bgColor='red' :absolute='true' :offset='badgeOffset'></u-badge>
 					</view>
 					<view class="">
 						今天 21:51
@@ -13,8 +41,8 @@
 				</view>
 				<view class="flex flex-space-between">
 					您的驾驶证即将到期,请尽快到“我的-身份认证”中更新,逾期将影响运费支付。
-				</view>
-				
+				</view> -->
+
 			</view>
 		</view>
 	</mescroll-body>
@@ -22,25 +50,70 @@
 
 <script>
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
-	import {apiGoods} from "@/api/mock.js"
-	
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		mixins: [MescrollMixin], // 使用mixin
 		data() {
 			return {
-				value:100,
-				goods: [] ,// 数据列表
-				badgeOffset:[0,-5]
+				src: 'https://cdn.uviewui.com/uview/album/1.jpg',
+				bgColor: '#317AFE',
+				value: 100,
+				news: [], // 数据列表
+				badgeOffset: [0, -5]
 			}
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
+		},
 		methods: {
+			rightClick() {
+				console.log(123)
+				uni.showLoading({
+					mask:true,
+					title:'加载中...'
+				})
+				this.$request.baseRequest('post', '/newsInfo/api/editAllNewsInfo', {
+						reCommonId: this.userInfo.id,
+					}).then(res => {
+						uni.hideLoading()
+						this.mescroll.resetUpScroll()
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			read(val) {
+				uni.showLoading({
+					mask:true,
+					title:'加载中...'
+				})
+				this.$request.baseRequest('post', '/newsInfo/api/editNewsInfo', {
+						id: val.id,
+					}).then(res => {
+						uni.hideLoading()
+						this.mescroll.resetUpScroll()
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			back() {
+				uni.navigateBack({
+
+				})
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
 			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
 			upCallback(page) {
 				// 此处可以继续请求其他接口
 				// if(page.num == 1){
 				// 	// 请求其他接口...
 				// }
-				
+
 				// 如果希望先请求其他接口,再触发upCallback,可参考以下写法
 				// if(!this.isInitxx){
 				// 	apiGetxx().then(res=>{
@@ -51,41 +124,94 @@
 				// 	})
 				// 	return // 此处return,先获取xx
 				// }
-				
+
 				//联网加载数据
-				apiGoods(page.num, page.size).then(res=>{
-					//联网成功的回调,隐藏下拉刷新和上拉加载的状态;
-					//mescroll会根据传的参数,自动判断列表如果无任何数据,则提示空;列表无下一页数据,则提示无更多数据;
+				this.$request.baseRequest('get', '/newsInfo/selectNewsInfo', {
+						reCommonId: this.userInfo.id,
+						pageSize: page.size,
+						currentPage: page.num,
+					}).then(res => {
+						if (page.num == 1) this.news = [];
+						this.news = this.news.concat(res.data.records); //追加新数据
+						this.mescroll.endBySize(res.data.records.length, res.data.total);
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	/deep/.u-navbar__content__right__text {
+		font-size: 26rpx;
+		color: #FFFFFF;
+	}
 
-					//方法一(推荐): 后台接口有返回列表的总页数 totalPage
-					//this.mescroll.endByPage(res.list.length, totalPage); //必传参数(当前页的数据个数, 总页数)
+	.top-bgc {
+		position: absolute;
+		width: 100%;
+		height: 519rpx;
+		// background: linear-gradient(180deg, #317AFE 0%, #F8F9FC 100%);
 
-					//方法二(推荐): 后台接口有返回列表的总数据量 totalSize
-					//this.mescroll.endBySize(res.list.length, totalSize); //必传参数(当前页的数据个数, 总数据量)
+	}
 
-					//方法三(推荐): 您有其他方式知道是否有下一页 hasNext
-					//this.mescroll.endSuccess(res.list.length, hasNext); //必传参数(当前页的数据个数, 是否有下一页true/false)
+	.content {
+		// position: relative;
+		// top: 0;
+		background: #FFFFFF;
+		margin: 20rpx;
+		width: calc(100% - 40rpx);
+		// padding: 20rpx;
+		box-sizing: border-box;
+		border-radius: 20rpx;
+	}
 
-					//方法四 (不推荐),会存在一个小问题:比如列表共有20条数据,每页加载10条,共2页.如果只根据当前页的数据个数判断,则需翻到第三页才会知道无更多数据
-					this.mescroll.endSuccess(res.list.length);
+	.info-item {
+		padding: 30rpx;
 
-					//设置列表数据
-					if(page.num == 1) this.goods = []; //如果是第一页需手动制空列表
-					this.goods=this.goods.concat(res.list); //追加新数据
-				}).catch(()=>{
-					//联网失败, 结束加载
-					this.mescroll.endErr();
-				})
-			}
+		.img {
+			width: 80rpx;
+			height: 80rpx;
 		}
-	}
-</script>
 
-<style lang="scss">
-.info-item{
-	.left{
-		position: relative;
+		.left {
+			margin-right: 20rpx;
+		}
+
+		.right {
+			width: 100%;
+			border-bottom: 1px solid #E6E6E6;
+
+			.row1 {
+				.title {
+					font-size: 28rpx;
+					color: #000000;
+				}
+
+				.time {
+					font-size: 24rpx;
+					color: #999999;
+				}
+
+			}
+
+			.row2 {
+				.text {
+					font-size: 24rpx;
+					color: #999999;
+					width: 500rpx;
+				}
+
+				.red-point {
+					width: 10rpx;
+					height: 10rpx;
+					background: #EE2F51;
+					border-radius: 6rpx;
+					margin-right: 20rpx;
+				}
+			}
+		}
 	}
-}
 </style>
-

+ 334 - 128
pages/order/index.vue

@@ -2,8 +2,8 @@
 <template>
 	<view class="content">
 		<view class="fixed1"></view>
-		<view v-if="!isSearch">
-			<view class="fixed">
+		<!-- <view v-if="!isSearch"> -->
+		<!-- 		<view class="fixed">
 				<view class='title flex flex-center'>
 					<view>订单</view>
 					<u-icon class="search" name="search" color="" size="28" @click="search"></u-icon>
@@ -13,74 +13,135 @@
 								fontWeight: 'bold',
 								transform: 'scale(1.05)'
 							}"></u-tabs>
+			</view> -->
+		<view class="top-content">
+			<u-search placeholder="搜索订单" v-model="searchKeyWord" bgColor='white' :actionStyle='searchStyle'
+				@search="getSearch" :clearabled="true"></u-search>
+			<view class="tab-content">
+				<u-tabs :list="tabList" @click="clickTab" lineColor='transparent' :current='tabIndex'
+					:inactiveStyle="{color:'white'}" :activeStyle="{
+									color: '#2772FB',
+									fontWeight: 'bold',
+									transform: 'scale(1.05)',
+									background:'white',
+									padding:'10rpx 20rpx',
+									'border-radius':'40rpx'
+								}" class="tabs"></u-tabs>
+				<view class="right-btn" @click="showMenu=true">
+					<u-icon name="grid-fill" color="white" size="28"></u-icon>
+					<view class="">
+						全部
+					</view>
+				</view>
 			</view>
-			<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
-				class="mescroll">
-				<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 row1">
-							<view class="item1">
-								{{good.orderNo}} {{good.goodsName}}
-							</view>
-							<view class="item2">
-								{{good.orderStatus}}
-							</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">
+			<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 row1">
+						<view class="item1">
+							{{good.orderNo}}
+							<!-- {{good.goodsName}} -->
 						</view>
-						<view class="flex row2">
-							<view class="left flex flex-space-between">
+						<view class="item2">
+							{{good.cargoOwnerStatus}}
+						</view>
+					</view>
+					<view class="flex row2">
+						<view class="left">
+							<view class="top">
 								<view class="ssx">{{$helper.getProvinceAbbreviation(good.sendPrivate)}}</view>
-								<view class="level2-title">{{good.sendCity}} {{good.sendArea}}</view>
-								<view>
-									<image class="jt-icon" src="@/static/images/goodSource/jt.png" mode='widthFix'>
-									</image>
-								</view>
+								<view class="level2-title">{{good.sendCity}} </view>
+							</view>
+							<view class="bottom">{{good.sendArea}}</view>
+						</view>
+						<view class="jt-image">
+							<image class="jt-icon" src="@/static/images/order/jt.png" mode='widthFix'>
+							</image>
+						</view>
+
+						<view class="right">
+							<view class="top">
 								<view class="ssx">
 									{{$helper.getProvinceAbbreviation(good.unloadPrivate)}}
 								</view>
-								<view class="level2-title">{{good.unloadCity}} {{good.unloadArea}}</view>
+								<view class="level2-title">{{good.unloadCity}}</view>
 							</view>
-						</view>
-						<view class="flex row3">
-							<view class="left">
-								<image class="hz" src="@/static/images/news/sj.png"></image>
-							</view>
-							<view class="right">
-								<view class="flex fontsize-26 row">
-									<view>{{good.compName}}</view>
-									<view class="sline"></view>
-									<view>{{good.cargoOwner}}</view>
-								</view>
-								<view class="flex align-center">
-									<view class="fontsize-26 ">运距 {{good.distance}}km</view>
-								</view>
+							<view class="bottom">
+								{{good.unloadArea}}
 							</view>
 						</view>
-						<view class="row4 flex flex-end align-center">
-							<view class="time">{{good.updateDate}}</view>
+					</view>
+					<view class="flex row3 s-row">
+						<view class="flex align-center">
+							<image class="hz" src="@/static/images/news/sj.png"></image>
+							<view style="margin-right: 20rpx;">{{good.driverName}}</view>
+							<!-- <view style="margin-right: 20rpx;">{{good.driverCall}}</view> -->
+							<image class="hz-good" src="@/static/images/order/good-img.png"></image>
+							<view>{{good.goodsName}}</view>
+						</view>
+						<view class="flex align-center">
+							<view style="margin-right: 20rpx;">运距 {{good.distance}}km</view>
 							<view class="car">{{good.freight}}{{good.illingMethod==0?'元/吨':'元/车'}}</view>
 						</view>
-						<view class="row5 flex flex-end">
-							<view class="stop active" @click.stop="accept(good,1)" v-if="good.orderStatus=='待接单'">接受</view>
-							<!-- <view class="stop active" @click.stop="accept(good,1)">接受</view> -->
-							<view class="stop active" @click.stop="accept(good,2)" v-if="good.orderStatus=='待接单'">拒绝</view>
-							<view class="stop active" @click.stop="stop(good)" v-if="good.orderStatus=='未装车'">终止</view>
-							<!-- <view class="stop active" @click.stop="stop(good)">终止</view> -->
-							<view class="start normal" @click.stop="confirmLoading(good,1)" v-if="good.orderStatus=='待确认装车'">确认装车</view>
-							<!-- <view class="start normal" @click.stop="confirmLoading(good,1)">确认装车</view> -->
-							<view class="start normal" v-if="good.orderStatus!='待接单'&&good.orderStatus!='未装车'">联系客服</view>
-							<view class="start normal" @click.stop="confirmLoading(good,2)" v-if="good.orderStatus=='待收货'">确认卸车</view>
-							<!-- <view class="start normal" @click.stop="confirmLoading(good,2)">确认卸车</view> -->
-					<view class="stop active" @click.stop="stop(good)" v-if="good.orderStatus=='已结算'">付款</view>
-					<view class="stop active" @click.stop="stop(good)" v-if="good.orderStatus=='待还款'||good.orderStatus=='已还款'">还款</view>
-					
-							<!-- <view class="start normal" @click.stop="closed(good)" v-if="good.orderStatus=='结算中'">完结</view> -->
+						<!-- 		<view class="right">
+							<view class="flex fontsize-26 row">
+								<view>{{good.compName}}</view>
+								<view class="sline"></view>
+								<view>{{good.cargoOwner}}</view>
+							</view>
+							<view class="flex align-center">
+								<view class="fontsize-26 ">运距 {{good.distance}}km</view>
+							</view>
+						</view> -->
+					</view>
+					<view class="row4 flex align-center">
+						<view class="time">{{good.updateDate}}</view>
+
+					</view>
+					<view class="row5 flex flex-end">
+						<image class="jt-icon" src="@/static/images/order/position.png" mode='widthFix'
+							@click.stop="toMap()">
+						</image>
+						<view class="stop" @click.stop="accept(good,1)" v-if="good.cargoOwnerStatus=='待接单'">接受
+						</view>
+						<!-- <view class="stop active" @click.stop="accept(good,1)">接受</view> -->
+						<view class="normal" @click.stop="accept(good,2)" v-if="good.cargoOwnerStatus=='待接单'">拒绝
 						</view>
+						<view class="normal" @click.stop="stop(good)" v-if="good.cargoOwnerStatus=='未装车'">终止</view>
+						<!-- <view class="stop active" @click.stop="stop(good)">终止</view> -->
+						<view class="start normal" @click.stop="confirmLoading(good,1)"
+							v-if="good.cargoOwnerStatus=='待确认装车'">确认装车</view>
+						<!-- <view class="start normal" @click.stop="confirmLoading(good,1)">确认装车</view> -->
+						<view class="start normal" v-if="good.cargoOwnerStatus!='待接单'&&good.cargoOwnerStatus!='未装车'">
+							联系客服</view>
+						<view class="start normal" @click.stop="confirmLoading(good,2)"
+							v-if="good.cargoOwnerStatus=='待收货'">确认卸车</view>
+						<!-- <view class="start normal" @click.stop="confirmLoading(good,2)">确认卸车</view> -->
+						<view class="normal" @click.stop="stop(good)" v-if="good.cargoOwnerStatus=='已结算'">付款</view>
+						<view class="normal" @click.stop="stop(good)"
+							v-if="good.cargoOwnerStatus=='待还款'||good.cargoOwnerStatus=='已还款'">还款</view>
+
+						<!-- <view class="start normal" @click.stop="closed(good)" v-if="good.cargoOwnerStatus=='结算中'">完结</view> -->
 					</view>
 				</view>
-			</mescroll-body>
-		</view>
-		<view v-else class="search-view">
+			</view>
+		</mescroll-body>
+		<!-- </view> -->
+		<!-- 		<view v-else class="search-view">
 			<view class="flex">
 				<u-icon name="arrow-left" color="" size="20" class="back-icon" @click="back()"></u-icon>
 				<u-search placeholder="可按编号、货主、收发地查找" placeholderColor="#AFB3BF" :actionStyle="textColor"
@@ -99,7 +160,7 @@
 				</view>
 
 			</view>
-		</view>
+		</view> -->
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
 			:closeOnClickOverlay='true' :showCancelButton='true' @confirm="confirmClick" @close="cancelClick"
 			@cancel="cancelClick" class="modal">
@@ -130,6 +191,15 @@
 		mixins: [MescrollMixin], // 使用mixin
 		data() {
 			return {
+				showMenu: false,
+				searchStyle: {
+					background: "#317AFE",
+					color: 'white',
+					position: "absolute",
+					right: "30rpx",
+					padding: "6rpx 20rpx",
+					"border-radius": '30rpx'
+				},
 				// isShowStopBtn: false,
 				// isConfirmLoadingBtn:false,
 				// isShowCustomerServiceBtn:false,
@@ -200,7 +270,7 @@
 					// {
 					// 	name: '评价'
 					// },
-					
+
 				],
 				tabIndex: 0,
 				scrollTop: 0
@@ -253,11 +323,20 @@
 
 		// },
 		methods: {
-			accept(item,type){
+			toMap() {
+				uni.$u.route('/pages/order/map', {
+					id: 1,
+				});
+			},
+			closeMenu() {
+				this.showMenu = false
+			},
+			accept(item, type) {
 				this.$request.baseRequest('post', '/orderInfo/api/orderReceiving', {
 						id: item.id,
-						flag:type
-					}).then(res => {debugger
+						flag: type
+					}).then(res => {
+						debugger
 						if (res.code == 200) {
 							this.$refs.uToast.show({
 								type: 'success',
@@ -269,7 +348,7 @@
 									})
 								}
 							})
-				
+
 						}
 					})
 					.catch(res => {
@@ -300,11 +379,11 @@
 						uni.$u.toast(res.message);
 					});
 			},
-			confirmLoading(item,type) {
+			confirmLoading(item, type) {
 				this.$request.baseRequest('post', '//carrierInfo/cargoOwnerLoadingAdd', {
 						id: item.id,
-						loadingFlag:type,
-						flag:1
+						loadingFlag: type,
+						flag: 1
 					}).then(res => {
 						if (res.code == 200) {
 							this.$refs.uToast.show({
@@ -317,7 +396,7 @@
 									})
 								}
 							})
-				
+
 						}
 					})
 					.catch(res => {
@@ -356,7 +435,7 @@
 			},
 			confirmClick() {
 				console.log('终止')
-		
+
 				this.$request.baseRequest('post', '/orderInfo/api/end', {
 						id: this.id,
 						terminator: 2,
@@ -374,10 +453,11 @@
 				this.isShowAlert = false
 			},
 			getSearch(e) {
+				debugger
 				// = uni.getStorageSync('useSearchList')
 
-				this.useSearchList.unshift(e)
-				uni.setStorageSync("useSearchList", this.useSearchList)
+				// this.useSearchList.unshift(e)
+				// uni.setStorageSync("useSearchList", this.useSearchList)
 				console.log("点击搜索", e)
 				this.upCallback({
 					size: 10,
@@ -405,19 +485,24 @@
 						if (page.num == 1) this.goods = [];
 						this.goods = this.goods.concat(res.data.records); //追加新数据
 						this.mescroll.endBySize(res.data.records.length, res.data.total);
-						
+						uni.hideLoading()
 					})
 					.catch(res => {
 						uni.$u.toast(res.message);
 					});
 			},
 			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
@@ -430,73 +515,80 @@
 </script>
 
 <style scoped lang="scss">
-	.banner {
-		width: 100%;
-		position: relative;
+	.top-content {
+		background: url(../../static/images/order/bg.png) no-repeat;
+		background-size: cover;
+		padding: 20rpx;
+		padding-bottom: 320rpx;
 	}
 
-	.fixed,
-	.fixed1 {
-		background: white;
-		position: fixed;
-		top: var(--status-bar-height);
-		z-index: 999;
-		width: 100%;
-	}
+	// .banner {
+	// 	width: 100%;
+	// 	position: relative;
+	// }
 
-	.fixed {
-		.title {
-			background: white;
-			position: relative;
-			font-size: 36rpx;
-			font-weight: 500;
-			color: rgba(0, 0, 0, 0.85);
-
-			.search {
-				position: absolute;
-				right: 20rpx;
-			}
-		}
-	}
+	// .fixed,
+	// .fixed1 {
+	// 	background: #2772FB;
+	// 	position: fixed;
+	// 	top: var(--status-bar-height);
+	// 	z-index: 999;
+	// 	width: 100%;
+	// }
+
+	// .fixed {
+	// 	.title {
+	// 		background: white;
+	// 		position: relative;
+	// 		font-size: 36rpx;
+	// 		font-weight: 500;
+	// 		color: rgba(0, 0, 0, 0.85);
+
+	// 		.search {
+	// 			position: absolute;
+	// 			right: 20rpx;
+	// 		}
+	// 	}
+	// }
 
 	.fixed1 {
 		top: 0;
 		height: var(--status-bar-height);
-		background: white;
+		background: #317AFE;
 	}
 
-	.banner-img {
-		width: 100%;
-	}
+	// .banner-img {
+	// 	width: 100%;
+	// }
 
-	.head {
-		position: absolute;
-		width: calc(100% - 108rpx);
-		bottom: 0;
-		background: white;
-		margin: 0 20rpx;
-		border-radius: 20rpx;
+	// .head {
+	// 	position: absolute;
+	// 	width: calc(100% - 108rpx);
+	// 	bottom: 0;
+	// 	background: white;
+	// 	margin: 0 20rpx;
+	// 	border-radius: 20rpx;
 
-		.item1,
-		.item3 {
-			width: 40%;
+	// 	.item1,
+	// 	.item3 {
+	// 		width: 40%;
 
-			.text {
-				text-overflow: ellipsis;
-				overflow: hidden;
-				white-space: nowrap;
-			}
+	// 		.text {
+	// 			text-overflow: ellipsis;
+	// 			overflow: hidden;
+	// 			white-space: nowrap;
+	// 		}
 
-		}
+	// 	}
 
-		.item1 .text {
-			text-align: left;
-		}
+	// 	.item1 .text {
+	// 		text-align: left;
+	// 	}
 
-		.item3 .text {
-			text-align: right;
-		}
-	}
+	// 	.item3 .text {
+	// 		text-align: right;
+	// 	}
+	// }
 
 	.change-btn {
 		width: 86rpx;
@@ -510,8 +602,6 @@
 		border-radius: 20rpx;
 
 		.row1 {
-			font-size: 26rpx;
-
 			.item1 {
 
 				color: #333333;
@@ -524,6 +614,48 @@
 
 		.row2 {
 			margin: 30rpx 0;
+			display: flex;
+			justify-content: center;
+
+			.left {
+				float: left;
+				width: 40%;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+
+				.top {
+					display: flex;
+					justify-content: flex-start;
+				}
+
+				.bottom {
+					display: flex;
+					justify-content: flex-start;
+					font-size: 24rpx;
+					color: #878787;
+				}
+			}
+
+			.right {
+				float: right;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				width: 40%;
+
+				.top {
+					display: flex;
+					justify-content: flex-end;
+				}
+
+				.bottom {
+					display: flex;
+					justify-content: flex-end;
+					font-size: 24rpx;
+					color: #878787;
+				}
+			}
 		}
 
 		.row3 {
@@ -537,13 +669,18 @@
 				height: 74rpx;
 				margin-right: 30rpx;
 			}
+
+			.hz-good {
+				width: 44rpx;
+				height: 44rpx;
+				margin: 0 30rpx;
+			}
 		}
 
 		.row4 {
 			margin: 20rpx 0;
 
 			.time {
-				font-size: 26rpx;
 				color: #999999;
 				margin-right: 20rpx;
 			}
@@ -567,9 +704,10 @@
 			}
 
 			.normal {
-				border: 1px solid #CDCDCD;
 				border-radius: 33px;
-				padding: 13rpx 31rpx;
+				border: 1px solid #CDCDCD;
+				padding: 6px 15px;
+				margin-right: 10px;
 			}
 		}
 	}
@@ -621,7 +759,8 @@
 	}
 
 	.mescroll {
-		margin-top: calc(var(--status-bar-height) + 140rpx);
+		// margin-top: calc(var(--status-bar-height) + 140rpx);
+		top: -320rpx;
 	}
 
 	.sline {
@@ -658,4 +797,71 @@
 	/deep/.u-modal__content {
 		flex-direction: column;
 	}
+
+	.tab-content {
+		position: relative;
+	}
+
+	.right-btn {
+		position: absolute;
+		width: 88rpx;
+		height: 88rpx;
+		background: #317AFE;
+		box-shadow: -14px 0px 8px -8px rgba(0, 53, 149, 0.21);
+		display: flex;
+		flex-direction: column;
+		right: 0;
+		top: 0;
+		bottom: 0;
+		margin: auto;
+		color: white;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.tabs {
+		// background: red;
+		margin-top: 20rpx;
+	}
+
+	/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: 40px;
+			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;
+	}
+
+	.all-menu {
+		position: absolute;
+		z-index: 99;
+		top: 260rpx;
+	}
 </style>

+ 75 - 0
pages/order/map.vue

@@ -0,0 +1,75 @@
+<template>
+	<view class="shareImage">
+		<view style="">
+			<web-view id="mapContainer" :src="srcHandler()"></web-view>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		data() {
+			return {
+				bgColor: '#317AFE',
+				bool: false,
+				lat: '',
+				lng: ''
+			}
+		},
+		created() {
+			this.getLngLat();
+		},
+		methods: {
+			back(){
+				uni.navigateBack({
+					
+				})
+			},
+			srcHandler() {
+				return `/hybrid/html/map.html?lat=${this.lat}`
+			},
+			getLngLat() {
+				uni.getLocation({
+					type: 'wgs84',
+					success: res => {
+						if (res.latitude) {
+							this.lat = res.latitude + ',' + res.longitude;
+							// this.lng = res.longitude;
+						} 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服务页面
+											}
+										}
+									}
+								});
+							}
+						}
+					}
+				});
+			}
+		}
+	}
+</script>

+ 90 - 49
pages/order/orderDetails.vue

@@ -6,26 +6,30 @@
 			<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="server-fill" color="" size="28" @click="$helper.contactCustomerService"></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">{{dataObj.orderStatus}}</view>
+				<view class="status">{{dataObj.cargoOwnerStatus}}</view>
 
 			</view>
 			<!-- flex flex-space-between -->
 			<view class="item2">
-				<u-button class="btn" text="驳回" @click="stop"  v-if="dataObj.orderStatus=='待接单'"></u-button>
-				<u-button class="btn" text="接受" @click="stop"  v-if="dataObj.orderStatus=='待接单'"></u-button>
-				<u-button class="btn" text="终止" @click="stop"  v-if="dataObj.orderStatus=='未装车'"></u-button>
-				<u-button class="btn" text="签订合同" @click="stop"  v-if="dataObj.orderStatus=='待确认装车'"></u-button>
-				<u-button class="btn" text="驳回装车信息" @click="stop"  v-if="dataObj.orderStatus=='待确认装车'"></u-button>
-				<u-button class="btn" text="确认装车" @click="confirmLoading" v-if="dataObj.orderStatus=='待确认装车'"></u-button>
-				<u-button class="btn" text="驳回卸车信息" @click="stop"  v-if="dataObj.orderStatus=='待收货'"></u-button>
-				<u-button class="btn" text="确认卸车" @click="confirmUnLoading" v-if="dataObj.orderStatus=='待收货'"></u-button>
-				<u-button class="btn" text="付款" @click="closed" v-if="dataObj.orderStatus=='待结算'||dataObj.orderStatus=='已结算'"></u-button>
-				<u-button class="btn" text="还款" @click="stop"  v-if="dataObj.orderStatus=='待还款'"></u-button>
+				<u-button class="btn" text="驳回" @click="stop" v-if="dataObj.cargoOwnerStatus=='待接单'"></u-button>
+				<u-button class="btn" text="接受" @click="stop" v-if="dataObj.cargoOwnerStatus=='待接单'"></u-button>
+				<u-button class="btn" text="终止" @click="stop" v-if="dataObj.cargoOwnerStatus=='未装车'"></u-button>
+				<u-button class="btn" text="签订合同" @click="stop" v-if="dataObj.cargoOwnerStatus=='待确认装车'"></u-button>
+				<u-button class="btn" text="驳回装车信息" @click="stop" v-if="dataObj.cargoOwnerStatus=='待确认装车'"></u-button>
+				<u-button class="btn" text="确认装车" @click="confirmLoading" v-if="dataObj.cargoOwnerStatus=='待确认装车'">
+				</u-button>
+				<u-button class="btn" text="驳回卸车信息" @click="stop" v-if="dataObj.cargoOwnerStatus=='待收货'"></u-button>
+				<u-button class="btn" text="确认卸车" @click="confirmUnLoading" v-if="dataObj.cargoOwnerStatus=='待收货'">
+				</u-button>
+				<u-button class="btn" text="付款" @click="closed"
+					v-if="dataObj.cargoOwnerStatus=='待结算'||dataObj.cargoOwnerStatus=='已结算'"></u-button>
+				<u-button class="btn" text="还款" @click="stop" v-if="dataObj.cargoOwnerStatus=='待还款'"></u-button>
 			</view>
 			<view class="item3 flex flex-space-between align-center">
 				<view class="left flex align-center">
@@ -90,7 +94,7 @@
 				<view class="row-left-text gray">订单编号</view>
 				<view class="row-right-text">{{dataObj.orderNo}}</view>
 			</view>
-		<!-- 	<view class='row-between'>
+			<!-- 	<view class='row-between'>
 				<view class="row-left-text gray">货主</view>
 				<view class="row-right-text">{{dataObj.cargoOwner}}</view>
 			</view> -->
@@ -100,11 +104,15 @@
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text gray">发货地</view>
-				<view class="row-right-text place">{{dataObj.sendPrivate}}{{dataObj.sendCity}}{{dataObj.sendArea}}{{dataObj.sendDetailedAddress}}</view>
+				<view class="row-right-text 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">{{dataObj.unloadPrivate}}{{dataObj.unloadCity}}{{dataObj.unloadArea}}{{dataObj.unloadDetailedAddress}}</view>
+				<view class="row-right-text place">
+					{{dataObj.unloadPrivate}}{{dataObj.unloadCity}}{{dataObj.unloadArea}}{{dataObj.unloadDetailedAddress}}
+				</view>
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text gray">货名</view>
@@ -141,7 +149,8 @@
 			<view class='row-between'>
 				<view class="row-left-text gray">装车照片</view>
 				<view class="flex">
-					<u--image :showLoading="true" :src="dataObj.carrierInfo.loadingDate" width="40px" height="40px"></u--image>
+					<u--image :showLoading="true" :src="item" width="40px" height="40px"
+						v-for="(item,index) in zcImgList" :key='index'></u--image>
 				</view>
 			</view>
 			<view class='row-between'>
@@ -155,12 +164,13 @@
 			<view class='row-between'>
 				<view class="row-left-text gray">卸车照片</view>
 				<view class="flex">
-					<u--image :showLoading="true" :src="dataObj.carrierInfo.unloadingImg" width="40px" height="40px"></u--image>
+					<u--image :showLoading="true" :src="item" width="40px" height="40px"
+						v-for="(item,index) in xcImgList" :key='index'></u--image>
 				</view>
 			</view>
 		</view>
 		<!-- v-if="status2 -->
-		<view class="content4">
+		<view class="content4" v-if="status2">
 			<view class="level2-title gray">运费信息(单位:元)</view>
 			<view class='row-between'>
 				<view class="row-left-text gray">预付运费</view>
@@ -177,7 +187,8 @@
 				明细:预付{{dataObj.freightInfo.freightBalance}}元,扣款{{dataObj.freightInfo.deduction}}元,服务费{{dataObj.freightInfo.serviceCharge}}元,尾款{{dataObj.freightInfo.freightBalance}}元,合计收款{{dataObj.freightInfo.totalCollection}}元。
 			</view>
 		</view>
-		<view class="content4">
+		<!-- v-if="status3" -->
+		<view class="content4" v-if="status3">
 			<view class="level2-title gray">还款信息</view>
 			<view class='row-between'>
 				<view class="row-left-text gray">运费</view>
@@ -227,9 +238,10 @@
 				src: 'https://cdn.uviewui.com/uview/album/1.jpg',
 				isShowTerminationReason: false,
 				id: "",
-				dataObj:{},
-				status1:false,
-				status2:false,
+				dataObj: {},
+				status1: false,
+				status2: false,
+				status3: false,
 				id: '',
 				value2: '',
 				radiolist1: [{
@@ -253,6 +265,8 @@
 				alertTitle: '确定终止订单?',
 				alertContent: "",
 				isShowAlert: false,
+				zcImgList: [],
+				xcImgList: []
 			}
 
 		},
@@ -281,7 +295,7 @@
 									})
 								}
 							})
-			
+
 						}
 					})
 					.catch(res => {
@@ -297,7 +311,7 @@
 				uni.$u.route('/pages/order/confirmUnloading', item);
 			},
 			confirmClick() {
-				let  that = this
+				let that = this
 				console.log('终止')
 				if (this.radiovalue1 == '其他' && !this.value2) {
 					this.$refs.uToast.show({
@@ -320,9 +334,9 @@
 						id: this.id,
 						terminationReason: _terminationReason,
 						terminationReasonDescription: this.value2,
-						terminator:1
+						terminator: 1
 					}).then(res => {
-						console.log(res) 
+						console.log(res)
 						this.isShowAlert = false
 						// this.mescroll.resetUpScroll()
 						this.$refs.uToast.show({
@@ -332,7 +346,7 @@
 								that.getList()
 							}
 						})
-			
+
 					})
 					.catch(res => {
 						uni.$u.toast(res.message);
@@ -344,7 +358,7 @@
 			stop() {
 				let item = this.dataObj
 				// 货主接单
-				if (item.orderStatusKey == 1) {
+				if (item.cargoOwnerStatusKey == 1) {
 					this.isShowTerminationReason = false
 				} else {
 					this.isShowTerminationReason = true
@@ -352,33 +366,56 @@
 				this.id = item.id
 				this.isShowAlert = true
 			},
-			toPhone(){
+			toPhone() {
 				uni.makePhoneCall({
-				    phoneNumber: this.dataObj.cargoOwnerPhone
+					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
-							if(res.data.orderStatus!="待接单"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="已终止"){
-								this.status1 = true
+			getList() {
+				this.$request.baseRequest('get', '/orderInfo/getOrderInfo', {
+					id: this.id,
+
+				}).then(res => {
+					if (res.code == 200) {
+						this.dataObj = res.data
+						// 承运信息显示
+						if (res.data.cargoOwnerStatus != "待接单" && res.data.cargoOwnerStatus != "未装车" && res.data
+							.cargoOwnerStatus != "已终止") {
+							this.status1 = true
+						}
+						// 运费信息
+						if (res.data.cargoOwnerStatus != "待接单" && res.data.cargoOwnerStatus != "未装车" && res.data
+							.cargoOwnerStatus != "待确认装车" && res.data.cargoOwnerStatus != "已驳回装车信息" && res.data
+							.cargoOwnerStatus != "待平台确认装车" && res.data.cargoOwnerStatus != "平台驳回装车信息" && res.data
+							.cargoOwnerStatus != "运输中" && res.data.cargoOwnerStatus != "待结算" && res.data
+							.cargoOwnerStatus != "已终止") {
+							this.status2 = true
+						}
+						//还款信息
+						if (res.data.cargoOwnerStatus == "待还款" && res.data.cargoOwnerStatus == "已还款" && res.data
+							.cargoOwnerStatus == "已完结") {
+							this.status3 = true
+						}
+						if (res.data.carrierInfo) {
+							debugger
+							let _zcList = res.data.carrierInfo.loadingImg.split(',')
+							let _xcList = res.data.carrierInfo.unloadingImg.split(',')
+							for (let i = 0; i < _zcList.length; i++) {
+								if (_zcList[i]) this.zcImgList.push(_zcList[i])
 							}
-							if(res.data.orderStatus!="待接单"&&res.data.orderStatus!="未装车"&&res.data.orderStatus!="待确认装车"&&res.data.orderStatus!="已驳回装车信息"&&res.data.orderStatus!="待平台确认装车"&&res.data.orderStatus!="平台驳回装车信息"&&res.data.orderStatus!="运输中"&&res.data.orderStatus!="待结算"&&res.data.orderStatus!="已终止"){
-								this.status2 = true
+							for (let i = 0; i < _xcList.length; i++) {
+								if (_xcList[i]) this.xcImgList.push(_xcList[i])
 							}
 						}
-						
-					})
+					}
+
+				})
 			},
 			goConfirmLoading(id) {
-				
+
 				console.log('点击详情id:', id)
 				uni.$u.route('/pages/order/confirmLoading', {
 					id: this.id,
@@ -425,9 +462,11 @@
 		height: var(--status-bar-height);
 		background: white;
 	}
-.row-between{
-	margin-bottom: 10rpx;
-}
+
+	.row-between {
+		margin-bottom: 10rpx;
+	}
+
 	.content1 {
 		background: white;
 		margin: calc(var(--status-bar-height) + 80rpx) 20rpx 0 20rpx;
@@ -557,16 +596,18 @@
 	}
 
 	.content4 {
-		.time{
+		.time {
 			text-align: right;
 		}
+
 		.mx {
-		
+
 			background: #F7F8FA;
 			padding: 10rpx;
 			margin: 10rpx 0;
 		}
 	}
+
 	/deep/.u-modal__content {
 		flex-direction: column;
 	}

+ 2 - 2
pages/public/login.vue

@@ -129,10 +129,10 @@
 				this.$refs.loginForm.validate().then(res => {
 					uni.$u.toast('校验通过')
 					this.isLoading = true
-					_this.dataDetails.loginFlag=1
 					_this.$request.baseRequest('get', '/commonUser/loginVerifyCode', {
 							phone: _this.dataDetails.phone,
-							verifyCode: _this.dataDetails.code
+							verifyCode: _this.dataDetails.code,
+							 loginFlag:1
 						}).then(res => {
 									uni.setStorageSync('pcUserInfo', res.data)
 									uni.setStorageSync('userInfo', res.data)

+ 178 - 0
pages/release/addAddress.vue

@@ -0,0 +1,178 @@
+<template>
+	<view class="content">
+		<view class="content1" v-if="!isShowMap">
+			<view class="top">
+				新增地址
+			</view>
+			<!-- 		<view class="row flex">
+				<u-radio-group placement="row" class="select-type">
+					<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>
+			</view> -->
+			<view class="">
+				<u--form labelPosition="left" :model="addressInfo" :rules="rules" ref="form1" labelWidth='100'>
+					<u-form-item label="所属区域" ref="item1" borderBottom>
+						<view @click='toMap' :class="addressInfo.area?'':'select-color'">
+							{{addressInfo.area?(addressInfo.province+addressInfo.city+addressInfo.area):'选择所属区域 '}}
+						</view>
+					</u-form-item>
+					<u-form-item label="详细地址" prop="addressInfo.detailedAddress" ref="item1" borderBottom>
+						<u--input v-model="addressInfo.detailedAddress" border="none" placeholder="详细地址"></u--input>
+					</u-form-item>
+					<u-form-item label="联系人" prop="addressInfo.contacts" ref="item1" borderBottom>
+						<u--input v-model="addressInfo.contacts" border="none" placeholder="联系人">></u--input>
+					</u-form-item>
+					<u-form-item label="联系电话" prop="addressInfo.contactPhone" ref="item1">
+						<u--input v-model="addressInfo.contactPhone" border="none" placeholder="联系电话">></u--input>
+					</u-form-item>
+				</u--form>
+			</view>
+		</view>
+		<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
+			confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
+		<view class="submit" @click="submit">提交</view>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				isShowAlert: false,
+				alertTitle: '确定提交地址信息?',
+				isShowMap: false,
+				addressInfo: {
+					commonId: "",
+					province: "",
+					city: "",
+					area: "",
+					detailedAddress: "",
+					contacts: "",
+					contactPhone: "",
+					longitude: "",
+					latitude: ""
+				},
+				rules: {
+					// 'addressInfo.name': {
+					// 	type: 'string',
+					// 	required: true,
+					// 	message: '请填写姓名',
+					// 	trigger: ['blur', 'change']
+					// },
+				},
+
+			};
+		},
+		onLoad(options) {
+			console.log(options)
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		methods: {
+			confirmClick() {
+				this.$request.baseRequest('post', '/cargoOwnerAddressInfo/api/addCargoOwnerAddress', this.addressInfo)
+					.then(
+						res => {
+							if (res.code == 200) {
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "提交成功",
+									complete() {
+										uni.$u.route('/pages/release/selectAddress');
+									}
+								})
+
+							}
+
+						})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+				this.isShowAlert = false
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			radioChange(n) {
+				console.log('radioChange', n);
+			},
+			toMap() {
+				let that = this
+				// this.isShowMap = true
+				uni.chooseLocation({
+					success: function(res) {
+						console.log(res);
+
+						console.log('位置名称:' + res.name);
+						console.log('详细地址:' + res.address);
+						console.log('纬度:' + res.latitude);
+						console.log('经度:' + res.longitude);
+						let _address = that.$helper.getAddress(res.address)
+						console.log(_address)
+						that.addressInfo.latitude = res.latitude
+						that.addressInfo.longitude = res.longitude
+						that.addressInfo.detailedAddress = _address.village
+						that.addressInfo.province = _address.province
+						that.addressInfo.city = _address.city
+						that.addressInfo.area = _address.county
+						that.addressInfo.commonId = that.userInfo.id
+
+					}
+				});
+				// console.log(123)
+				// uni.$u.route('/pages/release/map', {
+				// 	id: 1,
+				// });
+			},
+			submit() {
+				this.isShowAlert = true
+
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.select-color{
+		color: #C6CBD5;
+	}
+	.content{
+		background: white;
+		height: calc(100vh - 90rpx);
+	}
+	.content1 {
+		padding: 40rpx;
+		.top {
+			font-size: 42rpx;
+			font-weight: 700;
+			color: rgba(0, 0, 0, 0.85);
+		}
+	}
+	.submit{
+		position: absolute;
+		bottom: 40rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 80%;
+		font-size: 36rpx;
+		color: #FFFFFF;
+		background: #2772FB;
+		border-radius: 50rpx;
+		padding: 20rpx 0;
+		left: 0;
+		right: 0;
+		margin: auto;
+	}
+</style>

+ 180 - 0
pages/release/editAddress.vue

@@ -0,0 +1,180 @@
+<template>
+	<view class="content">
+		<view class="content1" v-if="!isShowMap">
+			<view class="top">
+				编辑地址
+			</view>
+			<!-- 		<view class="row flex">
+				<u-radio-group placement="row" class="select-type">
+					<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>
+			</view> -->
+			<view class="">
+				<u--form labelPosition="left" :model="addressInfo" :rules="rules" ref="form1" labelWidth='100'>
+					<u-form-item label="所属区域" ref="item1" borderBottom>
+						<view @click='toMap'>
+							{{addressInfo.area?(addressInfo.province+addressInfo.city+addressInfo.area):'选择所属区域 '}}
+						</view>
+					</u-form-item>
+					<u-form-item label="详细地址" prop="addressInfo.detailedAddress" ref="item1" borderBottom>
+						<u--input v-model="addressInfo.detailedAddress" border="none" placeholder="详细地址"></u--input>
+					</u-form-item>
+					<u-form-item label="联系人" prop="addressInfo.contacts" ref="item1" borderBottom>
+						<u--input v-model="addressInfo.contacts" border="none" placeholder="联系人">></u--input>
+					</u-form-item>
+					<u-form-item label="联系电话" prop="addressInfo.contactPhone" ref="item1">
+						<u--input v-model="addressInfo.contactPhone" border="none" placeholder="联系电话">></u--input>
+					</u-form-item>
+				</u--form>
+			</view>
+		</view>
+		<u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
+			confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
+		<view class="submit" @click="submit">提交</view>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				isShowAlert: false,
+				alertTitle: '确定提交地址信息?',
+				isShowMap: false,
+				addressInfo: {
+					commonId: "",
+					province: "",
+					city: "",
+					area: "",
+					detailedAddress: "",
+					contacts: "",
+					contactPhone: "",
+					longitude: "",
+					latitude: ""
+				},
+				rules: {
+					// 'addressInfo.name': {
+					// 	type: 'string',
+					// 	required: true,
+					// 	message: '请填写姓名',
+					// 	trigger: ['blur', 'change']
+					// },
+				},
+
+			};
+		},
+		onLoad(options) {
+			console.log(options)
+			this.addressInfo = options
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		methods: {
+			confirmClick() {
+				this.$request.baseRequest('post', '/cargoOwnerAddressInfo/api/editCargoOwnerAddress', this.addressInfo)
+					.then(
+						res => {
+							if (res.code == 200) {
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "提交成功",
+									complete() {
+										uni.$u.route('/pages/release/selectAddress');
+									}
+								})
+
+							}
+
+						})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+				this.isShowAlert = false
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			radioChange(n) {
+				console.log('radioChange', n);
+			},
+			toMap() {
+				let that = this
+				// this.isShowMap = true
+				uni.chooseLocation({
+					success: function(res) {
+						console.log(res);
+
+						console.log('位置名称:' + res.name);
+						console.log('详细地址:' + res.address);
+						console.log('纬度:' + res.latitude);
+						console.log('经度:' + res.longitude);
+						let _address = that.$helper.getAddress(res.address)
+						console.log(_address)
+						that.addressInfo.latitude = res.latitude
+						that.addressInfo.longitude = res.longitude
+						that.addressInfo.detailedAddress = _address.village
+						that.addressInfo.province = _address.province
+						that.addressInfo.city = _address.city
+						that.addressInfo.area = _address.county
+						that.addressInfo.commonId = that.userInfo.id
+
+					}
+				});
+				// console.log(123)
+				// uni.$u.route('/pages/release/map', {
+				// 	id: 1,
+				// });
+			},
+			submit() {
+				this.isShowAlert = true
+
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.select-color{
+		color: #C6CBD5;
+	}
+	.content{
+		background: white;
+		height: calc(100vh - 90rpx);
+	}
+	.content1 {
+		padding: 40rpx;
+		.top {
+			font-size: 42rpx;
+			font-weight: 700;
+			color: rgba(0, 0, 0, 0.85);
+		}
+	}
+	.submit{
+		position: absolute;
+		bottom: 40rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 80%;
+		font-size: 36rpx;
+		color: #FFFFFF;
+		background: #2772FB;
+		border-radius: 50rpx;
+		padding: 20rpx 0;
+		left: 0;
+		right: 0;
+		margin: auto;
+	}
+</style>
+

+ 697 - 0
pages/release/editRelease.vue

@@ -0,0 +1,697 @@
+<template>
+	<view class="content">
+		<view class="fixed1"></view>
+		<view class='title flex'>
+			<u-icon class="back" name="arrow-left" color="" size="20" @click="back"></u-icon>
+			<view class="nav-title">发布</view>
+			<view class="search" @click="goToRecord">
+				<u-icon class="" name="order" color="" size="28"></u-icon>
+				<view>
+					记录
+				</view>
+			</view>
+		</view>
+		<view class="content1">
+			<view class="row" @click="selectCargoOwner" v-if="!dataObj.cargoOwner">
+				<view class="left select-sf">选择货主身份</view>
+				<view class="right">></view>
+			</view>
+			<view class="row" @click="selectCargoOwner" v-if="dataObj.cargoOwner">
+				<view class="left">{{dataObj.cargoOwner}}</view>
+				<view class="right">></view>
+			</view>
+			<u-picker :show="show" :columns="columns" :closeOnClickOverlay='true' @close='selectCargoOwnerClose'
+				@cancel='selectCargoOwnerClose' @confirm='confirmSelectCargoOwner'></u-picker>
+		</view>
+		<view class="content2">
+			<view class="row1">
+				<view class="left">
+					<view class="top" @click="selectAddress(0)">
+						<view class="send">寄</view>
+						<view class="title">
+							{{dataObj.sendArea?(dataObj.sendPrivate + dataObj.sendCity+dataObj.sendArea):'选择发货地区'}}
+						</view>
+					</view>
+					<view class="bottom">
+						<input type="text" value="" placeholder="输入详细地址" v-model="dataObj.sendDetailedAddress" />
+					</view>
+				</view>
+				<view class="right" @click="selectAddress(0)" v-if="!dataObj.sendArea">
+					<view class="right">{{dataObj.sendArea?'':'>'}}</view>
+				</view>
+			</view>
+			<view class="row2">
+				<view class="left">
+					<view class="top" @click="selectAddress(1)">
+						<view class="collect">收</view>
+						<view class="title">
+							{{dataObj.unloadArea?(dataObj.unloadPrivate + dataObj.unloadCity+dataObj.unloadArea):'选择收货地区'}}
+						</view>
+					</view>
+					<view class="bottom">
+						<input type="text" value="" placeholder="输入详细地址" v-model="dataObj.unloadDetailedAddress" />
+					</view>
+				</view>
+				<view class="right" @click="selectAddress(1)" v-if="!dataObj.unloadArea">
+					<view class="right">{{dataObj.unloadArea?(dataObj.unloadCity+dataObj.unloadArea):'>'}}</view>
+				</view>
+			</view>
+		</view>
+		<view class="content3">
+			<view class="row">
+				<view class="left">距离</view>
+				<input type="text" value="" class="input" placeholder="自动计算" v-model="dataObj.distance" disabled="" />
+			</view>
+			<view class="row">
+				<view class="left">货名</view>
+				<view class="right"><input type="text" class="input" value="" placeholder="输入货物名称"
+						v-model="dataObj.goodsName" /></view>
+			</view>
+			<view class="flex row">
+				<view class="left-text">运费计算方式</view>
+				<!-- <u-radio-group v-model="dataDetails.driverSex" placement="row"> -->
+				<u-radio-group placement="row" v-model="dataObj.billingMethod" class="select-type">
+					<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="row">
+				<view class="left">运费单价</view>
+				<view class="right"><input type="text" value="" placeholder="输入运费单价" class="input"
+						v-model="dataObj.freightPrice" /></view>
+			</view>
+			<view class="row">
+				<view class="left">该任务申请运费垫付</view>
+				<view class="right">
+					<u-switch v-model="dataObj.freightAdvance" @change="change" size="20"></u-switch>
+				</view>
+			</view>
+		</view>
+		<view class="content4 flex">
+			<view class="title">以下为附加信息</view>
+			<view class="btn-text">选填</view>
+		</view>
+		<view class="content5">
+			<view class="row">
+				<view class="left">发货联系人</view>
+				<view class="right flex">
+					<input type="text" value="" placeholder="输入发货联系人姓名" class="input" v-model="dataObj.sender" />
+				</view>
+			</view>
+			<view class="row">
+				<view class="left">发货联系人电话</view>
+				<view class="right flex">
+					<input type="text" value="" placeholder="输入发货联系人手机号" class="input" v-model="dataObj.senderPhone" />
+				</view>
+			</view>
+			<view class="row">
+				<view class="left">收货联系人</view>
+				<view class="right flex">
+					<input type="text" value="" placeholder="输入收货联系人姓名" class="input" v-model="dataObj.receiver" />
+				</view>
+			</view>
+			<view class="row">
+				<view class="left">收货联系人电话</view>
+				<view class="right flex">
+					<input type="text" value="" placeholder="输入收货联系人手机号" class="input"
+						v-model="dataObj.receiverPhone" />
+				</view>
+			</view>
+			<view class="row">
+				<view class="left">重量(吨)</view>
+				<view class="right flex">
+					<input type="text" value="" placeholder="输入预计发运重量" class="input" v-model="dataObj.weight" />
+				</view>
+			</view>
+			<view class="flex row" @click="selectValidityPeriod(0)">
+				<view class="left-text">预计装车日期起</view>
+				<view :class="!dataObj.loadingDateStart?'select-data':''">
+					{{dataObj.loadingDateStart?dataObj.loadingDateStart:'选择有效截止日期>'}}
+				</view>
+			</view>
+			<view class="flex row" @click="selectValidityPeriod(1)">
+				<view class="left-text">预计装车日期止</view>
+				<view :class="!dataObj.loadingDateEnd?'select-data':''">
+					{{dataObj.loadingDateEnd?dataObj.loadingDateEnd:'选择有效截止日期>'}}
+				</view>
+			</view>
+			<view class="row">
+				<view class="left">车长要求(米)</view>
+			</view>
+			<view class="row flex-space-between row-bgc">
+				<view class="car-row">
+					<input type="text" value="" placeholder="最短不限" class="" v-model="dataObj.carLengthSmall"
+						class="car-input" />
+					<view>m</view>
+				</view>
+
+				<view class="car-line">-</view>
+				<view class="car-row">
+					<input type="text" value="" placeholder="最长不限" class="" v-model="dataObj.carLength"
+						class="car-input" />
+					<view>m</view>
+				</view>
+
+			</view>
+			<view class="row">
+				<view class="left">载重要求(吨)</view>
+			</view>
+			<view class="row flex-space-between row-bgc">
+				<view class="car-row">
+					<input type="text" value="" placeholder="最小不限" class="car-input"
+						v-model="dataObj.loadWeightSmall" />
+					<view>吨</view>
+				</view>
+				<view class="car-line">-</view>
+				<view class="car-row">
+					<input type="text" value="" placeholder="最大不限" class="car-input" v-model="dataObj.loadWeight" />
+					<view>吨</view>
+				</view>
+			</view>
+			<view class="row">
+				<view class="left">车型要求</view>
+			</view>
+			<view class="row">
+				<u-checkbox-group v-model="checkboxValue1" placement="row" @change="checkboxChange">
+					<u-checkbox :customStyle="radioCustomStyle" v-for="(item, index) in checkboxList1" :key="index"
+						:label="item.name" :name="item.name">
+					</u-checkbox>
+				</u-checkbox-group>
+			</view>
+			<view class="row">
+				<view class="left">任务描述</view>
+			</view>
+			<view class="row">
+				<u--textarea v-model="dataObj.taskDescription" placeholder="请输入内容"></u--textarea>
+			</view>
+
+
+			<view class="flex row noborder">
+				<view class="left-text">任务有效期</view>
+				<view :class="dataObj.taskValidity?'':'select-data'" @click="selectValidityPeriodcq">
+					{{dataObj.taskValidity?dataObj.taskValidity:'选择任务有效期>'}}
+				</view>
+			</view>
+			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriodcq"
+				@confirm="confirmValidityPeriodcq" @change="changeHandler" @close='isShowcardValidity=false'
+				@cancel='isShowcardValidity=false' :closeOnClickOverlay='true'>
+			</u-picker>
+		</view>
+		<view class="submit" @click="submit">立即发布</view>
+		<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>
+
+<script>
+	var _this;
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				radioCustomStyle: {
+					margin: '0 0 0 20rpx'
+				},
+				show: false,
+				columns: [
+					['个人货主', '黑龙江中天昊元贸易有限公司', '黑龙江利润元贸易有限公司']
+				],
+				dataObj: {
+					commonId: '',
+					cargoOwner: '',
+					sendPrivate: '',
+					sendCity: '',
+					sendArea: '',
+					sendDetailedAddress: '',
+					unloadPrivate: '',
+					unloadCity: '',
+					unloadArea: '',
+					unloadDetailedAddress: '',
+					distance: '',
+					goodsName: '',
+					billingMethod: '元/吨',
+					freightPrice: '',
+					freightAdvance: true,
+					sender: '',
+					senderPhone: '',
+					receiver: '',
+					receiverPhone: '',
+					weight: '',
+					loadingDateStart: '',
+					loadingDateEnd: '',
+					carLengthSmall: '',
+					carLength: '',
+					loadWeightSmall: '',
+					loadWeight: '',
+					carModel: '',
+					taskDescription: '',
+					taskValidity: '',
+					sendLongitude: '',
+					sendLatitude: '',
+					unsendLongitude: '',
+					unsendLatitude: '',
+				},
+				checkboxValue1: [],
+				checkboxList1: [{
+						name: '不限',
+						disabled: false
+					},
+					{
+						name: '高栏',
+						disabled: false
+					},
+					{
+						name: '集装箱',
+						disabled: false
+					},
+					{
+						name: '自卸车',
+						disabled: false
+					}
+				],
+				value: true,
+				isShowcardValidity: false,
+				ValidityPeriodType: '',
+				validityPeriod: [],
+				validityPeriodcq: [],
+				isShowValidity: false,
+				radiolist1: [{
+						name: '元/吨',
+						disabled: false
+					},
+					{
+						name: '元/车',
+						disabled: false
+					},
+
+				],
+			}
+		},
+		onShow() {
+			// //获取默认收货、发货地
+			// let _faddress = uni.getStorageSync('storage_faddress');
+			// let _saddress = uni.getStorageSync('storage_saddress');
+			// if (_faddress) {
+			// 	this.dataObj.sendCity = _faddress.city
+			// 	this.dataObj.sendArea = _faddress.area
+			// 	this.dataObj.sendPrivate = _faddress.province
+			// 	this.dataObj.sendDetailedAddress = _faddress.detailedAddress
+			// 	this.dataObj.sendLongitude = _faddress.longitude
+			// 	this.dataObj.sendLatitude = _faddress.latitude
+			// }
+			// if (_saddress) {
+			// 	this.dataObj.unloadDetailedAddress = _saddress.detailedAddress
+			// 	this.dataObj.unloadCity = _saddress.city
+			// 	this.dataObj.unloadArea = _saddress.area
+			// 	this.dataObj.unloadPrivate = _saddress.province
+			// 	this.dataObj.unsendLongitude = _saddress.longitude
+			// 	this.dataObj.unsendLatitude = _saddress.latitude
+			// }
+		},
+		onLoad(options) {
+			debugger
+			_this = this;
+			this.dataObj = options
+			if (this.dataObj.billingMethod == 1) {
+				this.dataObj.billingMethod = '元/车'
+			} else {
+				this.dataObj.billingMethod = '元/吨'
+			}
+
+			for (let i = 0; i < this.dataObj.carModel.length; i++) {
+
+				if (this.dataObj.carModel[i] == '1') {
+					this.checkboxValue1.push('不限')
+				} else if (this.dataObj.carModel[i] == '2') {
+					this.checkboxValue1.push('高栏')
+				} else if (this.dataObj.carModel[i] == '3') {
+					this.checkboxValue1.push('集装箱')
+				} else if (this.dataObj.carModel[i] == '4') {
+					this.checkboxValue1.push('自卸车')
+				}
+			}
+			if (this.dataObj.freightAdvance) {
+				this.dataObj.freightAdvance = true
+			} else {
+				this.dataObj.freightAdvance = false
+			}
+
+
+			console.log(this.dataObj)
+			this.validityPeriod = this.$helper.makeValidityPeriod(0, '随时')
+			this.validityPeriodcq = this.$helper.makeValidityPeriod(0, '随时')
+		},
+		computed: {
+			...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())
+				// 	}
+				// }
+			},
+			selectCargoOwnerClose() {
+				this.show = false
+			},
+			confirmSelectCargoOwner(e) {
+				debugger
+				this.dataObj.cargoOwner = e.value[0]
+				this.show = false
+			},
+			selectCargoOwner() {
+				this.show = true
+			},
+			selectAddress(type) {
+				uni.$u.route('/pages/release/selectAddress', {
+					type: type,
+				});
+			},
+			checkboxChange(n) {
+				console.log('change', n);
+			},
+			selectValidityPeriodcq() {
+				this.isShowcardValidity = true
+			},
+			confirmValidityPeriod(e) {
+				console.log('confirm', e)
+				if (!e.value[1] || !e.value[2]) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "日期格式错误,请重新选择!",
+					})
+					return
+				}
+				switch (this.ValidityPeriodType) {
+					case 0:
+						this.dataObj.loadingDateStart = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						break
+					case 1:
+						this.dataObj.loadingDateEnd = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						break
+
+				}
+				this.isShowValidity = false
+			},
+			confirmValidityPeriodcq(e) {
+				console.log('confirm', e)
+				this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+
+				this.isShowcardValidity = false
+			},
+			selectValidityPeriod(type) {
+				this.ValidityPeriodType = type
+				this.isShowValidity = true
+			},
+			change(e) {
+				console.log('change', e);
+			},
+			back() {
+				uni.navigateBack()
+			},
+			goToRecord() {
+				uni.$u.route('/pages/release/record');
+			},
+			radioChange(n) {
+				console.log('radioChange', n);
+				this.dataDetails.type = n
+			},
+			submit() {
+				debugger
+				uni.showLoading({
+					mask: true,
+					title: '加载中...'
+				})
+				// 校验没写
+				if (this.dataObj.billingMethod == '元/吨') {
+					this.dataObj.billingMethod = 0
+				} else {
+					this.dataObj.billingMethod = 1
+				}
+				if (this.dataObj.freightAdvance) {
+					this.dataObj.freightAdvance = 1
+				} else {
+					this.dataObj.freightAdvance = 0
+				}
+				let _list = []
+				for (let i = 0; i < this.checkboxValue1.length; i++) {
+					if (this.checkboxValue1 == '不限') {
+						_list.push(1)
+					} else if (this.checkboxValue1 == '高栏') {
+						_list.push(2)
+					} else if (this.checkboxValue1 == '集装箱') {
+						_list.push(3)
+					} else if (this.checkboxValue1 == '自卸车') {
+						_list.push(4)
+					}
+				}
+				this.dataObj.carModel = _list.toString()
+				this.dataObj.commonId = this.userInfo.id
+				this.$request.baseRequest('post', '/publishTaskInfo/api/editTask', this.dataObj).then(res => {
+						debugger
+						uni.hideLoading()
+						this.$refs.uToast.show({
+							type: 'success',
+							message: "发布成功",
+							complete() {
+								this.dataObj = {}
+								uni.$u.route('/pages/release/record');
+							}
+						})
+
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.input {
+		text-align: right;
+	}
+
+	.title {
+		padding: 0 20rpx;
+		display: flex;
+		justify-content: center;
+		position: relative;
+
+		.nav-title {
+			font-size: 32rpx;
+		}
+
+		.back {
+			position: absolute;
+			left: 20rpx;
+		}
+
+		.search {
+			display: flex;
+			align-items: center;
+			position: absolute;
+			right: 20rpx;
+		}
+
+	}
+
+
+	.fixed1 {
+		height: var(--status-bar-height);
+	}
+
+	.row {
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.content1 {
+		background: white;
+		margin: var(--status-bar-height) 20rpx 0 20rpx;
+		border-radius: 20rpx;
+		padding: 40rpx;
+
+		.select-sf {
+			color: #999999;
+		}
+
+		.right {
+			color: #CBCBCB
+		}
+	}
+
+	.content2,
+	.content3,
+	.content5 {
+		box-sizing: border-box;
+		background: white;
+		border-radius: 20rpx;
+		padding: 20rpx;
+		margin: 20rpx;
+
+		.row {
+			margin: 30rpx;
+		}
+
+		.row1,
+		.row2 {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.left .top {
+				display: flex;
+			}
+		}
+	}
+
+	.select-type {
+		display: flex;
+		justify-content: flex-end;
+	}
+
+	.content2 {
+		padding: 40rpx;
+
+		.row1,
+		.row2 {
+			.left {
+				width: 100%;
+			}
+
+			.right {
+				color: #CBCBCB
+			}
+		}
+
+		.row2 {
+			margin-top: 40rpx;
+		}
+
+		.top {
+			display: flex;
+			align-items: center;
+		}
+
+		.bottom {
+			margin-top: 10rpx;
+			padding-left: 72rpx;
+		}
+
+		.title {
+			font-size: 36rpx;
+			font-weight: 700;
+			color: #171717;
+		}
+
+		.collect {
+			width: 40rpx;
+			height: 40rpx;
+			line-height: 40rpx;
+			background: #2772FB;
+			color: white;
+			padding: 6rpx;
+			border-radius: 50%;
+			text-align: center;
+		}
+
+		.send {
+			width: 40rpx;
+			height: 40rpx;
+			line-height: 40rpx;
+			background: #101010;
+			color: white;
+			padding: 6rpx;
+			border-radius: 50%;
+			text-align: center;
+		}
+	}
+
+	.content3 {}
+
+	.content4 {
+		margin: 20rpx;
+		padding-left: 20rpx;
+
+		.title {
+			color: #999999;
+		}
+
+		.btn-text {
+			color: #2772FB;
+			border: 1px solid #2772FB;
+			border-radius: 40rpx;
+			padding: 0rpx 10rpx;
+			box-sizing: border-box;
+		}
+	}
+
+	.submit {
+		width: 90%;
+		margin: 100rpx auto;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #FFFFFF;
+		background: #2772FB;
+		text-align: center;
+		padding: 20rpx 0;
+		border-radius: 50rpx;
+	}
+
+	.select-data {
+		color: #999999;
+	}
+
+	.row-bgc {
+		background: #F7F8FA;
+		padding: 20rpx 30rpx;
+		box-sizing: border-box;
+		border-radius: 10rpx;
+	}
+
+	.car-input {
+
+		// padding:20rpx;
+		// box-sizing: border-box;
+		// border-radius: 10px;
+	}
+
+	.car-line {
+		margin: 0 20rpx;
+
+	}
+
+	.car-row {
+		display: flex;
+		background: white;
+		padding: 20rpx;
+		box-sizing: border-box;
+		border-radius: 10rpx;
+	}
+</style>

+ 447 - 0
pages/release/lookRelease.vue

@@ -0,0 +1,447 @@
+<template>
+	<view class="content">
+		<view class="content1">
+			<view v-if="dataObj.status=='已通过'" class="row1">
+				<image class="jt-icon" src="@/static/images/common/tg.png" mode='widthFix'>
+					<view class="title">任务已通过</view>
+			</view>
+			<view v-if="dataObj.status=='已过期'" class="row1">
+				<image class="jt-icon" src="@/static/images/common/sx.png" mode='widthFix'>
+					<view class="title">任务已失效</view>
+			</view>
+			<view v-if="dataObj.status=='未通过'" class="row1">
+				<image class="jt-icon" src="@/static/images/common/wtg.png" mode='widthFix'>
+					<view class="title">任务未通过</view>
+			</view>
+			<view v-if="dataObj.status=='审核中'" class="row1">
+				<image class="jt-icon" src="@/static/images/common/sh.png" mode='widthFix'>
+					<view class="title">任务审核中</view>
+			</view>
+		</view>
+		<view class="flex place">
+			<view class="left flex">
+				<view class="flex">
+					<view class="ssx">{{$helper.getProvinceAbbreviation(dataObj.sendPrivate)}}</view>
+					<view class="level2-title">{{dataObj.sendCity}}</view>
+				</view>
+				<view class="level2-title">{{dataObj.sendArea}}</view>
+			</view>
+			<image class="jt" src="@/static/images/order/jt.png" mode='widthFix'></image>
+			<view class="right flex">
+				<view class="flex">
+					<view class="ssx">
+						{{$helper.getProvinceAbbreviation(dataObj.unloadPrivate)}}
+					</view>
+					<view class="level2-title">{{dataObj.unloadCity}} </view>
+				</view>
+				<view class="level2-title">{{dataObj.unloadArea}}</view>
+			</view>
+		</view>
+		<view class="content2">
+			<view class="row">
+				<view class="left">货主</view>
+				<view class="right">{{dataObj.cargoOwner}}</view>
+			</view>
+			<view class="row">
+				<view class="left">发货地区</view>
+				<view class="right">{{dataObj.sendPrivate}}{{dataObj.sendCity}}{{dataObj.sendArea}}</view>
+			</view>
+			<view class="row">
+				<view class="left">发货详细地址</view>
+				<view class="right">{{dataObj.sendDetailedAddress}}</view>
+			</view>
+			<view class="row">
+				<view class="left">收货地区</view>
+				<view class="right">{{dataObj.unloadPrivate}}{{dataObj.unloadCity}}{{dataObj.unloadArea}}</view>
+			</view>
+			<view class="row">
+				<view class="left">收货详细地址</view>
+				<view class="right">{{dataObj.unloadDetailedAddress}}</view>
+			</view>
+			<view class="row">
+				<view class="left">距离</view>
+				<view class="right">{{dataObj.distance}}</view>
+			</view>
+			<view class="row">
+				<view class="left">货名</view>
+				<view class="right">{{dataObj.goodsName}}</view>
+			</view>
+			<view class="flex row">
+				<view class="left">运费计算方式</view>
+				<view class="right">{{dataObj.billingMethod=='0'?'元/吨':'元/车'}}</view>
+			</view>
+			<view class="row">
+				<view class="left">运费单价</view>
+				<view class="right">{{dataObj.freightPrice}}</view>
+			</view>
+			<view class="row">
+				<view class="left">该任务申请运费垫付</view>
+				<view class="right">{{dataObj.freightAdvance=='0'?'否':'是'}}</view>
+			</view>
+		</view>
+		<view class="content5">
+			<view class="row">
+				<view class="left">发货联系人</view>
+				<view class="right">{{dataObj.sender}}</view>
+			</view>
+			<view class="row">
+				<view class="left">发货联系人电话</view>
+				<view class="right">{{dataObj.senderPhone}}</view>
+			</view>
+			<view class="row">
+				<view class="left">收货联系人</view>
+				<view class="right">{{dataObj.receiver}}</view>
+			</view>
+			<view class="row">
+				<view class="left">收货联系人电话</view>
+				<view class="right">{{dataObj.receiverPhone}}</view>
+			</view>
+			<view class="row">
+				<view class="left">重量(吨)</view>
+				<view class="right">{{dataObj.weight}}</view>
+			</view>
+			<view class="flex row">
+				<view class="left">预计装车日期起</view>
+				<view class="right">{{dataObj.loadingDateStart}}</view>
+			</view>
+			<view class="flex row">
+				<view class="left">预计装车日期止</view>
+				<view class="right">{{dataObj.loadingDateEnd}}</view>
+			</view>
+			<view class="row">
+				<view class="left">车长要求(米)</view>
+				<view class="right">{{dataObj.carLengthSmall}}-{{dataObj.carLength}}</view>
+			</view>
+			<view class="row">
+				<view class="left">载重要求(吨)</view>
+				<view class="right">{{dataObj.loadWeightSmall}}-{{dataObj.loadWeight}}</view>
+			</view>
+			<view class="row">
+				<view class="left">车型要求</view>
+				<view class="right">{{carType()}}</view>
+
+			</view>
+			<view class="row">
+				<view class="left">任务描述</view>
+			</view>
+			<view class="row">
+				<u--textarea v-model="dataObj.taskDescription" placeholder="请输入内容"></u--textarea>
+			</view>
+
+
+			<view class="flex row noborder">
+				<view class="left">任务有效期</view>
+				<view class="right">{{dataObj.taskValidity}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	var _this;
+	export default {
+		data() {
+			return {
+				dataObj: {
+					cargoOwner: '',
+					sendPrivate: '',
+					sendCity: '',
+					sendArea: '',
+					sendDetailedAddress: '',
+					unloadPrivate: '',
+					unloadCity: '',
+					unloadArea: '',
+					unloadDetailedAddress: '',
+					distance: '',
+					goodsName: '',
+					billingMethod: '',
+					freightPrice: '',
+					freightAdvance: '',
+					sender: '',
+					senderPhone: '',
+					receiver: '',
+					receiverPhone: '',
+					weight: '',
+					loadingDateStart: '',
+					loadingDateEnd: '',
+					carLengthSmall: '',
+					carLength: '',
+					loadWeightSmall: '',
+					loadWeight: '',
+					carModel: '',
+					taskDescription: '',
+					taskValidity: '',
+					sendLongitude: '',
+					sendLatitude: '',
+					unsendLongitude: '',
+					unsendLatitude: '',
+				},
+			}
+		},
+		onLoad(options) {
+			_this = this;
+			// this.validityPeriod = this.$helper.makeValidityPeriod()
+			// this.validityPeriodcq = this.$helper.makeValidityPeriod(0)
+			this.id = options.id
+			this.getDetails()
+		},
+		methods: {
+			carType() {
+				let good = this.dataObj
+				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
+			},
+			getDetails() {
+				this.$request.baseRequest('get', '/publishTaskInfo/seeTask', {
+						id: this.id,
+					}).then(res => {
+						if (res.code == 200) {
+							this.dataObj = res.data
+						}
+
+
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			// 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())
+			// 	// 	}
+			// 	// }
+			// },
+			// selectCargoOwnerClose() {
+			// 	this.show = false
+			// },
+			// confirmSelectCargoOwner(e) {
+			// 	debugger
+			// 	this.dataObj.cargoOwner = e.value[0]
+			// 	this.show = false
+			// },
+			// selectCargoOwner() {
+			// 	this.show = true
+			// },
+			// selectAddress(type) {
+			// 	uni.$u.route('/pages/release/selectAddress', {
+			// 		type: type,
+			// 	});
+			// },
+			// checkboxChange(n) {
+			// 	console.log('change', n);
+			// },
+			// selectValidityPeriodcq() {
+			// 	this.isShowcardValidity = true
+			// },
+			// confirmValidityPeriod(e) {
+			// 	console.log('confirm', e)
+			// 	switch (this.ValidityPeriodType) {
+			// 		case 0:
+			// 			this.dataObj.loadingDateStart = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+			// 			break
+			// 		case 1:
+			// 			this.dataObj.loadingDateEnd = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+			// 			break
+
+			// 	}
+			// 	this.isShowValidity = false
+			// },
+			// confirmValidityPeriodcq(e) {
+			// 	console.log('confirm', e)
+			// 	this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+
+			// 	this.isShowcardValidity = false
+			// },
+			// selectValidityPeriod(type) {
+			// 	this.ValidityPeriodType = type
+			// 	this.isShowValidity = true
+			// },
+			// change(e) {
+			// 	console.log('change', e);
+			// },
+			// back() {
+			// 	uni.navigateBack()
+			// },
+			// goToRecord() {
+			// 	uni.$u.route('/pages/release/record');
+			// },
+			// radioChange(n) {
+			// 	console.log('radioChange', n);
+			// 	this.dataDetails.type = n
+			// },
+			// submit() {
+			// 	debugger
+			// 	// 校验没写
+			// 	if (this.dataObj.billingMethod == '元/吨') {
+			// 		this.dataObj.billingMethod = 0
+			// 	} else {
+			// 		this.dataObj.billingMethod = 1
+			// 	}
+			// 	if (this.dataObj.freightAdvance) {
+			// 		this.dataObj.freightAdvance = 1
+			// 	} else {
+			// 		this.dataObj.freightAdvance = 0
+			// 	}
+			// 	let _list = []
+			// 	for (let i = 0; i < this.checkboxValue1.length; i++) {
+			// 		if (this.checkboxValue1 == '不限') {
+			// 			_list.push(1)
+			// 		} else if (this.checkboxValue1 == '高栏') {
+			// 			_list.push(2)
+			// 		} else if (this.checkboxValue1 == '集装箱') {
+			// 			_list.push(3)
+			// 		} else if (this.checkboxValue1 == '自卸车') {
+			// 			_list.push(4)
+			// 		}
+			// 	}
+			// 	this.dataObj.carModel = _list.toString()
+			// 	this.$request.baseRequest('post', '//publishTaskInfo/api/addTask', this.dataObj).then(res => {
+			// 			debugger
+
+
+			// 		})
+			// 		.catch(res => {
+			// 			uni.showToast({
+			// 				title: res.message,
+			// 				icon: 'none',
+			// 				duration: 2000
+			// 			})
+			// 		});
+			// },
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.jt {
+		width: 60rpx;
+	}
+
+	.row {
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.content1 {
+		padding: 20rpx 40rpx;
+
+		.jt-icon {
+			width: 46rpx;
+			margin-right: 20rpx;
+		}
+
+		.title {
+			font-size: 46rpx;
+			font-weight: 700;
+			color: #333333;
+		}
+
+		.row1 {
+			display: flex;
+			align-items: center;
+		}
+	}
+
+	.content2,
+	.content3,
+	.content5 {
+		box-sizing: border-box;
+		background: white;
+		border-radius: 20rpx;
+		padding: 20rpx;
+		margin: 20rpx;
+
+		.row1 {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.left .top {
+				display: flex;
+			}
+		}
+	}
+
+	.content2,.content5 {
+		.row {
+			margin: 20rpx 0;
+		}
+
+		.left {
+			color: #8F8F8F;
+		}
+		.right{
+			color: #333333;
+		}
+	}
+
+	.content4 {
+		margin: 20rpx;
+
+		.mr20 {
+			color: #999999;
+		}
+
+		.btn-text {
+			color: #2772FB;
+			border: 1px solid #2772FB;
+			border-radius: 20rpx;
+			padding: 0rpx 10rpx;
+			box-sizing: border-box;
+		}
+	}
+
+	.place {
+		margin: 20rpx;
+		background: white;
+		padding: 20rpx 0;
+		border-radius: 20rpx;
+
+
+		.left {
+			width: calc(50% - 25rpx);
+			align-items: center;
+			flex-direction: column;
+			justify-content: center;
+		}
+
+		.right {
+			width: calc(50% - 25rpx);
+			align-items: center;
+			justify-content: flex-end;
+			flex-direction: column;
+		}
+	}
+</style>

+ 19 - 0
pages/release/map.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 615 - 0
pages/release/record.vue

@@ -0,0 +1,615 @@
+<template>
+	<view class="content">
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" class="mescroll">
+			<view class="top">
+				<u-icon class="back" name="arrow-left" color="" size="20" @click="back"></u-icon>
+				<u-search placeholder="可按编号、货主、收发地查找" v-model="searchKeyWord" @search="search" @custom="search"
+					bgColor='#F5F6FA'></u-search>
+			</view>
+
+			<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 row1">
+						<view class="item1">
+							{{good.taskNo}}
+							<!-- {{good.goodsName}} -->
+						</view>
+						<view class="item2 ytg-color" v-if="good.status=='已通过'">{{good.status}}</view>
+						<view class="item2 wtg-color" v-if="good.status=='未通过'">{{good.status}}</view>
+						<view class="item2 shz-color" v-if="good.status=='审核中'">{{good.status}}</view>
+						<view class="item2 ygq-color" v-if="good.status=='已过期'">{{good.status}}</view>
+					</view>
+					<view class="flex row2">
+						<view class="left flex">
+							<view class="flex">
+								<view class="ssx">{{$helper.getProvinceAbbreviation(good.sendPrivate)}}</view>
+								<view class="level2-title">{{good.sendCity}}</view>
+							</view>
+							<view class="level2-title">{{good.sendArea}}</view>
+						</view>
+						<image class="jt-icon" src="@/static/images/goodSource/jt.png" mode='widthFix'></image>
+						<view class="right flex">
+							<view class="flex">
+								<view class="ssx">
+									{{$helper.getProvinceAbbreviation(good.unloadPrivate)}}
+								</view>
+								<view class="level2-title">{{good.unloadCity}} </view>
+							</view>
+							<view class="level2-title">{{good.unloadArea}}</view>
+						</view>
+					</view>
+					<view class="flex row3">
+						<view class="left">
+							<!-- <image class="hz" src="@/static/images/news/hz.png"></image> -->
+						</view>
+						<view class="right">
+							<view class="flex row">
+								<view class="flex">
+									<image class="hz-good" src="@/static/images/order/good-img.png"></image>
+									<view>{{good.goodsName}}</view>
+								</view>
+								<view class="cc">{{good.carLengthSmall}} - {{good.carLength}} 米</view>
+								<view class="sline"></view>
+								<view>{{carType(good)}}</view>
+							</view>
+							<view class="flex align-center">
+								<view class="yj">运距约 {{good.distance}}km</view>
+								<view class="sline"></view>
+								<view class=" ">{{good.weight}}吨</view>
+							</view>
+						</view>
+					</view>
+					<view class="row4 flex flex-end align-center">
+						<view class="time">{{good.updateDate}}</view>
+						<!-- <view class="car">{{good.freight}}{{good.illingMethod==0?'元/吨':'元/车'}}</view> -->
+					</view>
+					<view class="row5 flex flex-end">
+						<view class="normal" @click.stop="edit(good)" v-if="good.status!='审核中'">编辑</view>
+						<view class="normal" @click.stop="del(good)">删除</view>
+						<!-- v-if="good.status!='已通过'" -->
+						<view class="normal" @click.stop="Refresh(good)" v-if="good.status=='已通过'">刷新</view>
+						<view class="normal" @click.stop="hideShow(good)" v-if="good.showHide=='1'">隐藏</view>
+						<view class="normal" @click.stop="hideShow(good)" v-if="good.showHide=='2'">显示</view>
+					</view>
+				</view>
+			</view>
+		</mescroll-body>
+
+		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
+			:closeOnClickOverlay='true' :showCancelButton='true' @confirm="confirmClick" @close="cancelClick"
+			@cancel="cancelClick" class="modal">
+		</u-modal>
+
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
+	import {
+		apiGoods
+	} from "@/api/mock.js"
+	export default {
+		mixins: [MescrollMixin], // 使用mixin
+		data() {
+			return {
+				keyword: '',
+				// isShowStopBtn: false,
+				// isConfirmLoadingBtn:false,
+				// isShowCustomerServiceBtn:false,
+				// isConfirmUnLoadingBtn:false,
+				// isClosedBtn:false,
+				searchKeyWord: '',
+				mescroll: null,
+				id: '',
+				confirmText: '确定',
+				alertTitle: '',
+				alertContent: "",
+				isShowAlert: false,
+				goods: [], // 数据列表
+				delOrShowHidden: '',
+				rowObj: {}
+			}
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
+		},
+		onTabItemTap(e) {
+			// tab 点击时执行,此处直接接收单击事件
+			uni.pageScrollTo({
+				scrollTop: 0,
+				duration: 300
+			});
+		},
+		created() {
+			//#ifdef APP-PLUS
+			// this.getLngLat();
+			//#endif
+		},
+		onLoad() {
+			// let _isHave = this.$utils.getRoles('aaa')
+			// console.log(_isHave)
+
+		},
+		onShow() {
+			// this.upCallback({
+			// 	size: 10,
+			// 	num: 1
+			// })
+		},
+		// onPageScroll(res) {
+		// 	this.scrollTop = res.scrollTop
+		// 	console.log("页面滚动了", res.scrollTop)
+		// 	if (this.scrollTop > 1200) {
+		// 		uni.setTabBarItem({
+		// 			index: 1,
+		// 			text: '返回顶部',
+		// 			iconPath: 'static/images/common/top@2x.png',
+		// 			selectedIconPath: 'static/images/common/top@2x.png'
+		// 		})
+		// 	} else {
+		// 		uni.setTabBarItem({
+		// 			index: 1,
+		// 			text: '订单',
+		// 			iconPath: 'static/images/common/dingdan@2x(1).png',
+		// 			selectedIconPath: 'static/images/common/dingdan@2x.png'
+		// 		})
+		// 	}
+
+		// },
+		methods: {
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			search() {
+				debugger
+				this.mescroll.resetUpScroll()
+			},
+			back() {
+				uni.navigateBack()
+			},
+			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
+			},
+			confirmDel() {
+				let that = this
+				this.$request.baseRequest('post', '/publishTaskInfo/deleteTask', {
+						id: this.rowObj.id,
+					}).then(res => {
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "删除成功!",
+								complete() {
+									that.isShowAlert = false
+									that.mescroll.resetUpScroll()
+								}
+							})
+						} else {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "删除失败!",
+								complete() {
+									that.isShowAlert = false
+								}
+							})
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			del(val) {
+				this.alertTitle = '确定删除任务?'
+				this.isShowAlert = true
+				this.rowObj = val
+				this.delOrShowHidden = 2
+
+			},
+			edit(item) {
+				uni.$u.route('/pages/release/editRelease', item);
+			},
+			Refresh(val) {
+				let that = this
+				this.$request.baseRequest('post', '/publishTaskInfo/api/refresh', {
+						id: val.id,
+						commonId: this.userInfo.id
+					}).then(res => {
+						debugger
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "刷新成功"
+							})
+
+						} else {
+							this.$refs.uToast.show({
+								type: 'error',
+								message: "刷新失败",
+							})
+						}
+						this.isShowAlert = false
+						this.mescroll.resetUpScroll()
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			back() {
+				uni.navigateBack(-1)
+			},
+			mescrollInit(mescroll) {
+				this.mescroll = mescroll;
+			},
+			radioChange(n) {
+				console.log('radioChange', n);
+
+			},
+			confirmHideShow() {
+				let that = this
+				this.$request.baseRequest('post', '/publishTaskInfo/api/showHidden', {
+						id: this.rowObj.id,
+					}).then(res => {
+						debugger
+						console.log(this.rowObj)
+						if (res.code == 200) {
+							if (this.rowObj.showHide == 2) {
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "显示成功"
+								})
+							}
+							this.isShowAlert = false
+							this.mescroll.resetUpScroll()
+						} else {
+							this.$refs.uToast.show({
+								type: 'error',
+								message: "显示失败",
+							})
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			hideShow(val) {
+				//隐藏 显示
+				// =1为点击隐藏
+				this.rowObj = val
+				if (val.showHide == '1') {
+					this.alertTitle = '确定隐藏任务?'
+					this.isShowAlert = true
+
+					this.delOrShowHidden = 1
+				} else {
+					this.confirmHideShow()
+				}
+			},
+			confirmClick() {
+				if (this.delOrShowHidden == 1) {
+					this.confirmHideShow();
+				} else if (this.delOrShowHidden == 2) {
+					this.confirmDel()
+				}
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			toDetail(id) {
+				uni.$u.route('/pages/release/lookRelease', {
+					id: id,
+				});
+			},
+			upCallback(page) {
+				uni.showLoading({
+					mask: true,
+					title: '加载中...'
+				})
+				this.$request.baseRequest('get', '/publishTaskInfo/selectTask', {
+
+						commonId: this.userInfo.id,
+						searchKeyWord: this.searchKeyWord,
+						searchType: this.searchType,
+						pageSize: page.size,
+						currentPage: page.num
+					}).then(res => {
+						this.mescroll.endBySize(res.data.records.length, res.data.total);
+						if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
+						this.goods = this.goods.concat(res.data.records); //追加新数据
+						uni.hideLoading()
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.content {
+		padding-top: var(--status-bar-height);
+
+		.top {
+			display: flex;
+			background: white;
+			padding: 20rpx;
+
+			.back {
+				margin-right: 20rpx;
+			}
+		}
+	}
+
+	// .banner {
+	// 	width: 100%;
+	// 	position: relative;
+	// }
+
+	// .fixed,
+	// .fixed1 {
+	// 	background: white;
+	// 	position: fixed;
+	// 	top: var(--status-bar-height);
+	// 	z-index: 999;
+	// 	width: 100%;
+	// }
+
+	// .fixed {
+	// 	.title {
+	// 		background: white;
+	// 		position: relative;
+	// 		font-size: 36rpx;
+	// 		font-weight: 500;
+	// 		color: rgba(0, 0, 0, 0.85);
+
+	// 		.search {
+	// 			position: absolute;
+	// 			right: 20rpx;
+	// 		}
+	// 	}
+	// }
+
+	// .fixed1 {
+	// 	top: 0;
+	// 	height: var(--status-bar-height);
+	// 	background: white;
+	// }
+
+	// .banner-img {
+	// 	width: 100%;
+	// }
+
+	// .head {
+	// 	position: absolute;
+	// 	width: calc(100% - 108rpx);
+	// 	bottom: 0;
+	// 	background: white;
+	// 	margin: 0 20rpx;
+	// 	border-radius: 20rpx;
+
+	// 	.item1,
+	// 	.item3 {
+	// 		width: 40%;
+
+	// 		.text {
+	// 			text-overflow: ellipsis;
+	// 			overflow: hidden;
+	// 			white-space: nowrap;
+	// 		}
+
+	// 	}
+
+	// 	.item1 .text {
+	// 		text-align: left;
+	// 	}
+
+	// 	.item3 .text {
+	// 		text-align: right;
+	// 	}
+	// }
+
+	// .change-btn {
+	// 	width: 86rpx;
+	// 	height: 86rpx;
+	// }
+	.hz-good {
+		width: 44rpx;
+		height: 44rpx;
+		margin: 0 30rpx;
+	}
+
+	.good-list {
+		background-color: white;
+		margin: 20rpx;
+		padding: 20rpx 0rpx 0 0;
+		border-radius: 20rpx;
+
+		.row1 {
+			font-size: 26rpx;
+
+			.item1 {
+
+				color: #333333;
+			}
+		}
+
+		.row2 {
+			margin: 30rpx 0;
+
+			.left {
+				width: calc(50% - 25rpx);
+				align-items: center;
+				flex-direction: column;
+				justify-content: center;
+			}
+
+			.right {
+				width: calc(50% - 25rpx);
+				align-items: center;
+				justify-content: flex-end;
+				flex-direction: column;
+			}
+		}
+
+		.row3 {
+			background: #F5F6FA;
+			padding: 20rpx;
+			border-radius: 10rpx;
+			color: #333333;
+
+			.hz {
+				width: 74rpx;
+				height: 74rpx;
+				margin-right: 30rpx;
+			}
+
+			.cc {
+				margin-left: 20rpx;
+			}
+
+			.yj {
+				margin-left: 30rpx;
+			}
+		}
+
+		.row4 {
+			margin: 20rpx 0;
+
+			.time {
+				font-size: 26rpx;
+				color: #999999;
+				margin-right: 20rpx;
+			}
+
+			.car {
+				font-size: 28rpx;
+				color: #000000;
+			}
+		}
+
+		.row5 {
+			margin: 20rpx 0;
+			font-size: 28rpx;
+
+			.stop {
+				border-radius: 33px;
+				border: 1px solid #FE6300;
+				padding: 13rpx 31rpx;
+				margin-right: 20rpx;
+				color: #FE6300;
+			}
+
+			.normal {
+				border: 1px solid #CDCDCD;
+				border-radius: 33px;
+				padding: 13rpx 31rpx;
+				margin-left: 20rpx;
+			}
+		}
+	}
+
+	.jt-icon {
+		position: relative;
+		top: 6rpx;
+		width: 60rpx;
+		margin: 0 20rpx;
+
+	}
+
+	.row {
+		margin: 10rpx 0;
+		align-items: center;
+	}
+
+	// .item-bottom {
+	// 	background: #F0F5FF;
+	// 	padding: 0 30rpx;
+
+	// 	.name {
+	// 		font-size: 26rpx;
+	// 		font-weight: 700;
+	// 		color: #000000;
+	// 		margin-left: 30rpx;
+	// 	}
+
+	// 	.hp {
+	// 		margin: 30rpx;
+	// 	}
+
+	// 	.number-color {
+	// 		margin: 0 10rpx;
+	// 	}
+
+	// 	.qd {
+	// 		background: linear-gradient(97deg, #4FABFD 0%, #2772FB 100%);
+	// 		border-radius: 13px;
+	// 		font-size: 29rpx;
+	// 		font-weight: 400;
+	// 		color: #FFFFFF;
+	// 		padding: 10rpx 35rpx;
+	// 	}
+	// }
+
+	.dw {
+		align-items: center;
+	}
+
+	// .mescroll {
+	// 	margin-top: calc(var(--status-bar-height) + 140rpx);
+	// }
+
+	.sline {
+		height: 28rpx;
+		width: 1px;
+		background: black;
+		margin: 0 20rpx;
+	}
+
+	.search-view {
+		margin-top: var(--status-bar-height);
+		background: white;
+		padding: 0 20rpx;
+	}
+
+	.back-icon {
+		margin-right: 20rpx;
+	}
+
+	.near-search-text {
+		margin: 20rpx 0;
+	}
+
+	.item-style {
+
+		background: #F5F6FA;
+		padding: 11rpx 24rpx;
+		margin-right: 20rpx;
+		border-radius: 10px;
+		font-size: 26rpx;
+		color: #333333;
+	}
+
+	/deep/.u-modal__content {
+		flex-direction: column;
+	}
+</style>

+ 520 - 100
pages/release/release.vue

@@ -1,167 +1,285 @@
 <template>
 	<view class="content">
 		<view class="fixed1"></view>
-		<view class="fixed">
-			<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>
-				<view class="search">
-					<u-icon class="" name="order" color="" size="28" @click="goToRecord"></u-icon>
-					<view class="">
-						记录
-					</view>
+		<view class='title flex'>
+			<u-icon class="back" name="arrow-left" color="" size="20" @click="back"></u-icon>
+			<view class="nav-title">发布</view>
+			<view class="search" @click="goToRecord">
+				<u-icon class="" name="order" color="" size="28"></u-icon>
+				<view>
+					记录
 				</view>
-
 			</view>
 		</view>
 		<view class="content1">
-			<view class="row">
-				<view class="left">选择货主身份</view>
+			<view class="row" @click="selectCargoOwner" v-if="!dataObj.cargoOwner">
+				<view class="left select-sf">选择货主身份</view>
+				<view class="right">></view>
+			</view>
+			<view class="row" @click="selectCargoOwner" v-if="dataObj.cargoOwner">
+				<view class="left">{{dataObj.cargoOwner}}</view>
 				<view class="right">></view>
 			</view>
+			<u-picker :show="show" :columns="columns" :closeOnClickOverlay='true' @close='selectCargoOwnerClose'
+				@cancel='selectCargoOwnerClose' @confirm='confirmSelectCargoOwner'></u-picker>
 		</view>
 		<view class="content2">
 			<view class="row1">
 				<view class="left">
-					<view class="top">
-						<view>寄</view>
-						<view>选择发货地区</view>
+					<view class="top" @click="selectAddress(0)">
+						<view class="send">寄</view>
+						<view class="title">
+							{{dataObj.sendArea?(dataObj.sendPrivate + dataObj.sendCity+dataObj.sendArea):'选择发货地区'}}
+						</view>
 					</view>
 					<view class="bottom">
-						<input type="text" value="" placeholder="输入详细地址" />
+						<input type="text" value="" placeholder="输入详细地址" v-model="dataObj.sendDetailedAddress" />
 					</view>
 				</view>
-				<view class="right">
-					<view class="right">></view>
+				<view class="right" @click="selectAddress(0)" v-if="!dataObj.sendArea">
+					<view class="right">{{dataObj.sendArea?'':'>'}}</view>
 				</view>
 			</view>
-			<view class="row1">
+			<view class="row2">
 				<view class="left">
-					<view class="top">
-						<view>收</view>
-						<view>选择收货地区</view>
+					<view class="top" @click="selectAddress(1)">
+						<view class="collect">收</view>
+						<view class="title">
+							{{dataObj.unloadArea?(dataObj.unloadPrivate + dataObj.unloadCity+dataObj.unloadArea):'选择收货地区'}}
+						</view>
 					</view>
 					<view class="bottom">
-						<input type="text" value="" placeholder="输入详细地址" />
+						<input type="text" value="" placeholder="输入详细地址" v-model="dataObj.unloadDetailedAddress" />
 					</view>
 				</view>
-				<view class="right">
-					<view class="right">></view>
+				<view class="right" @click="selectAddress(1)" v-if="!dataObj.unloadArea">
+					<view class="right">{{dataObj.unloadArea?(dataObj.unloadCity+dataObj.unloadArea):'>'}}</view>
 				</view>
 			</view>
 		</view>
 		<view class="content3">
 			<view class="row">
-				<view class="left">运输距离</view>
-				<view class="right">自动计算</view>
+				<view class="left">距离</view>
+				<input type="text" value="" class="input" placeholder="自动计算" v-model="dataObj.distance" disabled="" />
 			</view>
 			<view class="row">
 				<view class="left">货名</view>
-				<view class="right"><input type="text" value="" placeholder="输入货物名称,不超过6个字" /></view>
+				<view class="right"><input type="text" class="input" value="" placeholder="输入货物名称"
+						v-model="dataObj.goodsName" /></view>
 			</view>
 			<view class="flex row">
 				<view class="left-text">运费计算方式</view>
 				<!-- <u-radio-group v-model="dataDetails.driverSex" placement="row"> -->
-				<u-radio-group placement="row" v-model="dataDetails.type" class="select-type">
-					<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
+				<u-radio-group placement="row" v-model="dataObj.billingMethod" class="select-type">
+					<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="row">
 				<view class="left">运费单价</view>
-				<view class="right"><input type="text" value="" placeholder="输入运费单价" class="input"/></view>
+				<view class="right"><input type="text" value="" placeholder="输入运费单价" class="input"
+						v-model="dataObj.freightPrice" /></view>
 			</view>
 			<view class="row">
 				<view class="left">该任务申请运费垫付</view>
-				<view class="right"><u-switch v-model="value" @change="change" size="20"></u-switch></view>
+				<view class="right">
+					<u-switch v-model="dataObj.freightAdvance" @change="change" size="20"></u-switch>
+				</view>
 			</view>
 		</view>
 		<view class="content4 flex">
-			<view class="mr20">以下为附加信息</view>
+			<view class="title">以下为附加信息</view>
 			<view class="btn-text">选填</view>
 		</view>
 		<view class="content5">
 			<view class="row">
 				<view class="left">发货联系人</view>
 				<view class="right flex">
-					<input type="text" value="" placeholder="输入发货联系人姓名" class="input"/>
+					<input type="text" value="" placeholder="输入发货联系人姓名" class="input" v-model="dataObj.sender" />
 				</view>
 			</view>
 			<view class="row">
 				<view class="left">发货联系人电话</view>
 				<view class="right flex">
-					<input type="text" value="" placeholder="输入发货联系人手机号" class="input"/>
+					<input type="text" value="" placeholder="输入发货联系人手机号" class="input" v-model="dataObj.senderPhone" />
 				</view>
 			</view>
 			<view class="row">
 				<view class="left">收货联系人</view>
 				<view class="right flex">
-					<input type="text" value="" placeholder="输入收货联系人姓名" class="input"/>
+					<input type="text" value="" placeholder="输入收货联系人姓名" class="input" v-model="dataObj.receiver" />
 				</view>
 			</view>
 			<view class="row">
 				<view class="left">收货联系人电话</view>
 				<view class="right flex">
-					<input type="text" value="" placeholder="输入收货联系人手机号" class="input"/>
+					<input type="text" value="" placeholder="输入收货联系人手机号" class="input"
+						v-model="dataObj.receiverPhone" />
 				</view>
 			</view>
 			<view class="row">
 				<view class="left">重量(吨)</view>
 				<view class="right flex">
-					<input type="text" value="" placeholder="输入预计发运重量" class="input"/>
+					<input type="text" value="" placeholder="输入预计发运重量" class="input" v-model="dataObj.weight" />
 				</view>
 			</view>
-			<view class="row">
-				<view class="left">预计装车日期起</view>
-				<view class="right flex">
-					<!-- <input type="text" value="" placeholder="输入发货联系人姓名" class="input"/> -->
+			<view class="flex row">
+				<view class="left-text">预计装车日期起</view>
+				<view :class="!dataObj.loadingDateStart?'select-data':''" @click="selectValidityPeriod(0)">
+					{{dataObj.loadingDateStart?dataObj.loadingDateStart:'选择有效截止日期>'}}
 				</view>
 			</view>
-			<view class="row">
-				<view class="left">预计装车日期止</view>
-				<view class="right flex">
-					<!-- <input type="text" value="" placeholder="输入发货联系人姓名" class="input"/> -->
+			<view class="flex row">
+				<view class="left-text">预计装车日期止</view>
+				<view :class="!dataObj.loadingDateEnd?'select-data':''" @click="selectValidityPeriod(1)">
+					{{dataObj.loadingDateEnd?dataObj.loadingDateEnd:'选择有效截止日期>'}}
 				</view>
 			</view>
 			<view class="row">
 				<view class="left">车长要求(米)</view>
-				<view class="right flex">
-					<!-- <input type="text" value="" placeholder="输入发货联系人姓名" class="input"/> -->
+			</view>
+			<view class="row flex-space-between row-bgc">
+				<view class="car-row">
+					<input type="text" value="" placeholder="最短不限" class="" v-model="dataObj.carLengthSmall"
+						class="car-input" />
+					<view>m</view>
+				</view>
+
+				<view class="car-line">-</view>
+				<view class="car-row">
+					<input type="text" value="" placeholder="最长不限" class="" v-model="dataObj.carLength"
+						class="car-input" />
+					<view>m</view>
 				</view>
+
 			</view>
 			<view class="row">
 				<view class="left">载重要求(吨)</view>
-				<view class="right flex">
-					<!-- <input type="text" value="" placeholder="输入发货联系人姓名" class="input"/> -->
+			</view>
+			<view class="row flex-space-between row-bgc">
+				<view class="car-row">
+					<input type="text" value="" placeholder="最小不限" class="car-input"
+						v-model="dataObj.loadWeightSmall" />
+					<view>吨</view>
+				</view>
+				<view class="car-line">-</view>
+				<view class="car-row">
+					<input type="text" value="" placeholder="最大不限" class="car-input" v-model="dataObj.loadWeight" />
+					<view>吨</view>
 				</view>
 			</view>
 			<view class="row">
 				<view class="left">车型要求</view>
-				<view class="right flex">
-					<!-- <input type="text" value="" placeholder="输入发货联系人姓名" class="input"/> -->
-				</view>
+			</view>
+			<view class="row">
+				<u-checkbox-group v-model="checkboxValue1" placement="row" @change="checkboxChange">
+					<u-checkbox :customStyle="radioCustomStyle" v-for="(item, index) in checkboxList1" :key="index"
+						:label="item.name" :name="item.name">
+					</u-checkbox>
+				</u-checkbox-group>
 			</view>
 			<view class="row">
 				<view class="left">任务描述</view>
-				<view class="right flex">
-					<!-- <input type="text" value="" placeholder="输入发货联系人姓名" class="input"/> -->
-				</view>
-			</view><view class="row">
-				<view class="left">任务有效期</view>
-				<view class="right flex">
-					<!-- <input type="text" value="" placeholder="输入发货联系人姓名" class="input"/>  -->
+			</view>
+			<view class="row">
+				<u--textarea v-model="dataObj.taskDescription" placeholder="请输入内容"></u--textarea>
+			</view>
+
+
+			<view class="flex row noborder">
+				<view class="left-text">任务有效期</view>
+				<view :class="dataObj.taskValidity?'':'select-data'" @click="selectValidityPeriodcq">
+					{{dataObj.taskValidity?dataObj.taskValidity:'选择任务有效期>'}}
 				</view>
 			</view>
+			<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriodcq"
+				@confirm="confirmValidityPeriodcq" @change="changeHandler" @close='isShowcardValidity=false'
+				@cancel='isShowcardValidity=false' :closeOnClickOverlay='true'>
+			</u-picker>
 		</view>
+		<view class="submit" @click="submit">立即发布</view>
+		<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>
 
 <script>
+	var _this;
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		data() {
 			return {
-				value:true,
+				radioCustomStyle: {
+					margin: '0 0 0 20rpx'
+				},
+				show: false,
+				columns: [
+					['个人货主', '黑龙江中天昊元贸易有限公司', '黑龙江利润元贸易有限公司']
+				],
+				dataObj: {
+					commonId: '',
+					cargoOwner: '',
+					sendPrivate: '',
+					sendCity: '',
+					sendArea: '',
+					sendDetailedAddress: '',
+					unloadPrivate: '',
+					unloadCity: '',
+					unloadArea: '',
+					unloadDetailedAddress: '',
+					distance: '',
+					goodsName: '',
+					billingMethod: '元/吨',
+					freightPrice: '',
+					freightAdvance: true,
+					sender: '',
+					senderPhone: '',
+					receiver: '',
+					receiverPhone: '',
+					weight: '',
+					loadingDateStart: '',
+					loadingDateEnd: '',
+					carLengthSmall: '',
+					carLength: '',
+					loadWeightSmall: '',
+					loadWeight: '',
+					carModel: '',
+					taskDescription: '',
+					taskValidity: '',
+					sendLongitude: '',
+					sendLatitude: '',
+					unsendLongitude: '',
+					unsendLatitude: '',
+				},
+				checkboxValue1: ['不限'],
+				checkboxList1: [{
+						name: '不限',
+						disabled: false
+					},
+					{
+						name: '高栏',
+						disabled: false
+					},
+					{
+						name: '集装箱',
+						disabled: false
+					},
+					{
+						name: '自卸车',
+						disabled: false
+					}
+				],
+				value: true,
+				isShowcardValidity: false,
+				ValidityPeriodType: '',
+				validityPeriod: [],
+				validityPeriodcq: [],
+				isShowValidity: false,
 				dataDetails: {
 					type: '元/车'
 				},
@@ -177,7 +295,154 @@
 				],
 			}
 		},
+		onShow() {
+
+		},
+		onLoad(options) {
+			_this = this;
+			this.validityPeriod = this.$helper.makeValidityPeriod()
+			this.validityPeriodcq = this.$helper.makeValidityPeriod(0)
+			let _faddress = uni.getStorageSync('storage_faddress');
+			let _saddress = uni.getStorageSync('storage_saddress');
+			if (_faddress) {
+				this.dataObj.sendCity = _faddress.city
+				this.dataObj.sendArea = _faddress.area
+				this.dataObj.sendPrivate = _faddress.province
+				this.dataObj.sendDetailedAddress = _faddress.detailedAddress
+				this.dataObj.sendLongitude = _faddress.longitude
+				this.dataObj.sendLatitude = _faddress.latitude
+			} else {
+				this.getDefaultPlace(0)
+			}
+			if (_saddress) {
+				this.dataObj.unloadDetailedAddress = _saddress.detailedAddress
+				this.dataObj.unloadCity = _saddress.city
+				this.dataObj.unloadArea = _saddress.area
+				this.dataObj.unloadPrivate = _saddress.province
+				this.dataObj.unsendLongitude = _saddress.longitude
+				this.dataObj.unsendLatitude = _saddress.latitude
+			} else {
+				this.getDefaultPlace(1)
+			}
+
+
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo']),
+		},
 		methods: {
+			//获取默认发货地、收货地
+			getDefaultPlace(type) {
+				// 0时获取默认发货地址,1时获取默认收货地址 通过选择获取的地址无需获取默认地址
+				uni.showLoading({
+					mask: true,
+					title: '加载中...'
+				})
+				this.$request.baseRequest('get', '/cargoOwnerAddressInfo/addressList', {
+						commonId: this.userInfo.id
+					}).then(res => {
+						for (let i = 0; i < res.data.length; i++) {
+							if (res.data[i].defaultShipment == 1 && type == 0) {
+								this.dataObj.sendCity = res.data[i].city
+								this.dataObj.sendArea = res.data[i].area
+								this.dataObj.sendPrivate = res.data[i].province
+								this.dataObj.sendDetailedAddress = res.data[i].detailedAddress
+								this.dataObj.sendLongitude = res.data[i].longitude
+								this.dataObj.sendLatitude = res.data[i].latitude
+							}
+							if (res.data[i].defaultReceipt == 1 && type == 1) {
+								this.dataObj.unloadDetailedAddress = res.data[i].detailedAddress
+								this.dataObj.unloadCity = res.data[i].city
+								this.dataObj.unloadArea = res.data[i].area
+								this.dataObj.unloadPrivate = res.data[i].province
+								this.dataObj.unsendLongitude = res.data[i].longitude
+								this.dataObj.unsendLatitude = res.data[i].latitude
+							}
+						}
+						uni.hideLoading()
+
+
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			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())
+				// 	}
+				// }
+			},
+			selectCargoOwnerClose() {
+				this.show = false
+			},
+			confirmSelectCargoOwner(e) {
+				debugger
+				this.dataObj.cargoOwner = e.value[0]
+				this.show = false
+			},
+			selectCargoOwner() {
+				this.show = true
+			},
+			selectAddress(type) {
+				uni.removeStorage({
+					key: 'storage_faddress'
+				});
+				uni.removeStorage({
+					key: 'storage_saddress'
+				});
+				uni.$u.route('/pages/release/selectAddress', {
+					type: type,
+				});
+			},
+			checkboxChange(n) {
+				console.log('change', n);
+			},
+			selectValidityPeriodcq() {
+				this.isShowcardValidity = true
+			},
+			confirmValidityPeriod(e) {
+				console.log('confirm', e)
+				switch (this.ValidityPeriodType) {
+					case 0:
+						this.dataObj.loadingDateStart = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						break
+					case 1:
+						this.dataObj.loadingDateEnd = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+						break
+
+				}
+				this.isShowValidity = false
+			},
+			confirmValidityPeriodcq(e) {
+				console.log('confirm', e)
+				this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+
+				this.isShowcardValidity = false
+			},
+			selectValidityPeriod(type) {
+				this.ValidityPeriodType = type
+				this.isShowValidity = true
+			},
 			change(e) {
 				console.log('change', e);
 			},
@@ -185,60 +450,94 @@
 				uni.navigateBack()
 			},
 			goToRecord() {
-
+				uni.$u.route('/pages/release/record');
 			},
 			radioChange(n) {
 				console.log('radioChange', n);
 				this.dataDetails.type = n
 			},
+			submit() {
+				debugger
+				// 校验没写
+				if (this.dataObj.billingMethod == '元/吨') {
+					this.dataObj.billingMethod = 0
+				} else {
+					this.dataObj.billingMethod = 1
+				}
+				if (this.dataObj.freightAdvance) {
+					this.dataObj.freightAdvance = 1
+				} else {
+					this.dataObj.freightAdvance = 0
+				}
+				let _list = []
+				for (let i = 0; i < this.checkboxValue1.length; i++) {
+					if (this.checkboxValue1 == '不限') {
+						_list.push(1)
+					} else if (this.checkboxValue1 == '高栏') {
+						_list.push(2)
+					} else if (this.checkboxValue1 == '集装箱') {
+						_list.push(3)
+					} else if (this.checkboxValue1 == '自卸车') {
+						_list.push(4)
+					}
+				}
+				this.dataObj.carModel = _list.toString()
+				this.dataObj.commonId = this.userInfo.id
+				this.$request.baseRequest('post', '/publishTaskInfo/api/addTask', this.dataObj).then(res => {
+						debugger
+						this.$refs.uToast.show({
+							type: 'success',
+							message: "发布成功",
+							complete() {
+								this.dataObj = {}
+							}
+						})
+
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
 		}
 	}
 </script>
 
 <style scoped lang="scss">
-	.input{
+	.input {
 		text-align: right;
 	}
-	.fixed {
-		background: white;
-		// position: fixed;
-		// top: var(--status-bar-height);
-		// z-index: 999;
-		// padding-bottom: 10rpx;
-		width: 100%;
-	}
-
-	.fixed {
 
+	.title {
+		padding: 0 20rpx;
+		display: flex;
+		justify-content: center;
+		position: relative;
 
 		.nav-title {
-			font-weight: 700;
+			font-size: 32rpx;
 		}
 
-		.title {
-			background: white;
-			position: relative;
-			font-size: 36rpx;
-			color: rgba(0, 0, 0, 0.85);
-
-			.search {
-				position: absolute;
-				right: 20rpx;
-				display: flex;
-			}
-
-			.back {
-				position: absolute;
-				left: 20rpx;
+		.back {
+			position: absolute;
+			left: 20rpx;
+		}
 
-			}
+		.search {
+			display: flex;
+			align-items: center;
+			position: absolute;
+			right: 20rpx;
 		}
+
 	}
 
+
 	.fixed1 {
-		top: 0;
 		height: var(--status-bar-height);
-		background: white;
 	}
 
 	.row {
@@ -250,18 +549,32 @@
 		background: white;
 		margin: var(--status-bar-height) 20rpx 0 20rpx;
 		border-radius: 20rpx;
-		padding: 20rpx;
+		padding: 40rpx;
+
+		.select-sf {
+			color: #999999;
+		}
+
+		.right {
+			color: #CBCBCB
+		}
 	}
 
 	.content2,
-	.content3,.content5 {
+	.content3,
+	.content5 {
 		box-sizing: border-box;
 		background: white;
 		border-radius: 20rpx;
 		padding: 20rpx;
 		margin: 20rpx;
 
-		.row1 {
+		.row {
+			margin: 30rpx;
+		}
+
+		.row1,
+		.row2 {
 			display: flex;
 			justify-content: space-between;
 			align-items: center;
@@ -271,21 +584,128 @@
 			}
 		}
 	}
-	.select-type{
+
+	.select-type {
 		display: flex;
 		justify-content: flex-end;
 	}
-	.content4{
+
+	.content2 {
+		padding: 40rpx;
+
+		.row1,
+		.row2 {
+			.left {
+				width: 100%;
+			}
+
+			.right {
+				color: #CBCBCB
+			}
+		}
+
+		.row2 {
+			margin-top: 40rpx;
+		}
+
+		.top {
+			display: flex;
+			align-items: center;
+		}
+
+		.bottom {
+			margin-top: 10rpx;
+			padding-left: 72rpx;
+		}
+
+		.title {
+			font-size: 36rpx;
+			font-weight: 700;
+			color: #171717;
+		}
+
+		.collect {
+			width: 40rpx;
+			height: 40rpx;
+			line-height: 40rpx;
+			background: #2772FB;
+			color: white;
+			padding: 6rpx;
+			border-radius: 50%;
+			text-align: center;
+		}
+
+		.send {
+			width: 40rpx;
+			height: 40rpx;
+			line-height: 40rpx;
+			background: #101010;
+			color: white;
+			padding: 6rpx;
+			border-radius: 50%;
+			text-align: center;
+		}
+	}
+
+	.content3 {}
+
+	.content4 {
 		margin: 20rpx;
-		.mr20{
+		padding-left: 20rpx;
+
+		.title {
 			color: #999999;
 		}
-		.btn-text{
+
+		.btn-text {
 			color: #2772FB;
 			border: 1px solid #2772FB;
-			border-radius: 20rpx;
+			border-radius: 40rpx;
 			padding: 0rpx 10rpx;
 			box-sizing: border-box;
 		}
 	}
+
+	.submit {
+		width: 90%;
+		margin: 100rpx auto;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #FFFFFF;
+		background: #2772FB;
+		text-align: center;
+		padding: 20rpx 0;
+		border-radius: 50rpx;
+	}
+
+	.select-data {
+		color: #999999;
+	}
+
+	.row-bgc {
+		background: #F7F8FA;
+		padding: 20rpx 30rpx;
+		box-sizing: border-box;
+		border-radius: 10rpx;
+	}
+
+	.car-input {
+
+		// padding:20rpx;
+		// box-sizing: border-box;
+		// border-radius: 10px;
+	}
+
+	.car-line {
+		margin: 0 20rpx;
+
+	}
+
+	.car-row {
+		display: flex;
+		background: white;
+		padding: 20rpx;
+		box-sizing: border-box;
+		border-radius: 10rpx;
+	}
 </style>

+ 472 - 0
pages/release/selectAddress.vue

@@ -0,0 +1,472 @@
+<template>
+	<view class="content">
+		<view class="content1">
+			<u-search placeholder="可按地址、联系人和电话查找" v-model="searchKeyWord" :showAction='false' @search="getList()">
+			</u-search>
+		</view>
+		<view class="content2" v-for="(item,index) in dataList" :key='index' @click="configAddress(item)">
+			<view class="row flex row1">
+				<view class="name">
+					{{item.contacts}}
+				</view>
+				<view class="phone">
+					{{item.contactPhone}}
+				</view>
+			</view>
+			<view class="row flex row2">
+				{{item.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}
+			</view>
+			<view class="row flex row3">
+				<u-radio-group placement="row" class="select-type" v-model="item.radiovalue">
+					<u-radio :customStyle="radioCustomStyle" v-for="(item1, index) in radiolist1" :key="index"
+						:label="item1.name" :name="item1.name" @change="radioChange($event,item)" labelSize='12px'
+						:iconSize='4'>
+					</u-radio>
+				</u-radio-group>
+				<view class="flex">
+					<view class="mr20 icon-img" @click.stop="toTop(item)">
+						<u-icon name="arrow-upward" color="#999999" size="18"></u-icon>置顶
+					</view>
+					<view class="mr20 icon-img" @click.stop="edit(item)">
+						<u-icon name="edit-pen-fill" color="#999999" size="18"></u-icon>编辑
+					</view>
+					<view class="mr20 icon-img" @click.stop="del(item)">
+						<u-icon name="trash-fill" color="#999999" size="18"></u-icon>删除
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="bottom-btn">
+			<view class="btn-left" @click="selectAddress(0)">选择临时地址</view>
+			<view class="btn-right" @click="selectAddress(1)">新增地址</view>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	let that;
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				temporaryAddress: {
+					latitude: '',
+					longitude: '',
+					detailedAddress: '',
+					province: '',
+					city: '',
+					area: '',
+					commonId: '',
+				},
+				radioCustomStyle: {
+					margin: '0 20rpx 0 0',
+				},
+				type: '',
+				radiovalue: '',
+				dataList: [],
+				searchKeyWord: '',
+				radiolist1: [{
+						name: '默认收货',
+						disabled: false
+					},
+					{
+						name: '默认卸货',
+						disabled: false
+					},
+
+				],
+			}
+		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo'])
+		},
+		onLoad(options) {
+			console.log(options)
+			this.type = options.type
+			that = this
+			this.getList()
+		},
+		methods: {
+			configAddress(val) {
+				if (this.type == 0) {
+					uni.setStorageSync('storage_faddress', val);
+				} else {
+					uni.setStorageSync('storage_saddress', val);
+				}
+				uni.$u.route('/pages/release/release');
+			},
+			getList() {
+				uni.showLoading({
+					mask: true,
+					title: '加载中...'
+				})
+				this.$request.baseRequest('get', '/cargoOwnerAddressInfo/selectCargoOwnerAddress', {
+						commonId: this.userInfo.id,
+						searchKeyWord: this.searchKeyWord,
+						pageSize: 100,
+						currentPage: 1
+					}).then(res => {
+						if (res.code == 200) {
+							this.dataList = res.data.records
+							for (let i = 0; i < this.dataList.length; i++) {
+								if (this.dataList[i].defaultShipment == 1) {
+									this.dataList[i].radiovalue = '默认卸货'
+								}
+								if (this.dataList[i].defaultReceipt == 1) {
+									this.dataList[i].radiovalue = '默认收货'
+								}
+							}
+							uni.hideLoading()
+						}
+
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			radioChange(n, val) {
+				console.log('radioChange', n);
+				console.log('radioChange', val);
+				let _flag;
+				if (n == '默认收货') {
+					_flag = 2
+				} else {
+					_flag = 1
+				}
+				this.$request.baseRequest('post', '/cargoOwnerAddressInfo/api/setDefault', {
+						commonId: this.userInfo.id,
+						id: val.id,
+						defaultFlag: _flag
+					}).then(res => {
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "设置成功",
+								complete() {
+									that.getList()
+								}
+							})
+						}
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			toTop(val) {
+				this.$request.baseRequest('post', '/cargoOwnerAddressInfo/api/setDefault', {
+						commonId: this.userInfo.id,
+						id: val.id,
+					}).then(res => {
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "置顶成功",
+								complete() {
+									that.getList()
+								}
+							})
+						}
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			edit(val) {
+				uni.$u.route('/pages/release/editAddress', val);
+			},
+			del(val) {
+				this.$request.baseRequest('post', '/cargoOwnerAddressInfo/api/deleteCargoOwnerAddress', {
+						id: val.id,
+					}).then(res => {
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "删除成功",
+								complete() {
+									that.getList()
+								}
+							})
+						}
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
+			selectAddress(type) {
+				// 0临时地址 1 新增地址
+				if (type == 0) {
+					let that = this
+					uni.chooseLocation({
+						success: function(res) {
+							console.log(res);
+							console.log('位置名称:' + res.name);
+							console.log('详细地址:' + res.address);
+							console.log('纬度:' + res.latitude);
+							console.log('经度:' + res.longitude);
+							var locationObj = that.$helper.formatLocation(res);
+							console.log(locationObj)
+							that.temporaryAddress.latitude = res.latitude
+							that.temporaryAddress.longitude = res.longitude
+							that.temporaryAddress.detailedAddress = locationObj.ADDRESS
+							that.temporaryAddress.province = locationObj.REGION_PROVINCE
+							that.temporaryAddress.city = locationObj.REGION_CITY
+							that.temporaryAddress.area = locationObj.REGION_COUNTRY
+							that.temporaryAddress.commonId = that.userInfo.id
+							that.configAddress(that.temporaryAddress)
+						},
+						fail: function() {
+							uni.getSetting({
+								success: function(res) {
+									var statu = res.authSetting;
+									if (!statu['scope.userLocation']) {
+										uni.showModal({
+											title: '是否授权当前位置',
+											content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用',
+											success: function(tip) {
+												if (tip.confirm) {
+													uni.openSetting({
+														success: function(
+															data) {
+															if (data
+																.authSetting[
+																	"scope.userLocation"
+																] === true
+															) {
+																uni.showToast({
+																	title: '授权成功',
+																	icon: 'success',
+																	duration: 1000
+																})
+																//授权成功之后,再调用chooseLocation选择地方
+																uni.chooseLocation({
+																	success: function(
+																		res
+																	) {
+																		console
+																			.log(
+																				res
+																			);
+																		console
+																			.log(
+																				'位置名称:' +
+																				res
+																				.name
+																			);
+																		console
+																			.log(
+																				'详细地址:' +
+																				res
+																				.address
+																			);
+																		console
+																			.log(
+																				'纬度:' +
+																				res
+																				.latitude
+																			);
+																		console
+																			.log(
+																				'经度:' +
+																				res
+																				.longitude
+																			);
+																		var locationObj =
+																			that
+																			.$helper
+																			.formatLocation(
+																				res
+																			);
+																		console
+																			.log(
+																				locationObj
+																			)
+																		that.temporaryAddress
+																			.latitude =
+																			res
+																			.latitude
+																		that.temporaryAddress
+																			.longitude =
+																			res
+																			.longitude
+																		that.temporaryAddress
+																			.detailedAddress =
+																			locationObj
+																			.ADDRESS
+																		that.temporaryAddress
+																			.province =
+																			locationObj
+																			.REGION_PROVINCE
+																		that.temporaryAddress
+																			.city =
+																			locationObj
+																			.REGION_CITY
+																		that.temporaryAddress
+																			.area =
+																			locationObj
+																			.REGION_COUNTRY
+																		that.temporaryAddress
+																			.commonId =
+																			that
+																			.userInfo
+																			.id
+																		that.configAddress(
+																			that
+																			.temporaryAddress
+																		)
+																	},
+																})
+															} else {
+																uni.showToast({
+																	title: '授权失败',
+																	icon: 'none',
+																	duration: 1000
+																})
+															}
+														}
+													})
+												}
+											}
+										})
+									}
+								},
+								fail: function(res) {
+									uni.showToast({
+										title: '调用授权窗口失败',
+										icon: 'none',
+										duration: 1000
+									})
+								}
+							})
+						}
+					})
+					// that.$helper.getLocation(that.temporaryAddress)
+					// console.log('1111111111111111111111111111111111')
+					// console.log(that.temporaryAddress)
+					// let that = this
+					// // this.isShowMap = true
+					// uni.chooseLocation({
+					// 	success: function(res) {
+					// 		console.log(res);
+					// 		console.log('位置名称:' + res.name);
+					// 		console.log('详细地址:' + res.address);
+					// 		console.log('纬度:' + res.latitude);
+					// 		console.log('经度:' + res.longitude);
+					// 		// let _address = that.$helper.getAddress(res.address)
+					// 		let _address = that.$helper.getLocation(res.address)
+					// 		console.log(_address)
+					// 		// that.temporaryAddress.latitude = res.latitude
+					// 		// that.temporaryAddress.longitude = res.longitude
+					// 		// that.temporaryAddress.detailedAddress = _address.village
+					// 		// that.temporaryAddress.province = _address.province
+					// 		// that.temporaryAddress.city = _address.city
+					// 		// that.temporaryAddress.area = _address.county
+					// 		// that.temporaryAddress.commonId = that.userInfo.id
+					// 		// that.configAddress(that.temporaryAddress)
+					// 	}
+					// });
+					// // console.log(123)
+					// // uni.$u.route('/pages/release/map', {
+					// // 	id: 1,
+					// // });
+				} else {
+					uni.$u.route('/pages/release/addAddress', {
+						type: type,
+					});
+				}
+
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.content1 {
+		background: white;
+		padding: 20rpx;
+	}
+
+	.content2 {
+		border-radius: 20rpx;
+		background: white;
+		margin: 20rpx;
+		padding: 20rpx;
+
+		.row {
+			margin-top: 20rpx;
+		}
+
+		.row1 {
+			font-weight: 700;
+			color: #333333;
+
+			.name {
+				margin-right: 20rpx;
+			}
+		}
+
+		.row2 {
+			color: #7D7D7D;
+		}
+
+		.row3 {
+			font-size: 24rpx;
+		}
+
+
+	}
+
+	.bottom-btn {
+		position: fixed;
+		bottom: 50rpx;
+		width: 100%;
+		display: flex;
+		justify-content: space-around;
+
+		.btn-left {
+			text-align: center;
+			width: 30%;
+			font-size: 32rpx;
+			font-weight: 500;
+			color: #2772FB;
+			background-color: #EEF4FF;
+			padding: 20rpx 40rpx;
+			border-radius: 40rpx;
+		}
+
+		.btn-right {
+			text-align: center;
+			width: 30%;
+			font-size: 32rpx;
+			font-weight: 500;
+			color: white;
+			background-color: #2772FB;
+			padding: 20rpx 40rpx;
+			border-radius: 50rpx;
+		}
+	}
+
+	.icon-img {
+		display: flex;
+		align-items: center;
+		color: #999999;
+	}
+</style>

+ 13 - 1
static/css/common.scss

@@ -90,7 +90,7 @@
 
 // 边线相关start
 .border-bottom{
-	border-bottom: 1px solid $uni-border-color;
+	border-bottom: 1px solid #EEEEEE;
 	padding-bottom: 10rpx;
 }
 // 边线相关end
@@ -156,6 +156,18 @@ color: #000000;
 .row-right-text{
 	font-size:28rpx;
 }
+.ytg-color{
+	color: #0CBB6B;
+}
+.shz-color{
+	color:#FE6300;
+}
+.wtg-color{
+	color:#EF4034;
+}
+.ygq-color{
+	color: #878787;
+}
 // 文字相关end
 // 边线相关start
 .noborder{

BIN
static/images/common/sh.png


BIN
static/images/common/sx.png


BIN
static/images/common/tg.png


BIN
static/images/common/wtg.png


BIN
static/images/mine/bg@2x.png


BIN
static/images/mine/duihao@2x.png


BIN
static/images/mine/wxz.png


BIN
static/images/order/good-img.png


BIN
static/images/order/jt.png


BIN
static/images/order/position.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 596 - 291
unpackage/dist/dev/app-plus/app-view.js


+ 147 - 0
unpackage/dist/dev/app-plus/hybrid/html/base64.js

@@ -0,0 +1,147 @@
+(function() {
+	var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+	var base64DecodeChars = new Array(
+		-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+		-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+		-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
+		52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
+		-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+		15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
+		-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+		41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
+	 Window.base64 = {
+		encode: function encode(str) {
+			var out, i, len;
+			var c1, c2, c3;
+			len = str.length;
+			i = 0;
+			out = "";
+			while (i < len) {
+				c1 = str.charCodeAt(i++) & 0xff;
+				if (i == len) {
+					out += base64EncodeChars.charAt(c1 >> 2);
+					out += base64EncodeChars.charAt((c1 & 0x3) << 4);
+					out += "==";
+					break;
+				}
+				c2 = str.charCodeAt(i++);
+				if (i == len) {
+					out += base64EncodeChars.charAt(c1 >> 2);
+					out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
+					out += base64EncodeChars.charAt((c2 & 0xF) << 2);
+					out += "=";
+					break;
+				}
+				c3 = str.charCodeAt(i++);
+				out += base64EncodeChars.charAt(c1 >> 2);
+				out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
+				out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
+				out += base64EncodeChars.charAt(c3 & 0x3F);
+			}
+			return out;
+		},
+		decode: function decode(str) {
+			var c1, c2, c3, c4;
+			var i, len, out;
+			len = str.length;
+			i = 0;
+			out = "";
+			while (i < len) {
+				/* c1 */
+				do {
+					c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
+				} while (i < len && c1 == -1);
+				if (c1 == -1)
+					break;
+				/* c2 */
+				do {
+					c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
+				} while (i < len && c2 == -1);
+				if (c2 == -1)
+					break;
+				out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
+				/* c3 */
+				do {
+					c3 = str.charCodeAt(i++) & 0xff;
+					if (c3 == 61)
+						return out;
+					c3 = base64DecodeChars[c3];
+				} while (i < len && c3 == -1);
+				if (c3 == -1)
+					break;
+				out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
+				/* c4 */
+				do {
+					c4 = str.charCodeAt(i++) & 0xff;
+					if (c4 == 61)
+						return out;
+					c4 = base64DecodeChars[c4];
+				} while (i < len && c4 == -1);
+				if (c4 == -1)
+					break;
+				out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
+			}
+			return out;
+		},
+		utf16to8: function utf16to8(str) {
+			var out, i, len, c;
+			out = "";
+			len = str.length;
+			for (i = 0; i < len; i++) {
+				c = str.charCodeAt(i);
+				if ((c >= 0x0001) && (c <= 0x007F)) {
+					out += str.charAt(i);
+				} else if (c > 0x07FF) {
+					out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
+					out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
+					out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
+				} else {
+					out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
+					out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
+				}
+			}
+			return out;
+		},
+		utf8to16: function utf8to16(str) {
+			var out, i, len, c;
+			var char2, char3;
+			out = "";
+			len = str.length;
+			i = 0;
+			while (i < len) {
+				c = str.charCodeAt(i++);
+				switch (c >> 4) {
+					case 0:
+					case 1:
+					case 2:
+					case 3:
+					case 4:
+					case 5:
+					case 6:
+					case 7:
+						// 0xxxxxxx
+						out += str.charAt(i - 1);
+						break;
+					case 12:
+					case 13:
+						// 110x xxxx 10xx xxxx
+						char2 = str.charCodeAt(i++);
+						out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
+						break;
+					case 14:
+						// 1110 xxxx 10xx xxxx 10xx xxxx
+						char2 = str.charCodeAt(i++);
+						char3 = str.charCodeAt(i++);
+						out += String.fromCharCode(((c & 0x0F) << 12) |
+							((char2 & 0x3F) << 6) |
+							((char3 & 0x3F) << 0));
+						break;
+				}
+			}
+			return out;
+		}
+	}
+console.log('base64')
+console.log(Window.base64)
+	return Window.base64
+})()

+ 273 - 0
unpackage/dist/dev/app-plus/hybrid/html/crypto.js

@@ -0,0 +1,273 @@
+
+
+(function() {
+Window.Crypto = {};
+	var base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+
+	// Crypto utilities
+	var util = Window.Crypto.util = {
+
+		// Bit-wise rotate left
+		rotl: function(n, b) {
+			return (n << b) | (n >>> (32 - b));
+		},
+
+		// Bit-wise rotate right
+		rotr: function(n, b) {
+			return (n << (32 - b)) | (n >>> b);
+		},
+
+		// Swap big-endian to little-endian and vice versa
+		endian: function(n) {
+
+			// If number given, swap endian
+			if (n.constructor == Number) {
+				return util.rotl(n, 8) & 0x00FF00FF |
+					util.rotl(n, 24) & 0xFF00FF00;
+			}
+
+			// Else, assume array and swap all items
+			for (var i = 0; i < n.length; i++)
+				n[i] = util.endian(n[i]);
+			return n;
+
+		},
+
+		// Generate an array of any length of random bytes
+		randomBytes: function(n) {
+			for (var bytes = []; n > 0; n--)
+				bytes.push(Math.floor(Math.random() * 256));
+			return bytes;
+		},
+
+		// Convert a string to a byte array
+		stringToBytes: function(str) {
+			var bytes = [];
+			for (var i = 0; i < str.length; i++)
+				bytes.push(str.charCodeAt(i));
+			return bytes;
+		},
+
+		// Convert a byte array to a string
+		bytesToString: function(bytes) {
+			var str = [];
+			for (var i = 0; i < bytes.length; i++)
+				str.push(String.fromCharCode(bytes[i]));
+			return str.join("");
+		},
+
+		// Convert a string to big-endian 32-bit words
+		stringToWords: function(str) {
+			var words = [];
+			for (var c = 0, b = 0; c < str.length; c++, b += 8)
+				words[b >>> 5] |= str.charCodeAt(c) << (24 - b % 32);
+			return words;
+		},
+
+		// Convert a byte array to big-endian 32-bits words
+		bytesToWords: function(bytes) {
+			var words = [];
+			for (var i = 0, b = 0; i < bytes.length; i++, b += 8)
+				words[b >>> 5] |= bytes[i] << (24 - b % 32);
+			return words;
+		},
+
+		// Convert big-endian 32-bit words to a byte array
+		wordsToBytes: function(words) {
+			var bytes = [];
+			for (var b = 0; b < words.length * 32; b += 8)
+				bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
+			return bytes;
+		},
+
+		// Convert a byte array to a hex string
+		bytesToHex: function(bytes) {
+			var hex = [];
+			for (var i = 0; i < bytes.length; i++) {
+				hex.push((bytes[i] >>> 4).toString(16));
+				hex.push((bytes[i] & 0xF).toString(16));
+			}
+			return hex.join("");
+		},
+
+		// Convert a hex string to a byte array
+		hexToBytes: function(hex) {
+			var bytes = [];
+			for (var c = 0; c < hex.length; c += 2)
+				bytes.push(parseInt(hex.substr(c, 2), 16));
+			return bytes;
+		},
+
+		// Convert a byte array to a base-64 string
+		bytesToBase64: function(bytes) {
+
+			// Use browser-native function if it exists
+			// if (typeof btoa == "function") return btoa(util.bytesToString(bytes));
+
+			var base64 = [],
+				overflow;
+
+			for (var i = 0; i < bytes.length; i++) {
+				switch (i % 3) {
+					case 0:
+						base64.push(base64map.charAt(bytes[i] >>> 2));
+						overflow = (bytes[i] & 0x3) << 4;
+						break;
+					case 1:
+						base64.push(base64map.charAt(overflow | (bytes[i] >>> 4)));
+						overflow = (bytes[i] & 0xF) << 2;
+						break;
+					case 2:
+						base64.push(base64map.charAt(overflow | (bytes[i] >>> 6)));
+						base64.push(base64map.charAt(bytes[i] & 0x3F));
+						overflow = -1;
+				}
+			}
+
+			// Encode overflow bits, if there are any
+			if (overflow != undefined && overflow != -1)
+				base64.push(base64map.charAt(overflow));
+
+			// Add padding
+			while (base64.length % 4 != 0) base64.push("=");
+
+			return base64.join("");
+
+		},
+
+		// Convert a base-64 string to a byte array
+		base64ToBytes: function(base64) {
+
+			// Use browser-native function if it exists
+			if (typeof atob == "function") return util.stringToBytes(atob(base64));
+
+			// Remove non-base-64 characters
+			base64 = base64.replace(/[^A-Z0-9+\/]/ig, "");
+
+			var bytes = [];
+
+			for (var i = 0; i < base64.length; i++) {
+				switch (i % 4) {
+					case 1:
+						bytes.push((base64map.indexOf(base64.charAt(i - 1)) << 2) |
+							(base64map.indexOf(base64.charAt(i)) >>> 4));
+						break;
+					case 2:
+						bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0xF) << 4) |
+							(base64map.indexOf(base64.charAt(i)) >>> 2));
+						break;
+					case 3:
+						bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0x3) << 6) |
+							(base64map.indexOf(base64.charAt(i))));
+						break;
+				}
+			}
+
+			return bytes;
+
+		}
+
+	};
+
+	Window.Crypto.HMAC = function(hasher, message, key, options) {
+
+		// Allow arbitrary length keys
+		key = key.length > hasher._blocksize * 4 ?
+			hasher(key, {
+				asBytes: true
+			}) :
+			util.stringToBytes(key);
+
+		// XOR keys with pad constants
+		var okey = key,
+			ikey = key.slice(0);
+		for (var i = 0; i < hasher._blocksize * 4; i++) {
+			okey[i] ^= 0x5C;
+			ikey[i] ^= 0x36;
+		}
+
+		var hmacbytes = hasher(util.bytesToString(okey) +
+			hasher(util.bytesToString(ikey) + message, {
+				asString: true
+			}), {
+				asBytes: true
+			});
+		return options && options.asBytes ? hmacbytes :
+			options && options.asString ? util.bytesToString(hmacbytes) :
+			util.bytesToHex(hmacbytes);
+
+	};
+	// The core
+	var SHA1 = Window.Crypto.SHA1 = function (message, options) {
+		var digestbytes = util.wordsToBytes(SHA1._sha1(message));
+		return options && options.asBytes ? digestbytes :
+		       options && options.asString ? util.bytesToString(digestbytes) :
+		       util.bytesToHex(digestbytes);
+	};
+	SHA1._sha1 = function(message) {
+
+		var m = util.stringToWords(message),
+			l = message.length * 8,
+			w = [],
+			H0 = 1732584193,
+			H1 = -271733879,
+			H2 = -1732584194,
+			H3 = 271733878,
+			H4 = -1009589776;
+
+		// Padding
+		m[l >> 5] |= 0x80 << (24 - l % 32);
+		m[((l + 64 >>> 9) << 4) + 15] = l;
+
+		for (var i = 0; i < m.length; i += 16) {
+
+			var a = H0,
+				b = H1,
+				c = H2,
+				d = H3,
+				e = H4;
+
+			for (var j = 0; j < 80; j++) {
+
+				if (j < 16) w[j] = m[i + j];
+				else {
+					var n = w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16];
+					w[j] = (n << 1) | (n >>> 31);
+				}
+
+				var t = ((H0 << 5) | (H0 >>> 27)) + H4 + (w[j] >>> 0) + (
+					j < 20 ? (H1 & H2 | ~H1 & H3) + 1518500249 :
+					j < 40 ? (H1 ^ H2 ^ H3) + 1859775393 :
+					j < 60 ? (H1 & H2 | H1 & H3 | H2 & H3) - 1894007588 :
+					(H1 ^ H2 ^ H3) - 899497514);
+
+				H4 = H3;
+				H3 = H2;
+				H2 = (H1 << 30) | (H1 >>> 2);
+				H1 = H0;
+				H0 = t;
+
+			}
+
+			H0 += a;
+			H1 += b;
+			H2 += c;
+			H3 += d;
+			H4 += e;
+
+		}
+
+		return [H0, H1, H2, H3, H4];
+
+	};
+
+	// Package private blocksize
+	SHA1._blocksize = 16;
+
+	// Crypto mode namespace
+	Window.Crypto.mode = {};
+	console.log("Window.Crypto")
+	console.log(Window.Crypto)
+	return Window.Crypto;
+})();

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


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

@@ -0,0 +1,179 @@
+<!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%;
+			}
+			.content{
+				background-color: white;
+				position: absolute;
+				top: 20px;
+				padding: 6px 10px;
+				border-radius: 6px;
+				width: 90%;
+				margin-left: 5%;
+				display: flex;
+				align-items: center;
+			}
+			.start,.end{
+				display: flex;
+				flex-direction: column;
+			}
+			.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 class='content'>
+			<div class='start'>
+				<div>武汉</div>
+				<div>江汉</div>
+			</div>
+			<div>------></div>
+			<div class='end'>
+				<div>沈阳</div>
+				<div>和平</div>
+			</div>
+		</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>

+ 268 - 0
unpackage/dist/dev/app-plus/hybrid/html/oss - 副本.js

@@ -0,0 +1,268 @@
+const Crypto = {};
+
+(function() {
+
+	var base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+
+	// Crypto utilities
+	var util = Crypto.util = {
+
+		// Bit-wise rotate left
+		rotl: function(n, b) {
+			return (n << b) | (n >>> (32 - b));
+		},
+
+		// Bit-wise rotate right
+		rotr: function(n, b) {
+			return (n << (32 - b)) | (n >>> b);
+		},
+
+		// Swap big-endian to little-endian and vice versa
+		endian: function(n) {
+
+			// If number given, swap endian
+			if (n.constructor == Number) {
+				return util.rotl(n, 8) & 0x00FF00FF |
+					util.rotl(n, 24) & 0xFF00FF00;
+			}
+
+			// Else, assume array and swap all items
+			for (var i = 0; i < n.length; i++)
+				n[i] = util.endian(n[i]);
+			return n;
+
+		},
+
+		// Generate an array of any length of random bytes
+		randomBytes: function(n) {
+			for (var bytes = []; n > 0; n--)
+				bytes.push(Math.floor(Math.random() * 256));
+			return bytes;
+		},
+
+		// Convert a string to a byte array
+		stringToBytes: function(str) {
+			var bytes = [];
+			for (var i = 0; i < str.length; i++)
+				bytes.push(str.charCodeAt(i));
+			return bytes;
+		},
+
+		// Convert a byte array to a string
+		bytesToString: function(bytes) {
+			var str = [];
+			for (var i = 0; i < bytes.length; i++)
+				str.push(String.fromCharCode(bytes[i]));
+			return str.join("");
+		},
+
+		// Convert a string to big-endian 32-bit words
+		stringToWords: function(str) {
+			var words = [];
+			for (var c = 0, b = 0; c < str.length; c++, b += 8)
+				words[b >>> 5] |= str.charCodeAt(c) << (24 - b % 32);
+			return words;
+		},
+
+		// Convert a byte array to big-endian 32-bits words
+		bytesToWords: function(bytes) {
+			var words = [];
+			for (var i = 0, b = 0; i < bytes.length; i++, b += 8)
+				words[b >>> 5] |= bytes[i] << (24 - b % 32);
+			return words;
+		},
+
+		// Convert big-endian 32-bit words to a byte array
+		wordsToBytes: function(words) {
+			var bytes = [];
+			for (var b = 0; b < words.length * 32; b += 8)
+				bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
+			return bytes;
+		},
+
+		// Convert a byte array to a hex string
+		bytesToHex: function(bytes) {
+			var hex = [];
+			for (var i = 0; i < bytes.length; i++) {
+				hex.push((bytes[i] >>> 4).toString(16));
+				hex.push((bytes[i] & 0xF).toString(16));
+			}
+			return hex.join("");
+		},
+
+		// Convert a hex string to a byte array
+		hexToBytes: function(hex) {
+			var bytes = [];
+			for (var c = 0; c < hex.length; c += 2)
+				bytes.push(parseInt(hex.substr(c, 2), 16));
+			return bytes;
+		},
+
+		// Convert a byte array to a base-64 string
+		bytesToBase64: function(bytes) {
+
+			// Use browser-native function if it exists
+			// if (typeof btoa == "function") return btoa(util.bytesToString(bytes));
+
+			var base64 = [],
+				overflow;
+
+			for (var i = 0; i < bytes.length; i++) {
+				switch (i % 3) {
+					case 0:
+						base64.push(base64map.charAt(bytes[i] >>> 2));
+						overflow = (bytes[i] & 0x3) << 4;
+						break;
+					case 1:
+						base64.push(base64map.charAt(overflow | (bytes[i] >>> 4)));
+						overflow = (bytes[i] & 0xF) << 2;
+						break;
+					case 2:
+						base64.push(base64map.charAt(overflow | (bytes[i] >>> 6)));
+						base64.push(base64map.charAt(bytes[i] & 0x3F));
+						overflow = -1;
+				}
+			}
+
+			// Encode overflow bits, if there are any
+			if (overflow != undefined && overflow != -1)
+				base64.push(base64map.charAt(overflow));
+
+			// Add padding
+			while (base64.length % 4 != 0) base64.push("=");
+
+			return base64.join("");
+
+		},
+
+		// Convert a base-64 string to a byte array
+		base64ToBytes: function(base64) {
+
+			// Use browser-native function if it exists
+			if (typeof atob == "function") return util.stringToBytes(atob(base64));
+
+			// Remove non-base-64 characters
+			base64 = base64.replace(/[^A-Z0-9+\/]/ig, "");
+
+			var bytes = [];
+
+			for (var i = 0; i < base64.length; i++) {
+				switch (i % 4) {
+					case 1:
+						bytes.push((base64map.indexOf(base64.charAt(i - 1)) << 2) |
+							(base64map.indexOf(base64.charAt(i)) >>> 4));
+						break;
+					case 2:
+						bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0xF) << 4) |
+							(base64map.indexOf(base64.charAt(i)) >>> 2));
+						break;
+					case 3:
+						bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0x3) << 6) |
+							(base64map.indexOf(base64.charAt(i))));
+						break;
+				}
+			}
+
+			return bytes;
+
+		}
+
+	};
+
+	Crypto.HMAC = function(hasher, message, key, options) {
+
+		// Allow arbitrary length keys
+		key = key.length > hasher._blocksize * 4 ?
+			hasher(key, {
+				asBytes: true
+			}) :
+			util.stringToBytes(key);
+
+		// XOR keys with pad constants
+		var okey = key,
+			ikey = key.slice(0);
+		for (var i = 0; i < hasher._blocksize * 4; i++) {
+			okey[i] ^= 0x5C;
+			ikey[i] ^= 0x36;
+		}
+
+		var hmacbytes = hasher(util.bytesToString(okey) +
+			hasher(util.bytesToString(ikey) + message, {
+				asString: true
+			}), {
+				asBytes: true
+			});
+		return options && options.asBytes ? hmacbytes :
+			options && options.asString ? util.bytesToString(hmacbytes) :
+			util.bytesToHex(hmacbytes);
+
+	};
+	// The core
+	SHA1._sha1 = function(message) {
+
+		var m = util.stringToWords(message),
+			l = message.length * 8,
+			w = [],
+			H0 = 1732584193,
+			H1 = -271733879,
+			H2 = -1732584194,
+			H3 = 271733878,
+			H4 = -1009589776;
+
+		// Padding
+		m[l >> 5] |= 0x80 << (24 - l % 32);
+		m[((l + 64 >>> 9) << 4) + 15] = l;
+
+		for (var i = 0; i < m.length; i += 16) {
+
+			var a = H0,
+				b = H1,
+				c = H2,
+				d = H3,
+				e = H4;
+
+			for (var j = 0; j < 80; j++) {
+
+				if (j < 16) w[j] = m[i + j];
+				else {
+					var n = w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16];
+					w[j] = (n << 1) | (n >>> 31);
+				}
+
+				var t = ((H0 << 5) | (H0 >>> 27)) + H4 + (w[j] >>> 0) + (
+					j < 20 ? (H1 & H2 | ~H1 & H3) + 1518500249 :
+					j < 40 ? (H1 ^ H2 ^ H3) + 1859775393 :
+					j < 60 ? (H1 & H2 | H1 & H3 | H2 & H3) - 1894007588 :
+					(H1 ^ H2 ^ H3) - 899497514);
+
+				H4 = H3;
+				H3 = H2;
+				H2 = (H1 << 30) | (H1 >>> 2);
+				H1 = H0;
+				H0 = t;
+
+			}
+
+			H0 += a;
+			H1 += b;
+			H2 += c;
+			H3 += d;
+			H4 += e;
+
+		}
+
+		return [H0, H1, H2, H3, H4];
+
+	};
+
+	// Package private blocksize
+	SHA1._blocksize = 16;
+
+	// Crypto mode namespace
+	Crypto.mode = {};
+
+})();
+console.log('oss')
+console.log(Crypto)
+return Crypto;

+ 265 - 0
unpackage/dist/dev/app-plus/hybrid/html/oss.js

@@ -0,0 +1,265 @@
+const Crypto = {};
+
+(function() {
+
+	var base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+
+	// Crypto utilities
+	var util = Crypto.util = {
+
+		// Bit-wise rotate left
+		rotl: function(n, b) {
+			return (n << b) | (n >>> (32 - b));
+		},
+
+		// Bit-wise rotate right
+		rotr: function(n, b) {
+			return (n << (32 - b)) | (n >>> b);
+		},
+
+		// Swap big-endian to little-endian and vice versa
+		endian: function(n) {
+
+			// If number given, swap endian
+			if (n.constructor == Number) {
+				return util.rotl(n, 8) & 0x00FF00FF |
+					util.rotl(n, 24) & 0xFF00FF00;
+			}
+
+			// Else, assume array and swap all items
+			for (var i = 0; i < n.length; i++)
+				n[i] = util.endian(n[i]);
+			return n;
+
+		},
+
+		// Generate an array of any length of random bytes
+		randomBytes: function(n) {
+			for (var bytes = []; n > 0; n--)
+				bytes.push(Math.floor(Math.random() * 256));
+			return bytes;
+		},
+
+		// Convert a string to a byte array
+		stringToBytes: function(str) {
+			var bytes = [];
+			for (var i = 0; i < str.length; i++)
+				bytes.push(str.charCodeAt(i));
+			return bytes;
+		},
+
+		// Convert a byte array to a string
+		bytesToString: function(bytes) {
+			var str = [];
+			for (var i = 0; i < bytes.length; i++)
+				str.push(String.fromCharCode(bytes[i]));
+			return str.join("");
+		},
+
+		// Convert a string to big-endian 32-bit words
+		stringToWords: function(str) {
+			var words = [];
+			for (var c = 0, b = 0; c < str.length; c++, b += 8)
+				words[b >>> 5] |= str.charCodeAt(c) << (24 - b % 32);
+			return words;
+		},
+
+		// Convert a byte array to big-endian 32-bits words
+		bytesToWords: function(bytes) {
+			var words = [];
+			for (var i = 0, b = 0; i < bytes.length; i++, b += 8)
+				words[b >>> 5] |= bytes[i] << (24 - b % 32);
+			return words;
+		},
+
+		// Convert big-endian 32-bit words to a byte array
+		wordsToBytes: function(words) {
+			var bytes = [];
+			for (var b = 0; b < words.length * 32; b += 8)
+				bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
+			return bytes;
+		},
+
+		// Convert a byte array to a hex string
+		bytesToHex: function(bytes) {
+			var hex = [];
+			for (var i = 0; i < bytes.length; i++) {
+				hex.push((bytes[i] >>> 4).toString(16));
+				hex.push((bytes[i] & 0xF).toString(16));
+			}
+			return hex.join("");
+		},
+
+		// Convert a hex string to a byte array
+		hexToBytes: function(hex) {
+			var bytes = [];
+			for (var c = 0; c < hex.length; c += 2)
+				bytes.push(parseInt(hex.substr(c, 2), 16));
+			return bytes;
+		},
+
+		// Convert a byte array to a base-64 string
+		bytesToBase64: function(bytes) {
+
+			// Use browser-native function if it exists
+			// if (typeof btoa == "function") return btoa(util.bytesToString(bytes));
+
+			var base64 = [],
+				overflow;
+
+			for (var i = 0; i < bytes.length; i++) {
+				switch (i % 3) {
+					case 0:
+						base64.push(base64map.charAt(bytes[i] >>> 2));
+						overflow = (bytes[i] & 0x3) << 4;
+						break;
+					case 1:
+						base64.push(base64map.charAt(overflow | (bytes[i] >>> 4)));
+						overflow = (bytes[i] & 0xF) << 2;
+						break;
+					case 2:
+						base64.push(base64map.charAt(overflow | (bytes[i] >>> 6)));
+						base64.push(base64map.charAt(bytes[i] & 0x3F));
+						overflow = -1;
+				}
+			}
+
+			// Encode overflow bits, if there are any
+			if (overflow != undefined && overflow != -1)
+				base64.push(base64map.charAt(overflow));
+
+			// Add padding
+			while (base64.length % 4 != 0) base64.push("=");
+
+			return base64.join("");
+
+		},
+
+		// Convert a base-64 string to a byte array
+		base64ToBytes: function(base64) {
+
+			// Use browser-native function if it exists
+			if (typeof atob == "function") return util.stringToBytes(atob(base64));
+
+			// Remove non-base-64 characters
+			base64 = base64.replace(/[^A-Z0-9+\/]/ig, "");
+
+			var bytes = [];
+
+			for (var i = 0; i < base64.length; i++) {
+				switch (i % 4) {
+					case 1:
+						bytes.push((base64map.indexOf(base64.charAt(i - 1)) << 2) |
+							(base64map.indexOf(base64.charAt(i)) >>> 4));
+						break;
+					case 2:
+						bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0xF) << 4) |
+							(base64map.indexOf(base64.charAt(i)) >>> 2));
+						break;
+					case 3:
+						bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0x3) << 6) |
+							(base64map.indexOf(base64.charAt(i))));
+						break;
+				}
+			}
+
+			return bytes;
+
+		}
+
+	};
+
+	Crypto.HMAC = function(hasher, message, key, options) {
+
+		// Allow arbitrary length keys
+		key = key.length > hasher._blocksize * 4 ?
+			hasher(key, {
+				asBytes: true
+			}) :
+			util.stringToBytes(key);
+
+		// XOR keys with pad constants
+		var okey = key,
+			ikey = key.slice(0);
+		for (var i = 0; i < hasher._blocksize * 4; i++) {
+			okey[i] ^= 0x5C;
+			ikey[i] ^= 0x36;
+		}
+
+		var hmacbytes = hasher(util.bytesToString(okey) +
+			hasher(util.bytesToString(ikey) + message, {
+				asString: true
+			}), {
+				asBytes: true
+			});
+		return options && options.asBytes ? hmacbytes :
+			options && options.asString ? util.bytesToString(hmacbytes) :
+			util.bytesToHex(hmacbytes);
+
+	};
+	// The core
+	SHA1._sha1 = function(message) {
+
+		var m = util.stringToWords(message),
+			l = message.length * 8,
+			w = [],
+			H0 = 1732584193,
+			H1 = -271733879,
+			H2 = -1732584194,
+			H3 = 271733878,
+			H4 = -1009589776;
+
+		// Padding
+		m[l >> 5] |= 0x80 << (24 - l % 32);
+		m[((l + 64 >>> 9) << 4) + 15] = l;
+
+		for (var i = 0; i < m.length; i += 16) {
+
+			var a = H0,
+				b = H1,
+				c = H2,
+				d = H3,
+				e = H4;
+
+			for (var j = 0; j < 80; j++) {
+
+				if (j < 16) w[j] = m[i + j];
+				else {
+					var n = w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16];
+					w[j] = (n << 1) | (n >>> 31);
+				}
+
+				var t = ((H0 << 5) | (H0 >>> 27)) + H4 + (w[j] >>> 0) + (
+					j < 20 ? (H1 & H2 | ~H1 & H3) + 1518500249 :
+					j < 40 ? (H1 ^ H2 ^ H3) + 1859775393 :
+					j < 60 ? (H1 & H2 | H1 & H3 | H2 & H3) - 1894007588 :
+					(H1 ^ H2 ^ H3) - 899497514);
+
+				H4 = H3;
+				H3 = H2;
+				H2 = (H1 << 30) | (H1 >>> 2);
+				H1 = H0;
+				H0 = t;
+
+			}
+
+			H0 += a;
+			H1 += b;
+			H2 += c;
+			H3 += d;
+			H4 += e;
+
+		}
+
+		return [H0, H1, H2, H3, H4];
+
+	};
+
+	// Package private blocksize
+	SHA1._blocksize = 16;
+
+	// Crypto mode namespace
+	Crypto.mode = {};
+	return Crypto;
+})();

+ 212 - 0
unpackage/dist/dev/app-plus/hybrid/html/video - 副本.js

@@ -0,0 +1,212 @@
+new Vue({
+		el: '#app',
+		data: {
+			url: '',
+			showVideo: false,
+			mediaRecorder: null,
+			MediaStreamTrack: null,
+			isAlreadyRecord: false,
+			count: 8,
+			countTimer: null,
+			recordedBlobs: []
+		},
+		beforeDestroy() {
+			this.MediaStreamTrack && this.MediaStreamTrack.stop()
+			this.countTimer && clearTimeout(this.countTimer)
+		},
+		computed: {},
+
+		mounted() {
+
+		},
+		watch: {},
+		methods: {
+			getPolicyBase64() {
+				let date = new Date();
+				date.setHours(date.getHours() + env.timeout);
+				let srcT = date.toISOString();
+				const policyText = {
+					"expiration": srcT, //设置该Policy的失效时间,超过这个失效时间之后,就没有办法通过这个policy上传文件了 
+					"conditions": [
+						["content-length-range", 0, 5 * 1024 * 1024] // 设置上传文件的大小限制,5mb
+					]
+				};
+
+				const policyBase64 = base64.encode(JSON.stringify(policyText));
+				console.log(policyBase64);
+				return policyBase64;
+			},
+			getSignature(policyBase64) {
+				const accesskey = 'FpClTp4OVrRRtHEfi3lBOWUoLxKieW';
+
+				const bytes = Crypto.HMAC(Crypto.SHA1, policyBase64, accesskey, {
+					asBytes: true
+				})
+				const signature = Crypto.util.bytesToBase64(bytes);
+				console.log(signature);
+				return signature;
+			},
+			uploadFile() {
+				var formdata = new FormData()
+				const policyBase64 = getPolicyBase64();
+				const signature = getSignature(policyBase64); //获取签名
+				formdata.append("key", "https://taohaoliang.oss-cn-beijing.aliyuncs.com")
+				formdata.append("policy", policyBase64)
+				formdata.append("OSSAccessKeyId", 'LTAI4G9c14PgKvM23WZ9zrpc')
+				formdata.append("signature", signature)
+				formdata.append("success_action_status", '200')
+				$.ajax({
+					type: "GET",
+					contentType: "application/json;charset=UTF-8",
+					url: "http://api1.eliangeyun.com/biInfoController/selectBiInfo?compId=" + compId +
+						'&seachMoth=' + seachMoth,
+					success: function(result) {
+						console.log("result", result);
+
+
+					},
+					//请求失败,包含具体的错误信息
+					error: function(e) {
+						console.log(e);
+						console.log(e.status);
+						console.log(e.responseText);
+					}
+				});
+			},
+			// 调用摄像头 开始录制
+			getCamera() {
+				// 注意本例需要在HTTPS协议网站中运行,新版本Chrome中getUserMedia接口在http下不再支持。
+				let constraints = {
+					audio: true,
+					video: {
+						facingMode: 'user' // 优先调前置摄像头
+					}
+				}
+				console.log('--------------')
+				console.log(navigator)
+				// 老的浏览器可能根本没有实现 mediaDevices,所以我们可以先设置一个空的对象
+				if (navigator.mediaDevices === undefined) {
+					navigator.mediaDevices = {}
+				}
+				// 一些浏览器部分支持 mediaDevices。我们不能直接给对象设置 getUserMedia
+				// 因为这样可能会覆盖已有的属性。这里我们只会在没有getUserMedia属性的时候添加它。
+				if (navigator.mediaDevices.getUserMedia === undefined) {
+					navigator.mediaDevices.getUserMedia = function(constraints) {
+						// 首先,如果有getUserMedia的话,就获得它
+						//   var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia
+						var getUserMedia = navigator.getUserMedia ||
+							navigator.webkitGetUserMedia ||
+							navigator.mozGetUserMedia
+						// 一些浏览器根本没实现它 - 那么就返回一个error到promise的reject来保持一个统一的接口
+						if (!getUserMedia) {
+							this.$messageBox.alert('该浏览器不支持getUserMedia,请使用其他浏览器')
+							return Promise.reject(new Error(
+								'getUserMedia is not implemented in this browser'))
+						}
+						// 否则,为老的navigator.getUserMedia方法包裹一个Promise
+						return new Promise(function(resolve, reject) {
+							getUserMedia.call(navigator, constraints, resolve, reject)
+						})
+					}
+				}
+				navigator.mediaDevices.getUserMedia(constraints)
+					.then((stream) => {
+						this.MediaStreamTrack = typeof stream.stop === 'function' ? stream : stream
+							.getTracks()[0]
+						console.log(stream)
+						console.log(this.MediaStreamTrack)
+						// 显示录制框
+						this.showVideo = true
+						this.isAlreadyRecord = false
+						let winURL = window.URL || window.webkitURL
+						if ('srcObject' in this.$refs.videoRef) {
+							this.$refs.videoRef.srcObject = stream
+						} else {
+							this.$refs.videoRef.src = winURL.createObjectURL(stream)
+						}
+						console.log(this.$refs.videoRef)
+						this.$refs.videoRef.onloadedmetadata = e => {
+							// 播放视频
+							this.$refs.videoRef.play()
+						}
+						let options = {
+							videoBitsPerSecond: 2500000
+						}
+						this.mediaRecorder = new MediaRecorder(stream, options)
+					})
+					.catch((err) => {
+						console.log(err)
+						this.$messageBox.alert('摄像头开启失败,请检查摄像头是否授权或是否可用!')
+					})
+			},
+			// 关闭活体检测
+			closeVideo() {
+				this.recordedBlobs = ''
+				this.isAlreadyRecord = false
+				this.MediaStreamTrack && this.MediaStreamTrack.stop()
+				this.countTimer && clearTimeout(this.countTimer)
+				this.$router.go(0)
+			},
+			// 录制倒计时
+			countDown() {
+				let that = this
+				let sendTime = Math.round(+new Date() / 1000)
+				return function walk() {
+					that.countTimer = setTimeout(function() {
+						that.countTimer && clearTimeout(that.countTimer)
+						let diff = sendTime + 8 - Math.round(+new Date() / 1000)
+						if (diff > 0) {
+							that.count = diff
+							walk()
+						} else {
+							console.log('倒计时结束')
+							this.showVideo = false
+							console.log(this.url)
+							console.log(this.MediaStreamTrack)
+						}
+					}, 1000)
+				}
+			},
+			// 保存录制视频
+			saveVideo() {
+				if (this.isAlreadyRecord) {
+					this.countTimer && clearTimeout(this.countTimer)
+					this.showVideo = false
+					//当录制的数据可用时
+					this.mediaRecorder.ondataavailable = (e) => {
+						console.log(e.data)
+						if (e.data && e.data.size > 0) {
+							this.recordedBlobs.push(e.data)
+						}
+					}
+					this.mediaRecorder.stop()
+					setTimeout(() => {
+						var blob = new Blob(this.recordedBlobs, {
+							type: 'video/mp4'
+						})
+						console.log(blob)
+						this.isAlreadyRecord = false
+						this.MediaStreamTrack && this.MediaStreamTrack.stop()
+						var reader = new FileReader();
+						reader.readAsDataURL(blob, 'utf-8')
+						reader.onload = () => {
+							console.log(reader.result); // base64格式
+							this.$refs.videob.src = reader.result
+							console.log('11111111111111111')
+							console.log(reader)
+
+						}
+					}, 1000)
+				} else {
+					this.count = 8
+					this.isAlreadyRecord = true
+					this.mediaRecorder.start(8000)
+					this.countDown()()
+				}
+			},
+			changeVideo(e) {
+				let file = this.$refs.videoFile.files
+				console.log(file)
+			}
+		}
+	})

+ 280 - 0
unpackage/dist/dev/app-plus/hybrid/html/video.html

@@ -0,0 +1,280 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="utf-8">
+		<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+		<title></title>
+		<style>
+
+		</style>
+	</head>
+	<body>
+		<div id='app'>
+			<div class="verify-placeholder">
+				<div class="verify-placeholder-img"></div>
+				<p class="verify-placeholder-text">正面平视手机、保证光线充足<br>请勿遮挡面部</p>
+			</div>
+			<div class="verify-bottom">
+				<ul class="verify-process">
+					<li>
+						<span class="num">1</span>
+						<p class="text">人脸放入框内,点击开始录制</p>
+					</li>
+					<li>
+						<span class="num">2</span>
+						<p class="text">录制倒计时<span class="text-tips">(8s)</span>,点击立即结束</p>
+					</li>
+					<li>
+						<span class="num">3</span>
+						<p class="text">完成录制,等待验证结果</p>
+					</li>
+				</ul>
+				<button class="verify-btn" @click="getCamera">开始录制</button>
+			</div>
+			<div class="btn-submit">
+				<button class="app-button-warning" size="small" @click="$router.back(-1)">上一步</button>
+				<button type="primary" size="small" class="btn">下一步</button>
+			</div>
+			<!--    人脸检测-->
+			<div class="video" v-show="showVideo">
+				<div class="video-cover"></div>
+				<video :src="url" ref="videoRef" autoplay playsinline x5-video-player-type="h5"></video>
+				<!-- 关闭按钮 -->
+				<button class="video-close" @click="closeVideo">×</button>
+				<button class="video-save" @click="saveVideo">
+					{{ isAlreadyRecord ? '结束录制(' + count + 's)' : '开始录制' }}</button>
+			</div>
+			<video ref="videob" controls="" name="media" v-show="!showVideo" width="100%" height="400"></video>
+		</div>
+	</body>
+	<script src="vue.min.js"></script>
+	<script src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/jquery.min.js"></script>
+	<script src="base64.js"></script>
+	<script src="crypto.js"></script>
+	<!-- <script src="oss.js"></script> -->
+	<!-- <script src="video.js"></script> -->
+	<script>
+		new Vue({
+			el: '#app',
+			data: {
+				url: '',
+				showVideo: false,
+				mediaRecorder: null,
+				MediaStreamTrack: null,
+				isAlreadyRecord: false,
+				count: 8,
+				countTimer: null,
+				recordedBlobs: [],
+				compId: ''
+			},
+			beforeDestroy() {
+				this.MediaStreamTrack && this.MediaStreamTrack.stop()
+				this.countTimer && clearTimeout(this.countTimer)
+			},
+			computed: {},
+
+			mounted() {
+
+			},
+			watch: {},
+			methods: {
+				getPolicyBase64() {
+					let date = new Date();
+					date.setHours(date.getHours() + 87600);
+					let srcT = date.toISOString();
+					const policyText = {
+						"expiration": srcT, //设置该Policy的失效时间,超过这个失效时间之后,就没有办法通过这个policy上传文件了 
+						"conditions": [
+							["content-length-range", 0, 5 * 1024 * 1024] // 设置上传文件的大小限制,5mb
+						]
+					};
+
+					const policyBase64 = Window.base64.encode(JSON.stringify(policyText));
+					console.log(policyBase64);
+					return policyBase64;
+				},
+				getSignature(policyBase64) {
+					const accesskey = 'FpClTp4OVrRRtHEfi3lBOWUoLxKieW';
+					// console.log('video.js')
+					// console.log(Crypto)
+					const bytes = Window.Crypto.HMAC(Window.Crypto.SHA1, policyBase64, accesskey, {
+						asBytes: true
+					})
+					const signature = Window.Crypto.util.bytesToBase64(bytes);
+					// console.log(signature);
+					return signature;
+				},
+				uploadFile(policyBase64) {
+					var formdata = new FormData()
+					// const policyBase64 = this.getPolicyBase64();
+
+					console.log("policyBase64-----------------------")
+					console.log(policyBase64)
+					const signature = this.getSignature(policyBase64); //获取签名
+					console.log("signatur--------------------------------------e")
+					console.log(signature)
+					formdata.append("key", "https://taohaoliang.oss-cn-beijing.aliyuncs.com")
+					formdata.append("policy", policyBase64)
+					formdata.append("OSSAccessKeyId", 'LTAI4G9c14PgKvM23WZ9zrpc')
+					formdata.append("signature", signature)
+					formdata.append("success_action_status", '200')
+					$.ajax({
+						type: "POST",
+						contentType: "application/json;charset=UTF-8",
+						url: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com',
+						success: function(result) {
+							console.log("result", result);
+
+
+						},
+						//请求失败,包含具体的错误信息
+						error: function(e) {
+							console.log(e);
+							console.log(e.status);
+							console.log(e.responseText);
+						}
+					});
+				},
+				// 调用摄像头 开始录制
+				getCamera() {
+					// 注意本例需要在HTTPS协议网站中运行,新版本Chrome中getUserMedia接口在http下不再支持。
+					let constraints = {
+						audio: true,
+						video: {
+							facingMode: 'user' // 优先调前置摄像头
+						}
+					}
+					console.log('--------------')
+					console.log(navigator)
+					// 老的浏览器可能根本没有实现 mediaDevices,所以我们可以先设置一个空的对象
+					if (navigator.mediaDevices === undefined) {
+						navigator.mediaDevices = {}
+					}
+					// 一些浏览器部分支持 mediaDevices。我们不能直接给对象设置 getUserMedia
+					// 因为这样可能会覆盖已有的属性。这里我们只会在没有getUserMedia属性的时候添加它。
+					if (navigator.mediaDevices.getUserMedia === undefined) {
+						navigator.mediaDevices.getUserMedia = function(constraints) {
+							// 首先,如果有getUserMedia的话,就获得它
+							//   var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia
+							var getUserMedia = navigator.getUserMedia ||
+								navigator.webkitGetUserMedia ||
+								navigator.mozGetUserMedia
+							// 一些浏览器根本没实现它 - 那么就返回一个error到promise的reject来保持一个统一的接口
+							if (!getUserMedia) {
+								this.$messageBox.alert('该浏览器不支持getUserMedia,请使用其他浏览器')
+								return Promise.reject(new Error(
+									'getUserMedia is not implemented in this browser'))
+							}
+							// 否则,为老的navigator.getUserMedia方法包裹一个Promise
+							return new Promise(function(resolve, reject) {
+								getUserMedia.call(navigator, constraints, resolve, reject)
+							})
+						}
+					}
+					navigator.mediaDevices.getUserMedia(constraints)
+						.then((stream) => {
+							this.MediaStreamTrack = typeof stream.stop === 'function' ? stream : stream
+								.getTracks()[0]
+							console.log(stream)
+							console.log(this.MediaStreamTrack)
+							// 显示录制框
+							this.showVideo = true
+							this.isAlreadyRecord = false
+							let winURL = window.URL || window.webkitURL
+							if ('srcObject' in this.$refs.videoRef) {
+								this.$refs.videoRef.srcObject = stream
+							} else {
+								this.$refs.videoRef.src = winURL.createObjectURL(stream)
+							}
+							console.log(this.$refs.videoRef)
+							this.$refs.videoRef.onloadedmetadata = e => {
+								// 播放视频
+								this.$refs.videoRef.play()
+							}
+							let options = {
+								videoBitsPerSecond: 2500000
+							}
+							this.mediaRecorder = new MediaRecorder(stream, options)
+						})
+						.catch((err) => {
+							console.log(err)
+							this.$messageBox.alert('摄像头开启失败,请检查摄像头是否授权或是否可用!')
+						})
+				},
+				// 关闭活体检测
+				closeVideo() {
+					this.recordedBlobs = ''
+					this.isAlreadyRecord = false
+					this.MediaStreamTrack && this.MediaStreamTrack.stop()
+					this.countTimer && clearTimeout(this.countTimer)
+					this.$router.go(0)
+				},
+				// 录制倒计时
+				countDown() {
+					let that = this
+					let sendTime = Math.round(+new Date() / 1000)
+					return function walk() {
+						that.countTimer = setTimeout(function() {
+							that.countTimer && clearTimeout(that.countTimer)
+							let diff = sendTime + 8 - Math.round(+new Date() / 1000)
+							if (diff > 0) {
+								that.count = diff
+								walk()
+							} else {
+								console.log('倒计时结束')
+								this.showVideo = false
+								console.log(this.url)
+								console.log(this.MediaStreamTrack)
+							}
+						}, 1000)
+					}
+				},
+				// 保存录制视频
+				saveVideo() {
+					if (this.isAlreadyRecord) {
+						this.countTimer && clearTimeout(this.countTimer)
+						this.showVideo = false
+						//当录制的数据可用时
+						this.mediaRecorder.ondataavailable = (e) => {
+							if (e.data && e.data.size > 0) {
+								this.recordedBlobs.push(e.data)
+							}
+						}
+						this.mediaRecorder.stop()
+						setTimeout(() => {
+							var blob = new Blob(this.recordedBlobs, {
+								type: 'video/mp4'
+							})
+
+							// console.log(blob)
+							this.isAlreadyRecord = false
+							this.MediaStreamTrack && this.MediaStreamTrack.stop()
+							var reader = new FileReader();
+							reader.readAsDataURL(blob, 'utf-8')
+							reader.onload = () => {
+
+								console.log('11111111111111111')
+								console.log(reader.result); // base64格式
+								this.$refs.videob.src = reader.result
+								this.uploadFile(reader.result)
+
+								console.log(reader)
+
+							}
+						}, 1000)
+					} else {
+						this.count = 8
+						this.isAlreadyRecord = true
+						this.mediaRecorder.start(8000)
+						this.countDown()()
+					}
+				},
+				changeVideo(e) {
+					let file = this.$refs.videoFile.files
+					console.log(file)
+				}
+			}
+		})
+	</script>
+
+</html>

+ 0 - 0
unpackage/dist/dev/app-plus/hybrid/html/video.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 5 - 0
unpackage/dist/dev/app-plus/hybrid/html/vue.min.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 9
unpackage/dist/dev/app-plus/pages/mine/camera/idcard/idcard.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 96 - 0
unpackage/dist/dev/app-plus/pages/mine/camera/video/video.js


+ 13 - 1
unpackage/dist/dev/app-plus/static/css/common.scss

@@ -90,7 +90,7 @@
 
 // 边线相关start
 .border-bottom{
-	border-bottom: 1px solid $uni-border-color;
+	border-bottom: 1px solid #EEEEEE;
 	padding-bottom: 10rpx;
 }
 // 边线相关end
@@ -156,6 +156,18 @@ color: #000000;
 .row-right-text{
 	font-size:28rpx;
 }
+.ytg-color{
+	color: #0CBB6B;
+}
+.shz-color{
+	color:#FE6300;
+}
+.wtg-color{
+	color:#EF4034;
+}
+.ygq-color{
+	color: #878787;
+}
 // 文字相关end
 // 边线相关start
 .noborder{

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


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


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


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


BIN
unpackage/dist/dev/app-plus/static/images/mine/bg@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/mine/duihao@2x.png


BIN
unpackage/dist/dev/app-plus/static/images/mine/wxz.png


BIN
unpackage/dist/dev/app-plus/static/images/order/good-img.png


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


BIN
unpackage/dist/dev/app-plus/static/images/order/position.png


+ 16 - 10
util/request.js

@@ -24,21 +24,27 @@ const baseRequest = (method, url, data,header) => {
 					if(res[1].data.code == '200' || res[1].data.code == 200){
 						// 后端返回的状态码100为成功状态,成功则返回请求结果,在app调试时可以通过console.log(JSON.stringify(res[1].data))来查看返回值(以项目实际情况为准)
 						resolve(res[1].data)
-					}
-					// 登录失败
-					if(res[1].data.code == '11006' || res[1].data.code == 11006){
-						reject(res[1].data)
-					}
-					if(res[1].data.code == '105' || res[1].data.code == 105){
-						// 后端返回状态码为105则为未登录状态(以项目实际情况为准)
+					}else{
 						uni.showToast({
 							icon:'none',
-						    title: '尚未登录',
+						    title: res[1].data.message,
 						    duration: 2000 
 						}); 
-						// 尚未登录的逻辑处理
-						return false
 					}
+					// // 登录失败
+					// if(res[1].data.code == '11006' || res[1].data.code == 11006){
+					// 	reject(res[1].data)
+					// }
+					// if(res[1].data.code == '105' || res[1].data.code == 105){
+					// 	// 后端返回状态码为105则为未登录状态(以项目实际情况为准)
+					// 	uni.showToast({
+					// 		icon:'none',
+					// 	    title: '尚未登录',
+					// 	    duration: 2000 
+					// 	}); 
+					// 	// 尚未登录的逻辑处理
+					// 	return false
+					// }
 				}
 			).catch(
 				(response) => {

Vissa filer visades inte eftersom för många filer har ändrats