Bladeren bron

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

gjy 2 jaren geleden
bovenliggende
commit
0fd8003adf
49 gewijzigde bestanden met toevoegingen van 2714 en 1066 verwijderingen
  1. 21 7
      App.vue
  2. 107 0
      config/componentConfig.js
  3. 27 6
      manifest.json
  4. 1 1
      pages.json
  5. 2 6
      pages/carSource/driverSee.vue
  6. 1 1
      pages/carSource/index.vue
  7. 1 1
      pages/mine/agentCargoOwner.vue
  8. 1 2
      pages/mine/cargoowner/addEnerprise.vue
  9. 5 4
      pages/mine/cargoowner/cargoowner.vue
  10. 1 2
      pages/mine/cargoowner/editEnerprise.vue
  11. 6 5
      pages/mine/cargoowner/editpersonalinformation.vue
  12. 12 23
      pages/mine/company/addcompany.vue
  13. 15 14
      pages/mine/company/editcompany.vue
  14. 1 1
      pages/mine/company/index.vue
  15. 91 12
      pages/mine/index.vue
  16. 138 126
      pages/mine/manageBankCards/addBankCard.vue
  17. 1 1
      pages/mine/manageBankCards/editBankCard.vue
  18. 19 11
      pages/mine/myAccount/bankList.vue
  19. 9 4
      pages/mine/myAccount/withdrawal.vue
  20. 1 1
      pages/mine/settings/editAvatar.vue
  21. 18 2
      pages/mine/settings/editPassword.vue
  22. 1 1
      pages/mine/settings/editPhone.vue
  23. 1 1
      pages/news/feedbackResults.vue
  24. 1 1
      pages/news/index.vue
  25. 11 2
      pages/news/newsSee.vue
  26. 0 3
      pages/order/addEvaluation.vue
  27. 0 3
      pages/order/driverDetail.vue
  28. 34 34
      pages/order/fk.vue
  29. 8 7
      pages/order/index.vue
  30. 39 40
      pages/order/jb.vue
  31. 25 24
      pages/order/map.nvue
  32. 131 138
      pages/order/map.vue
  33. 223 168
      pages/order/orderDetails.vue
  34. 241 62
      pages/order/signContract.vue
  35. 25 5
      pages/public/register.vue
  36. 48 29
      pages/release/addAddress.vue
  37. 1 1
      pages/release/editAddress.vue
  38. 90 68
      pages/release/editRelease.vue
  39. 69 60
      pages/release/record.vue
  40. 208 186
      pages/release/release.vue
  41. 3 2
      pages/release/selectAddress.vue
  42. BIN
      static/images/help/zy.png
  43. BIN
      static/images/mine/appUpdate.png
  44. 5 0
      uni_modules/zhouWei-APPUpdate/changelog.md
  45. 830 0
      uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate.js
  46. 79 0
      uni_modules/zhouWei-APPUpdate/package.json
  47. 162 0
      uni_modules/zhouWei-APPUpdate/readme.md
  48. BIN
      uni_modules/zhouWei-APPUpdate/static/ic_ar.png
  49. 1 1
      util/request.js

+ 21 - 7
App.vue

@@ -18,8 +18,18 @@
 	import * as config from '@/config'
 	import permision from "@/js_sdk/wa-permission/permission.js"
 	import appUpdate from 'common/appUpdate.js'
-	// import app_push from './components/APPPush/app_push.js'
+	// #ifdef APP-PLUS
+	// import APPUpdate from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
+	import APPUpdate, {
+		getCurrentNo
+	} from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
+	// #endif
 	export default {
+		data(){
+			return{
+				version:""//版本号
+			}
+		},
 		methods: {
 			...mapMutations(['login']),
 		},
@@ -185,10 +195,10 @@
 								};
 								const native = uni.requireNativePlugin('AJ-Alert');
 								native.showAction(options, result => {
-									
-									uni.switchTab({
-										url: '/pages/mine/index'
+									uni.navigateTo({
+										url: '/pages/mine/cargoowner/cargoowner'
 									})
+									// uni.$u.route("/pages/mine/cargoowner/cargoowner" )
 								    // 点击是的回调, result暂时没有返回内容
 								}, cancel => {
 								    // 点击否的回调
@@ -214,10 +224,8 @@
 			})
 			// #ifdef APP-PLUS
 			let type = uni.getSystemInfoSync().platform
-			console.log(type)
 			if (type == "android") {
-				console.log(111111111111111111111111111111111111111111111111111)
-				// appUpdate()
+				APPUpdate()
 			}
 			// var that = this
 			// plus.push.getClientInfoAsync((info) => {
@@ -310,6 +318,12 @@
 		},
 		onShow: function() {
 			console.log('App Show')
+			// #ifdef APP-PLUS
+			getCurrentNo(res => {
+				// 进页面获取当前APP版本号(用于页面显示)
+				this.version = res.versionName;
+			});
+			// #endif
 		},
 		onHide: function() {
 			console.log('App Hide')

+ 107 - 0
config/componentConfig.js

@@ -0,0 +1,107 @@
+/**** 此文件说明请看注释 *****/
+// 可以用自己项目的请求方法
+// 请求配置说明:https://ext.dcloud.net.cn/plugin?id=822
+// import $http from '@/config/requestConfig';
+/**** 结束 *****/
+const platform = uni.getSystemInfoSync().platform;
+import * as config from '../config'
+
+export default {
+	// 发起ajax请求获取服务端版本号
+	getServerNo: (version, isPrompt = false, callback) => {
+		let httpData = {
+			version: version.versionCode,
+			// 版本名称
+			versionName: version.versionName,
+			// setupPage参数说明(判断用户是不是从设置页面点击的更新,如果是设置页面点击的更新,有不要用静默更新了,不然用户点击没反应很奇怪的)
+			setupPage: isPrompt
+		};
+		if (platform == "android") {
+			httpData.type = 1101;
+		} else {
+			httpData.type = 1102;
+		}
+		/* 接口入参说明
+		 * version: 应用当前版本号(已自动获取)
+		 * versionName: 应用当前版本名称(已自动获取)
+		 * type:平台(1101是安卓,1102是IOS)
+		 */
+		/****************以下是示例*******************/
+		// 可以用自己项目的请求方法(接口自己找后台要,插件不提供)
+		plus.runtime.getProperty(plus.runtime.appid, (info) => {
+			//版本号
+			const baseUrlNew = config.def().baseUrlNew
+			uni.request({
+				url: baseUrlNew + '/appVersion/selectInfo',
+				data: {
+					appid: plus.runtime.appid,
+					version: info.version,
+					imei: "1",
+					type: 'hz'
+				},
+				method: 'GET',
+				success: (res) => {
+					if (res.data.data && res.data.data.wgtUrl) {
+						res.data.data.versionName = res.data.data.version
+						res.data.data.versionInfo = res.data.data.note
+						res.data.data.downloadUrl = res.data.data.wgtUrl
+						// 兼容之前的版本(updateType是新版才有的参数)
+						if (res.data.data.updateType) {
+							callback && callback(res.data.data);
+						} else {
+							if (res.forceUpdate) {
+								res.updateType = "forcibly";
+							} else {
+								res.updateType = "solicit";
+							}
+							callback && callback(res.data.data);
+						}
+					} else if (isPrompt) {
+						uni.showToast({
+							title: "暂无新版本",
+							icon: "none"
+						});
+					}
+				}
+		})
+		
+		})
+		//      $http.get("api/common/v1/app_version", httpData,{
+		//          isPrompt: isPrompt
+		//      }).then(res => {
+		// console.log("新更新res",res)
+		//          /* res的数据说明
+		//           * | 参数名称        | 一定返回     | 类型        | 描述
+		//           * | -------------|--------- | --------- | ------------- |
+		//           * | versionCode     | y        | int       | 版本号        |
+		//           * | versionName     | y        | String    | 版本名称      |
+		//           * | versionInfo     | y        | String    | 版本信息      |
+		//           * | updateType      | y        | String    | forcibly = 强制更新, solicit = 弹窗确认更新, silent = 静默更新 |
+		//           * | downloadUrl     | y        | String    | 版本下载链接(IOS安装包更新请放跳转store应用商店链接,安卓apk和wgt文件放文件下载链接)  |
+		//           */
+		//          if (res && res.downloadUrl) {
+		//              // 兼容之前的版本(updateType是新版才有的参数)
+		//              if(res.updateType){
+		//                  callback && callback(res);
+		//              } else {
+		//                  if(res.forceUpdate){
+		//                      res.updateType = "forcibly";
+		//                  } else {
+		//                      res.updateType = "solicit";
+		//                  }
+		//                  callback && callback(res);
+		//              }
+		//          } else if (isPrompt) {
+		//              uni.showToast({
+		//                  title: "暂无新版本",
+		//                  icon: "none"
+		//              });
+		//          }
+		//      });
+		/****************以上是示例*******************/
+	},
+	// 弹窗主颜色(不填默认粉色)
+	appUpdateColor: "f00",
+	// 弹窗图标(不填显示默认图标,链接配置示例如: '/static/demo/ic_attention.png')
+	appUpdateIcon: ''
+}

+ 27 - 6
manifest.json

@@ -2,11 +2,14 @@
     "name" : "畅运通-货主端",
     "appid" : "__UNI__DCD13AC",
     "description" : "畅运通",
-    "versionName" : "1.0.5",
-    "versionCode" : 105,
+    "versionName" : "1.1.0",
+    "versionCode" : 110,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
+        "compatible" : {
+            "ignoreVersion" : true
+        },
         "usingComponents" : true,
         "nvueStyleCompiler" : "uni-app",
         "compilerVersion" : 3,
@@ -19,8 +22,8 @@
         /* 模块配置 */
         "modules" : {
             "Maps" : {},
-            "VideoPlayer" : {},
-            "Geolocation" : {}
+            "Geolocation" : {},
+            "Push" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -48,12 +51,16 @@
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>",
+                    "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>"
                 ],
                 "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
             },
             /* ios打包配置 */
-            "ios" : {},
+            "ios" : {
+                "dSYMs" : false
+            },
             /* SDK配置 */
             "sdkConfigs" : {
                 "maps" : {
@@ -125,6 +132,20 @@
                     "pid" : "1664",
                     "parameters" : {}
                 }
+            },
+            "KJ-Camera" : {
+                "__plugin_info__" : {
+                    "name" : "相机自定义拍照录像,可设置相机分辨率、相机焦距、相机无声录像、相机支持横竖屏",
+                    "description" : "相机自定义拍照录像,可设置相机分辨率、相机焦距、相机无声录像、相机支持横竖屏、相机切换前后摄像头 QQ群:863776189 可接单 离线包:单价*10  源码:单价*15",
+                    "platforms" : "Android,iOS",
+                    "url" : "https://ext.dcloud.net.cn/plugin?id=3404",
+                    "android_package_name" : "uni.UNIDCD13AC",
+                    "ios_bundle_id" : "uni.UNIDCD13AC",
+                    "isCloud" : true,
+                    "bought" : 1,
+                    "pid" : "3404",
+                    "parameters" : {}
+                }
             }
         }
     },

+ 1 - 1
pages.json

@@ -401,7 +401,7 @@
 					"titleNView": {
 						"buttons": [{
 							"text": "记录",
-							"fontSize": "13"
+							"fontSize": "14"
 						}]
 					}
 				}

+ 2 - 6
pages/carSource/driverSee.vue

@@ -176,9 +176,8 @@
 			this.show = true
 		},
 		onLoad(options) {
-			this.get_camera_permission()
+			// this.get_camera_permission()
 			this.commonId=options.commonId
-			console.log(options )
 			// this.dataObj =JSON.parse(options.driver) 
 			// console.log(this.dataObj)
 			that = this
@@ -223,7 +222,7 @@
 				this.show = false
 			},
 			toPhone(){
-				console.log(this.driverList.driverPhone)
+				this.get_camera_permission()
 				var that=this
 				uni.makePhoneCall({
 					phoneNumber: that.driverList.driverPhone,
@@ -259,7 +258,6 @@
 				this.tabIndex = index
 			},
 			btnChange(num) {
-				// debugger
 				this.haoType = num
 				this.upCallback({size:10,num:1})
 				// this.getList()
@@ -327,8 +325,6 @@
 				
 			},
 			// getList() {
-
-			// 		debugger
 			// 	this.$request.baseRequest('get', '/orderInfo/selectHaoPing', {
 			// 			commonId: this.userInfo.id,
 			// 			haoType:''

+ 1 - 1
pages/carSource/index.vue

@@ -132,7 +132,7 @@
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		
-		<u-modal :show="tipsShow" :content='tipsText' :confirmText="btnTips" @confirm="$u.throttle(authentication(), 5000)"></u-modal>
+		<u-modal :show="tipsShow" :content='tipsText' :confirmText="btnTips" @confirm="$u.throttle(authentication(), 1000)"></u-modal>
 	</view>
 </template>
 

+ 1 - 1
pages/mine/agentCargoOwner.vue

@@ -34,7 +34,7 @@
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
-			:showCancelButton='true' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
+			:showCancelButton='true' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 1000)" @close="cancelClick"
 			@cancel="cancelClick"></u-modal>
 	</mescroll-body>
 </template>

+ 1 - 2
pages/mine/cargoowner/addEnerprise.vue

@@ -89,7 +89,7 @@
 			</view>
 			<view class='line'></view>
 			<!-- :class="{'active':dataDetails.certificateAddressUrl&&dataDetails.company&&dataDetails.legalPersonName&&dataDetails.authorizationDeadline}" -->
-			<view class="next-btn active" @click="$u.throttle(submit, 5000)">
+			<view class="next-btn active" @click="$u.throttle(submit, 1000)">
 				提交
 			</view>
 		</view>
@@ -383,7 +383,6 @@
 				// 	title: '加载中',
 				// 	mask: true
 				// })
-				// debugger
 				var _this = this
 				this.dataDetails.commonId = this.userInfo.id
 				this.dataDetails.certificateAddressUrl = this.urlList

+ 5 - 4
pages/mine/cargoowner/cargoowner.vue

@@ -21,7 +21,7 @@
 			</view>
 		</view> -->
 		 <!-- @click='goDetailPage("/pages/mine/cargoowner/editpersonalinformation")' -->
-				<view class=' flex items-center identity' @click='toEditPage()'>
+				<view class='flex items-center identity' @click='toEditPage()'>
 					<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'"
@@ -41,7 +41,7 @@
 					</view>
 				</view>
 		<view>
-			<view class="content2-title">所属企业 
+			<view class="content2-title">所属企业 <text style="color: #999999;margin-left: 20rpx;">({{enterprise.length}})</text>
 			<!-- <text style='color:#999;'>({{enterprise.length}})</text> -->
 			</view>
 			<view v-if='enterprise.length>0'>
@@ -74,7 +74,7 @@
 				</view>
 
 			</view>
-			<view v-else style='text-align:center;'>
+			<view v-else style='text-align:center;margin-top: 80px;'>
 				<image class='image weibangding' :showLoading="true"
 					src="../../../static/mine/huozhurenzheng/weibangding.png"></image>
 				<view style='font-size:12px;color:#999;'>您还未认证企业信息</view>
@@ -236,7 +236,8 @@
 
 <style lang="scss" scoped>
 	.content {
-		height:100vh;
+		// height:100vh;
+		min-height: 70vh;
 		padding-bottom: 320rpx;
 	}
 

+ 1 - 2
pages/mine/cargoowner/editEnerprise.vue

@@ -90,7 +90,7 @@
 			<view class='line'></view>
 			<view
 				:class="{'active':dataDetails.certificateAddressUrl&&dataDetails.company&&dataDetails.legalPersonName&&dataDetails.authorizationDeadline}"
-				class="next-btn" @click="$u.throttle(submit, 5000)">
+				class="next-btn" @click="$u.throttle(submit, 1000)">
 				提交
 			</view>
 		</view>
@@ -165,7 +165,6 @@
 
 			console.log(this.dataDetails)
 			if (options.certificateAddressUrl) {
-				debugger
 				this.urlList = options.certificateAddressUrl
 				this.fileList1 = []
 				this.fileList1.push({

+ 6 - 5
pages/mine/cargoowner/editpersonalinformation.vue

@@ -82,8 +82,8 @@
 					<view :style="{'color':dataDetails.cardValidityDate ? '#000':'#C6CBD5'}">
 						{{dataDetails.cardValidityDate?dataDetails.cardValidityDate:'选择身份证截止日期'}}
 					</view>
-					<image class='right' src="@/static/mine/right.png" mode=""></image>
-					<!-- <u-icon name="arrow-right" color="#7E7E7E" size="16"></u-icon> -->
+					<!-- <image class='right' src="@/static/mine/right.png" mode=""></image> -->
+					<u-icon name="arrow-right" color="#333333" size="16"></u-icon>
 				</view>
 			</view>
 			<view class="bz">注:个人信息审核通过后自动认证成为个人货主。</view>
@@ -98,7 +98,7 @@
 				我已阅读并同意全部细则
 			</view>
 			<view class='line'></view>
-			<view class="next-btn" @click="$u.throttle(submit(), 5000)">
+			<view class="next-btn" @click="$u.throttle(submit(), 1000)">
 				提交
 			</view>
 		</view>
@@ -169,7 +169,7 @@
 			};
 		},
 		onLoad(options) {
-			this.get_camera_permission()
+			// this.get_camera_permission()
 			var _this = this;
 			// console.log(options)
 			if(JSON.stringify(options) != "{}"){
@@ -303,6 +303,7 @@
 				this.dataDetails.cardValidityDate=date.date
 			},
 			uploadImg(type, index) {
+				this.get_camera_permission()
 				this.uploadType = type
 				this.index = index
 				this.imgTypeSelect()
@@ -462,7 +463,7 @@
 												}).then(res => {
 												// if(!that.dataDetails.id){
 													if (res.data.recPersonNo) {
-														that.dataDetails.cardNumber = res.data.recPersonNo
+														that.dataDetails.cardNumber = res.data.recPersonNo.replace(/\s*/g,"")
 														if(that.dataDetails.cardNumber[16]%2==0){
 															that.dataDetails.sex='女'
 														}else{

+ 12 - 23
pages/mine/company/addcompany.vue

@@ -133,7 +133,6 @@
 						</image>
 					</view>
 				</view>
-
 			</view>
 			<view class="flex row border-bottom mt20 flex-space-between">
 				<view class="left-text">开户行</view>
@@ -156,7 +155,6 @@
 					</view>
 					<view @click="manualInput" class="type">手动输入</view>
 				</view>
-
 			</view>
 			<!-- 	<view class="flex row noborder">
 					<view class="left-text">身份证截止日期</view>
@@ -165,14 +163,14 @@
 					</view>
 				</view> -->
 		</view>
-		<view class='content3' v-if="!dataDetails.videoAddressUrl"
+		<!-- <view class='content3' v-if="!dataDetails.videoAddressUrl"
 			@click="goDetailPage('/pages/mine/company/companyvideo')">
 			<view class="left-text">视频验证(打开摄像头并阅读提示文字)</view>
 			<view class="video-icon">
 				<u-icon size="40" name="camera-fill"></u-icon>
 			</view>
-		</view>
-		<view class='content3' v-if="dataDetails.videoAddressUrl">
+		</view> -->
+		<!-- <view class='content3' v-if="dataDetails.videoAddressUrl">
 			<view class="flex row noborder mt20 flex-space-between">
 				<view class="left-text">视频验证(点击按钮播放视频)</view>
 				<view>
@@ -181,15 +179,12 @@
 					</u-button>
 				</view>
 			</view>
-			<!-- <video class="myVideo" :src="dataDetails.videoAddressUrl" controls></video> -->
 			<view>
 				<view class="video-icon">
 					<u-icon size="40" name="play-circle-fill" @click="videoShow()"></u-icon>
 				</view>
 			</view>
-
-		</view>
-
+		</view> -->
 		<view class='content3'>
 			<view class="flex row noborder flex-space-between">
 				<view class="left-text">申请开通平台垫付运费业务</view>
@@ -255,7 +250,7 @@
 
 		<view class='footer'>
 			<!-- <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view> -->
-			<view @click="$u.throttle(submit(), 5000)" class='newlyIncreased'>提交</view>
+			<view @click="$u.throttle(submit(), 1000)" class='newlyIncreased'>提交</view>
 		</view>
 		<itmister-date-picker :overdueContent="overdueContent" :dateStatus="1" :periodOfValidity="true" :futureYear="30"  ref="dateValidityPeriod"  @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<u-picker :show="isShowBank" :columns="columns" :closeOnClickOverlay='true' @close='zhBankClose'
@@ -329,16 +324,12 @@
 			}
 		},
 		onShow() {
-			// debugger
-			console.log(uni.getStorageSync("videoSrc"))
 			var viderSrc = uni.getStorageSync("videoSrc")
 			if (viderSrc) {
 				this.dataDetails.videoAddressUrl = viderSrc
 			}
-
 		},
 		onLoad(options) {
-			// debugger
 			this.dataDetails.videoAddressUrl = options.videoSrc
 			// #ifdef APP-PLUS
 			this.get_camera_permission()
@@ -419,7 +410,6 @@
 				this.isShowBank = false
 			},
 			// uploadImg() {
-			// 	debugger
 			// 	this.uploadType = 5
 			// 	this.imgTypeSelect()
 			// 	// this.isShowimgType = true
@@ -704,13 +694,13 @@
 				// 		return true
 				// 	}
 				// }
-				if (uni.$u.test.isEmpty(this.dataDetails.videoAddressUrl)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "视频认证不能为空!",
-					})
-					return true
-				}
+				// if (uni.$u.test.isEmpty(this.dataDetails.videoAddressUrl)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "视频认证不能为空!",
+				// 	})
+				// 	return true
+				// }
 			},
 			submit() {
 				if (this.validate()) return
@@ -792,7 +782,6 @@
 				}
 			},
 			imgTypeSelect(val) {
-				// debugger
 				var _this = this
 				// if (val.name == '相册') {
 				uni.chooseImage({

+ 15 - 14
pages/mine/company/editcompany.vue

@@ -161,14 +161,14 @@
 		</view>
 		<!-- http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 -->
 		<!-- dataDetails.videoAddressUrl -->
-		<view class='content3' v-if="!dataDetails.videoAddressUrl"
+		<!-- <view class='content3' v-if="!dataDetails.videoAddressUrl"
 			@click="goDetailPage('/pages/mine/company/companyvideo')">
 			<view class="left-text">视频验证(打开摄像头并阅读提示文字)</view>
 			<view class="video-icon">
 				<u-icon size="40" name="camera-fill"></u-icon>
 			</view>
-		</view>
-		<view class='content3' v-if="dataDetails.videoAddressUrl">
+		</view> -->
+		<!-- <view class='content3' v-if="dataDetails.videoAddressUrl">
 			<view class="flex row noborder mt20 flex-space-between">
 				<view class="left-text">视频验证(点击按钮播放视频)</view>
 				<view>
@@ -176,15 +176,15 @@
 						size="mini">重新上传
 					</u-button>
 				</view>
-			</view>
+			</view> -->
 			<!-- <video class="myVideo" :src="dataDetails.videoAddressUrl" controls></video> -->
-			<view>
+			<!-- <view>
 				<view class="video-icon">
 					<u-icon size="40" name="play-circle-fill" @click="videoShow()"></u-icon>
 				</view>
 			</view>
 
-		</view>
+		</view> -->
 
 		<view class='content3'>
 			<view class="flex row noborder mt20 flex-space-between">
@@ -251,7 +251,7 @@
 
 		<view class='footer'>
 			<!-- <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view> -->
-			<view @click="$u.throttle(submit, 5000)" class='newlyIncreased'>提交</view>
+			<view @click="$u.throttle(submit, 1000)" class='newlyIncreased'>提交</view>
 		</view>
 		<u-picker :show="isShowBank" :columns="columns" :closeOnClickOverlay='true' @close='zhBankClose'
 			@cancel='zhBankClose' @confirm='confirmBank'></u-picker>
@@ -644,13 +644,13 @@
 				// 		return true
 				// 	}
 				// }
-				if (uni.$u.test.isEmpty(this.dataDetails.videoAddressUrl)) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "视频认证不能为空!",
-					})
-					return true
-				}
+				// if (uni.$u.test.isEmpty(this.dataDetails.videoAddressUrl)) {
+				// 	this.$refs.uToast.show({
+				// 		type: 'error',
+				// 		message: "视频认证不能为空!",
+				// 	})
+				// 	return true
+				// }
 			},
 			companyNamechange(e) {
 				console.log(e)
@@ -838,6 +838,7 @@
 												}
 
 												// 开户支行LIst
+												_this.columns=[]
 												if (res.data.bankNameZhihang) {
 													_this.columns.push(res.data
 														.bankNameZhihang)

+ 1 - 1
pages/mine/company/index.vue

@@ -84,7 +84,7 @@
 				this.goDetailPage('/pages/mine/company/editcompany?id=' + item.id)
 			},
 			delbtnAClick(val) {
-				uni.$u.throttle(this.del(val), 5000)
+				uni.$u.throttle(this.del(val), 1000)
 			},
 			del(item) {
 				var _this = this

+ 91 - 12
pages/mine/index.vue

@@ -17,12 +17,14 @@
 						<view class='flex items-center'>
 							<view v-if='userName' class='username'>{{userName}} {{cargoCall}}</view>
 							<view v-else class='username'>{{userInfo.userName}} </view>
-							<view @click="goDetailPage('/pages/mine/cargoowner/cargoowner',true)" v-if='status'
-								class='currectstatus'>已认证</view>
-							<view @click="goDetailPage('/pages/mine/cargoowner/cargoowner',true)" v-if='!status'
-								class='currectstatus1'>
-								{{CargoOwner.authenticationStatus?CargoOwner.authenticationStatus:'未认证'}}
-							</view>
+							<!-- <view @click="goDetailPage('/pages/mine/cargoowner/cargoowner',true)" v-if='status'
+								class='currectstatus'>已认证</view> -->
+							<!-- <view @click="goDetailPage('/pages/mine/cargoowner/cargoowner',true)" v-if='!status'
+								class='currectstatus1'> -->
+							<!-- 	<view class="" v-if="CargoOwner.authenticationStatus">{{CargoOwner.authenticationStatus=="已过期"?"身份已过期":CargoOwner.authenticationStatus}}</view>
+								<view class="" v-else>未认证</view> -->
+								<!-- {{CargoOwner.authenticationStatus?CargoOwner.authenticationStatus:'未认证'}} -->
+							<!-- </view> -->
 						</view>
 						<view class='phone'>{{starUserphone}}</view>
 					</view>
@@ -88,13 +90,26 @@
 					@click="goDetailPage('/pages/mine/cargoowner/cargoowner',true)">
 					<view class='flex items-center'>
 						<u--image style='margin-right:8px;' :showLoading="true" src="../../static/mine/huozhu.png"
-							width="20px" height="20px"></u--image>货主认证
+							width="20px" height="20px"></u--image>
+							<view>货主认证</view>
 					</view>
-					<view class='flex'>
+					<view >
+						<text class="version_css" v-if="CargoOwner.authenticationStatus">{{CargoOwner.authenticationStatus == '已过期'?'认证已过期':CargoOwner.authenticationStatus}}</text>
+						<text class="version_css" v-else>未认证</text>
 						<image class='right' src="@/static/mine/right.png" mode=""></image>
-						<!-- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> -->
 					</view>
 				</view>
+				<!-- <view class="flex flex-space-between content1-item">
+					<view class="flex align-center">
+						<u--image style='margin-right:8px;' :showLoading="true" src="../../static/images/mine/appUpdate.png"
+							width="20px" height="20px"></u--image>
+						<view>货主认证</view>
+					</view>
+					<view @click="onAPPUpdate">
+						<text class="version_css">{{version}}</text>
+						<image class='right' src="@/static/mine/right.png" mode=""></image>
+					</view>
+				</view> -->
 				<view class="flex flex-space-between content1-item"
 					@click="goDetailPage('/pages/mine/agentCargoOwner',false)">
 					<view class='flex'>
@@ -130,6 +145,17 @@
 						<!-- <u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon> -->
 					</view>
 				</view>
+				<view class="flex flex-space-between content1-item">
+					<view class="flex align-center">
+						<u--image style='margin-right:8px;' :showLoading="true" src="../../static/images/mine/appUpdate.png"
+							width="20px" height="20px"></u--image>
+						<view>检查更新</view>
+					</view>
+					<view @click="onAPPUpdate">
+						<text class="version_css">{{version}}</text>
+						<image class='right' src="@/static/mine/right.png" mode=""></image>
+					</view>
+				</view>
 
 				<!-- 		<view class="flex flex-space-between content1-item"
 					@click="goDetailPage('/pages/mine/driverEvaluation')">
@@ -164,6 +190,10 @@
 	import {
 		mapState
 	} from 'vuex';
+	import APPUpdate, {
+		getCurrentNo
+	} from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
+	import * as config from '@/config/index.js'
 	export default {
 		data() {
 			return {
@@ -179,9 +209,18 @@
 				status1: false,
 				alertContent: '您尚未登录,是否立即登录?',
 				cargoCall: "",
+				version: "1.1.0"
 			};
 		},
 		onShow() {
+			// #ifdef APP-PLUS
+			plus.runtime.getProperty(plus.runtime.appid, (info) => {
+				//版本号
+				this.version = info.version;
+				console.log("当前版本为:", this.version)
+				this.checkVersion()
+			})
+			// #endif
 			uni.setTabBarItem({
 				index: 0,
 				text: '订单',
@@ -268,6 +307,41 @@
 			}
 		},
 		methods: {
+			// 检查APP是否有新版本
+			onAPPUpdate() {
+				// true 没有新版本的时候有提示,默认:false
+				if (this.version == "发现新版本,立即更新") {
+					APPUpdate(true);
+				}
+			},
+			checkVersion() {
+				const baseUrlNew = config.def().baseUrlNew
+				uni.request({
+					url: baseUrlNew + '/appVersion/selectInfo',
+					data: {
+						appid: plus.runtime.appid,
+						version: this.version,
+						imei: "1",
+						type: 'hz'
+					},
+					method: 'GET',
+					success: (res) => {
+						console.log("查看1111",this.version)
+						console.log("查看11111",res)
+						// var versionNo = plus.runtime.version
+						// if (versionNo == res.data.data.version) {
+						// 	this.version = "当前为最新版" + res.data.data.version
+						// } else {
+						// 	this.version = "发现新版本,立即更新"
+						// }
+						if (!res.data.data.version) {//有返回值证明需要更新   没有则不需要
+							this.version = "当前为最新版" + this.version
+						} else {
+							this.version = "发现新版本,立即更新"
+						}
+					}
+				})
+			},
 			scanCode() {
 				let _this = this;
 				uni.scanCode({
@@ -291,7 +365,6 @@
 					uni.navigateTo({
 						url: `./confirm?token=${this.token}`
 					});
-
 				})
 			},
 			confirmClick() {
@@ -317,7 +390,6 @@
 				} else {
 					uni.$u.route('/pages/release/record');
 				}
-
 			},
 			goDetailPage(src, isClick) {
 				if (!this.hasLogin || !this.userInfo || this.userName == "立即登录") {
@@ -383,7 +455,7 @@
 		background: url('~@/static/mine/bg@3x.png');
 		background-size: 100% 100%;
 		margin: 0 auto;
-		height: calc(100vh - 100px);
+		height: calc(100vh - 80rpx);
 
 		.container_content {
 			padding: 18px;
@@ -486,4 +558,11 @@
 		width: 6px;
 		height: 6px;
 	}
+
+	.version_css {
+		margin-right: 10rpx;
+		color: #9D9D9D;
+		font-size: 32rpx;
+		text-align: center;
+	}
 </style>

+ 138 - 126
pages/mine/manageBankCards/addBankCard.vue

@@ -21,7 +21,8 @@
 					</u--input>
 				</view>
 				<view class="" @click="uploadImg">
-					<image src="../../../static/images/xiangji-2.png" mode="" style="width: 40rpx ;height: 40rpx;margin-top: 10rpx;"></image>
+					<image src="../../../static/images/xiangji-2.png" mode=""
+						style="width: 40rpx ;height: 40rpx;margin-top: 10rpx;"></image>
 				</view>
 			</view>
 			<view class="flex row">
@@ -43,7 +44,8 @@
 					<!-- <u--input class="select-bankzh point" placeholder="选择开户支行" inputAlign='left' border="none"
 						v-model="dataDetails.bankDepositBranch">
 					</u--input> -->
-					<view :style="{'color':dataDetails.bankDepositBranch?'#000':'#C6CBD5'}" style='font-size:15px;' class="select-bankzh" @click="selectZhbank">
+					<view :style="{'color':dataDetails.bankDepositBranch?'#000':'#C6CBD5'}" style='font-size:15px;'
+						class="select-bankzh" @click="selectZhbank">
 						{{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
 					</view>
 					<view @click="manualInput" class="type">手动输入</view>
@@ -72,6 +74,14 @@
 					</view>
 				</view>
 			</view>
+			<view class="flex row noborder" v-if="enterpriseShow">
+				<view class="left-text">企业名称</view>
+				<view class="flex">
+					<u--input placeholder="输入企业名称" inputAlign='left' border="none" v-model="dataDetails.companyName"
+						maxlength="18">
+					</u--input>
+				</view>
+			</view>
 			<u-picker :show="isShowBank" :columns="columns" :closeOnClickOverlay='true' @close='zhBankClose'
 				@cancel='zhBankClose' @confirm='confirmBank'></u-picker>
 			</u-picker>
@@ -79,7 +89,7 @@
 		</view>
 
 		<u-toast ref="uToast"></u-toast>
-		<view class="submit-btn" @click="$u.throttle(submit, 5000)">提交</view>
+		<view class="submit-btn" @click="$u.throttle(submit, 1000)">提交</view>
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
 		</u-action-sheet>
@@ -107,9 +117,9 @@
 					bankDeposit: '',
 					bankDepositBranch: '',
 				},
-				disabled:false,
+				disabled: false,
 				imagesrc: '',
-				submitstatus:false,
+				submitstatus: false,
 				columns: [
 
 				],
@@ -117,44 +127,54 @@
 				isShowManualInput: false,
 				index: '',
 				id: "", //司机身份证号
-				name: "" //司机姓名
+				name: "", //司机姓名
+				enterpriseShow: false, //判断是否有企业
+				enterprise: ""
 			};
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo']),
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication']),
 		},
-		onLoad() {
+		onLoad(options) {
+			if (options && options.enterprise) { //判断是否是从企业页面进来的(有则是)
+				this.enterprise = options.enterprise
+			}
+			console.log(this.firstAuthentication.enterpriseOwner)
+			if (this.firstAuthentication.enterpriseOwner && this.firstAuthentication.enterpriseOwner == 1 && this
+				.enterprise) {
+				this.enterpriseShow = true
+			}
 			this.get_camera_permission()
 			_this = this;
 			// this.dataDetails.driverId = this.userInfo.driverId
 			_this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', { //查身份证号
 				phone: uni.getStorageSync("userInfo").phone
 			}).then(res => {
-				if(res.data.authenticationStatus=='已认证'){
+				if (res.data.authenticationStatus == '已认证') {
 					this.id = res.data.cardNumber
 					this.name = res.data.name
-					this.dataDetails.cardholderIdNumber= res.data.cardNumber
-					this.dataDetails.cardholderName=res.data.name
-					this.disabled=true
+					this.dataDetails.cardholderIdNumber = res.data.cardNumber
+					this.dataDetails.cardholderName = res.data.name
+					this.disabled = true
 				}
 			})
 		},
 		methods: {
 			async get_camera_permission() {
-				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
-				if(photol == false){
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
 					uni.showModal({
 						title: '提示',
 						content: '您已经关闭相机权限,去设置',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 								permision.gotoAppPermissionSetting()
-									            // plus.runtime.openURL("app-settings:");
+								// plus.runtime.openURL("app-settings:");
 							} else if (res.cancel) {
 								console.log('用户点击取消');
 							}
 						}
-					});	
+					});
 				}
 			},
 			delCard() {
@@ -187,23 +207,23 @@
 			},
 			manualInput() {
 				if (this.isShowManualInput) {
-					
+
 					if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
-						if(this.dataDetails.bankCard){
+						if (this.dataDetails.bankCard) {
 							this.$refs.uToast.show({
 								type: 'error',
 								message: "请手动输入开户支行!",
 							})
 							return true
-						}else{
+						} else {
 							this.$refs.uToast.show({
 								type: 'error',
 								message: "请填写卡号!",
 							})
 							return true
 						}
-						
-					}else if(this.dataDetails.payeeAddressUrl && uni.$u.test.isEmpty(this.columns)){
+
+					} else if (this.dataDetails.payeeAddressUrl && uni.$u.test.isEmpty(this.columns)) {
 						this.$refs.uToast.show({
 							type: 'error',
 							message: "请手动输入开户支行!",
@@ -251,7 +271,7 @@
 				// });
 			},
 			uploadImg() {
-				this.dataDetails.bankDepositBranch=''
+				this.dataDetails.bankDepositBranch = ''
 				this.imgTypeSelect()
 				// this.isShowimgType = true
 			},
@@ -271,7 +291,7 @@
 					})
 					return true
 				}
-				if (uni.$u.test.rangeLength(this.dataDetails.bankCard,[16,20])) {
+				if (uni.$u.test.rangeLength(this.dataDetails.bankCard, [16, 20])) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "银行卡号输入错误!",
@@ -285,8 +305,8 @@
 					})
 					return true
 				}
-				
-				if (uni.$u.test.rangeLength(this.dataDetails.bankDeposit,[4,25])) {
+
+				if (uni.$u.test.rangeLength(this.dataDetails.bankDeposit, [4, 25])) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "开户行输入错误!",
@@ -300,7 +320,7 @@
 					})
 					return true
 				}
-				if (uni.$u.test.rangeLength(this.dataDetails.bankDepositBranch,[4,25])) {
+				if (uni.$u.test.rangeLength(this.dataDetails.bankDepositBranch, [4, 25])) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "开户支行输入错误!",
@@ -324,47 +344,47 @@
 			},
 
 			imgTypeSelect(val) {
-				
+
 				console.log(val)
 				// if (val.name == '相册') {
-					uni.chooseImage({
-						count: 1,
-						// sourceType: this.$helper.chooseImage.sourceType,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage('image', res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功
-									console.log('图片地址', result)
-									_this.$request.baseRequest('get',
-											'/driverInfo/bankShibie', {
-												bankImg: result,
-											}).then(res => {
-											console.log(res)
-											_this.dataDetails.payeeAddressUrl = result
-											_this.columns = []
-											if (res.data.bankNo) {
-												_this.dataDetails.bankCard = res.data.bankNo
-											}
-											if (res.data.bankName) {
-												_this.dataDetails.bankDeposit = res.data.bankName
-											}
+				uni.chooseImage({
+					count: 1,
+					// sourceType: this.$helper.chooseImage.sourceType,
+					success: function(res) {
+						console.log(JSON.stringify(res.tempFilePaths));
+						uploadImage('image', res.tempFilePaths[0], 'appData/',
+							result => {
+								// 上传成功
+								console.log('图片地址', result)
+								_this.$request.baseRequest('get',
+										'/driverInfo/bankShibie', {
+											bankImg: result,
+										}).then(res => {
+										console.log(res)
+										_this.dataDetails.payeeAddressUrl = result
+										_this.columns = []
+										if (res.data.bankNo) {
+											_this.dataDetails.bankCard = res.data.bankNo
+										}
+										if (res.data.bankName) {
+											_this.dataDetails.bankDeposit = res.data.bankName
+										}
 
-											// 开户支行LIst
-											if (res.data.bankNameZhihang) {
-												_this.columns.push(res.data
-													.bankNameZhihang)
+										// 开户支行LIst
+										if (res.data.bankNameZhihang) {
+											_this.columns.push(res.data
+												.bankNameZhihang)
 
-											}
-											_this.$forceUpdate()
-										})
-										.catch(res => {
-											uni.$u.toast(res.message);
-										});
-								}
-							)
-						}
-					});
+										}
+										_this.$forceUpdate()
+									})
+									.catch(res => {
+										uni.$u.toast(res.message);
+									});
+							}
+						)
+					}
+				});
 
 				// } else {
 				// 	uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=bank');
@@ -392,71 +412,63 @@
 				// 	});
 				console.log(this.name)
 				if (that.validate()) return //校验  511303198809243079
-				if(!this.submitstatus){
-					this.submitstatus=true
-					if (that.dataDetails.cardholderName != this.name&&this.name!='') {
-					that.$refs.uToast.show({
-						type: 'error',
-						message: "收款人须为货主本人!",
-					})
-					return
-				} else {
-					uni.showLoading({
-						title: '加载中',
-						mask: true
-					})
-					
-					that.$request.baseRequest('get', '/driverPayeeInfo/bankCradShibie', { //三要素验证
-						name: that.dataDetails.cardholderName, //持卡人姓名
-						idCard: this.id, //货主身份证号
-						accountNo: that.dataDetails.bankCard //卡号
-					}).then(response => {
-						if (response.data.distinguishNum == "01") {
-							that.dataDetails.commonId = uni.getStorageSync("userInfo").id
-							delete that.dataDetails.payeeAddressUrl
-							that.$request.baseRequest('post', '/hyCargoOwnerPayeeInfo/api/addPayee',
-									that.dataDetails).then(res => {
+				if (!this.submitstatus) {
+					this.submitstatus = true
+					if (that.dataDetails.cardholderName != this.name && this.name != '') {
+						that.$refs.uToast.show({
+							type: 'error',
+							message: "收款人须为货主本人!",
+						})
+						return
+					} else {
+						uni.showLoading({
+							title: '加载中',
+							mask: true
+						})
+						that.$request.baseRequest('get', '/driverPayeeInfo/bankCradShibie', { //三要素验证
+							name: that.dataDetails.cardholderName, //持卡人姓名
+							idCard: this.id, //货主身份证号
+							accountNo: that.dataDetails.bankCard //卡号
+						}).then(response => {
+							if (response.data.distinguishNum == "01") {
+								that.dataDetails.commonId = uni.getStorageSync("userInfo").id
+								delete that.dataDetails.payeeAddressUrl
+								that.$request.baseRequest('post', '/hyCargoOwnerPayeeInfo/api/addPayee',
+										that.dataDetails).then(res => {
 										uni.hideLoading()
-									if (res.code == '200') {
-										let params = {
-											type: 'success',
-											message: "提交成功",
+										if (res.code == '200') {
+											let params = {
+												type: 'success',
+												message: "提交成功",
+											}
+											this.submitstatus = false
+											that.$refs.uToast.show({
+												...params
+											})
+											//uni.$u.route('/pages/mine/manageBankCards/index');
+											uni.navigateBack({
+												delta: 1
+											});
+
+										} else {
+											this.submitstatus = false
+											uni.$u.toast(res.message);
 										}
-										this.submitstatus=false
-										that.$refs.uToast.show({
-											...params
-										})
-										//uni.$u.route('/pages/mine/manageBankCards/index');
-										uni.navigateBack({
-											delta: 1
-										});
-					
-									} else {
-										this.submitstatus=false
+
+									})
+									.catch(res => {
+										uni.hideLoading()
+										this.submitstatus
 										uni.$u.toast(res.message);
-									}
-					
-								})
-								.catch(res => {
-									uni.hideLoading()
-									this.submitstatus
-									uni.$u.toast(res.message);
-								});
-						} else {
-							uni.hideLoading()
-							this.submitstatus=false
-							uni.$u.toast(response.data.distinguish);
-						}
-					})
-				}
+									});
+							} else {
+								uni.hideLoading()
+								this.submitstatus = false
+								uni.$u.toast(response.data.distinguish);
+							}
+						})
+					}
 				}
-				
-				
-
-
-
-
-
 			},
 		},
 	};
@@ -469,7 +481,7 @@
 	}
 
 	.content {
-		padding: 20rpx ;
+		padding: 20rpx;
 		height: calc(100vh - 23vh);
 	}
 

+ 1 - 1
pages/mine/manageBankCards/editBankCard.vue

@@ -50,7 +50,7 @@
 		</view>
 
 		<u-toast ref="uToast"></u-toast>
-		<view class="submit-btn" @click="$u.throttle(submit, 5000)">提交</view>
+		<view class="submit-btn" @click="$u.throttle(submit, 1000)">提交</view>
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
 		</u-action-sheet>

+ 19 - 11
pages/mine/myAccount/bankList.vue

@@ -6,15 +6,15 @@
 				<view class="text2">(共{{bankList?bankList.length:0}}张)</view>
 			</view> -->
 
-			<view v-if='bankList.length==0' @click="addBankCard" class="add-bankcard flex">
+			<view  @click="addBankCard" class="add-bankcard flex">
 				<view class="car-text">添加银行卡</view>
 				<u-icon class="icon" name="plus-circle-fill" color="#2979ff" size="24"></u-icon>
 			</view>
-			<view v-else><image style='width:17px;height:17px;' @click="del()" src="../../../static/mine/sanchu.png" mode=""></image></view>
 		</view>
 		<!-- <image src="../../../static/images/mine/bank/nongyelogo.png" mode=""></image> -->
 		<view class="card-list" v-for="(item,index) in bankList" @click="bankCheng(item)">
 			<view class="card-list-item" :style='{"background-image":"url("+item.cardColor+")"}'>
+				<image style='width:17px;height:17px;position: absolute;z-index: 9999;right: 20rpx;top: 20rpx;' @click.stop="del(item,index)" src="../../../static/mine/sanchu.png" mode=""></image>
 				<view class="flex flex-end number carNumber">{{item.bankCard}}</view>
 				<view class="flex align-center">
 					<!-- @/static/images/mine/bank/gflogo.png -->
@@ -28,7 +28,7 @@
 			</view>
 		</view>
 		<!-- <view @click="addBankCard">添加银行卡</view> -->
-		 <u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true' confirmColor='#2772FB'  @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick" @cancel="cancelClick"></u-modal>
+		 <u-modal :show="isShowAlert" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true' confirmColor='#2772FB'  @confirm="$u.throttle(confirmClick(), 1000)" @close="cancelClick" @cancel="cancelClick"></u-modal>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -44,13 +44,17 @@
 				obj:{},
 				index:null,
 				isShowAlert:false,
-				alertTitle:'确认删除该银行卡?'
+				alertTitle:'确认删除该银行卡?',
+				enterprise:"",//判断是否有值(有则是我的公司页面进来的  没有则是首页进来的)
 			};
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
-		onLoad() {
+		onLoad(options) {
+			if(options && options.enterprise){
+				this.enterprise = options.enterprise
+			}
 			if (!this.hasLogin) {
 				uni.$u.route('/pages/public/login');
 			}
@@ -100,7 +104,6 @@
 								} else {
 									uni.$u.toast(res.message);
 								}
-
 							})
 							.catch(res => {
 								uni.$u.toast(res.message);
@@ -210,7 +213,11 @@
 					phone: uni.getStorageSync("userInfo").phone
 				}).then(res => {
 					if(res.data.authenticationStatus=='已认证'){
-						uni.$u.route('/pages/mine/manageBankCards/addBankCard');
+						if(this.enterprise){
+							uni.$u.route('/pages/mine/manageBankCards/addBankCard?enterprise='+this.enterprise);//企业添加银行卡标识
+						}else{
+							uni.$u.route('/pages/mine/manageBankCards/addBankCard');
+						}
 					}else{
 						this.$refs.uToast.show({
 							type: 'error',
@@ -230,11 +237,10 @@
 					...params
 				})
 			},
-			del() {
-				this.obj = this.bankList[0]
-				this.index =0
+			del(val,index) {
+				this.obj = val
+				this.index = index
 				this.isShowAlert = true
-		
 			}
 		},
 
@@ -266,6 +272,7 @@
 
 	.card-list {
 		padding: 0 20rpx;
+		margin-top: 20rpx;
 
 		.number {
 			color: white;
@@ -288,6 +295,7 @@
 		background-size: cover;
 		padding: 60rpx 43rpx 100rpx 43rpx;
 		border-radius: 20rpx;
+		position: relative;
 		.carNumber{
 			margin-bottom: 20rpx;
 		}

+ 9 - 4
pages/mine/myAccount/withdrawal.vue

@@ -65,9 +65,9 @@
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
-			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
+			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 1000)" @close="cancelClick"
 			@cancel="cancelClick"></u-modal>
-			<view @click="$u.throttle(submit, 5000)" class='newlyIncreased'>提交</view>
+			<view @click="$u.throttle(submit, 1000)" class='newlyIncreased'>提交</view>
 		<!-- <u-button type="primary" text="提交" @click="submit" class="btn_css"></u-button> -->
 	</view>
 </template>
@@ -88,6 +88,7 @@
 				alertTitle: "",
 				alertContent: "",
 				showCancelButton: true,
+				enterprise:""//企业名称
 			}
 		},
 		onLoad(options) {
@@ -126,14 +127,18 @@
 				})
 			},
 			bankChange() { //选择银行卡
-				uni.$u.route("/pages/mine/myAccount/bankList")
+				uni.$u.route("/pages/mine/myAccount/bankList?enterprise=" + this.enterprise)
 			},
 			getList() {
 				this.$request.baseRequest('get', '/cargoOwnerInfo/selectAccountBalance', {
 					id: this.id,
 					flag: this.flag
 				}).then(res => {
-					this.usableMoney = Number(res.data.accountBalance)
+					if(res.data){
+						this.usableMoney = Number(res.data.accountBalance)
+						this.enterprise = res.data.companyName
+					}
+					
 				})
 			},
 			writeIn() {

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

@@ -5,7 +5,7 @@
 			<image class="xj-image" :src="deptListurl.avatarUrl" v-if="deptListurl.avatarUrl"></image>
 			
 		</view>
-			<view @click="$u.throttle(submit, 5000)" class="submit">提交</view>
+			<view @click="$u.throttle(submit, 1000)" class="submit">提交</view>
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
 			@close="isShowimgType=false">

+ 18 - 2
pages/mine/settings/editPassword.vue

@@ -13,7 +13,15 @@
 					<button :disabled="disabled1" class="code-style code-small" @tap="getCode">{{tips}}</button>
 				</u-form-item>
 				<u-form-item label="新密码" prop="password" borderBottom>
-					<u--input v-model="registerData.password" border="none" placeholder="请输入新密码,6-16位字符"></u--input>
+					<!-- <u--input v-model="registerData.password" border="none" suffixIcon="eye" @suffix="textChange" placeholder="请输入新密码,6-16位字符"></u--input> -->
+					<input class='password' v-model='registerData.password' v-if="isShowPassword=='password'"
+						placeholder="请输入密码" type="password">
+					<input maxlength='16' class='password' v-model='registerData.password' v-else type="text"
+						placeholder="请输入密码">
+					<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(1)"
+						v-if="isShowPassword=='password'" src="../../../static/yioncang.png" mode=""></image>
+					<image class='yanjingicon' style='width:22px;height:22px;' @click="passWordStatus(2)" v-else
+						src="../../../static/xianshi.png" mode=""></image>
 				</u-form-item>
 
 				<u-code ref="uCode" @change="codeChange" seconds="60" @start="disabled1 = true"
@@ -55,7 +63,8 @@
 						message: '请填写6位验证码',
 						trigger: ['blur']
 					},
-				}
+				},
+				isShowPassword: 'password',
 			}
 		},
 		computed: {
@@ -77,6 +86,13 @@
 			this.registerData.phone = this.userInfo.phone
 		},
 		methods: {
+			passWordStatus(type) {
+				if (type == 1) {
+					this.isShowPassword = 'text'
+				} else {
+					this.isShowPassword = 'password'
+				}
+			},
 			navBack() {
 				uni.navigateBack();
 			},

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

@@ -13,7 +13,7 @@
 			<u-code ref="uCode" @change="codeChange" seconds="20" @start="disabled1 = true" @end="disabled1 = false">
 			</u-code>
 		</u--form>
-		<u-button type="primary" @click='$u.throttle(reset, 5000)'>确定修改</u-button>
+		<u-button type="primary" @click='$u.throttle(reset, 1000)'>确定修改</u-button>
 
 	</view>
 </template>

+ 1 - 1
pages/news/feedbackResults.vue

@@ -40,7 +40,7 @@
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		<u-modal :show="showPips" :title="title" :content='content' showCancelButton @close="showPips = false"
-			@cancel="showPips=false" @confirm="$u.throttle(confirmSubmit(), 5000)"></u-modal>
+			@cancel="showPips=false" @confirm="$u.throttle(confirmSubmit(), 1000)"></u-modal>
 		<u-button type="primary" text="提交" @click="submit"></u-button>
 	</view>
 </template>

+ 1 - 1
pages/news/index.vue

@@ -45,7 +45,7 @@
 				</view> -->
 				</view>
 				<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
-					:closeOnClickOverlay='true' :showCancelButton='showCancelButton' @confirm="$u.throttle(confirmClick(), 5000)"
+					:closeOnClickOverlay='true' :showCancelButton='showCancelButton' @confirm="$u.throttle(confirmClick(), 1000)"
 					@close="cancelClick" @cancel="cancelClick" class="modal">
 				</u-modal>
 			</view>

+ 11 - 2
pages/news/newsSee.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="center">
 		<view class="news_info">
-			<!-- <view class="">{{dataInfo.newsTitle}}</view> -->
-			<view style='white-space: pre-wrap;' class="">{{dataInfo.newsContent}}</view>
+			<view class="text">{{dataInfo.newsTitle}}</view>
+			<view style='white-space: pre-wrap;' class="info">{{dataInfo.newsContent}}</view>
 		</view>
 	</view>
 </template>
@@ -31,6 +31,15 @@
 		padding:30rpx;
 		height: calc(100vh - 11.2vh);
 		background: #F5F6FA ;
+		.text{
+			font-size: 18px;
+			font-weight: 600;
+		}
+		.info{
+			font-size: 14px;
+			color: #999999;
+			margin-top: 20rpx;
+		}
 		.news_info{
 			background: #FFFFFF;
 			padding: 20rpx 30rpx;

+ 0 - 3
pages/order/addEvaluation.vue

@@ -122,7 +122,6 @@
 		},
 		onNavigationBarButtonTap() {
 			// console.log(12121,uni.$u,this)
-			// debugger
 			uni.$u.throttle(this.submit(), 5000)
 			// uni.$u.debounce(this.submit, 500)
 			
@@ -208,9 +207,7 @@
 
 			},
 			getVal(e) {
-				// debugger
 				this.starIndex = e.value
-				console.log(e)
 			},
 			checkboxChange(n) {
 				console.log('change', n);

+ 0 - 3
pages/order/driverDetail.vue

@@ -263,7 +263,6 @@
 				this.tabIndex = index
 			},
 			btnChange(num) {
-				// debugger
 				this.haoType = num
 				this.upCallback({size:10,num:1})
 				// this.getList()
@@ -337,8 +336,6 @@
 				
 			},
 			// getList() {
-
-			// 		debugger
 			// 	this.$request.baseRequest('get', '/orderInfo/selectHaoPing', {
 			// 			commonId: this.userInfo.id,
 			// 			haoType:''

+ 34 - 34
pages/order/fk.vue

@@ -22,7 +22,7 @@
 				name="1" multiple :maxCount="9"></u-upload>
 		</view>
 		<view class="row3" @click="$u.throttle(submit, 5000)">提交</view>
-		<u-picker :show="isShow" ref="uPicker"  :columns="orderList" keyName="orderNo" @confirm="confirmorder"
+		<u-picker :show="isShow" ref="uPicker" :columns="orderList" keyName="orderNo" @confirm="confirmorder"
 			:closeOnClickOverlay='true' @close='isShow=false' @cancel='isShow=false'>
 		</u-picker>
 		<u-toast ref="uToast"></u-toast>
@@ -41,9 +41,9 @@
 				imgList: [],
 				value1: '',
 				fileList1: [],
-				orderList:[],
+				orderList: [],
 				dataDetails: {},
-				isShow:false,
+				isShow: false,
 			};
 		},
 		computed: {
@@ -54,34 +54,34 @@
 			console.log(this.dataDetails)
 			this.imgList = []
 		},
-		onShow(){
+		onShow() {
 			uni.showLoading({
 				title: '加载中'
 			})
-			this.$request.baseRequest('get', '/orderInfo/getAssociatedOrder',{
-				commonId: this.dataDetails.commonId,
-				cargoCommonId:this.userInfo.id
-			}).then(res => {
-				let that = this
-				uni.hideLoading()
-				this.orderList=[res.data]
-				// console.log(this.orderList)
-			})
-			.catch(res => {
-				uni.$u.toast(res.message);
-			});
+			this.$request.baseRequest('get', '/orderInfo/getAssociatedOrder', {
+					commonId: this.dataDetails.commonId,
+					cargoCommonId: this.userInfo.id
+				}).then(res => {
+					uni.hideLoading()
+					this.orderList = [res.data]
+					// console.log(this.orderList)
+				})
+				.catch(res => {
+					uni.$u.toast(res.message);
+				});
 		},
 		methods: {
-			confirmorder(e){
+			confirmorder(e) {
 				console.log(e)
-				this.dataDetails.orderId=e.value[0].id
-				this.dataDetails.orderNo=e.value[0].orderNo
-				this.isShow=false
+				this.dataDetails.orderId = e.value[0].id
+				this.dataDetails.orderNo = e.value[0].orderNo
+				this.isShow = false
 			},
-			selectorder(){
-				this.isShow=true
+			selectorder() {
+				this.isShow = true
 			},
 			submit() {
+				var that = this
 				if (!this.value1) {
 					that.$refs.uToast.show({
 						type: 'error',
@@ -89,10 +89,10 @@
 					})
 					return
 				}
-				if (this.value1.length<10||this.value1.length>300) {
+				if (this.value1.length < 10 || this.value1.length > 300) {
 					that.$refs.uToast.show({
 						type: 'error',
-						message: "投诉信息输入错误!",
+						message: "投诉信息需输入10 ~ 300字之间!",
 					})
 					return
 				}
@@ -100,18 +100,18 @@
 					title: '加载中'
 				})
 				this.$request.baseRequest('post', '/feedbackReport/api/addInfo', {
-					    initiator:this.dataDetails.cargoOwner,
-						initiatorNumber:this.dataDetails.cargoOwnerPhone,
+						initiator: uni.getStorageSync("firstAuthentication").name,
+						initiatorNumber: uni.getStorageSync("firstAuthentication").phone,
 						commonId: this.userInfo.id,
 						passive: this.dataDetails.driverName,
 						passiveNumber: this.dataDetails.driverPhone,
-						passiveCommonId:this.dataDetails.commonId,
-						orderId:this.dataDetails.orderId,
-						orderNo:this.dataDetails.orderNo,
+						passiveCommonId: this.dataDetails.commonId,
+						orderId: this.dataDetails.orderId,
+						orderNo: this.dataDetails.orderNo,
 						content: this.value1,
 						url: this.imgList.toString(),
 						flag: 1,
-						objectFlag:1,
+						objectFlag: 1,
 					}).then(res => {
 						let that = this
 						uni.hideLoading()
@@ -119,10 +119,10 @@
 							type: 'success',
 							message: "反馈成功",
 							complete() {
-								uni.navigateBack({
-									delta:1
-								})
-								
+								// uni.navigateBack({
+								// 	delta:1
+								// })
+
 							}
 						})
 					})

+ 8 - 7
pages/order/index.vue

@@ -18,7 +18,7 @@
 			<view class="fixed1"></view>
 			<view class="fix-content">
 				<u-search placeholder="搜索订单" v-model="searchKeyWord" bgColor='white' :actionStyle='searchStyle'
-					@custom="getSearch" @search="getSearch" :clearabled="true"></u-search>
+					@custom="getSearch" @search="getSearch" :clearabled="true" style="margin: 0 auto;"></u-search>
 				<view class="tab-content">
 					<u-tabs :list="tabList" @click="clickTab" lineColor='transparent' :current='tabIndex'
 						:inactiveStyle="{color:'white'}" :activeStyle="{
@@ -140,7 +140,7 @@
 						<!-- <image class="jt-icon" src="@/static/images/order/position.png" mode='widthFix'
 								@click.stop="toMap(good)">
 							</image> -->
-						<view v-if="good.cargoOwnerStatus=='运输中'||good.cargoOwnerStatus=='已完结'"
+						<view v-if="good.cargoOwnerStatus=='运输中'||good.cargoOwnerStatus=='已完结'||good.cargoOwnerStatus=='待收货'||good.cargoOwnerStatus=='已终止'"
 						 style='border:1px solid #2772FB'	class="start normal look-map" @click.stop="toMap(good)">
 							查看轨迹</view>
 						<view class="stop" @click.stop="accept(good,1)" v-if="good.cargoOwnerStatus=='待接单'">接受
@@ -199,7 +199,7 @@
 			</view>
 		</view> -->
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
-			:closeOnClickOverlay='true' :showCancelButton='showCancelButton' @confirm="$u.throttle(confirmClick, 5000)"
+			:closeOnClickOverlay='true' :showCancelButton='showCancelButton' @confirm="$u.throttle(confirmClick, 1000)"
 			@close="cancelClick" @cancel="cancelClick" class="modal">
 		</u-modal>
 		<u-popup :show="show" mode="bottom" @close="close" @open="open">
@@ -222,7 +222,7 @@
 				<view style='padding:40rpx 0 30rpx;'>终止原因描述</view>
 				<u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'>
 				</u--textarea>
-				<view class='termination' :class="{'active':value2.length>0}" @click='$u.throttle(termination, 5000)'>终止
+				<view class='termination' :class="{'active':value2.length>0}" @click='$u.throttle(termination, 1000)'>终止
 				</view>
 			</view>
 
@@ -261,7 +261,7 @@
 					right: "30rpx",
 					padding: "6rpx 20rpx",
 					margin: '0 20rpx 0 0',
-					"border-radius": '30rpx'
+					"border-radius": '30rpx',
 				},
 				isdblclick:0,
 				upOption: {
@@ -395,6 +395,7 @@
 
 		},
 		onShow() {
+			let that = this 
 			if (this.scrollTop > 1200) {
 				uni.setTabBarItem({
 					index: 0,
@@ -407,7 +408,7 @@
 				size: 10,
 				num: 1
 			})
-			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+			this.$request.baseRequest('get', '/newsInfo/unreadMessage', {
 				reCommonId: this.userInfo.id,
 			}).then(res3 => {
 				if (res3.data || res3.data == 0) {
@@ -768,7 +769,7 @@
 		padding: 20rpx;
 		position: fixed;
 		z-index: 99;
-		width: 100%;
+		width: 98%;
 		// margin-top: var(--status-bar-height);
 		// padding-bottom: 320rpx;
 	}

+ 39 - 40
pages/order/jb.vue

@@ -21,8 +21,8 @@
 			<u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event)" @delete="deletePic"
 				name="1" multiple :maxCount="9"></u-upload>
 		</view>
-		<view class="row3" @click="$u.throttle(submit(), 5000)">提交</view>
-		<u-picker :show="isShow" ref="uPicker"  :columns="orderList" keyName="orderNo" @confirm="confirmorder"
+		<view class="row3" @click="$u.throttle(submit(), 1000)">提交</view>
+		<u-picker :show="isShow" ref="uPicker" :columns="orderList" keyName="orderNo" @confirm="confirmorder"
 			:closeOnClickOverlay='true' @close='isShow=false' @cancel='isShow=false'>
 		</u-picker>
 		<u-toast ref="uToast"></u-toast>
@@ -35,16 +35,16 @@
 	} from 'vuex';
 	import permision from "@/js_sdk/wa-permission/permission.js"
 	import uploadImage from '@/components/ossutil/uploadFile.js';
-	
+
 	export default {
 		data() {
 			return {
 				imgList: [],
 				value1: '',
 				fileList1: [],
-				orderList:[],
+				orderList: [],
 				dataDetails: {},
-				isShow:false,
+				isShow: false,
 			};
 		},
 		computed: {
@@ -56,52 +56,51 @@
 			console.log(this.dataDetails)
 			this.imgList = []
 		},
-		onShow(){
+		onShow() {
 			uni.showLoading({
 				title: '加载中'
 			})
-			this.$request.baseRequest('get', '/orderInfo/getAssociatedOrder',{
-				commonId: this.dataDetails.commonId,
-				cargoCommonId:this.userInfo.id
-			}).then(res => {
-				let that = this
-				uni.hideLoading()
-				this.orderList=[res.data]
-				// console.log(this.orderList)
-			})
-			.catch(res => {
-				uni.$u.toast(res.message);
-			});
+			this.$request.baseRequest('get', '/orderInfo/getAssociatedOrder', {
+					commonId: this.dataDetails.commonId,
+					cargoCommonId: this.userInfo.id
+				}).then(res => {
+					uni.hideLoading()
+					this.orderList = [res.data]
+					// console.log(this.orderList)
+				})
+				.catch(res => {
+					uni.$u.toast(res.message);
+				});
 		},
 		methods: {
-			confirmorder(e){
+			confirmorder(e) {
 				console.log(e)
-				this.dataDetails.orderId=e.value[0].id
-				this.dataDetails.orderNo=e.value[0].orderNo
-				this.isShow=false
+				this.dataDetails.orderId = e.value[0].id
+				this.dataDetails.orderNo = e.value[0].orderNo
+				this.isShow = false
 			},
-			selectorder(){
-				this.isShow=true
+			selectorder() {
+				this.isShow = true
 			},
 			async get_camera_permission() {
-				var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
-				if(photol == false){
+				var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
+				if (photol == false) {
 					uni.showModal({
 						title: '提示',
 						content: '您已经关闭相机权限,去设置',
-						success: function (res) {
+						success: function(res) {
 							if (res.confirm) {
 								permision.gotoAppPermissionSetting()
-									            // plus.runtime.openURL("app-settings:");
+								// plus.runtime.openURL("app-settings:");
 							} else if (res.cancel) {
 								console.log('用户点击取消');
 							}
 						}
-					});	
+					});
 				}
 			},
 			submit() {
-				var that=this
+				var that = this
 				if (!this.value1) {
 					that.$refs.uToast.show({
 						type: 'error',
@@ -109,7 +108,7 @@
 					})
 					return
 				}
-				if (this.value1.length<10||this.value1.length>300) {
+				if (this.value1.length < 10 || this.value1.length > 300) {
 					that.$refs.uToast.show({
 						type: 'error',
 						message: "举报信息输入错误!",
@@ -120,18 +119,18 @@
 					title: '加载中'
 				})
 				this.$request.baseRequest('post', '/feedbackReport/api/addInfo', {
-						initiator:this.dataDetails.cargoOwner,
-						initiatorNumber:this.dataDetails.cargoOwnerPhone,
+						initiator: uni.getStorageSync("firstAuthentication").name,
+						initiatorNumber: uni.getStorageSync("firstAuthentication").phone,
 						commonId: this.userInfo.id,
 						passive: this.dataDetails.driverName,
 						passiveNumber: this.dataDetails.driverPhone,
-						orderId:this.dataDetails.orderId,
-						orderNo:this.dataDetails.orderNo,
-						passiveCommonId:this.dataDetails.commonId,
+						orderId: this.dataDetails.orderId,
+						orderNo: this.dataDetails.orderNo,
+						passiveCommonId: this.dataDetails.commonId,
 						content: this.value1,
 						url: this.imgList.toString(),
 						flag: 2,
-						objectFlag:1,
+						objectFlag: 1,
 					}).then(res => {
 						let that = this
 						uni.hideLoading()
@@ -139,10 +138,10 @@
 							type: 'success',
 							message: "举报成功",
 							complete() {
-								uni.$u.route('/pages/order/driverDetail',{
-									driver:JSON.stringify(that.dataDetails)
+								uni.$u.route('/pages/order/driverDetail', {
+									driver: JSON.stringify(that.dataDetails)
 								});
-								
+
 							}
 						})
 					})

+ 25 - 24
pages/order/map.nvue

@@ -13,11 +13,10 @@
 <script>
 	const img = '/static/logo.png';
 	import * as config from '@/config'
-	// let baseUrl = config.def().baseUrlNew
+	let baseUrl = config.def().baseUrlNew
 	export default {
 		data() {
 			return {
-
 				scaleNum: 10,
 				mapContext: null, //地图对象
 				startMove: false, //是否开始回放
@@ -54,25 +53,35 @@
 		methods: {
 			//模拟获取远程数据
 			getTrack() {
-				
 				uni.request({
 					url: baseUrl + '/hyOrderTravelPath/getInfo',
 					data: {
-						orderId: this.id
+						orderId: this.id,
+						currentPage: 1,
+						pageSize: 9999
 					},
 					method: 'get',
 					header: {
 						'content-type': 'application/json' //'application/x-www-form-urlencoded; charset=UTF-8',
 					},
 					success: (res) => {
-						// console.log(res.data,11111111)
-						if(res.data.code==200){
-							if(res.data.data){
-								if(res.data.data.longitudeLatitude){
-									// console.log(JSON.parse(res.data.data.longitudeLatitude));
-									this.polyline[0].points =JSON.parse(res.data.data.longitudeLatitude)
+						if (res.data.code == 200) {
+							if (res.data.data) {
+								var patharr = []
+								for (let num = 0; num < res.data.data.records.length; num++) {
+									if(res.data.data.records[num].longitudeLatitude){
+										patharr.push(JSON.parse(res.data.data.records[num].longitudeLatitude));
+									}
+									// for (let i = 0; i < patharr.length; i++) {
+									//   that.path2.push([patharr[i].longitude, patharr[i].latitude]);
+									// }
 								}
-							}else{
+								this.polyline[0].points = patharr
+								// if (res.data.data.longitudeLatitude) {
+								// 	// console.log(JSON.parse(res.data.data.longitudeLatitude));
+								// 	this.polyline[0].points = JSON.parse(res.data.data.longitudeLatitude)
+								// }
+							} else {
 								uni.showToast({
 									title: '暂无运输轨迹',
 									icon: 'none',
@@ -84,7 +93,7 @@
 				})
 				// this.$request.baseRequest('post', '/hyOrderTravelPath/getInfo', {
 				// 		orderId: this.id,
-				// 	}).then(res => {debugger
+				// 	}).then(res => {
 				// 	console.log("res",res)
 				// 	// this.polyline[0].points = [
 				// 	// 	{latitude: 39.997761, longitude: 116.478935},
@@ -110,11 +119,11 @@
 				// 	// 	this.polyline[0].points.push({latitude,longitude})
 				// 	// }
 				var that = this
-				setTimeout(()=>{
-					that.durationTime = Math.ceil(30000 / that.polyline[0].points.length)	//默认播放全程使用30秒,计算相连两点动画时长
+				setTimeout(() => {
+					that.durationTime = Math.ceil(30000 / that.polyline[0].points.length) //默认播放全程使用30秒,计算相连两点动画时长
 					that.initMapData()
-				},1000)
-					
+				}, 1000)
+
 				// 	})
 				// 	.catch(res => {
 				// 		uni.hideLoading()
@@ -124,18 +133,13 @@
 				// 			duration: 2000
 				// 		})
 				// 	});
-
-
-
 			},
 			//设置地图
 			initMapData() {
 				this.initMarkers()
 				this.mapContext = uni.createMapContext('myMap', this)
-
 			},
 			test() {
-				// console.log("1111111111111111")
 				this.mapContext.includePoints({
 					points: this.polyline[0].points,
 					padding: [100, 100, 1000, 100]
@@ -149,8 +153,6 @@
 			},
 			//开始移动
 			handleStartMove() {
-
-				console.log("222222")
 				this.startMove = true
 				this.movePoint()
 			},
@@ -169,7 +171,6 @@
 				})
 				return
 				*/
-			   console.log(this.mapContext)
 				this.mapContext.moveAlong({
 					duration: 10000,
 					markerId: this.markers[0].id,

+ 131 - 138
pages/order/map.vue

@@ -1,15 +1,8 @@
 <template>
 	<view>
-		<map
-			v-if="polyline[0].points.length > 0"
-			id="myMap"
-			:markers="markers"
-			:polyline="polyline"
-			:include-points="polyline[0].points"
-			:latitude="polyline[0].points[0].latitude"
-			:longitude="polyline[0].points[0].longitude"
-			style="width: 100%; height: calc(100vh - 90px)"
-		/>
+		<map v-if="polyline[0].points.length > 0" id="myMap" :markers="markers" :polyline="polyline"
+			:include-points="polyline[0].points" :latitude="polyline[0].points[0].latitude"
+			:longitude="polyline[0].points[0].longitude" style="width: 100%; height: calc(100vh - 90px)" />
 		<view class="hcp-bottom">
 			<button v-if="startMove" @click="handleStopMove()">暂停移动</button>
 			<button v-else @click="handleStartMove()">开始移动</button>
@@ -18,27 +11,24 @@
 </template>
 
 <script>
-	 const img = '/static/logo.png';
-export default {
-	data() {
-		return {
-			id:'',
-			mapContext: null,			//地图对象
-			startMove: false,			//是否开始回放
-			nextPointIndex: 1,		//下一个坐标点的索引
-			durationTime: 1000,		//相邻两点动画持续时长默认1秒
-			//路线信息
-			polyline: [
-				{
+	const img = '/static/logo.png';
+	export default {
+		data() {
+			return {
+				id: '',
+				mapContext: null, //地图对象
+				startMove: false, //是否开始回放
+				nextPointIndex: 1, //下一个坐标点的索引
+				durationTime: 1000, //相邻两点动画持续时长默认1秒
+				//路线信息
+				polyline: [{
 					width: 28,
 					points: [],
 					arrowLine: true,
 					color: '#3591FC',
-				}
-			],
-			//标记点(即移动标记物)
-			markers: [
-				{
+				}],
+				//标记点(即移动标记物)
+				markers: [{
 					id: 1,
 					width: 140,
 					height: 140,
@@ -49,122 +39,125 @@ export default {
 						x: 0.5,
 						y: 1
 					}
-				}
-			]
-		}
-	},
-	onLoad(option) {
-		this.id = option.id
-		this.getTrack()		//获取轨迹信息(只做演示,未进行远程请求)
-	},
-	methods: {
-		//模拟获取远程数据
-		getTrack() {
-			this.$request.baseRequest('post', '//hyOrderTravelPath/getInfo', {
-					orderId: this.id,
-				}).then(res => {
-				console.log("res",res)
-					// this.polyline[0].points = [
-					// 	{latitude: 39.997761, longitude: 116.478935},
-					// 	{latitude: 39.997825, longitude: 116.478939},
-					// 	{latitude: 39.998549, longitude: 116.478912},
-					// 	{latitude: 39.998555, longitude: 116.478998},
-					// 	{latitude: 39.998566, longitude: 116.479282},
-					// 	{latitude: 39.998528, longitude: 116.479658},
-					// 	{latitude: 39.998453, longitude: 116.480151},
-					// 	{latitude: 39.998302, longitude: 116.480784},
-					// 	{latitude: 39.998184, longitude: 116.481149},
-					// 	{latitude: 39.997997, longitude: 116.481573},
-					// 	{latitude: 39.997846, longitude: 116.481863},
-					// 	{latitude: 39.997718, longitude: 116.482072},
-					// 	{latitude: 39.997718, longitude: 116.482362},
-					// 	{latitude: 39.998935, longitude: 116.483633},
-					// 	{latitude: 39.998968, longitude: 116.48367},
-					// 	{latitude: 39.999861, longitude: 116.484648}
-					// ]
-					// this.durationTime = Math.ceil(30000 / this.polyline[0].points.length)	//默认播放全程使用30秒,计算相连两点动画时长
-					// this.initMapData()
-				})
-				.catch(res => {
-					uni.hideLoading()
-					uni.showToast({
-						title: res.message,
-						icon: 'none',
-						duration: 2000
-					})
-				});
-
-		},
-		//设置地图
-		initMapData() {
-			this.initMarkers()
-			this.mapContext = uni.createMapContext('myMap', this)
-		},
-		//设置位置(从起点开始)
-		initMarkers() {
-			this.markers[0].latitude = this.polyline[0].points[0].latitude
-			this.markers[0].longitude = this.polyline[0].points[0].longitude
-		},
-		//开始移动
-		handleStartMove() {
-			this.startMove = true
-			this.movePoint()
+				}]
+			}
 		},
-		//停止移动
-		handleStopMove() {
-			this.startMove = false
+		onLoad(option) {
+			this.id = option.id
+			console.log(option.id)
+			this.getTrack() //获取轨迹信息(只做演示,未进行远程请求)
 		},
-		//移动坐标
-		movePoint() {
-			/*
-			//也可以用这个方法
-			this.mapContext.moveAlong({
-				duration: 30000,
-				markerId: this.markers[0].id,
-				path: this.polyline[0].points
-			})
-			return
-			*/
-		   // this.mapContext.moveAlong({
-		   // 	duration: 10000,
-		   // 	markerId: this.markers[0].id,
-		   // 	path: this.polyline[0].points
-		   // })
-		   console.log("this.nextPointIndex1 ",this.nextPointIndex ,this.polyline[0].points.length - 1)
-		   console.log("this.startMove1",this.startMove)
-			this.mapContext.translateMarker({
-				duration: this.durationTime,
-				markerId: this.markers[0].id,
-				destination: {
-					latitude: this.polyline[0].points[this.nextPointIndex].latitude,
-					longitude: this.polyline[0].points[this.nextPointIndex].longitude
-				},
-				animationEnd: res => {
-					
-					console.log("this.nextPointIndex ",this.nextPointIndex ,this.polyline[0].points.length - 1)
-					console.log("this.startMove",this.startMove)
-					//播放结束,继续移动到下一个点,最后一个点时结束移动
-					if (this.nextPointIndex < this.polyline[0].points.length - 1) {
-						this.nextPointIndex++
-						if (this.startMove) {
-							this.movePoint()
+		methods: {
+			//模拟获取远程数据
+			getTrack() {
+				this.$request.baseRequest('get', '/hyOrderTravelPath/getInfo', {
+						orderId: this.id,
+						currentPage: 1,
+						pageSize: 9999
+					}).then(res => {
+						console.log("res", res)
+						// this.polyline[0].points = [
+						// 	{latitude: 39.997761, longitude: 116.478935},
+						// 	{latitude: 39.997825, longitude: 116.478939},
+						// 	{latitude: 39.998549, longitude: 116.478912},
+						// 	{latitude: 39.998555, longitude: 116.478998},
+						// 	{latitude: 39.998566, longitude: 116.479282},
+						// 	{latitude: 39.998528, longitude: 116.479658},
+						// 	{latitude: 39.998453, longitude: 116.480151},
+						// 	{latitude: 39.998302, longitude: 116.480784},
+						// 	{latitude: 39.998184, longitude: 116.481149},
+						// 	{latitude: 39.997997, longitude: 116.481573},
+						// 	{latitude: 39.997846, longitude: 116.481863},
+						// 	{latitude: 39.997718, longitude: 116.482072},
+						// 	{latitude: 39.997718, longitude: 116.482362},
+						// 	{latitude: 39.998935, longitude: 116.483633},
+						// 	{latitude: 39.998968, longitude: 116.48367},
+						// 	{latitude: 39.999861, longitude: 116.484648}
+						// ]
+						// this.durationTime = Math.ceil(30000 / this.polyline[0].points.length)	//默认播放全程使用30秒,计算相连两点动画时长
+						// this.initMapData()
+					})
+					.catch(res => {
+						uni.hideLoading()
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+
+			},
+			//设置地图
+			initMapData() {
+				this.initMarkers()
+				this.mapContext = uni.createMapContext('myMap', this)
+			},
+			//设置位置(从起点开始)
+			initMarkers() {
+				this.markers[0].latitude = this.polyline[0].points[0].latitude
+				this.markers[0].longitude = this.polyline[0].points[0].longitude
+			},
+			//开始移动
+			handleStartMove() {
+				this.startMove = true
+				this.movePoint()
+			},
+			//停止移动
+			handleStopMove() {
+				this.startMove = false
+			},
+			//移动坐标
+			movePoint() {
+				/*
+				//也可以用这个方法
+				this.mapContext.moveAlong({
+					duration: 30000,
+					markerId: this.markers[0].id,
+					path: this.polyline[0].points
+				})
+				return
+				*/
+				// this.mapContext.moveAlong({
+				// 	duration: 10000,
+				// 	markerId: this.markers[0].id,
+				// 	path: this.polyline[0].points
+				// })
+				console.log("this.nextPointIndex1 ", this.nextPointIndex, this.polyline[0].points.length - 1)
+				console.log("this.startMove1", this.startMove)
+				this.mapContext.translateMarker({
+					duration: this.durationTime,
+					markerId: this.markers[0].id,
+					destination: {
+						latitude: this.polyline[0].points[this.nextPointIndex].latitude,
+						longitude: this.polyline[0].points[this.nextPointIndex].longitude
+					},
+					animationEnd: res => {
+
+						console.log("this.nextPointIndex ", this.nextPointIndex, this.polyline[0].points
+							.length - 1)
+						console.log("this.startMove", this.startMove)
+						//播放结束,继续移动到下一个点,最后一个点时结束移动
+						if (this.nextPointIndex < this.polyline[0].points.length - 1) {
+							this.nextPointIndex++
+							if (this.startMove) {
+								this.movePoint()
+							}
+						} else {
+							this.nextPointIndex = 1
+							this.startMove = false
 						}
-					} else {
-						this.nextPointIndex = 1
-						this.startMove = false
 					}
-				}
-			})
+				})
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss" scoped>
-.hcp-bottom {
-	left: 0;
-	bottom: 0;
-	width: 750rpx;
-	position: fixed;
-}
-</style>
+	.hcp-bottom {
+		left: 0;
+		bottom: 0;
+		width: 750rpx;
+		position: fixed;
+	}
+</style>

+ 223 - 168
pages/order/orderDetails.vue

@@ -4,10 +4,12 @@
 		<view class="fixed1"></view>
 		<view class="fixed">
 			<view class='title flex flex-center'>
-				<image class="back"  src="../../static/images/return.png" @click="back" mode="" style="width: 40rpx; height: 40rpx;"></image>
+				<image class="back" src="../../static/images/return.png" @click="back" mode=""
+					style="width: 40rpx; height: 40rpx;"></image>
 				<!-- <u-icon class="back" name="arrow-left" color="" size="20" @click="back"></u-icon> -->
 				<view class="nav-title">订单详情</view>
-				<image class="search" style='width:18px;height:18px;' src="../../static/images/kefu.png" @click="$helper.contactCustomerService()" mode=""></image>
+				<image class="search" style='width:18px;height:18px;' src="../../static/images/kefu.png"
+					@click="$helper.contactCustomerService()" mode=""></image>
 				<!-- <u-icon class="search" name="server-fill" color="" size="28" @click="$helper.contactCustomerService()"> -->
 				</u-icon>
 			</view>
@@ -15,7 +17,6 @@
 		<view class="content1">
 			<view class="item1">
 				<view class="status">{{dataObj.cargoOwnerStatus}}</view>
-
 			</view>
 			<!-- flex flex-space-between -->
 			<view class="item2">
@@ -26,11 +27,9 @@
 				</u-button>
 				<u-button class="btn" text="终止" @click="clickstop()" v-if="dataObj.cargoOwnerStatus=='未装车'">
 				</u-button>
-				<u-button class="btn" text="查看合同" @click="lookContract" v-if="dataObj.cargoOwnerContract=='1'">
-				</u-button>
-				<u-button class="btn" text="签订合同" @click="signContract"
-					v-if="dataObj.cargoOwnerStatus=='待确认装车'&&dataObj.cargoOwnerContract!='1'">
-				</u-button>
+				<!-- <u-button class="btn" @click="lookContract" v-if="dataObj.cargoOwnerContract=='1'">查看合同</u-button>
+				<u-button class="btn" text="签订合同" @click="signContract" v-if="dataObj.cargoOwnerStatus=='待确认装车'&&dataObj.cargoOwnerContract!='1'">
+				</u-button> -->
 
 				<u-button class="btn" text="驳回装车信息" @click="confirmLoading(5)" v-if="dataObj.cargoOwnerStatus=='待确认装车'">
 				</u-button>
@@ -44,7 +43,8 @@
 				</u-button>
 				<u-button class="btn" text="确认卸车" @click="confirmUnLoading(4)" v-if="dataObj.cargoOwnerStatus=='待收货'">
 				</u-button>
-				<u-button class="btn" text="确认运费" @click="freightOk()" v-if="dataObj.cargoOwnerStatus=='司机驳回运费信息'"></u-button>
+				<u-button class="btn" text="确认运费" @click="freightOk()" v-if="dataObj.cargoOwnerStatus=='司机驳回运费信息'">
+				</u-button>
 				<!-- <u-button class="btn" text="确认卸车" @click="confirmLoading(4)" v-if="dataObj.cargoOwnerStatus=='待收货'">
 				</u-button> -->
 				<u-button class="btn" text="付款" @click="closed"
@@ -67,7 +67,8 @@
 				</view>
 				<view class="right flex s-row align-center phone">
 					<view class="bgc">
-						<image class="phone" style='width:24px;height:24px;' src="../../static/images/dianhua.png" @click="toPhone" mode=""></image>
+						<image class="phone" style='width:24px;height:24px;' src="../../static/images/dianhua.png"
+							@click="toPhone" mode=""></image>
 						<!-- <u-icon class="phone" name="phone-fill" color="#2772FB" size="20" @click="toPhone"></u-icon> -->
 					</view>
 
@@ -157,7 +158,9 @@
 			<view class="level2-title">承运信息</view>
 			<view class='row-between'>
 				<view class="row-left-text gray">合同编号</view>
-				<view class="row-right-text">{{dataObj.wtContractNo?dataObj.wtContractNo:'未签订'}}</view>
+				<view class="row-right-text">
+					{{dataObj.publishTaskInfo.wtContractNo?dataObj.publishTaskInfo.wtContractNo:'未签订'}}
+				</view>
 			</view>
 			<view class='row-between'>
 				<view class="row-left-text gray">车牌号</view>
@@ -167,7 +170,7 @@
 				<view class="row-left-text gray">预计运费</view>
 				<view class="row-right-text">{{dataObj.hyCarrierInfo.estimatedFreight}}元</view>
 			</view>
-			<view class='row-between' >
+			<view class='row-between'>
 				<view class="row-left-text gray">预付款</view>
 				<view class="row-right-text">{{dataObj.advanceCharge}}元</view>
 			</view>
@@ -175,6 +178,10 @@
 				<view class="row-left-text gray">装车净重</view>
 				<view class="row-right-text">{{dataObj.hyCarrierInfo?dataObj.hyCarrierInfo.loadingWeight:""}}吨</view>
 			</view>
+			<view class='row-between' v-if="dataObj.hyCarrierInfo && dataObj.hyCarrierInfo.unloadingWeight">
+				<view class="row-left-text gray">卸车净重</view>
+				<view class="row-right-text">{{dataObj.hyCarrierInfo?dataObj.hyCarrierInfo.unloadingWeight:""}}吨</view>
+			</view>
 			<view class='row-between'>
 				<view class="row-left-text gray">运输开始日期</view>
 				<view class="row-right-text">{{dataObj.tranStartDate}}</view>
@@ -187,6 +194,10 @@
 				<view class="row-left-text gray">装车时间</view>
 				<view class="row-right-text">{{dataObj.hyCarrierInfo.loadingDate}}</view>
 			</view>
+			<view class='row-between'>
+				<view class="row-left-text gray">运输时长</view>
+				<view class="row-right-text">{{dataObj.hyCarrierInfo.transportationDuration }} 小时</view>
+			</view>
 			<view class='row-between'>
 				<view class="row-left-text gray">装车照片</view>
 				<view class="flex">
@@ -194,12 +205,17 @@
 						v-for="(item,index) in zcImgList" @click='ylImg(zcImgList)'></u--image>
 				</view>
 			</view>
-			<view v-if='dataObj.orderStatus=="待货主确认卸车"||dataObj.orderStatus=="待平台确认卸车"||dataObj.orderStatus=="货主驳回装车信息"||dataObj.orderStatus=="平台驳回装车信息"||dataObj.orderStatus=="待确认运费"||dataObj.cargoOwnerStatus=="已完结"'>
+			<view
+				v-if='dataObj.orderStatus=="待货主确认卸车"||dataObj.orderStatus=="待平台确认卸车"||dataObj.orderStatus=="货主驳回装车信息"||dataObj.orderStatus=="平台驳回装车信息"||dataObj.orderStatus=="待确认运费"||dataObj.cargoOwnerStatus=="已完结"'>
 				<view class='row-between'>
 					<view class="row-left-text gray">合计应付运费</view>
 					<view class="row-right-text">
-						<u--input v-if='dataObj.orderStatus=="待货主确认卸车"' placeholder="请输入合计应付运费" border="none" inputAlign="right" clearable v-model="totalFreight"></u--input>
-						<view v-if='dataObj.orderStatus=="待平台确认卸车"||dataObj.orderStatus=="货主驳回装车信息"||dataObj.orderStatus=="平台驳回装车信息"||dataObj.orderStatus=="待确认运费"||dataObj.cargoOwnerStatus=="已完结"'>{{totalFreight}}</view>
+						<u--input v-if='dataObj.orderStatus=="待货主确认卸车"' placeholder="请输入合计应付运费" border="none"
+							inputAlign="right" clearable v-model="totalFreight"></u--input>
+						<view
+							v-if='dataObj.orderStatus=="待平台确认卸车"||dataObj.orderStatus=="货主驳回装车信息"||dataObj.orderStatus=="平台驳回装车信息"||dataObj.orderStatus=="待确认运费"||dataObj.cargoOwnerStatus=="已完结"'>
+							{{totalFreight}}
+						</view>
 					</view>
 				</view>
 				<view class='row-between'>
@@ -216,7 +232,8 @@
 				<view class='row-between'>
 					<view class="row-left-text gray">回单照片</view>
 					<view class="flex">
-						<u--image @click='ylImg(hdImgList)' :showLoading="true" :src='item' width="40px" height="40px" v-for="(item,index) in hdImgList"></u--image>
+						<u--image @click='ylImg(hdImgList)' :showLoading="true" :src='item' width="40px" height="40px"
+							v-for="(item,index) in hdImgList"></u--image>
 					</view>
 				</view>
 			</view>
@@ -242,8 +259,10 @@
 			</view>
 			<view style='flex-wrap: wrap;' class='flex mx row-left-text'>
 				<!-- 明细:预付{{dataObj.advanceCharge}}元,服务费{{dataObj.freightInfo.driverServiceCharge}}元,尾款{{dataObj.freightInfo.ownerFreightBalance}}元,合计{{dataObj.freightInfo.totalPayment}}元。 -->
-				明细:预付{{dataObj.advanceCharge}}元,工本费{{dataObj.freightInfo.ownerServiceCharge}}元,<text v-if="dataObj.freightInfo.ownerFreightBalance">尾款{{dataObj.freightInfo.ownerFreightBalance}}元,</text>合计{{dataObj.freightInfo.totalPayment}}元。</view>
+				明细:预付{{dataObj.advanceCharge}}元,工本费{{dataObj.freightInfo.ownerServiceCharge}}元,<text
+					v-if="dataObj.freightInfo.ownerFreightBalance">尾款{{dataObj.freightInfo.ownerFreightBalance}}元,</text>合计{{dataObj.freightInfo.totalPayment}}元。
 			</view>
+		</view>
 		<!-- v-if="status3" -->
 		<view class="content4" v-if="status3">
 			<view class="level2-title gray">还款信息</view>
@@ -272,8 +291,8 @@
 			</view>
 		</view>
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
-			:closeOnClickOverlay='true' :showCancelButton='true' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
-			@cancel="cancelClick" class="modal">
+			:closeOnClickOverlay='true' :showCancelButton='true' @confirm="$u.throttle(confirmClick(), 1000)"
+			@close="cancelClick" @cancel="cancelClick" class="modal">
 			<u-radio-group v-model="radiovalue1" placement="" v-if='isShowTerminationReason' class='row'>
 				<u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in radiolist1" :key="index"
 					:label="item.name" :name="item.name" @change="radioChange">
@@ -285,24 +304,26 @@
 		</u-modal>
 		<u-popup :show="show" mode="bottom" @close="close" @open="open">
 			<view class="u-popup-wrap">
-				<view >
-					<image style='width:12px;height:12px;' @click='closepopup' class='close'  src="../../static/images/order/guanbi@3x.png" mode=""></image>
+				<view>
+					<image style='width:12px;height:12px;' @click='closepopup' class='close'
+						src="../../static/images/order/guanbi@3x.png" mode=""></image>
 					<!-- <u-icon @click="closepopup" class='close' name="close" size="20"></u-icon> -->
 				</view>
-				
+
 				<view style='fon-size:34rpx;margin-bottom:20px;text-align:center;font-weight: 600;'>确认终止订单</view>
 				<view style="margin: 0 auto;">
-		           	<u-radio-group iconPlacement="right" v-model="radiovalue1" placement="" >
-		           	<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 style='border-top:10px solid #F2F4F7;position:absolute;left:0;height:0;width:100%;'></view>
-		           <view style='padding:40rpx 0 30rpx;'>终止原因描述</view>
-		           <u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'>
-		           </u--textarea>
-				   <view class='termination' :class="{'active':value2.length>0}" @click='$u.throttle(termination(), 5000)'>终止</view>
+					<u-radio-group iconPlacement="right" v-model="radiovalue1" placement="">
+						<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 style='border-top:10px solid #F2F4F7;position:absolute;left:0;height:0;width:100%;'></view>
+				<view style='padding:40rpx 0 30rpx;'>终止原因描述</view>
+				<u--textarea class="row" v-model="value2" placeholder="终止原因描述" count maxlength='50'>
+				</u--textarea>
+				<view class='termination' :class="{'active':value2.length>0}" @click='$u.throttle(termination(), 1000)'>
+					终止</view>
 			</view>
 		</u-popup>
 		<u-toast ref="uToast"></u-toast>
@@ -319,11 +340,11 @@
 			</view>
 			
 		</u-popup> -->
-		<u-modal :show="moneyShow"  title="合计运费" showCancelButton @confirm="moneyClick" @close="moneyclose"
+		<u-modal :show="moneyShow" title="合计运费" showCancelButton @confirm="moneyClick" @close="moneyclose"
 			@cancel="moneyclose">
-					<view class="slot-content">
-						<u--input v-model="totalFreight" type="number" placeholder="合计应付运费(含预付款)"></u--input>
-					</view>
+			<view class="slot-content">
+				<u--input v-model="totalFreight" type="number" placeholder="合计应付运费(含预付款)"></u--input>
+			</view>
 		</u-modal>
 		<!-- 		<view v-if="lookAlert" class="look-contract" @click="lookAlert==false">
 			<u-button class="btn" text="查看合同" @click="lookContract"></u-button>
@@ -359,7 +380,7 @@
 	import uniPopup from '@/components/uni-popup/uni-popup.vue'
 	import uploadImage from '@/components/ossutil/uploadFile.js';
 	export default {
-		components:{
+		components: {
 			uniPopup
 		},
 		data() {
@@ -376,7 +397,7 @@
 				status2: false,
 				status3: false,
 				id: '',
-				show:false,
+				show: false,
 				value2: '',
 				radiolist1: [{
 						name: '已与司机协商',
@@ -401,7 +422,7 @@
 				isShowAlert: false,
 				zcImgList: [],
 				xcImgList: [],
-				hdImgList:[],
+				hdImgList: [],
 				contractSrc: '',
 				canvasName: 'handWriting',
 				ctx: '',
@@ -412,15 +433,15 @@
 				selectColor: 'black',
 				lineColor: '#1A1A1A', // 颜色
 				lineSize: 5, // 笔记倍数
-				moneyShow:false,
-				totalFreight:""
+				moneyShow: false,
+				totalFreight: ""
 			}
 
 		},
 		onLoad(options) {
 			that = this
 			this.id = options.id
-			this.get_camera_permission()
+			// this.get_camera_permission()
 			// this.ctx = uni.createCanvasContext("handWriting");
 			// this.$nextTick(() => {
 			// 	uni.createSelectorQuery().select('.handCenter').boundingClientRect(rect => {
@@ -453,45 +474,59 @@
 					});
 				}
 			},
-			moneyClick(){
+			moneyClick() {
 				this.moneyShow = false
-				if(this.dataObj.cargoOwnerStatus == "司机驳回运费信息"){
+				if (this.dataObj.cargoOwnerStatus == "司机驳回运费信息") {
 					this.$request.baseRequest('post', '/orderInfo/api/confirmFreight', {
-							 id: this.dataObj.id,
-							 typeFlag:1,
-							 totalFreight:this.totalFreight
-						}).then(res => {
-							if (res.code == 200) {
-								this.$refs.uToast.show({
-									type: 'success',
-									message: "确认成功",
-								})
-								// this.getList()
-							}
-						})
-				}else{
+						id: this.dataObj.id,
+						typeFlag: 1,
+						totalFreight: this.totalFreight
+					}).then(res => {
+						if (res.code == 200) {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: "确认成功",
+							})
+							// this.getList()
+						}
+					})
+				} else {
 					this.confirmUnLoading(4)
 				}
 			},
-			moneyclose(){
+			moneyclose() {
 				this.moneyShow = false
 				this.totalFreight = ""
 			},
-			freightOk(){
-					this.moneyShow = true
+			freightOk() {
+				// billingMethod 0:元/吨 1:元/车
+				if (this.dataObj.billingMethod == 1) { //元/车
+					this.totalFreight = this.dataObj.freight
+				} else { //元/吨
+				//装车净重和卸车净重最小值  *  运输单价
+					if (Number(this.dataObj.hyCarrierInfo.loadingWeight) > Number(this.dataObj.hyCarrierInfo
+							.unloadingWeight)) {
+						this.totalFreight = Number(this.dataObj.hyCarrierInfo.unloadingWeight) * Number(this.dataObj.freight)
+						this.totalFreight = this.totalFreight.toFixed(2)
+					} else {
+						this.totalFreight = Number(this.dataObj.hyCarrierInfo.loadingWeight) * Number(this.dataObj.freight)
+						this.totalFreight = this.totalFreight.toFixed(2)
+					}
+				}
+				this.moneyShow = true
 			},
 			radioChange(n) {
 				console.log('radioChange', n);
 			},
-			closepopup(){
-				this.show=false
+			closepopup() {
+				this.show = false
 			},
 			open() {
-			          // console.log('open');
+				// console.log('open');
 			},
 			close() {
 				this.show = false
-			          // console.log('close');
+				// console.log('close');
 			},
 			ylImg(src) {
 				uni.previewImage({
@@ -528,12 +563,10 @@
 				});
 			},
 			signContract() {
-				
 				// this.lookAlert = true
 				uni.$u.route('/pages/order/signContract', {
 					obj: JSON.stringify(this.dataObj)
 				});
-
 			},
 			// 完结
 			closed() {
@@ -553,7 +586,6 @@
 									})
 								}
 							})
-
 						}
 					})
 					.catch(res => {
@@ -576,15 +608,16 @@
 			},
 			confirmLoading(type) {
 				this.type = type
-				if(this.type == 3 || this.type == 4){
-					if (this.dataObj.cargoOwnerContract != '1') {
-					uni.showToast({
-						title: '请先签订合同!',
-						icon: 'none'
-					})
-					return
-				}
-				}
+				//货主签订合同改为 已每个任务签订,不是按车每次签订合同
+				// if(this.type == 3 || this.type == 4){
+				// 	if (this.dataObj.cargoOwnerContract != '1') {
+				// 	uni.showToast({
+				// 		title: '请先签订合同!',
+				// 		icon: 'none'
+				// 	})
+				// 	return
+				// }
+				// }
 				if (type == 3) {
 					this.alertTitle = '确认装车?'
 					this.confirmText = '确定'
@@ -598,32 +631,44 @@
 					this.confirmText = '确定'
 					this.isShowAlert = true
 				}
-				
+
 				// uni.$u.route('/pages/order/confirmLoading', item);
 			},
 			confirmUnLoading(type) {
-				this.type=type
-				if(type == 4){
-					console.log(this.totalFreight)
-					if(this.totalFreight){
+				this.type = type
+				if (type == 4) {
+					if (this.totalFreight) {
 						this.alertTitle = '确认卸车?'
 						this.confirmText = '确定'
 						this.isShowAlert = true
-					}else{
+					} else {
+						// billingMethod 0:元/吨 1:元/车 
+						if (this.dataObj.billingMethod == 1) { //元/车
+							this.totalFreight = this.dataObj.freight
+						} else { //元/吨
+						//装车净重和卸车净重最小值  *  运输单价
+							if (Number(this.dataObj.hyCarrierInfo.loadingWeight) > Number(this.dataObj.hyCarrierInfo
+									.unloadingWeight)) {
+								this.totalFreight = Number(this.dataObj.hyCarrierInfo.unloadingWeight) * Number(this.dataObj.freight)
+								this.totalFreight = this.totalFreight.toFixed(2)
+							} else {
+								this.totalFreight = Number(this.dataObj.hyCarrierInfo.loadingWeight) * Number(this.dataObj.freight)
+								this.totalFreight = this.totalFreight.toFixed(2)
+							}
+						}
 						this.moneyShow = true
 					}
-				}else if(type == 6){
+				} else if (type == 6) {
 					this.alertTitle = '确定驳回卸车信息?'
 					this.confirmText = '确定'
 					this.isShowAlert = true
 				}
-				
+
 				// let item = this.dataObj
 				// uni.$u.route('/pages/order/confirmUnloading', item);
 			},
 			confirmClick() {
-				console.log(111111111)
-				var that=this
+				var that = this
 				that.isShowAlert = false
 				if (this.type == 1 || this.type == 2) {
 					let _title = ''
@@ -654,7 +699,7 @@
 									type: 'success',
 									message: _title,
 									complete() {
-										
+
 									}
 								})
 							}
@@ -666,13 +711,13 @@
 					let _flag = ''
 					if (this.type == 3) _flag = 1
 					if (this.type == 4) _flag = 2
-					
+
 					this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
 							orderId: this.dataObj.id,
 							id: this.dataObj.hyCarrierInfo.id,
 							loadingFlag: _flag,
 							flag: 1,
-							totalFreight:this.totalFreight,
+							totalFreight: this.totalFreight,
 						}).then(res => {
 							if (res.code == 200) {
 								this.$refs.uToast.show({
@@ -692,7 +737,7 @@
 						.catch(res => {
 							uni.$u.toast(res.message);
 						});
-				}else if(this.type==5){
+				} else if (this.type == 5) {
 					this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
 							orderId: this.dataObj.id,
 							loadingFlag: 1,
@@ -715,7 +760,7 @@
 						.catch(res => {
 							uni.$u.toast(res.message);
 						});
-				}else if(this.type == 6){
+				} else if (this.type == 6) {
 					this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
 							orderId: this.dataObj.id,
 							loadingFlag: 2,
@@ -733,59 +778,14 @@
 										// })
 									}
 								})
-					
+
 							}
 						})
 						.catch(res => {
 							uni.$u.toast(res.message);
 						});
-				} else{
-					var that=this
-										if (this.radiovalue1 == '其他' && !this.value2) {
-											this.$refs.uToast.show({
-												type: 'error',
-												message: "请填写终止原因描述!",
-											})
-											return
-										}
-										let _terminationReason = ''
-										if (this.radiovalue1 == '已与司机协商') {
-											_terminationReason = 1
-										} else if (this.radiovalue1 == '司机原因终止') {
-											_terminationReason = 2
-										} else if (this.radiovalue1 == '货主个人原因终止') {
-											_terminationReason = 3
-										} else if (this.radiovalue1 == '其他') {
-											_terminationReason = 4
-										}
-										this.$request.baseRequest('post', '/orderInfo/api/end', {
-												id: this.id,
-												terminator: 2,
-												terminationReason: _terminationReason,
-												terminationReasonDescription: this.value2
-											}).then(res => {
-												if (res.code == 200) {
-													that.show=false
-													that.value2=''
-													this.$refs.uToast.show({
-														type: 'success',
-														message: '终止订单成功',
-													})
-													that.getList()
-												} else {
-													this.$refs.uToast.show({
-														type: 'success',
-														message: '终止订单失败',
-													})
-												}
-											})
-											.catch(res => {
-												uni.$u.toast(res.message);
-											});
-				}
-			},
-			termination(){
-				var that=this
+				} else {
+					var that = this
 					if (this.radiovalue1 == '其他' && !this.value2) {
 						this.$refs.uToast.show({
 							type: 'error',
@@ -810,8 +810,8 @@
 							terminationReasonDescription: this.value2
 						}).then(res => {
 							if (res.code == 200) {
-								that.show=false
-								that.value2=''
+								that.show = false
+								that.value2 = ''
 								this.$refs.uToast.show({
 									type: 'success',
 									message: '终止订单成功',
@@ -827,6 +827,51 @@
 						.catch(res => {
 							uni.$u.toast(res.message);
 						});
+				}
+			},
+			termination() {
+				var that = this
+				if (this.radiovalue1 == '其他' && !this.value2) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "请填写终止原因描述!",
+					})
+					return
+				}
+				let _terminationReason = ''
+				if (this.radiovalue1 == '已与司机协商') {
+					_terminationReason = 1
+				} else if (this.radiovalue1 == '司机原因终止') {
+					_terminationReason = 2
+				} else if (this.radiovalue1 == '货主个人原因终止') {
+					_terminationReason = 3
+				} else if (this.radiovalue1 == '其他') {
+					_terminationReason = 4
+				}
+				this.$request.baseRequest('post', '/orderInfo/api/end', {
+						id: this.id,
+						terminator: 2,
+						terminationReason: _terminationReason,
+						terminationReasonDescription: this.value2
+					}).then(res => {
+						if (res.code == 200) {
+							that.show = false
+							that.value2 = ''
+							this.$refs.uToast.show({
+								type: 'success',
+								message: '终止订单成功',
+							})
+							that.getList()
+						} else {
+							this.$refs.uToast.show({
+								type: 'success',
+								message: '终止订单失败',
+							})
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
 			},
 			cancelClick() {
 				this.isShowAlert = false
@@ -842,7 +887,7 @@
 				this.id = item.id
 				this.isShowAlert = true
 			},
-			clickstop(){
+			clickstop() {
 				let item = this.dataObj
 				// 货主接单
 				if (item.cargoOwnerStatusKey == 1) {
@@ -854,7 +899,8 @@
 				this.show = true
 			},
 			toPhone() {
-				var that=this
+				var that = this
+				that.get_camera_permission()
 				uni.makePhoneCall({
 					phoneNumber: that.dataObj.driverPhone,
 					success: (res) => {
@@ -875,10 +921,10 @@
 				}).then(res => {
 					if (res.code == 200) {
 						this.dataObj = res.data
-						if(this.dataObj.hyCarrierInfo.totalFreight){//货主确定卸车输入的 合计运费
+						if (this.dataObj.hyCarrierInfo.totalFreight) { //货主确定卸车输入的 合计运费
 							this.totalFreight = this.dataObj.hyCarrierInfo.totalFreight
 						}
-						
+
 						// 承运信息显示
 						if (res.data.cargoOwnerStatus != "待接单" && res.data.cargoOwnerStatus != "未装车" && res.data
 							.cargoOwnerStatus != "已终止") {
@@ -894,7 +940,7 @@
 							this.status3 = true
 						}
 						if (res.data.hyCarrierInfo) {
-							this.zcImgList=[]
+							this.zcImgList = []
 							if (res.data.hyCarrierInfo.loadingImg) {
 								let _zcList = res.data.hyCarrierInfo.loadingImg.split(',')
 								for (let i = 0; i < _zcList.length; i++) {
@@ -902,14 +948,14 @@
 								}
 							}
 							if (res.data.hyCarrierInfo.unloadingImg) {
-								this.xcImgList=[]
+								this.xcImgList = []
 								let _xcList = res.data.hyCarrierInfo.unloadingImg.split(',')
 								for (let i = 0; i < _xcList.length; i++) {
 									if (_xcList[i]) this.xcImgList.push(_xcList[i])
 								}
 							}
 							if (res.data.hyCarrierInfo.receiptImg) {
-								this.hdImgList=[]
+								this.hdImgList = []
 								let _hdList = res.data.hyCarrierInfo.receiptImg.split(',')
 								console.log(_hdList)
 								for (let i = 0; i < _hdList.length; i++) {
@@ -1272,49 +1318,58 @@
 		top: 120rpx;
 		left: 10rpx;
 	}
-	/deep/.u-popup__content{
+
+	/deep/.u-popup__content {
 		border-radius: 10px;
 		// padding:20px;
 	}
-	/deep/.u-radio{
-		margin:40rpx 0;
+
+	/deep/.u-radio {
+		margin: 40rpx 0;
 	}
-	.close{
-		position:absolute;
-		right:20px;
+
+	.close {
+		position: absolute;
+		right: 20px;
 	}
-	.termination{
-		background:#F1F3F6;
-		color:#C5CAD4;
-		padding:10px;
-		border-radius:30px;
+
+	.termination {
+		background: #F1F3F6;
+		color: #C5CAD4;
+		padding: 10px;
+		border-radius: 30px;
 		text-align: center;
-		margin-top:30rpx;
+		margin-top: 30rpx;
 	}
-	.termination.active{
+
+	.termination.active {
 		background: #2772FB;
 		color: white;
 	}
-	.freight{
-		.freight_text{
+
+	.freight {
+		.freight_text {
 			font-size: 34rpx;
 			font-weight: 600;
 			margin-bottom: 20rpx;
 		}
-		.freight_up{
+
+		.freight_up {
 			display: flex;
 			border-top: 1px solid #EEEEEE;
 			height: 60rpx;
 			background: red;
 			margin-top: 10px;
 		}
-		.freight_item{
+
+		.freight_item {
 			width: 50%;
 			text-align: center;
 			line-height: 50rpx;
 		}
 	}
-	.u-popup-wrap{
-		padding:20px;
+
+	.u-popup-wrap {
+		padding: 20px;
 	}
 </style>

+ 241 - 62
pages/order/signContract.vue

@@ -21,7 +21,7 @@
 			</view>
 			<view class='row-between'>
 				<view class="gray">发货单位</view>
-				<view class="">{{dataDetails.compName?dataDetails.compName:'个人货主'}}</view>
+				<view class="">{{dataDetails.cargoOwner?dataDetails.cargoOwner:'个人货主'}}</view>
 			</view>
 			<view class='row-between'>
 				<view class="gray">发货地</view>
@@ -52,6 +52,16 @@
 				<view class="gray">收费比例(%)</view>
 				<view class="">{{chargeProportion}}</view><!-- 暂时写死6% -->
 			</view>
+			<view style='color:#6A6A6A;margin-top:20px;font-size:30rpx;align-items: center;' class="flex">
+				<u--image style='margin-right:3px;position:relative;top:1rpx;' @click='consent'
+					:src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
+					width="17px" height="17px"></u--image>
+				我已阅读并同意
+				<view>
+					<u--text type="primary" text="《货物运输委托协议》" @click="lookContract"></u--text>
+				</view>
+				条款
+			</view>
 		</view>
 		<view class="wrapper content3">
 			<view class="qm-row">
@@ -67,19 +77,20 @@
 			<view class="handRight">
 
 			</view>
-			<view class="handBtn">
-				<!-- 			<image @click="selectColorEvent('black','#1A1A1A')"
-					:src="selectColor === 'black' ? '/static/other/color_black_selected.png' : '/static/other/color_black.png'"
-					:class="[selectColor === 'black' ? 'color_select' : '', 'black-select']"></image>
-				<image @click="selectColorEvent('red','#ca262a')"
-					:src="selectColor === 'red' ? '/static/other/color_red_selected.png' : '/static/other/color_red.png'"
-					:class="[selectColor === 'red' ? 'color_select' : '', 'black-select']"></image> -->
-
-				<!-- <button @click="saveCanvasAsImg" class="saveBtn">保存</button> -->
-				<view @click="$u.throttle(submit, 5000)" class="saveBtn">提交</view>
-				<!-- <button @click="previewCanvasImg" class="previewBtn">预览</button> -->
-				<!-- <button @click="subCanvas" class="subBtn">完成</button> -->
-			</view>
+
+		</view>
+		<view class="handBtn">
+			<!-- 			<image @click="selectColorEvent('black','#1A1A1A')"
+				:src="selectColor === 'black' ? '/static/other/color_black_selected.png' : '/static/other/color_black.png'"
+				:class="[selectColor === 'black' ? 'color_select' : '', 'black-select']"></image>
+			<image @click="selectColorEvent('red','#ca262a')"
+				:src="selectColor === 'red' ? '/static/other/color_red_selected.png' : '/static/other/color_red.png'"
+				:class="[selectColor === 'red' ? 'color_select' : '', 'black-select']"></image> -->
+
+			<!-- <button @click="saveCanvasAsImg" class="saveBtn">保存</button> -->
+			<view @click="$u.throttle(submit, 1000)" class="saveBtn">提交</view>
+			<!-- <button @click="previewCanvasImg" class="previewBtn">预览</button> -->
+			<!-- <button @click="subCanvas" class="subBtn">完成</button> -->
 		</view>
 		<u-toast ref="uToast"></u-toast>
 	</view>
@@ -110,7 +121,7 @@
 				value: true,
 				dataDetails: {
 					carrierInfo: {},
-					serviceCharge:'50'
+					serviceCharge: '50'
 				},
 				radiolist1: [{
 						name: '平台垫付运费',
@@ -121,7 +132,10 @@
 						disabled: false
 					},
 				],
-				chargeProportion:"",//收费比例
+				chargeProportion: "", //收费比例
+				consentStatus: false,
+				codestatus: false,
+				addType: "",
 			};
 		},
 		computed: {
@@ -135,10 +149,10 @@
 			}).then(res => {
 				uni.setStorageSync("firstAuthentication", res.data)
 				//收费比例从缓存中取
-				that.chargeProportion =uni.getStorageSync("firstAuthentication").chargeProportion*100
+				that.chargeProportion = uni.getStorageSync("firstAuthentication").chargeProportion * 100
 			})
-			
 			this.dataDetails = JSON.parse(decodeURIComponent(options.obj))
+			this.addType = JSON.parse(decodeURIComponent(options.type))
 			// this.dataDetails.advanceFreightService = '平台垫付运费'
 			this.ctx = uni.createCanvasContext("handWriting");
 			this.$nextTick(() => {
@@ -147,11 +161,65 @@
 						this.canvasHeight = rect.height;
 						/* 将canvas背景设置为 白底,不设置  导出的canvas的背景为透明 */
 						this.setCanvasBg('#fff');
+						this.$request.baseRequest('get', '/commonUser/getSignatureAddress', {
+							phone: this.userInfo.phone,
+							identification: 2
+						}).then(res => {
+							if (res.data) {
+								if (res.data.signImg) {
+									// 获取远程图片,canvas无法直接绘制远程图片
+									this.userInfo.signImg = res.data.signImg
+									this.isScaleStart = res.data.signImg
+									uni.getImageInfo({
+										src: res.data.signImg,
+										success(res) {
+											var ctx = uni.createCanvasContext('handWriting')
+											console.log(res.width);
+											console.log(res.height);
+											ctx.drawImage(res.path, 0, 0)
+											// ctx.drawImage(res.path, 0, 0, 330, 244)
+											ctx.save()
+											ctx.draw()
+										},
+										fail(res) {
+											console.log("fail -> res", res)
+											uni.showToast({
+												title: "图片下载异常",
+												duration: 2000,
+												icon: "none"
+											})
+										}
+									})
+								}
+							}
+						})
 					})
 					.exec();
 			});
 		},
 		methods: {
+			lookContract() {
+				uni.downloadFile({
+					url: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/hzContract.pdf",
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							showMenu: true,
+							success: function(res) {
+								console.log('打开文档成功');
+							}
+						});
+					}
+				});
+			},
+			consent() {
+				this.consentStatus = !this.consentStatus
+				uni.setStorage({
+					key: 'policyStorageKey',
+					data: this.consentStatus
+				});
+			},
 			submit() {
 				if (!that.isScaleStart) {
 					that.$refs.uToast.show({
@@ -167,10 +235,22 @@
 				// 	})
 				// 	return
 				// }
+				if (!that.consentStatus) {
+					that.$refs.uToast.show({
+						type: 'error',
+						message: "请阅读并确认协议条款!",
+					})
+					return
+				}
+
 				uni.canvasToTempFilePath({
 					canvasId: 'handWriting',
 					fileType: 'png',
 					quality: 1, //图片质量
+					width: 330,
+					height: 244,
+					destWidth: 330,
+					destHeight: 244,
 					success(res) {
 						console.log(res.tempFilePath, 'canvas生成图片地址');
 						uploadImage('image', res.tempFilePath, 'appData/',
@@ -178,58 +258,145 @@
 								// 上传成功
 								console.log('图片地址', result)
 								that.dataDetails.cargoOwnerAutograph = result
-
-
 								uni.showLoading({
 									title: '加载中',
 									mask: true
 								})
-								let _obj = {}
-								_obj.id = that.dataDetails.id
-								_obj.submitFlag=2
-								_obj.typeFlag = 1
-								_obj.cargoOwnerAutograph = that.dataDetails.cargoOwnerAutograph
-								that.$request.baseRequest('get', '/orderInfo/setPdf', _obj).then(
-										res => {
+								if (that.addType == 1) { //新增
+									that.$request.baseRequest('post', '/publishTaskInfo/api/addTask', that
+											.dataDetails).then(res => {
+											if (res.code == 200) {
+												uni.removeStorage({
+													key: 'storage_saddress'
+												});
+												uni.removeStorage({
+													key: 'storage_faddress'
+												});
+												uni.removeStorage({
+													key: 'releaseCargoOwner'
+												});
+												uni.removeStorage({
+													key: 'releasecompId'
+												});
+												// uni.redirectTo({
+												// 		url: "/pages/release/release"
+												// })
+												that.dataDetails.id = res.data
+												let _obj = {}
+												_obj.id = that.dataDetails.id
+												_obj.cargoOwnerAutograph = that.dataDetails
+													.cargoOwnerAutograph
+												that.$request.baseRequest('get',
+														'/publishTaskInfo/signContract', _obj).then(
+														res => {
+															uni.hideLoading()
+															if (res.code == 200) {
+
+																// that.contractSrc = res.data
+																// uni.downloadFile({
+																// 	url: res.data,
+																// 	success: function(res) {
+																// 		var filePath = res.tempFilePath;
+																// 		uni.openDocument({
+																//  		filePath: filePath,
+																// 			showMenu: true,
+																// 			success: function(res) {
+																// 				console.log('打开文档成功');
+																// 			}
+																// 		});
+																// 	}
+																// });
+																that.$refs.uToast.show({
+																	type: 'success',
+																	message: "发布成功",
+																	complete() {
+																		uni.switchTab({
+																			url: '/pages/order/index'
+																		});
+																	}
+																})
+															}
+														})
+													.catch(res => {
+														uni.hideLoading()
+														uni.$u.toast(res.message);
+													});
+											}
+										})
+										.catch(res => {
 											uni.hideLoading()
-											uni.navigateBack({
-												delta:1
+											uni.showToast({
+												title: res.message,
+												icon: 'none',
+												duration: 2000
 											})
+										});
+								} else if (that.addType == 2) { //编辑
+									that.$request.baseRequest('post', '/publishTaskInfo/api/editTask', that
+											.dataDetails).then(res => {
 											if (res.code == 200) {
-												// that.contractSrc = res.data
-												// uni.downloadFile({
-												// 	url: res.data,
-												// 	success: function(res) {
-												// 		var filePath = res.tempFilePath;
-												// 		uni.openDocument({
-												//  		filePath: filePath,
-												// 			showMenu: true,
-												// 			success: function(res) {
-												// 				console.log('打开文档成功');
-												// 			}
-												// 		});
-												// 	}
-												// });
-												// this.$refs.uToast.show({
-												// 	type: 'success',
-												// 	message: "提交成功",
-												// 	complete() {
-												// 		that.upCallback({
-												// 			size: 10,
-												// 			num: 1
-												// 		})
-												// 	}
-												// })
-
+												uni.removeStorage({
+													key: 'storage_saddress'
+												});
+												uni.removeStorage({
+													key: 'storage_faddress'
+												});
+												uni.removeStorage({
+													key: 'releaseCargoOwner'
+												});
+												uni.removeStorage({
+													key: 'releasecompId'
+												});
+												let _obj = {}
+												_obj.id = that.dataDetails.id
+												_obj.cargoOwnerAutograph = that.dataDetails
+													.cargoOwnerAutograph
+												that.$request.baseRequest('get',
+														'/publishTaskInfo/signContract', _obj).then(
+														res => {
+															uni.hideLoading()
+															if (res.code == 200) {
+																// that.contractSrc = res.data
+																// uni.downloadFile({
+																// 	url: res.data,
+																// 	success: function(res) {
+																// 		var filePath = res.tempFilePath;
+																// 		uni.openDocument({
+																//  		filePath: filePath,
+																// 			showMenu: true,
+																// 			success: function(res) {
+																// 				console.log('打开文档成功');
+																// 			}
+																// 		});
+																// 	}
+																// });
+																that.$refs.uToast.show({
+																	type: 'success',
+																	message: "修改成功",
+																	complete() {
+																		uni.switchTab({
+																			url: '/pages/order/index'
+																		});
+																	}
+																})
+															}
+														})
+													.catch(res => {
+														uni.hideLoading()
+														uni.$u.toast(res.message);
+													});
 											}
 										})
-									.catch(res => {
-										uni.hideLoading()
-										uni.$u.toast(res.message);
-									});
-							}
-						)
-
+										.catch(res => {
+											uni.hideLoading()
+											uni.showToast({
+												title: res.message,
+												icon: 'none',
+												duration: 2000
+											})
+										});
+								}
+							})
 					}
 				});
 			},
@@ -251,7 +418,7 @@
 				//设置线条粗细
 				this.ctx.setLineWidth(this.lineSize)
 				//设置线条的结束端点样式
-				this.ctx.setLineCap("round")//'butt'、'round'、'square'
+				this.ctx.setLineCap("round") //'butt'、'round'、'square'
 				//开始画笔
 				this.ctx.beginPath()
 			},
@@ -466,13 +633,25 @@
 		text-align: center;
 		border-radius: 50rpx;
 		padding: 20rpx;
+		height: 50rpx;
 	}
 
 	.handBtn {
 		display: flex;
+		height: 60px;
+		bottom: 0px;
+		padding-top: 20rpx;
+		background-color: #FFFFFF;
 		justify-content: center;
 	}
 
+	uni-navigator {
+		//条款
+		display: inline-block;
+		color: #2772FB;
+
+	}
+
 	/* 
 	.wrapper {
 		width: 100%;

+ 25 - 5
pages/public/register.vue

@@ -26,16 +26,28 @@
 				<button :class='codestatus?"activeCode":""' @click='getcode'
 					class='getcode Regular'>{{sendText}}</button>
 			</view>
-			<view style='border-bottom:1px solid #E8E9ED;padding:10px 0;position:relative;'>
+			<view style='border-bottom:1px solid #E8E9ED;padding:10px 0;position:relative;display: flex;'>
 				<!-- <u-input border="none" maxlength='16' class='Regular input-style' style='height:30px;'
 					v-model='password' placeholder="请输入密码,6-16位字符" :type="type" /> -->
-				<input placeholder-style="color:#AFB3BF" border="none" maxlength="16" v-model='password' style=''
-					placeholder="请输入密码,6-16位字符" :type="type" class="Regular input-style" />
+				<!-- <u-input placeholder-style="color:#AFB3BF" border="none" maxlength="16" v-model='password' style=''
+					placeholder="请输入密码,6-16位字符" :type="isShowPassword" class="Regular input-style" /> -->
+				<input placeholder-style="color:#AFB3BF" v-model='password' v-if="isShowPassword=='password'"
+					placeholder="请输入密码" type="password">
+				<input maxlength='16' placeholder-style="color:#AFB3BF" class='password Regular' v-model='password'
+					v-else type="text" placeholder="请输入密码">
+				<view style="width: 50%;text-align: right;">
+					<image class='yanjingicon' style='width:22px;height:22px;margin-right: 20rpx;'
+						@click="passWordStatus(1)" v-if="isShowPassword=='password'" src="../../static/yioncang.png"
+						mode=""></image>
+					<image class='yanjingicon' style='width:22px;height:22px;margin-right: 20rpx;'
+						@click="passWordStatus(2)" v-else src="../../static/xianshi.png" mode=""></image>
+				</view>
+
 				<!-- 				<input maxlength='16' class='password Regular input-style' style='height:30px;' v-model='password' placeholder="请输入密码,6-16位字符" :type="type"> -->
 				<!-- <image v-if='password!=""' @click='password=""' class='close2' src='../../static/img/login/guanbi@2x.png'></image> -->
 				<!-- <view @click='switchover' style='position:absolute;right:0;top:38%;z-index:10;cursor:pointer;' class="iconfont " :class='type=="password"?"icon-yanjing-biyan":"icon-yanjing-zhengyan"'></view> -->
 			</view>
-			<button :class='phone!=""&&verifyCode!=""&&password!=""?"active":""' @click='$u.throttle(register(), 5000)'
+			<button :class='phone!=""&&verifyCode!=""&&password!=""?"active":""' @click='$u.throttle(register(), 1000)'
 				class='verificationCode'>注册</button>
 			<view
 				style='color:#6A6A6A;margin-top:10px;font-size:30rpx;display:flex;justify-content:center;align-items: center;'>
@@ -100,7 +112,8 @@
 				sendDisabled: false,
 				system: '',
 				platform: '',
-				canIUseProfile: false
+				canIUseProfile: false,
+				isShowPassword: 'password'
 			}
 		},
 
@@ -128,6 +141,13 @@
 			// })
 		},
 		methods: {
+			passWordStatus(type) {
+				if (type == 1) {
+					this.isShowPassword = 'text'
+				} else {
+					this.isShowPassword = 'password'
+				}
+			},
 			// 随机数
 			randomAccess(min, max) {
 				return Math.floor(Math.random() * (min - max) + max)

+ 48 - 29
pages/release/addAddress.vue

@@ -14,21 +14,28 @@
 			<view class="">
 				<u--form labelPosition="left" :model="addressInfo" ref="form1" labelWidth='100'>
 					<u-form-item label="所属区域" ref="item1" borderBottom>
-						<view style='width:100%;flex-direction:row-reverse;' class='flex align-center' @click='toMap' :class="addressInfo.area?'':'select-color'">
-							<image src="../../static/right.png" style="width: 12px;height: 12px;margin-top: 2px;"></image>
-							<view>{{addressInfo.area?(addressInfo.province+addressInfo.city+addressInfo.area):'选择所属区域 '}}</view>
+						<view style='width:100%;flex-direction:row-reverse;' class='flex align-center' @click='toMap'
+							:class="addressInfo.area?'':'select-color'">
+							<image src="../../static/right.png" style="width: 12px;height: 12px;margin-top: 2px;">
+							</image>
+							<view>
+								{{addressInfo.area?(addressInfo.province+addressInfo.city+addressInfo.area):'选择所属区域 '}}
+							</view>
 						</view>
 					</u-form-item>
 					<u-form-item label="详细地址" prop="addressInfo.detailedAddress" ref="item1" borderBottom>
 						<!-- <u--input v-model="addressInfo.detailedAddress" border="none" inputAlign="left"  placeholder="详细地址"></u--input> -->
-						<u--textarea v-model="addressInfo.detailedAddress" border="none" inputAlign="left" placeholder="请输入详细地址" autoHeight  maxlength="15"></u--textarea>
+						<u--textarea v-model="addressInfo.detailedAddress" border="none" inputAlign="left"
+							placeholder="请输入详细地址" autoHeight maxlength="15"></u--textarea>
 						<!-- <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"  maxlength="10" inputAlign="right" border="none" placeholder="请输入联系人">></u--input>
+						<u--input v-model="addressInfo.contacts" maxlength="10" inputAlign="right" border="none"
+							placeholder="请输入联系人">></u--input>
 					</u-form-item>
 					<u-form-item label="联系电话" prop="addressInfo.contactPhone" ref="item1">
-						<u--input v-model="addressInfo.contactPhone" inputAlign="right" border="none" placeholder="请输入联系电话" maxlength="11">>
+						<u--input v-model="addressInfo.contactPhone" inputAlign="right" border="none"
+							placeholder="请输入联系电话" maxlength="11">>
 						</u--input>
 					</u-form-item>
 				</u--form>
@@ -36,7 +43,7 @@
 		</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="$u.throttle(submit(), 5000)">提交</view>
+		<view class="submit" @click="$u.throttle(submit(), 1000)">提交</view>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -60,7 +67,8 @@
 					contacts: "",
 					contactPhone: "",
 					longitude: "",
-					latitude: ""
+					latitude: "",
+					adCode:"",
 				},
 				// rules: {
 				// 	// 'addressInfo.name': {
@@ -74,7 +82,6 @@
 			};
 		},
 		onLoad(options) {
-			console.log(options)
 			this.$helper.formatLocation('辽宁省营口市鲅鱼圈区蝴蝶泉路红运小区')
 		},
 		computed: {
@@ -96,9 +103,7 @@
 										})
 									}
 								})
-
 							}
-
 						})
 					.catch(res => {
 						uni.showToast({
@@ -120,10 +125,10 @@
 				// this.isShowMap = true
 				uni.getLocation({
 					type: 'gcj02',
-					geocode:true,
-					altitude:true,
-					isHighAccuracy:true,
-					success: function (res) {
+					geocode: true,
+					altitude: true,
+					isHighAccuracy: true,
+					success: function(res) {
 						console.log('当前位置的经度:' + res.longitude);
 						console.log('当前位置的纬度:' + res.latitude);
 						uni.chooseLocation({
@@ -136,8 +141,6 @@
 								console.log('纬度:' + res.latitude);
 								console.log('经度:' + res.longitude);
 								let _address = that.$helper.formatLocation(res.address)
-								console.log('----------------------------')
-								console.log(_address)
 								that.addressInfo.latitude = res.latitude
 								that.addressInfo.longitude = res.longitude
 								that.addressInfo.detailedAddress = _address.Village
@@ -145,6 +148,19 @@
 								that.addressInfo.city = _address.City
 								that.addressInfo.area = _address.Country
 								that.addressInfo.commonId = that.userInfo.id
+								uni.request({
+									url: 'https://restapi.amap.com/v3/config/district?key=d29a9d10160efaca0dd616bbec936d7f&subdistrict=1&keywords=' +
+										_address.City,
+									success: (res) => {
+									  for(let i = 0 ; i < res.data.districts[0].districts.length ; i++){
+										  if(res.data.districts[0].districts[i].name == _address.Country){
+											  that.addressInfo.adCode = res.data.districts[0].districts[i].adcode
+											  console.log("行政区划代码"+that.addressInfo.adCode)
+											  break
+										  } 
+									  }
+									}
+								});
 								that.$forceUpdate()
 							},
 							fail(err) {
@@ -156,21 +172,21 @@
 						});
 					}
 				})
-				
+
 				// console.log(123)
 				// uni.$u.route('/pages/release/map', {
 				// 	id: 1,
 				// });
 			},
 			validate() {
-				if (this.addressInfo.contacts.length<2||this.addressInfo.contacts.length>10) {
+				if (this.addressInfo.contacts.length < 2 || this.addressInfo.contacts.length > 10) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "联系人姓名长度2-10个字符!",
 					})
 					return true
 				}
-				if (this.addressInfo.contactPhone.length<7) {
+				if (this.addressInfo.contactPhone.length < 7) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "联系人电话输入错误!",
@@ -184,10 +200,10 @@
 					})
 					return true
 				}
-				if (this.addressInfo.detailedAddress.length<4||this.addressInfo.detailedAddress.length>15) {
+				if (this.addressInfo.detailedAddress.length < 4 || this.addressInfo.detailedAddress.length > 50) {
 					this.$refs.uToast.show({
 						type: 'error',
-						message: "详细地址4-15个字符!",
+						message: "详细地址4-50个字符!",
 					})
 					return true
 				}
@@ -237,14 +253,17 @@
 		right: 0;
 		margin: auto;
 	}
-	/deep/input{
-		word-break:break-all;
+
+	/deep/input {
+		word-break: break-all;
 	}
-	/deep/.u-textarea{
-		padding:9px 0;
+
+	/deep/.u-textarea {
+		padding: 9px 0;
 	}
-	/deep/.u-textarea__field{
-		color:#000;
-		text-align:right;
+
+	/deep/.u-textarea__field {
+		color: #000;
+		text-align: right;
 	}
 </style>

+ 1 - 1
pages/release/editAddress.vue

@@ -35,7 +35,7 @@
 		</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="$u.throttle(submit, 5000)">提交</view>
+		<view class="submit" @click="$u.throttle(submit, 1000)">提交</view>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>

+ 90 - 68
pages/release/editRelease.vue

@@ -61,6 +61,11 @@
 				<!-- <input type="text" class="input" placeholder="自动计算" v-model="dataObj.distance" disabled /> -->
 				<view class="input">{{dataObj.distance?dataObj.distance:"自动计算"}} km</view>
 			</view>
+			<view class="row">
+				<view class="left">业务类型</view>
+				<view class="right" >{{dataObj.businessType?dataObj.businessType:"请选择业务类型"}}
+				</view>
+			</view>
 			<view class="row">
 				<view class="left">货物类别</view>
 				<view class="right" @click="goodstypeChange">{{dataObj.goodsType?dataObj.goodsType:"请选择货物类别"}}</view>
@@ -217,15 +222,21 @@
 				@cancel='isShowcardValidity=false' :closeOnClickOverlay='true'>
 			</u-picker> -->
 			<itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022' :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq"></itmister-date-picker>
+		
+		<view class="flex row noborder">
+			<view class="left-text flex">查看 
+			    <u--text type="primary" text="《货物运输委托协议》" @click="lookContract"></u--text>
+			</view>
+		</view>
 		</view>
-		<view class="submit" @click="submit">立即发布</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> -->
 		<itmister-date-picker :dateStatus="2" :startYear='2022' ref="datezc" :futureYear="30" :checkYear="year" :checkMonth="month" :checkDay="day" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
-			:showCancelButton='true' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
+			:showCancelButton='true' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 1000)" @close="cancelClick"
 			@cancel="cancelClick"></u-modal>
 		<u-toast ref="uToast"></u-toast>
 	</view>
@@ -385,16 +396,28 @@
 				this.dataObj.freightAdvance = false
 				this.freightAdvance=false
 			}
-			console.log(this.dataObj)
 			this.validityPeriod = this.$helper.makeValidityPeriod(0, '随时')
 			this.validityPeriodcq = this.$helper.makeValidityPeriod(0, '长期')
-
-
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			lookContract(){
+				uni.downloadFile({
+					url: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/hzContract.pdf",
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							showMenu: true,
+							success: function(res) {
+								console.log('打开文档成功');
+							}
+						});
+					}
+				});
+			},
 			goodstypeChange(){
 				this.isGoodsType = true
 			},
@@ -446,8 +469,6 @@
 							this.columns[0].push(this.qyList[i].company ? this.qyList[i].company : this.qyList[i]
 								.companyName)
 						}
-						console.log('1111', _this.columns)
-
 					})
 					.catch(res => {
 						uni.showToast({
@@ -456,8 +477,6 @@
 							duration: 2000
 						})
 					});
-
-
 			},
 			validate() {
 				if (uni.$u.test.isEmpty(this.dataObj.cargoOwner)) {
@@ -488,6 +507,42 @@
 					})
 					return true
 				}
+				if (uni.$u.test.isEmpty(this.dataObj.receiver)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "收货方不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataObj.receiverPhone)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "收货方手机号不能为空!",
+					})
+					return true
+				}
+				if (!this.dataObj.receiverIdcard && !this.dataObj.receiverCreditCode) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "信用代码和身份证号码至少填写一个!",
+						duration:4000
+					})
+					return true
+				}
+				if(this.dataObj.receiverIdcard&&this.dataObj.receiverIdcard.length!=18){
+					this.$refs.uToast.show({
+							type: 'error',
+							message: "身份证号输入错误!",
+						})
+						return true
+				}
+				if(this.dataObj.receiverCreditCode&&this.dataObj.receiverCreditCode.length!=18){
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "信用代码输入错误!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataObj.freightPrice)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -497,7 +552,7 @@
 				}
 				if (
 					this.dataObj.freightPrice < 0 || this.dataObj.freightPrice > 100000 || (
-						String(this.dataObj.freightPrice).indexOf('.') != -1 && String(tthis.dataObj.freightPrice).length -
+						String(this.dataObj.freightPrice).indexOf('.') != -1 && String(this.dataObj.freightPrice).length -
 						(String(this.dataObj.freightPrice).indexOf(
 							'.') + 1) > 2)
 				) {
@@ -511,7 +566,7 @@
 				if (this.dataObj.weight) {
 					if (
 						this.dataObj.weight < 0.1 || this.dataObj.weight > 10000000 || (
-							String(this.dataObj.weight).indexOf('.') != -1 && String(tthis.dataObj.weight).length -
+							String(this.dataObj.weight).indexOf('.') != -1 && String(this.dataObj.weight).length -
 							(String(this.dataObj.weight).indexOf(
 								'.') + 1) > 2)
 					) {
@@ -622,62 +677,24 @@
 				}
 				this.dataObj.carModel = _list.toString()
 				this.dataObj.commonId = this.userInfo.id
-				this.$request.baseRequest('post', '/publishTaskInfo/api/editTask', this.dataObj).then(res => {
-
-						this.$refs.uToast.show({
-							type: 'success',
-							message: "修改成功",
-							complete() {
-								uni.navigateBack({
-									delta:1
-								})
-								_this.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: '',
-								}
-								_this.checkboxValue1 = ['不限']
-							}
-						})
-
-					})
-					.catch(res => {
-						uni.showToast({
-							title: res.message,
-							icon: 'none',
-							duration: 2000
-						})
-					});
+				uni.$u.route('/pages/order/signContract', {
+					obj: JSON.stringify(this.dataObj),
+					type:2,//编辑
+				});
+				// this.$request.baseRequest('post', '/publishTaskInfo/api/editTask', this.dataObj).then(res => {
+				// 	if(res.code == 200){
+				// 		uni.$u.route('/pages/order/signContract', {
+				// 			obj: JSON.stringify(this.dataObj)
+				// 		});
+				// 	}
+				// 	})
+				// 	.catch(res => {
+				// 		uni.showToast({
+				// 			title: res.message,
+				// 			icon: 'none',
+				// 			duration: 2000
+				// 		})
+				// 	});
 
 			},
 			cancelClick() {
@@ -895,7 +912,8 @@
 			},
 			submit() {
 				if (this.validate()) return
-				this.isShowAlert = true;
+				this.confirmClick()
+				// this.isShowAlert = true;
 			},
 		}
 	}
@@ -1103,4 +1121,8 @@
 		box-sizing: border-box;
 		border-radius: 10rpx;
 	}
+	uni-navigator {//条款
+		display: inline-block;
+		color: #2772FB;
+	}
 </style>

+ 69 - 60
pages/release/record.vue

@@ -23,12 +23,14 @@
 			        itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;"
 			    >
 			    </u-tabs> -->
-				<view class='tab-nav'>
-					<view class='tab-item' v-for='item in list1' @click='statuschange(item)' :class='{active:item.status==searchType}'>
-						{{item.name}} {{item.num}}	
-					</view>
+			<view class='tab-nav'>
+				<view class='tab-item' v-for='item in list1' @click='statuschange(item)'
+					:class='{active:item.status==searchType}'>
+					{{item.name}}
+					<!-- {{item.num}} -->
 				</view>
-			
+			</view>
+
 			<!-- <u-tabs  :list="list1" @click="click"></u-tabs> -->
 			<view :id="'good'+good.id" class="good-list" v-for="good in goods" :key="good.id"
 				@click="toDetail(good.id)">
@@ -93,7 +95,8 @@
 						<!-- <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="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>
@@ -107,8 +110,8 @@
 		</mescroll-body>
 
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :confirmText='confirmText'
-			:closeOnClickOverlay='true' :showCancelButton='true' @confirm="$u.throttle(confirmClick, 5000)" @close="cancelClick"
-			@cancel="cancelClick" class="modal">
+			:closeOnClickOverlay='true' :showCancelButton='true' @confirm="$u.throttle(confirmClick, 1000)"
+			@close="cancelClick" @cancel="cancelClick" class="modal">
 		</u-modal>
 
 		<u-toast ref="uToast"></u-toast>
@@ -137,30 +140,34 @@
 				mescroll: null,
 				id: '',
 				confirmText: '确定',
-				searchType:'2',
+				searchType: '',
 				alertTitle: '',
 				alertContent: "",
 				isShowAlert: false,
 				goods: [], // 数据列表
 				delOrShowHidden: '',
 				rowObj: {},
-				 list1: [{
-				    name: '审核中',
-					status:'1',
-					num:0,
-					}, {
-				    name: '已通过',
-					status:'2',
-					num:0,
-				    }, {
-				    name: '未通过',
-					status:'3',
-					num:0,
-				    }, {
-				    name: '已过期',
-					status:'4',
-					num:0,
-				    }],
+				list1: [{
+					name: '全部',
+					status: '',
+					num: 0,
+				}, {
+					name: '审核中',
+					status: '1',
+					num: 0,
+				}, {
+					name: '已通过',
+					status: '3',
+					num: 0,
+				}, {
+					name: '未通过',
+					status: '2',
+					num: 0,
+				}, {
+					name: '已过期',
+					status: '4',
+					num: 0,
+				}],
 				upOption: {
 					page: {
 						size: 10 // 每页数据的数量,默认10
@@ -188,7 +195,7 @@
 			//#endif
 		},
 		onLoad() {
-			
+
 			// let _isHave = this.$utils.getRoles('aaa')
 			// console.log(_isHave)
 
@@ -220,8 +227,8 @@
 
 		// },
 		methods: {
-			statuschange(item){
-				this.searchType=item.status
+			statuschange(item) {
+				this.searchType = item.status
 				this.upCallback({
 					size: 10,
 					num: 1
@@ -322,9 +329,7 @@
 			back() {
 				uni.navigateBack(-1)
 			},
-			mescrollInit(mescroll) {
-				this.mescroll = mescroll;
-			},
+
 			radioChange(n) {
 				console.log('radioChange', n);
 
@@ -392,11 +397,11 @@
 				this.$request.baseRequest('get', '/publishTaskInfo/selectNum', {
 						commonId: this.userInfo.id,
 					}).then(res => {
-						this.list1[0].num=res.data.examieNum
-						this.list1[1].num=res.data.noNum
-						this.list1[2].num=res.data.passNum
-						this.list1[3].num=res.data.overdueNum
-						console.log(res)
+						this.list1[0].num = res.data.allNum
+						this.list1[1].num = res.data.examieNum
+						this.list1[2].num = res.data.passNum
+						this.list1[3].num = res.data.noNum
+						this.list1[4].num = res.data.overdueNum
 					})
 					.catch(res => {
 						uni.$u.toast(res.message);
@@ -691,35 +696,39 @@
 	/deep/.u-modal__content {
 		flex-direction: column;
 	}
-	.tab-nav{
-		width:100%;
+
+	.tab-nav {
+		width: 100%;
 		background: white;
-		display:flex;
+		display: flex;
 	}
-	.tab-item{
-		width:25%;
-		display:block;
-		position:relative;
-		text-align:center;
-		padding:10px 0;
+
+	.tab-item {
+		width: 25%;
+		display: block;
+		position: relative;
+		text-align: center;
+		padding: 10px 0;
 		box-sizing: border-box;
-		color:#7D8087;
-		font-size:14px;
+		color: #7D8087;
+		font-size: 14px;
 	}
-	.tab-item.active{
-		color:#000;
-		font-size:16px;
+
+	.tab-item.active {
+		color: #000;
+		font-size: 16px;
 	}
-	.tab-item.active:after{
-		position:absolute;
-		content:'';
-		display:block;
-		width:50%;
-		left:50%;
+
+	.tab-item.active:after {
+		position: absolute;
+		content: '';
+		display: block;
+		width: 50%;
+		left: 50%;
 		transform: translate(-50%);
-		height:4px;
-		bottom:0;
-		background:#2772FB;
+		height: 4px;
+		bottom: 0;
+		background: #2772FB;
 		border-radius: 2px;
 	}
 </style>

+ 208 - 186
pages/release/release.vue

@@ -21,8 +21,11 @@
 		<view class="content1">
 			<view class="row" @click="selectCargoOwner">
 
-				<view class="left select-sf" :class='dataObj.cargoOwner?"":"select-sf1"'>{{dataObj.cargoOwner?dataObj.cargoOwner:'选择货主身份'}}</view>
-				<view class="right"><image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image></view>
+				<view class="left select-sf" :class='dataObj.cargoOwner?"":"select-sf1"'>
+					{{dataObj.cargoOwner?dataObj.cargoOwner:'选择货主身份'}}</view>
+				<view class="right">
+					<image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image>
+				</view>
 			</view>
 			<!-- 		<view class="row" @click="selectCargoOwner" v-if="dataObj.cargoOwner">
 				<view class="left">{{dataObj.cargoOwner}}</view>
@@ -46,7 +49,10 @@
 				</view>
 				<view class="right" @click="selectAddress(0)" v-if="!dataObj.sendArea">
 					<view v-if='dataObj.sendArea' class="right"></view>
-					<view class="right" v-else><image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image></view>
+					<view class="right" v-else>
+						<image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;">
+						</image>
+					</view>
 				</view>
 			</view>
 			<view class="row2">
@@ -63,7 +69,10 @@
 				</view>
 				<view class="right" @click="selectAddress(1)" v-if="!dataObj.unloadArea">
 					<view v-if='dataObj.unloadArea' class="right">{{(dataObj.unloadCity+dataObj.unloadArea)}}</view>
-					<view class="right" v-else><image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;"></image></view>
+					<view class="right" v-else>
+						<image src="../../static/right.png" style="width: 22rpx;height: 22rpx;margin-top:14rpx;">
+						</image>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -74,6 +83,11 @@
 				{{dataObj.distance }}
 				km
 			</view>
+			<view class="row">
+				<view class="left">业务类型</view>
+				<view class="right" @click="businessChange">{{dataObj.businessType?dataObj.businessType:"请选择业务类型"}}
+				</view>
+			</view>
 			<view class="row">
 				<view class="left">货物类别</view>
 				<view class="right" @click="goodstypeChange">{{dataObj.goodsType?dataObj.goodsType:"请选择货物类别"}}</view>
@@ -104,7 +118,7 @@
 				</view>
 			</view>
 			<view class="row">
-				<view  style='width:120px;' class="left">收货方信用代码(选填)</view>
+				<view style='width:120px;' class="left">收货方信用代码(选填)</view>
 				<view class="right flex">
 					<input maxlength="18" placeholder="统一社会信用代码" class="input" v-model="dataObj.receiverCreditCode" />
 				</view>
@@ -225,23 +239,36 @@
 					{{dataObj.taskValidity?dataObj.taskValidity:'选择任务有效期>'}}
 				</view>
 			</view>
-			<itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022' ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq"></itmister-date-picker>
+			<itmister-date-picker :overdueContent="'任务已过期'" :dateStatus="1" :periodOfValidity="true" :startYear='2022'
+				ref="dateEl" :endDate="array" :futureYear="30" @dateConfirm="confirmValidityPeriodcq">
+			</itmister-date-picker>
+			<!-- <view class="flex row noborder" >
+				<view class="left-text flex">查看 
+					<u--text type="primary" text="《货物运输委托协议》" @click="lookContract"></u--text>
+				</view>
+			</view> -->
 		</view>
-		<view class="submit" @click="submit">立即发布</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> -->
-		<itmister-date-picker :dateStatus="2" :startYear='2022' ref="datezc" :futureYear="30" @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
+		<itmister-date-picker :dateStatus="2" :startYear='2022' ref="datezc" :futureYear="30"
+			@dateConfirm="confirmValidityPeriod"></itmister-date-picker>
 		<!-- //货物类别 -->
 		<u-picker :show="isGoodsType" ref="uPicker" :columns="goodsList" keyName="constValue" @confirm="goodsSubmit"
 			:closeOnClickOverlay='true' @close='isGoodsType=false' @cancel='isGoodsType=false'>
 		</u-picker>
+		<!-- 业务类型 -->
+		<u-picker :show="isBusinessType" ref="uPicker" :columns="businessList" keyName="constValue"
+			@confirm="businessSubmit" :closeOnClickOverlay='true' @close='isBusinessType=false'
+			@cancel='isBusinessType=false'>
+		</u-picker>
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='false'
-			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick"
-			@cancel="cancelClick"></u-modal>
+			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick(), 1000)"
+			@close="cancelClick" @cancel="cancelClick"></u-modal>
 		<u-modal :show="isShowAlert1" :title="alertTitle" :confirmText='confirmText' :content='alertContent'
 			:closeOnClickOverlay='false' :showCancelButton='showCancelButton' confirmColor='#2772FB'
-			@confirm="$u.throttle(confirmClick(), 5000)" @close="cancelClick" @cancel="cancelClick"></u-modal>
+			@confirm="$u.throttle(confirmClick(), 1000)" @close="cancelClick" @cancel="cancelClick"></u-modal>
 		<u-toast ref="uToast"></u-toast>
 
 	</view>
@@ -267,7 +294,7 @@
 				columns: [
 					[]
 				],
-				array:{},
+				array: {},
 				freightAdvance: false,
 				dataObj: {
 					commonId: '',
@@ -303,6 +330,8 @@
 					sendLatitude: '',
 					unsendLongitude: '',
 					unsendLatitude: '',
+					sendAdCode: '',
+					unsendAdCode: ''
 				},
 				confirmText: '',
 				isShowAlert1: false,
@@ -340,8 +369,11 @@
 
 				],
 				// 货物类别
-				isGoodsType:false,
-				goodsList:[]
+				isGoodsType: false,
+				goodsList: [],
+				//业务类型
+				isBusinessType: false,
+				businessList: []
 			}
 		},
 		onNavigationBarButtonTap(e) {
@@ -351,8 +383,12 @@
 		onShow() {
 			var datetime = new Date().getTime()
 			var datetime1 = datetime + (24 * 60 * 60 * 1000 * 30 * 6)
-			var date=new Date(datetime1)
-			this.array={year:date.getFullYear(),month:date.getMonth() + 1,day:date.getDate()}
+			var date = new Date(datetime1)
+			this.array = {
+				year: date.getFullYear(),
+				month: date.getMonth() + 1,
+				day: date.getDate()
+			}
 			_this = this
 			// #ifdef APP-PLUS
 			// let _status = this.$request.baseRequest('get', '/cargoOwnerInfo/firstAuthentication', {
@@ -406,14 +442,15 @@
 			if (_faddress) {
 				this.dataObj.sendCity = _faddress.city
 				this.dataObj.sendArea = _faddress.area
+				this.dataObj.sendAdCode = _faddress.adCode
 				this.dataObj.sendPrivate = _faddress.province
 				this.dataObj.sendDetailedAddress = _faddress.detailedAddress
 				this.dataObj.sendLongitude = _faddress.longitude
 				this.dataObj.sendLatitude = _faddress.latitude
-				if(_faddress.contactPhone){
+				if (_faddress.contactPhone) {
 					this.dataObj.senderPhone = _faddress.contactPhone
 				}
-				if(_faddress.contacts){
+				if (_faddress.contacts) {
 					this.dataObj.sender = _faddress.contacts
 				}
 			} else {
@@ -423,13 +460,14 @@
 				this.dataObj.unloadDetailedAddress = _saddress.detailedAddress
 				this.dataObj.unloadCity = _saddress.city
 				this.dataObj.unloadArea = _saddress.area
+				this.dataObj.unsendAdCode = _faddress.adCode
 				this.dataObj.unloadPrivate = _saddress.province
 				this.dataObj.unsendLongitude = _saddress.longitude
 				this.dataObj.unsendLatitude = _saddress.latitude
-				if(_saddress.contacts){
+				if (_saddress.contacts) {
 					this.dataObj.receiver = _saddress.contacts
 				}
-				if(_saddress.contactPhone){
+				if (_saddress.contactPhone) {
 					this.dataObj.receiverPhone = _saddress.contactPhone
 				}
 			} else {
@@ -445,17 +483,18 @@
 			this.dataObj.loadingDateEnd = '随时'
 			this.dataObj.taskValidity = '长期'
 			this.getSFList()
-			
+
 		},
 		async onLoad() {
 			//货物类别(默认上一次)
 			this.queryGoodsList() // 查询货物类别
 			let goods = uni.getStorageSync("goodsType")
-			if(goods){
+			if (goods) {
 				this.dataObj.goodsType = goods.name
 				this.dataObj.goodsTypeKey = goods.key
 			}
-			
+			this.queryBusinessTypeList() //查询业务类型
+
 
 			// _this = this
 			// // #ifdef APP-PLUS
@@ -481,27 +520,58 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
-			queryGoodsList(){
+			lookContract(){
+				uni.downloadFile({
+					url: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/hzContract.pdf",
+					success: function(res) {
+						var filePath = res.tempFilePath;
+						uni.openDocument({
+							filePath: filePath,
+							showMenu: true,
+							success: function(res) {
+								console.log('打开文档成功');
+							}
+						});
+					}
+				});
+			},
+			queryGoodsList() {
 				this.$request.baseRequest('get', '/commonSysParameter/getInfo', {
-						constId: "CON1"
-					}).then(res => {
-						this.goodsList.push(res.data)
-						console.log(this.goodsList)
-					})
+					constId: "CON1"
+				}).then(res => {
+					this.dataObj.goodsType = res.data[0].constValue
+					this.goodsList.push(res.data)
+				})
 			},
-			goodstypeChange(){
+			queryBusinessTypeList() {
+				this.$request.baseRequest('get', '/commonSysParameter/getInfo', {
+					constId: "BUS1"
+				}).then(res => {
+					this.dataObj.businessType = res.data[0].constValue
+					this.businessList.push(res.data)
+				})
+			},
+			goodstypeChange() {
 				this.isGoodsType = true
 			},
-			goodsSubmit(e){
+			businessChange() {
+				this.isBusinessType = true
+			},
+			goodsSubmit(e) {
 				this.dataObj.goodsType = e.value[0].constValue
 				this.dataObj.goodsTypeKey = e.value[0].constKey
-				let _obj={
-					name:e.value[0].constValue,
-					key:e.value[0].constKey
+				let _obj = {
+					name: e.value[0].constValue,
+					key: e.value[0].constKey
 				}
-				uni.setStorageSync("goodsType",_obj)
+				uni.setStorageSync("goodsType", _obj)
 				this.isGoodsType = false
 			},
+			businessSubmit(e) {
+				this.dataObj.businessType = e.value[0].constValue
+				this.dataObj.businessTypeKey = e.value[0].constKey
+				this.isBusinessType = false
+			},
 			getSFList() {
 				this.dataObj.commonId = this.userInfo.id
 				this.$request.baseRequest('get', '/cargoOwnerCompInfo/cargoOwnerList', {
@@ -509,8 +579,8 @@
 					}).then(res => {
 						if (uni.getStorageSync('releaseCargoOwner')) {
 							this.dataObj.cargoOwner = uni.getStorageSync('releaseCargoOwner')
-							this.dataObj.compId =uni.getStorageSync('releasecompId')
-							
+							this.dataObj.compId = uni.getStorageSync('releasecompId')
+
 						}
 						// 可用企业货主
 						this.qyList = []
@@ -524,7 +594,7 @@
 						if (!_self) _self = []
 						if (_self.length > 0) {
 							for (let i = 0; i < _self.length; i++) {
-								_self[i].compStatus='wd'
+								_self[i].compStatus = 'wd'
 								if (_self[i].status == '已认证') {
 									this.qyList.push(_self[i])
 								}
@@ -532,7 +602,7 @@
 						}
 						if (_dlhz.length > 0) {
 							for (let i = 0; i < _dlhz.length; i++) {
-								_dlhz[i].compStatus='ss'
+								_dlhz[i].compStatus = 'ss'
 								if (_dlhz[i].status == '已认证') {
 									this.qyList.push(_dlhz[i])
 								}
@@ -591,6 +661,13 @@
 					})
 					return true
 				}
+				if (uni.$u.test.isEmpty(this.dataObj.businessType)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "业务类型不能为空!",
+					})
+					return true
+				}
 				if (uni.$u.test.isEmpty(this.dataObj.goodsType)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -612,8 +689,6 @@
 					})
 					return true
 				}
-				console.log(this.dataObj.receiver,"收货方")
-				console.log(this.dataObj.receiverPhone,"收货方手机号")
 				if (uni.$u.test.isEmpty(this.dataObj.receiver)) {
 					this.$refs.uToast.show({
 						type: 'error',
@@ -640,7 +715,7 @@
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "信用代码和身份证号码至少填写一个!",
-						duration:2000
+						duration: 4000
 					})
 					return true
 				}
@@ -651,14 +726,14 @@
 				// 	})
 				// 	return true
 				// }
-				if(this.dataObj.receiverIdcard&&this.dataObj.receiverIdcard.length!=18){
+				if (this.dataObj.receiverIdcard && this.dataObj.receiverIdcard.length != 18) {
 					this.$refs.uToast.show({
-							type: 'error',
-							message: "身份证号输入错误!",
-						})
-						return true
+						type: 'error',
+						message: "身份证号输入错误!",
+					})
+					return true
 				}
-				if(this.dataObj.receiverCreditCode&&this.dataObj.receiverCreditCode.length!=18){
+				if (this.dataObj.receiverCreditCode && this.dataObj.receiverCreditCode.length != 18) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "信用代码输入错误!",
@@ -688,7 +763,7 @@
 				if (this.dataObj.weight) {
 					if (
 						this.dataObj.weight < 0.1 || this.dataObj.weight > 10000000 || (
-							String(this.dataObj.weight).indexOf('.') != -1 && String(tthis.dataObj.weight).length -
+							String(this.dataObj.weight).indexOf('.') != -1 && String(this.dataObj.weight).length -
 							(String(this.dataObj.weight).indexOf(
 								'.') + 1) > 2)
 					) {
@@ -734,7 +809,7 @@
 				if (this.dataObj.loadWeightSmall) {
 					if (
 						this.dataObj.loadWeightSmall < 0.1 || this.dataObj.loadWeightSmall > 100 || (
-							String(this.dataObj.loadWeightSmall).indexOf('.') != -1 && String(tthis.dataObj
+							String(this.dataObj.loadWeightSmall).indexOf('.') != -1 && String(this.dataObj
 								.loadWeightSmall).length -
 							(String(this.dataObj.loadWeightSmall).indexOf(
 								'.') + 1) > 3)
@@ -750,7 +825,7 @@
 				if (this.dataObj.loadWeight) {
 					if (
 						this.dataObj.loadWeight < 0.1 || this.dataObj.loadWeight > 100 || (
-							String(this.dataObj.loadWeight).indexOf('.') != -1 && String(tthis.dataObj.loadWeight).length -
+							String(this.dataObj.loadWeight).indexOf('.') != -1 && String(this.dataObj.loadWeight).length -
 							(String(this.dataObj.loadWeight).indexOf(
 								'.') + 1) > 3)
 					) {
@@ -776,7 +851,7 @@
 			confirmClick() {
 				uni.$u.throttle(this.requestdata, 500)
 			},
-			requestdata(){
+			requestdata() {
 				console.log(this.dataObj)
 				// // #ifdef APP-PLUS
 				// if (this.alertTitle == '账号审核中') {
@@ -788,7 +863,7 @@
 				// 	return
 				// }
 				// // #endif
-				
+
 				// if (this.alertTitle == '身份信息未认证,去认证?') {
 				// 	uni.switchTab({
 				// 		url: '/pages/mine/index'
@@ -796,7 +871,7 @@
 				// 	return
 				// }
 				// this.isShowAlert = false
-				
+
 				if (this.dataDetails.type == '元/吨') {
 					this.dataObj.billingMethod = 0
 				} else {
@@ -807,11 +882,11 @@
 				} else {
 					this.dataObj.freightAdvance = 0
 				}
-				if(!this.dataObj.receiverIdcard){
-					this.dataObj.receiverIdcard=''
+				if (!this.dataObj.receiverIdcard) {
+					this.dataObj.receiverIdcard = ''
 				}
-				if(!this.dataObj.receiverCreditCode){
-					this.dataObj.receiverCreditCode=''
+				if (!this.dataObj.receiverCreditCode) {
+					this.dataObj.receiverCreditCode = ''
 				}
 				let _list = []
 				for (let i = 0; i < this.checkboxValue1.length; i++) {
@@ -827,98 +902,39 @@
 				}
 				this.dataObj.carModel = _list.toString()
 				this.dataObj.commonId = this.userInfo.id
-				this.$request.baseRequest('post', '/publishTaskInfo/api/addTask', this.dataObj).then(res => {
-						uni.removeStorage({
-							key: 'storage_saddress'
-						});
-						uni.removeStorage({
-							key: 'storage_faddress'
-						});
-						uni.removeStorage({
-							key: 'releaseCargoOwner'
-						});
-						uni.removeStorage({
-							key: 'releasecompId'
-						});
-						this.$refs.uToast.show({
-							type: 'success',
-							message: "发布成功",
-							complete() {
-								// _this.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: '',
-								// 	receiverIdcard:'',
-								// 	sendLatitude: '',
-								// 	receiverCreditCode:'',
-								// 	unsendLongitude: '',
-								// 	unsendLatitude: '',
-								// }
-								// _this.checkboxValue1 = ['不限']
-								 // _this.queryGoodsList() // 查询货物类别
-								 // let goods = uni.getStorageSync("goodsType")
-								 // if(goods){
-								 // 	_this.dataObj.goodsType = goods.name
-								 // 	_this.dataObj.goodsTypeKey = goods.key
-								 // }
-								  // const pages = getCurrentPages()
-								  // console.log(pages)
-								         // 声明一个pages使用getCurrentPages方法
-								         // const curPage = pages[pages.length - 1]
-								         // 声明一个当前页面
-								        // curPage.$vm.$options.onLoad[1].bind(curPage.$vm); // 传入参数
-										// curPage.$vm.$options.onShow[1].bind(curPage.$vm); // curPage.onShow()
-								  //       curPage.$vm.$options.onReady[1].bind(curPage.$vm);
-										 // curPage.onReady()
-										 // uni.switchTab({
-										 // 	url: '/pages/mine/index'
-										 // })
-										 // uni.switchTab({
-										 // 	url: '/pages/mine/index'
-										 // })
-								 uni.redirectTo({url:"/pages/release/release"})
-								 // uni.reLaunch({url:"/pages/release/release"})
-								 // uni.redirectTo("/pages/release/record")
-								// uni.$u.route("/pages/release/record")
-							}
-						})
-						this.isShowAlert = false
-				
-					})
-					.catch(res => {
-						uni.showToast({
-							title: res.message,
-							icon: 'none',
-							duration: 2000
-						})
-					});
+				uni.$u.route('/pages/order/signContract', {
+					obj: JSON.stringify(this.dataObj),
+					type:1
+				});
+				// this.$request.baseRequest('post', '/publishTaskInfo/api/addTask', this.dataObj).then(res => {
+					
+				// 	if(res.code == 200){
+				// 		uni.removeStorage({
+				// 			key: 'storage_saddress'
+				// 		});
+				// 		uni.removeStorage({
+				// 			key: 'storage_faddress'
+				// 		});
+				// 		uni.removeStorage({
+				// 			key: 'releaseCargoOwner'
+				// 		});
+				// 		uni.removeStorage({
+				// 			key: 'releasecompId'
+				// 		});
+				// 		// uni.redirectTo({
+				// 		// 		url: "/pages/release/release"
+				// 		// })
+				// 		this.dataObj.id = res.data 
+						
+				// 	}
+				// 	})
+				// 	.catch(res => {
+				// 		uni.showToast({
+				// 			title: res.message,
+				// 			icon: 'none',
+				// 			duration: 2000
+				// 		})
+				// 	});
 			},
 			cancelClick() {
 				this.isShowAlert = false
@@ -961,7 +977,7 @@
 							this.dataObj.distance = this.$helper.getDistance(this.dataObj.unsendLatitude, this.dataObj
 								.unsendLongitude, this.dataObj.sendLatitude, this.dataObj.sendLongitude)
 						}
-						
+
 					})
 					.catch(res => {
 						uni.hideLoading()
@@ -1001,38 +1017,39 @@
 				for (let i = 0; i < this.qyList.length; i++) {
 					let _name = this.qyList[i].company ? this.qyList[i].company : this.qyList[i].companyName
 					if (_name == e.value[0]) {
-						if(e.value[0]!='个人货主'){
-							this.freightAdvance=true
-							if(this.qyList[i].compStatus=='ss'){
-								this.dataObj.compId=this.qyList[i].compId
-							}else{
-								this.dataObj.compId=this.qyList[i].id
+						if (e.value[0] != '个人货主') {
+							this.freightAdvance = true
+							if (this.qyList[i].compStatus == 'ss') {
+								this.dataObj.compId = this.qyList[i].compId
+							} else {
+								this.dataObj.compId = this.qyList[i].id
 							}
 							// console.log(this.qyList[i].compStatus,this.dataObj.compId)
 							uni.setStorageSync('releasecompId', this.dataObj.compId)
-						}else{
+						} else {
 							this.$request.baseRequest('get', '/hyCargoOwnerPayeeInfo/selectPayee', {
-									commonId: this.userInfo.id,
-									pageSize: 10,
-									currentPage: 1,
-								}).then(res => {
-									if (res.code == '200') {
-										if(res.data.records.length==0){
-											this.$refs.uToast.show({
-												type: 'error',
-												message: "未绑定银行卡"})
-											this.dataObj.cargoOwner=''
-												return
-										}
-										this.freightAdvance=false
+								commonId: this.userInfo.id,
+								pageSize: 10,
+								currentPage: 1,
+							}).then(res => {
+								if (res.code == '200') {
+									if (res.data.records.length == 0) {
+										this.$refs.uToast.show({
+											type: 'error',
+											message: "未绑定银行卡"
+										})
+										this.dataObj.cargoOwner = ''
+										return
 									}
-								})
+									this.freightAdvance = false
+								}
+							})
 						}
-						this.freightAdvance= this.qyList[i].advanceFreightService == 1 ? true : false
+						this.freightAdvance = this.qyList[i].advanceFreightService == 1 ? true : false
 						this.dataObj.freightAdvance = this.qyList[i].advanceFreightService == 1 ? true : false
 					}
 				}
-				
+
 				uni.setStorageSync('releaseCargoOwner', this.dataObj.cargoOwner)
 				this.show = false
 			},
@@ -1061,15 +1078,15 @@
 				this.$refs.dateEl.show();
 			},
 			confirmValidityPeriod(date) {
-			
-			switch (this.ValidityPeriodType) {
-				case 0:
-					this.dataObj.loadingDateStart = date.date
-					break
-				case 1:
-					this.dataObj.loadingDateEnd =date.date
-					break
-			}
+
+				switch (this.ValidityPeriodType) {
+					case 0:
+						this.dataObj.loadingDateStart = date.date
+						break
+					case 1:
+						this.dataObj.loadingDateEnd = date.date
+						break
+				}
 			},
 			getTime: function() {
 
@@ -1084,7 +1101,7 @@
 				return timer;
 			},
 			confirmValidityPeriodcq(date) {
-				this.dataObj.taskValidity=date.date
+				this.dataObj.taskValidity = date.date
 			},
 			selectValidityPeriod(type) {
 				this.ValidityPeriodType = type
@@ -1119,7 +1136,8 @@
 						}
 					}
 				}
-				this.isShowAlert = true;
+				uni.$u.throttle(this.requestdata, 500)
+				// this.isShowAlert = true;
 			},
 		}
 	}
@@ -1262,7 +1280,7 @@
 			font-size: 36rpx;
 			font-weight: 700;
 			color: #171717;
-			width:90%;
+			width: 90%;
 			justify-content: flex-start;
 			// text-align:left;
 		}
@@ -1352,4 +1370,8 @@
 		box-sizing: border-box;
 		border-radius: 10rpx;
 	}
+	uni-navigator {
+		display: inline-block;
+		color: #2772FB;
+	}
 </style>

+ 3 - 2
pages/release/selectAddress.vue

@@ -50,10 +50,10 @@
 
 		<view class="bottom-btn">
 			<view class="btn-left" @click="selectAddress(0)">选择临时地址</view>
-			<view class="btn-right" @click="selectAddress(1)">新增地址</view>
+			<view class="btn-right" @click="selectAddress(1)">新增常用地址</view>
 		</view>
 		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
-			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick, 5000)" @close="cancelClick"
+			:showCancelButton='showCancelButton' confirmColor='#2772FB' @confirm="$u.throttle(confirmClick, 1000)" @close="cancelClick"
 			@cancel="cancelClick"></u-modal>
 		<u-toast ref="uToast"></u-toast>
 	</view>
@@ -99,6 +99,7 @@
 				isShowAlert: false,
 				alertTitle: "",
 				alertContent: "",
+				showCancelButton:false
 			}
 		},
 		computed: {

BIN
static/images/help/zy.png


BIN
static/images/mine/appUpdate.png


+ 5 - 0
uni_modules/zhouWei-APPUpdate/changelog.md

@@ -0,0 +1,5 @@
+## 3.0.1(2021-05-13)
+1. 跳转颜色和图标配置
+2. 新增静默更新
+## 3.0.0(2021-05-12)
+1. 支持uni_modules

+ 830 - 0
uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate.js

@@ -0,0 +1,830 @@
+// #ifdef APP-PLUS 
+import componentConfig from "@/config/componentConfig"
+const platform = uni.getSystemInfoSync().platform;
+// 主颜色
+const $mainColor = componentConfig.appUpdateColor ? componentConfig.appUpdateColor : "FF5B78";
+// 弹窗图标url
+const $iconUrl = componentConfig.appUpdateIcon ? componentConfig.appUpdateIcon : "/uni_modules/zhouWei-APPUpdate/static/ic_ar.png";
+
+// 获取当前应用的版本号
+export const getCurrentNo = function(callback) {
+	// 获取本地应用资源版本号
+	plus.runtime.getProperty(plus.runtime.appid, function(inf) {
+		callback && callback({
+			versionCode: inf.versionCode,
+			versionName: inf.version
+		});
+	});
+}
+// 从服务器下载应用资源包(wgt文件)
+const getDownload = function(data) {
+	let dtask;
+	if(data.updateType == 'forcibly' || data.updateType == 'solicit'){
+		let popupData = {
+			progress: true,
+			buttonNum: 2
+		};
+		if(data.updateType == 'forcibly'){
+			popupData.buttonNum = 0;
+		}
+		let lastProgressValue = 0;
+		let popupObj = downloadPopup(popupData);
+		dtask = plus.downloader.createDownload(data.downloadUrl, {
+			filename: "_doc/update/"
+		}, function(download, status) {
+			if (status == 200) {
+				popupObj.change({
+					progressValue: 100,
+					progressTip:"正在安装文件...",
+					progress: true,
+					buttonNum: 0
+				});
+				plus.runtime.install(download.filename, {}, function() {
+					popupObj.change({
+						contentText: "应用资源更新完成!",
+						buttonNum: 1,
+						progress: false
+					});
+				}, function(e) {
+					popupObj.cancel();
+					plus.nativeUI.alert("安装文件失败[" + e.code + "]:" + e.message);
+				});
+			} else {
+				popupObj.change({
+					contentText: "文件下载失败...",
+					buttonNum: 1,
+					progress: false
+				});
+			}
+		});
+		dtask.start();
+		dtask.addEventListener("statechanged", function(task, status) {
+			switch (task.state) {
+				case 1: // 开始
+					popupObj.change({
+						progressValue:0,
+						progressTip:"准备下载...",
+						progress: true
+					});
+					break;
+				case 2: // 已连接到服务器  
+					popupObj.change({
+						progressValue:0,
+						progressTip:"开始下载...",
+						progress: true
+					});
+					break;
+				case 3:
+					const progress = parseInt(task.downloadedSize / task.totalSize * 100);
+					if(progress - lastProgressValue >= 2){
+						lastProgressValue = progress;
+						popupObj.change({
+							progressValue:progress,
+							progressTip: "已下载" + progress + "%",
+							progress: true
+						});
+					}
+					break;
+			}
+		});
+		// 取消下载
+		popupObj.cancelDownload = function(){
+			dtask && dtask.abort();
+			uni.showToast({
+				title: "已取消下载",
+				icon:"none"
+			});
+		}
+		// 重启APP
+		popupObj.reboot = function(){
+			plus.runtime.restart();
+		}
+	} else if(data.updateType == "silent"){
+		dtask = plus.downloader.createDownload(data.downloadUrl, {
+			filename: "_doc/update/"
+		}, function(download, status) {
+			if (status == 200) {
+				plus.runtime.install(download.filename, {}, function() {
+					console.log("应用资源更新完成");
+				}, function(e) {
+					plus.nativeUI.alert("安装文件失败[" + e.code + "]:" + e.message);
+				});
+			} else {
+				plus.nativeUI.alert("文件下载失败...");
+			}
+		});
+		dtask.start();
+	}
+}
+// 文字换行
+function drawtext(text, maxWidth) {
+	let textArr = text.split("");
+	let len = textArr.length;
+	// 上个节点
+	let previousNode = 0;
+	// 记录节点宽度
+	let nodeWidth = 0;
+	// 文本换行数组
+	let rowText = [];
+	// 如果是字母,侧保存长度
+	let letterWidth = 0;
+	// 汉字宽度
+	let chineseWidth = 14;
+	// otherFont宽度
+	let otherWidth = 7;
+	for (let i = 0; i < len; i++) {
+		if (/[\u4e00-\u9fa5]|[\uFE30-\uFFA0]/g.test(textArr[i])) {
+			if(letterWidth > 0){
+				if(nodeWidth + chineseWidth + letterWidth * otherWidth > maxWidth){
+					rowText.push({
+						type: "text",
+						content: text.substring(previousNode, i)
+					});
+					previousNode = i;
+					nodeWidth = chineseWidth;
+					letterWidth = 0;
+				} else {
+					nodeWidth += chineseWidth + letterWidth * otherWidth;
+					letterWidth = 0;
+				}
+			} else {
+				if(nodeWidth + chineseWidth > maxWidth){
+					rowText.push({
+						type: "text",
+						content: text.substring(previousNode, i)
+					});
+					previousNode = i;
+					nodeWidth = chineseWidth;
+				}else{
+					nodeWidth += chineseWidth;
+				}
+			}
+		} else {
+			if(/\n/g.test(textArr[i])){
+				rowText.push({
+					type: "break",
+					content: text.substring(previousNode, i)
+				});
+				previousNode = i + 1;
+				nodeWidth = 0;
+				letterWidth = 0;
+			}else if(textArr[i] == "\\" && textArr[i + 1] == "n"){
+				rowText.push({
+					type: "break",
+					content: text.substring(previousNode, i)
+				});
+				previousNode = i + 2;
+				nodeWidth = 0;
+				letterWidth = 0;
+			}else if(/[a-zA-Z0-9]/g.test(textArr[i])){
+				letterWidth += 1;
+				if(nodeWidth + letterWidth * otherWidth > maxWidth){
+					rowText.push({
+						type: "text",
+						content: text.substring(previousNode, i + 1 - letterWidth)
+					});
+					previousNode = i + 1 - letterWidth;
+					nodeWidth = letterWidth * otherWidth;
+					letterWidth = 0;
+				}
+			} else{
+				if(nodeWidth + otherWidth > maxWidth){
+					rowText.push({
+						type: "text",
+						content: text.substring(previousNode, i)
+					});
+					previousNode = i;
+					nodeWidth = otherWidth;
+				}else{
+					nodeWidth += otherWidth;
+				}
+			}
+		}
+	}
+	if (previousNode < len) {
+		rowText.push({
+			type: "text",
+			content: text.substring(previousNode, len)
+		});
+	}
+	return rowText;
+}
+// 是否更新弹窗
+function updatePopup(data, callback) {
+	// 弹窗遮罩层
+	let maskLayer = new plus.nativeObj.View("maskLayer", { //先创建遮罩层
+		top: '0px',
+		left: '0px',
+		height: '100%',
+		width: '100%',
+		backgroundColor: 'rgba(0,0,0,0.5)'
+	});
+
+	// 以下为计算菜单的nview绘制布局,为固定算法,使用者无关关心
+	const screenWidth = plus.screen.resolutionWidth;
+	const screenHeight = plus.screen.resolutionHeight;
+	//弹窗容器宽度
+	const popupViewWidth = screenWidth * 0.7;
+	// 弹窗容器的Padding
+	const viewContentPadding = 20;
+	// 弹窗容器的宽度
+	const viewContentWidth = parseInt(popupViewWidth - (viewContentPadding * 2));
+	// 描述的列表
+	const descriptionList = drawtext(data.versionInfo, viewContentWidth);
+	// 弹窗容器高度
+	let popupViewHeight = 80 + 20 + 20 + 90 + 10;
+	
+	let popupViewContentList = [{
+			src: $iconUrl,
+			id: "logo", 
+			tag: "img",
+			position: {
+				top: "0px",
+				left: (popupViewWidth - 124) / 2 + "px",
+				width: "124px",
+				height: "80px",
+			}
+		},
+		{
+			tag: 'font',
+			id: 'title',
+			text: "发现新版本" + data.versionName,
+			textStyles: {
+				size: '18px',
+				color: "#333",
+				weight: "bold",
+				whiteSpace: "normal"
+			},
+			position: {
+				top: '90px',
+				left: viewContentPadding + "px",
+				width: viewContentWidth + "px",
+				height: "30px",
+			}
+		}];
+	const textHeight = 18;
+	let contentTop = 130;
+	descriptionList.forEach((item,index) => {
+		if(index > 0){
+			popupViewHeight += textHeight;
+			contentTop += textHeight;
+		}
+		popupViewContentList.push({
+			tag: 'font',
+			id: 'content' + index + 1,
+			text: item.content,
+			textStyles: {
+				size: '14px',
+				color: "#666",
+				lineSpacing: "50%",
+				align: "left"
+			},
+			position: {
+				top: contentTop + "px",
+				left: viewContentPadding + "px",
+				width: viewContentWidth + "px",
+				height: textHeight + "px",
+			}
+		});
+		if(item.type == "break"){
+			contentTop += 10;
+			popupViewHeight += 10;
+		}
+	});
+	
+	if(data.updateType == "forcibly"){
+		popupViewContentList.push({
+			tag: 'rect', //绘制底边按钮
+			rectStyles:{
+				radius: "6px",
+				color: $mainColor
+			},
+			position:{
+				bottom: viewContentPadding + 'px',
+				left: viewContentPadding + "px",
+				width: viewContentWidth + "px",
+				height: "30px"
+			}
+		});
+		popupViewContentList.push({
+			tag: 'font',
+			id: 'confirmText',
+			text: "立即升级",
+			textStyles: {
+				size: '14px',
+				color: "#FFF",
+				lineSpacing: "0%",
+			},
+			position: {
+				bottom: viewContentPadding + 'px',
+				left: viewContentPadding + "px",
+				width: viewContentWidth + "px",
+				height: "30px"
+			}
+		});
+	} else {
+		// 绘制底边按钮
+		popupViewContentList.push({
+			tag: 'rect',
+			id: 'cancelBox',
+			rectStyles: {
+				radius: "3px",
+				borderColor: "#f1f1f1",
+				borderWidth: "1px",
+			},
+			position: {
+				bottom: viewContentPadding + 'px',
+				left: viewContentPadding + "px",
+				width: (viewContentWidth - viewContentPadding) / 2 + "px",
+				height: "30px",
+			}
+		});
+		popupViewContentList.push({
+			tag: 'rect',
+			id: 'confirmBox',
+			rectStyles: {
+				radius: "3px",
+				color: $mainColor,
+			},
+			position: {
+				bottom: viewContentPadding + 'px',
+				left: ((viewContentWidth - viewContentPadding) / 2 + viewContentPadding * 2) + "px",
+				width: (viewContentWidth - viewContentPadding) / 2 + "px",
+				height: "30px",
+			}
+		});
+		popupViewContentList.push({
+			tag: 'font',
+			id: 'cancelText',
+			text: "暂不升级",
+			textStyles: {
+				size: '14px',
+				color: "#666",
+				lineSpacing: "0%",
+				whiteSpace: "normal"
+			},
+			position: {
+				bottom: viewContentPadding + 'px',
+				left: viewContentPadding + "px",
+				width: (viewContentWidth - viewContentPadding) / 2 + "px",
+				height: "30px",
+			}
+		});
+		popupViewContentList.push({
+			tag: 'font',
+			id: 'confirmText',
+			text: "立即升级",
+			textStyles: {
+				size: '14px',
+				color: "#FFF",
+				lineSpacing: "0%",
+				whiteSpace: "normal"
+			},
+			position: {
+				bottom: viewContentPadding + 'px',
+				left: ((viewContentWidth - viewContentPadding) / 2 + viewContentPadding * 2) + "px",
+				width: (viewContentWidth - viewContentPadding) / 2 + "px",
+				height: "30px",
+			}
+		});
+	}
+	// 弹窗内容
+	let popupView = new plus.nativeObj.View("popupView", { //创建底部图标菜单
+		tag: "rect",
+		top: (screenHeight - popupViewHeight) / 2 + "px",
+		left: '15%',
+		height: popupViewHeight + "px",
+		width: "70%"
+	});
+	// 绘制白色背景
+	popupView.drawRect({
+		color: "#FFFFFF",
+		radius: "8px"
+	}, {
+		top: "40px",
+		height: popupViewHeight - 40 + "px",
+	});
+	
+	popupView.draw(popupViewContentList);
+	popupView.addEventListener("click", function(e) {
+		let maxTop = popupViewHeight - viewContentPadding;
+		let maxLeft = popupViewWidth - viewContentPadding;
+		let buttonWidth = (viewContentWidth - viewContentPadding) / 2;
+		if (e.clientY > maxTop - 30 && e.clientY < maxTop) {
+			if(data.updateType == "forcibly"){
+				if(e.clientX > viewContentPadding && e.clientX < maxLeft){
+					// 立即升级
+					maskLayer.hide();
+					popupView.hide();
+					callback && callback();
+				}
+			} else {
+				// 暂不升级
+				if (e.clientX > viewContentPadding && e.clientX < maxLeft - buttonWidth - viewContentPadding) {
+					maskLayer.hide();
+					popupView.hide();
+				} else if (e.clientX > maxLeft - buttonWidth && e.clientX < maxLeft) {
+					// 立即升级
+					maskLayer.hide();
+					popupView.hide();
+					callback && callback();
+				}
+			}
+			
+		}
+	});
+	if(data.updateType == "solicit"){
+		// 点击遮罩层
+		maskLayer.addEventListener("click", function() { //处理遮罩层点击
+			maskLayer.hide();
+			popupView.hide();
+		});
+	}
+	// 显示弹窗
+	maskLayer.show();
+	popupView.show();
+}
+// 文件下载的弹窗绘图
+function downloadPopupDrawing(data){
+	// 以下为计算菜单的nview绘制布局,为固定算法,使用者无关关心
+	const screenWidth = plus.screen.resolutionWidth;
+	const screenHeight = plus.screen.resolutionHeight;
+	//弹窗容器宽度
+	const popupViewWidth = screenWidth * 0.7;
+	// 弹窗容器的Padding
+	const viewContentPadding = 20;
+	// 弹窗容器的宽度
+	const viewContentWidth = popupViewWidth - (viewContentPadding * 2);
+	// 弹窗容器高度
+	let popupViewHeight = viewContentPadding * 3 + 60;
+	let progressTip = data.progressTip || "准备下载...";
+	let contentText = data.contentText || "正在为您更新,请耐心等待";
+	let elementList = [
+		{
+			tag: 'rect', //背景色
+			color: '#FFFFFF',
+			rectStyles:{
+				radius: "8px"
+			}
+		},
+		{
+			tag: 'font',
+			id: 'title',
+			text: "升级APP",
+			textStyles: {
+				size: '16px',
+				color: "#333",
+				weight: "bold",
+				verticalAlign: "middle",
+				whiteSpace: "normal"
+			},
+			position: {
+				top: viewContentPadding + 'px',
+				height: "30px",
+			}
+		},
+		{
+			tag: 'font',
+			id: 'content',
+			text: contentText,
+			textStyles: {
+				size: '14px',
+				color: "#333",
+				verticalAlign: "middle",
+				whiteSpace: "normal"
+			},
+			position: {
+				top: viewContentPadding * 2 + 30 + 'px',
+				height: "20px",
+			}
+		}
+	];
+	// 是否有进度条
+	if(data.progress){
+		popupViewHeight += viewContentPadding + 40;
+		elementList = elementList.concat([
+			{
+				tag: 'font',
+				id: 'progressValue',
+				text: progressTip,
+				textStyles: {
+					size: '14px',
+					color: $mainColor,
+					whiteSpace: "normal"
+				},
+				position: {
+					top: viewContentPadding * 4 + 20 + 'px',
+					height: "30px"
+				}
+			},
+			{
+				tag: 'rect', //绘制进度条背景
+				id: 'progressBg',
+				rectStyles:{
+					radius: "4px",
+					borderColor: "#f1f1f1",
+					borderWidth: "1px",
+				},
+				position:{
+					top: viewContentPadding * 4 + 60 + 'px',
+					left: viewContentPadding + "px",
+					width: viewContentWidth + "px",
+					height: "8px"
+				}
+			},
+		]);
+	}
+	if (data.buttonNum == 2) {
+		popupViewHeight += viewContentPadding + 30;
+		elementList = elementList.concat([
+			{
+				tag: 'rect', //绘制底边按钮
+				rectStyles:{
+					radius: "3px",
+					borderColor: "#f1f1f1",
+					borderWidth: "1px",
+				},
+				position:{
+					bottom: viewContentPadding + 'px',
+					left: viewContentPadding + "px",
+					width: (viewContentWidth - viewContentPadding) / 2 + "px",
+					height: "30px"
+				}
+			},
+			{
+				tag: 'rect', //绘制底边按钮
+				rectStyles:{
+					radius: "3px",
+					color: $mainColor
+				},
+				position:{
+					bottom: viewContentPadding + 'px',
+					left: ((viewContentWidth - viewContentPadding) / 2 + viewContentPadding * 2) + "px",
+					width: (viewContentWidth - viewContentPadding) / 2 + "px",
+					height: "30px"
+				}
+			},
+			{
+				tag: 'font',
+				id: 'cancelText',
+				text: "取消下载",
+				textStyles: {
+					size: '14px',
+					color: "#666",
+					lineSpacing: "0%",
+					whiteSpace: "normal"
+				},
+				position: {
+					bottom: viewContentPadding + 'px',
+					left: viewContentPadding + "px",
+					width: (viewContentWidth - viewContentPadding) / 2 + "px",
+					height: "30px",
+				}
+			},
+			{
+				tag: 'font',
+				id: 'confirmText',
+				text: "后台下载",
+				textStyles: {
+					size: '14px',
+					color: "#FFF",
+					lineSpacing: "0%",
+					whiteSpace: "normal"
+				},
+				position: {
+					bottom: viewContentPadding + 'px',
+					left: ((viewContentWidth - viewContentPadding) / 2 + viewContentPadding * 2) + "px",
+					width: (viewContentWidth - viewContentPadding) / 2 + "px",
+					height: "30px",
+				}
+			}
+		]);
+	}
+	if (data.buttonNum == 1) {
+		popupViewHeight += viewContentPadding + 40;
+		elementList = elementList.concat([
+			{
+				tag: 'rect', //绘制底边按钮
+				rectStyles:{
+					radius: "6px",
+					color: $mainColor
+				},
+				position:{
+					bottom: viewContentPadding + 'px',
+					left: viewContentPadding + "px",
+					width: viewContentWidth + "px",
+					height: "40px"
+				}
+			},
+			{
+				tag: 'font',
+				id: 'confirmText',
+				text: "关闭",
+				textStyles: {
+					size: '14px',
+					color: "#FFF",
+					lineSpacing: "0%",
+				},
+				position: {
+					bottom: viewContentPadding + 'px',
+					left: viewContentPadding + "px",
+					width: viewContentWidth + "px",
+					height: "40px"
+				}
+			}
+		]);
+	}
+	return {
+		popupViewHeight:popupViewHeight,
+		popupViewWidth:popupViewWidth,
+		screenHeight:screenHeight,
+		viewContentWidth:viewContentWidth,
+		viewContentPadding:viewContentPadding,
+		elementList: elementList
+	};
+}
+// 文件下载的弹窗
+function downloadPopup(data) {
+	// 弹窗遮罩层
+	let maskLayer = new plus.nativeObj.View("maskLayer", { //先创建遮罩层
+		top: '0px',
+		left: '0px',
+		height: '100%',
+		width: '100%',
+		backgroundColor: 'rgba(0,0,0,0.5)'
+	});
+	let popupViewData = downloadPopupDrawing(data);
+	// 弹窗内容
+	let popupView = new plus.nativeObj.View("popupView", { //创建底部图标菜单
+		tag: "rect",
+		top: (popupViewData.screenHeight - popupViewData.popupViewHeight) / 2 + "px",
+		left: '15%',
+		height: popupViewData.popupViewHeight + "px",
+		width: "70%",
+	});
+	let progressValue = 0;
+	let progressTip = 0;
+	let contentText = 0;
+	let buttonNum = 2;
+	if(data.buttonNum >= 0){
+		buttonNum = data.buttonNum;
+	}
+	popupView.draw(popupViewData.elementList);
+    let callbackData = {
+		change: function(res) {
+			let progressElement = [];
+			if(res.progressValue){
+				progressValue = res.progressValue;
+				// 绘制进度条
+				progressElement.push({
+					tag: 'rect', //绘制进度条背景
+					id: 'progressValueBg',
+					rectStyles:{
+						radius: "4px",
+						color: $mainColor
+					},
+					position:{
+						top: popupViewData.viewContentPadding * 4 + 60 + 'px',
+						left: popupViewData.viewContentPadding + "px",
+						width: popupViewData.viewContentWidth * (res.progressValue / 100) + "px",
+						height: "8px"
+					}
+				});
+			}
+			if(res.progressTip){
+				progressTip = res.progressTip;
+				progressElement.push({
+					tag: 'font',
+					id: 'progressValue',
+					text: res.progressTip,
+					textStyles: {
+						size: '14px',
+						color: $mainColor,
+						whiteSpace: "normal"
+					},
+					position: {
+						top: popupViewData.viewContentPadding * 4 + 20 + 'px',
+						height: "30px"
+					}
+				});
+			}
+			if(res.contentText){
+				contentText = res.contentText;
+				progressElement.push({
+					tag: 'font',
+					id: 'content',
+					text: res.contentText,
+					textStyles: {
+						size: '16px',
+						color: "#333",
+						whiteSpace: "normal"
+					},
+					position: {
+						top: popupViewData.viewContentPadding * 2 + 30 + 'px',
+						height: "30px",
+					}
+				});
+			}
+			if(res.buttonNum >= 0 && buttonNum != res.buttonNum){
+				buttonNum = res.buttonNum;
+				popupView.reset();
+				popupViewData = downloadPopupDrawing(Object.assign({
+					progressValue:progressValue,
+					progressTip:progressTip,
+					contentText:contentText,
+				},res));
+				let newElement = [];
+				popupViewData.elementList.map((item,index) => {
+					let have = false;
+					progressElement.forEach((childItem,childIndex) => {
+						if(item.id == childItem.id){
+							have = true;
+						}
+					});
+					if(!have){
+						newElement.push(item);
+					}
+				});
+				progressElement = newElement.concat(progressElement);
+				popupView.setStyle({
+					tag: "rect",
+					top: (popupViewData.screenHeight - popupViewData.popupViewHeight) / 2 + "px",
+					left: '15%',
+					height: popupViewData.popupViewHeight + "px",
+					width: "70%",
+				});
+				popupView.draw(progressElement); 
+			}else{
+				popupView.draw(progressElement);
+			}
+		},
+		cancel: function() { 
+			maskLayer.hide();
+			popupView.hide();
+		}
+	}
+	popupView.addEventListener("click", function(e) {
+		let maxTop = popupViewData.popupViewHeight - popupViewData.viewContentPadding;
+		let maxLeft = popupViewData.popupViewWidth - popupViewData.viewContentPadding;
+		if (e.clientY > maxTop - 40 && e.clientY < maxTop) {
+			if(buttonNum == 1){
+				// 单按钮
+				if (e.clientX > popupViewData.viewContentPadding && e.clientX < maxLeft) {
+					maskLayer.hide();
+					popupView.hide();
+                    callbackData.reboot();
+				}
+			}else if(buttonNum == 2){
+				// 双按钮
+				let buttonWidth = (popupViewData.viewContentWidth - popupViewData.viewContentPadding) / 2;
+				if (e.clientX > popupViewData.viewContentPadding && e.clientX < maxLeft - buttonWidth - popupViewData.viewContentPadding) {
+					maskLayer.hide();
+					popupView.hide();
+                    callbackData.cancelDownload();
+				} else if (e.clientX > maxLeft - buttonWidth && e.clientX < maxLeft) {
+					maskLayer.hide();
+					popupView.hide();
+				}
+			}
+		}
+	});
+	// 显示弹窗
+	maskLayer.show();
+	popupView.show();
+	// 改变进度条
+	return callbackData;
+}
+export default function(isPrompt = false) {
+	getCurrentNo(versionInfo => {
+		componentConfig.getServerNo(versionInfo, isPrompt, res => {
+			if (res.updateType == "forcibly" || res.updateType == "silent") {
+				if (/\.wgt$/i.test(res.downloadUrl)) {
+					getDownload(res);
+				} else if(/\.html$/i.test(res.downloadUrl)){
+					plus.runtime.openURL(res.downloadUrl);
+				} else {
+					if (platform == "android") {
+						getDownload(res);
+					} else {
+						plus.runtime.openURL(res.downloadUrl);
+					}
+				}
+			} else if(res.updateType == "solicit"){
+				updatePopup(res, function() {
+					if (/\.wgt$/i.test(res.downloadUrl)) {
+						getDownload(res);
+					} else if(/\.html$/i.test(res.downloadUrl)){
+						plus.runtime.openURL(res.downloadUrl);
+					} else {
+						if (platform == "android") {
+							getDownload(res);
+						} else {
+							plus.runtime.openURL(res.downloadUrl);
+						}
+					}
+				});
+			}
+		});
+	});
+}
+// #endif

+ 79 - 0
uni_modules/zhouWei-APPUpdate/package.json

@@ -0,0 +1,79 @@
+{
+  "id": "zhouWei-APPUpdate",
+  "displayName": "APP版本更新、强制更新、静默更新、下载进度(wgt更新)",
+  "version": "3.0.1",
+  "description": "APP版本更新、强制更新、静默更新、漂亮弹窗、下载进度(wgt更新)",
+  "keywords": [
+    "APP版本更新",
+    "强制更新",
+    "版本更新",
+    "静默更新"
+],
+  "repository": "https://github.com/zhouwei1994/uni-app-demo",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "dcloudext": {
+    "category": [
+        "JS SDK",
+        "通用 SDK"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": "465081029"
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "<uses-permission android:name=\\\"android.permission.INSTALL_PACKAGES\\\"/>  \n<uses-permission android:name=\\\"android.permission.REQUEST_INSTALL_PACKAGES\\\"/>"
+    },
+    "npmurl": ""
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "n",
+          "Android Browser": "n",
+          "微信浏览器(Android)": "n",
+          "QQ浏览器(Android)": "n"
+        },
+        "H5-pc": {
+          "Chrome": "n",
+          "IE": "n",
+          "Edge": "n",
+          "Firefox": "n",
+          "Safari": "n"
+        },
+        "小程序": {
+          "微信": "n",
+          "阿里": "n",
+          "百度": "n",
+          "字节跳动": "n",
+          "QQ": "n"
+        },
+        "快应用": {
+          "华为": "n",
+          "联盟": "n"
+        }
+      }
+    }
+  }
+}

+ 162 - 0
uni_modules/zhouWei-APPUpdate/readme.md

@@ -0,0 +1,162 @@
+# APP版本更新、强制更新、漂亮的更新界面、IOS更新(跳转IOS store)、wgt更新
+
+| `QQ交流群(607391225)`         | `微信交流群(加我好友备注"进群")`                  |
+| ----------------------------|--------------------------- |
+|![QQ交流群](http://qn.kemean.cn//upload/202004/14/15868301778472k7oubi6.png)|![微信交流群](https://qn.kemean.cn/upload/202010/13/weiXin_group_code.jpg)|
+| QQ群号:607391225 |微信号:zhou0612wei|
+
+### [点击跳转-插件示例](https://ext.dcloud.net.cn/plugin?id=2009)
+### [点击跳转-5年的web前端开源的uni-app快速开发模板-下载看文档](https://ext.dcloud.net.cn/plugin?id=2009)
+ 
+### 常见问题
+1.安卓apk下载完成后没有更新APP?
+
+答:问题是因为没有添加APP安装应用的权限,解决方法在`manifest.json`文件里面`APP模块权限配置`的`Android打包权限配置`勾选以下权限
+```
+<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>  
+<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>
+```
+若还有问题请看[安装apk无法执行的解决方案](https://ask.dcloud.net.cn/article/35703 "安装apk无法执行的解决方案")
+
+2.APP更新后版本号没变,还是之前的版本号?
+
+答:可能是更新的安装包没有升级版本号,`manifest.json`文件里面基本设置`应用版本号`和`应用版本名称`需要升高(保持一直减少问题)
+
+3.APP更新后没有覆盖之前的APP?
+
+答:可能是更新的安装包`包名`和APP的`包名`不一样
+
+4.弹窗的图标不显示?
+
+答:检查图片是不是放项目资源文件`static`,然后重新运行项目
+
+5.版本号是在前端对比还是在后端接口对比?
+
+答:当前案例是本地的版本号通过接口传递给后台,是后台对比的,若需要前端对比,请在接口返回数据的地方修改,不更新就不要调用`callback`方法
+
+6.本地的版本号比接口的版本号高还弹窗升级窗口?
+
+答:当前案例是本地的版本号通过接口传递给后台,后台对比是否需要升级,不需要升级就不要返回数据(特别是需要wgt更新的,建议这种方式)
+
+### 第一步`关键`配置APP更新接口(可以参考上面的示例)
+在项目目录下`config/componentConfig.js`里面如下配置
+```
+// 此方法是接口请求方法
+import $http from '@/config/requestConfig'
+export default {
+	// 发起ajax请求获取服务端版本号
+	getServerNo: (version, isPrompt = false, callback) => {
+		let httpData = {
+			version: version.versionCode,
+			// 版本名称
+		    versionName: version.versionName,
+			// setupPage参数说明(判断用户是不是从设置页面点击的更新,如果是设置页面点击的更新,有不要用静默更新了,不然用户点击没反应很奇怪的)
+			setupPage: isPrompt   
+		};
+		if (platform == "android") {
+			httpData.type = 1101;
+		} else {
+			httpData.type = 1102;
+		}
+		/* 接口入参说明
+		 * version: 应用当前版本号(已自动获取)
+		 * versionName: 应用当前版本名称(已自动获取)
+		 * type:平台(1101是安卓,1102是IOS)
+		 */
+		/****************以下是示例*******************/
+		// 可以用自己项目的请求方法(接口自己找后台要,插件不提供)
+		$http.get("api/common/v1/app_version", httpData,{
+			isPrompt: isPrompt
+		}).then(res => {
+			/* res的数据说明
+			 * | 参数名称	     | 一定返回 	| 类型	    | 描述
+			 * | -------------|--------- | --------- | ------------- |
+			 * | versionCode	 | y	    | int	    | 版本号        |
+			 * | versionName	 | y	    | String	| 版本名称      |
+			 * | versionInfo	 | y	    | String	| 版本信息      |
+			 * | updateType	     | y	    | String	| forcibly = 强制更新, solicit = 弹窗确认更新, silent = 静默更新 |
+			 * | downloadUrl	 | y	    | String	| 版本下载链接(IOS安装包更新请放跳转store应用商店链接,安卓apk和wgt文件放文件下载链接)  |
+			 */
+			if (res && res.downloadUrl) {
+				// 兼容之前的版本(updateType是新版才有的参数)
+				if(res.updateType){
+					callback && callback(res);
+				} else {
+					if(res.forceUpdate){
+						res.updateType = "forcibly";
+					} else {
+						res.updateType = "solicit";
+					}
+					callback && callback(res);
+				}
+			} else if (isPrompt) {
+				uni.showToast({
+					title: "暂无新版本",
+					icon: "none"
+				});
+			}
+		});
+		/****************以上是示例*******************/
+	},
+	// 弹窗主颜色(不填默认粉色)
+	appUpdateColor: "f00",
+	// 弹窗图标(不填显示默认图标,链接配置示例如: '/static/demo/ic_attention.png')
+	appUpdateIcon: ''
+}
+```
+
+### 第二步 使用方法
+``` 
+// App.vue页面
+
+// #ifdef APP-PLUS
+import APPUpdate from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
+// #endif
+
+onLaunch: function(e) {
+	// #ifdef APP-PLUS
+	APPUpdate();
+	// #endif
+}
+```
+
+### 第三步 添加APP安装应用的权限
+在`manifest.json`文件里面`APP模块权限配置`的`Android打包权限配置`勾选以下权限
+```
+<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>  
+<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>
+```
+
+### 修改弹窗的主题色或弹窗图标
+在`APPUpdate/index.js`里面上面`$mainColor`常量中定义主题颜色,`$iconUrl`常量中定义图标地址
+
+### 检查APP是否有新版本(一般在设置页面使用)
+```
+// #ifdef APP-PLUS
+import APPUpdate, { getCurrentNo } from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
+// #endif
+export default {
+	data() {
+		return {
+			version: "" // 版本号
+		};
+	},
+	//第一次加载
+	onLoad(e) {
+		// #ifdef APP-PLUS
+		getCurrentNo(res => {
+			// 进页面获取当前APP版本号(用于页面显示)
+			this.version = res.version;
+		});
+		// #endif
+	},
+	//方法
+	methods: {
+		// 检查APP是否有新版本
+		onAPPUpdate() {
+			// true 没有新版本的时候有提示,默认:false
+			APPUpdate(true);
+		}
+	}
+}
+```

BIN
uni_modules/zhouWei-APPUpdate/static/ic_ar.png


+ 1 - 1
util/request.js

@@ -59,7 +59,7 @@ const baseRequest = (method, url, data, header) => {
 								title: '网络异常,请检查网络状况',
 								duration: 2000
 							});
-							reject(response)
+							reject(res)
 							
 						}
 						// // 登录失败