achao 3 years ago
parent
commit
a67107657f

+ 10 - 3
components/ossutil/uploadFile.js

@@ -12,7 +12,8 @@ const Crypto = require('./crypto.js');
  *@param - successc:成功回调
  *@param - failc:失败回调
  */ 
-const uploadFile = function (filePath, dir, successc, failc) {
+const uploadFile = function (type,filePath, dir, successc, failc) {
+	console.log('type',type)
   if (!filePath || filePath.length < 9) {
     uni.showModal({
       title: '图片错误',
@@ -20,9 +21,15 @@ const uploadFile = function (filePath, dir, successc, failc) {
       showCancel: false,
     })
     return;
+  }
+   let aliyunFileKey=''
+  if(type){
+	     aliyunFileKey = dir + new Date().getTime() + Math.floor(Math.random() * 150) + '.mp4';
+  }else{
+	   aliyunFileKey = dir + new Date().getTime() + Math.floor(Math.random() * 150) + '.png';
   }
   //图片名字 可以自行定义,     这里是采用当前的时间戳 + 150内的随机数来给图片命名的
-  const aliyunFileKey = dir + new Date().getTime() + Math.floor(Math.random() * 150) + '.png';
+  // const aliyunFileKey = dir + new Date().getTime() + Math.floor(Math.random() * 150) + '.png';
   
   const aliyunServerURL = env.uploadImageUrl;//OSS地址,需要https
   const accessid = env.OSSAccessKeyId;
@@ -78,7 +85,7 @@ const getSignature = function (policyBase64) {
     asBytes: true
   });
   const signature = Crypto.util.bytesToBase64(bytes);
-console.log(signature);
+// console.log(signature);
   return signature;
 }
 

+ 1 - 1
config/index.js

@@ -1,6 +1,6 @@
 const dev = {
 	// baseUrlNew: 'https://apitest.eliangeyun.com',
-	baseUrlNew: 'http://192.168.1.114:8091',
+	baseUrlNew: 'http://192.168.1.114:8099',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 15 - 3
manifest.json

@@ -20,7 +20,8 @@
         "modules" : {
             "Maps" : {},
             "VideoPlayer" : {},
-            "OAuth" : {}
+            "Geolocation" : {},
+            "iBeacon" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -33,6 +34,8 @@
                     "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
+                    "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
@@ -45,7 +48,9 @@
                     "<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.BLUETOOTH\"/>",
+                    "<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
                 ]
             },
             /* ios打包配置 */
@@ -62,7 +67,14 @@
                     "unipush" : {}
                 },
                 "oauth" : {},
-                "ad" : {}
+                "ad" : {},
+                "geolocation" : {
+                    "amap" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appkey_ios" : "b1ce5ff5cafa861ce00623ac4788a721",
+                        "appkey_android" : "77d75fbe6f68fc8e415b990bfc70daaa"
+                    }
+                }
             },
             "icons" : {
                 "android" : {

+ 1 - 1
pages.json

@@ -297,7 +297,7 @@
 		}, {
 			"path": "pages/mine/company/companyvideo",
 			"style": {
-				"navigationBarTitleText": "",
+				"navigationBarTitleText": "视频认证",
 				"enablePullDownRefresh": false
 			}
 

+ 32 - 0
pages/goodSource/index.vue

@@ -6,6 +6,10 @@
 </template>
 
 <script>
+	var that
+	import {
+		mapState
+	} from 'vuex';
 	import MescrollItem from "./mescroll-swiper-item.vue";
 	export default {
 		components: {
@@ -20,12 +24,40 @@
 
 			}
 		},
+		onShow() {
+			this.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+				reCommonId: this.userInfo.id,
+			}).then(res3 => {
+				if (res3.data) {
+					let name = 'myTip';
+					let value = res3.data
+					if (value == 0) {
+						uni.removeTabBarBadge({
+							index: 2
+						})
+					}
+					this.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if (value != 0 && value) {
+						uni.setTabBarBadge({
+							index: 2,
+							text: value + ""
+						})
+					}
+				}
+			})
+		},
 		onLoad() {
 			let _isHave = this.$utils.getRoles('aaa')
 			console.log(_isHave)
 			// 需要固定swiper的高度 (需减去悬浮tabs的高度64rpx)
 			this.height = uni.getSystemInfoSync().windowHeight - uni.upx2px(64) + 'px'
 		},
+		computed: {
+			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
+		},
 		methods: {
 			changeCity(type) {
 				console.log(type)

+ 83 - 5
pages/mine/company/addcompany.vue

@@ -119,7 +119,7 @@
 		<!-- http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 -->
 		<!-- dataDetails.videoAddressUrl -->
 		<view class='content3' v-if="!dataDetails.videoAddressUrl"
-			@click="goDetailPage('/pages/mine/company/addcompanythree')">
+			@click="goDetailPage('/pages/mine/company/companyvideo')">
 			<view class="left-text">视频验证(打开摄像头并阅读提示文字)</view>
 			<view class="video-icon">
 				<u-icon size="40" name="camera-fill"></u-icon>
@@ -127,7 +127,7 @@
 		</view>
 		<view class='content3' v-if="dataDetails.videoAddressUrl">
 			<view class="left-text">视频验证(点击按钮播放视频)</view>
-			<view >
+			<view>
 				<view class="video-icon">
 					<u-icon size="40" name="play-circle-fill" @click="isSshowPlayVideo=true"></u-icon>
 				</view>
@@ -156,7 +156,7 @@
 
 		<view class='footer'>
 			<!-- <view @click="goDetailPage('/pages/mine/company/addcompanythree')" class='newlyIncreased'>下一步</view> -->
-			<view @click="submit()" class='newlyIncreased'>提交</view>
+			<view @click="submit" class='newlyIncreased'>提交</view>
 		</view>
 		<u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			@change="changeHandler" @cancel="isShowcardValidity=false">
@@ -164,6 +164,7 @@
 		<u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
 			@select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
 		</u-action-sheet>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -241,7 +242,84 @@
 					showCancel: false
 				})
 			},
+			validate() {
+				if (uni.$u.test.isEmpty(this.dataDetails.companyName)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "企业名称不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.legalPersonName)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "法定代表人姓名不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.phone)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "联系电话不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.registeredPaidAmount)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "注册实缴金额不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.businessLicenseAddressUrl)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "营业执照不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.businessTermDate)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "营业期限截止日期不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataDetails.unifiedSocialCreditCode)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "统一社会信用代码不能为空!",
+					})
+					return true
+				}
+
+				if (uni.$u.test.isEmpty(this.dataDetails.propertyAddressUrl)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "房产证或租赁合同不能为空!",
+					})
+					return true
+				}
+
+				if (this.dataDetails.landOwnership == '租赁') {
+					if (uni.$u.test.isEmpty(this.dataDetails.siteLeaseDate)) {
+						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
 				uni.showLoading({
 					title: '加载中',
 					mask: true
@@ -277,8 +355,8 @@
 				console.log('this.dataDetails.landOwnership', this.dataDetails.landOwnership);
 			},
 			delCard(type) {
-				if(type==1){}else{
-					
+				if (type == 1) {} else {
+
 				}
 				this.dataDetails.businessLicenseAddressUrl = ''
 				this.$forceUpdate()

+ 105 - 26
pages/mine/company/companyvideo.nvue

@@ -1,9 +1,35 @@
 <<template>
-    <view class="page">
-        <KJ-Camera ref='Camera' class="KJ-Camera" :style="{width:'100%',height:cameraHeight}">
+    <view class="u-page">
+        <KJ-Camera ref='Camera' class="KJ-Camera" :style="{width:'100vw',height:cameraHeight}">
         </KJ-Camera>
-        <view class="btn-view">
-            <button @click="captureImage" class="btn" type="primary">
+        <view class="view-content" :style="contentStyle">
+			<image :showLoading="true" src="@/static/video-bgc.png"  @click="click" class="img-bgc" :style="contentStyle"></image>
+			<view class="content" :style="{width:width}">
+				<view class="title">
+					请阅读以下文字
+				</view>
+				<view class="text">
+					我已同意段时间放假啦硕大的房间里方法是打开立方爱睡懒觉发的房间拉法史莱克激发熟练度拉收费记录卡士大夫积分代暗室逢灯金坷垃似懂非懂接口了
+				</view>
+			</view>
+			<view class="btn-view">
+				<view v-if='!isSaveVideo'>
+					<button @click="startVideoCapture" class="btn" type="primary" v-if='!isAlreadyRecord'>
+					    开始录像
+					</button>
+					<button @click="stopVideoCapture" class="btn" type="primary"  v-if='isAlreadyRecord'>
+					    停止录像
+					</button>
+				</view>
+				<button @click="saveVideo" class="btn" type="primary"  v-if='isSaveVideo'>
+				    保存视频
+				</button>
+				<button @click="switchCamera" class="btn" type="primary">
+				    前后摄像头切换
+				</button>
+			</view>
+			
+        <!--    <button @click="captureImage" class="btn" type="primary">
                 拍照
             </button>
             <button @click="startVideoCapture" class="btn" type="primary">
@@ -48,27 +74,52 @@
             <button @click="initCamera" class="btn" type="primary">
                 初始化相机
             </button>
-            <image :src="src" style="width: 50px;height: 50px;"></image>
+            <image :src="src" style="width: 50px;height: 50px;"></image> -->
         </view>
     </view>
 </template>
 
 <script>
+	import uploadImage from '@/components/ossutil/uploadFile.js';
     var videoFilePath;
     export default {
         data() {
             return {
-                cameraWidth: "100%",
-                cameraHeight: "auto",
-                src: ""
+				isSaveVideo:false,
+				isAlreadyRecord:false,
+                cameraWidth: "100vw",
+                cameraHeight: "100vh",
+                src: '',
+				contentStyle:{
+					width:0,
+					height:0,
+				},
+				width:0,
+				height:0,
+				videoSrc:''
+				
             }
         },
         onReady() {
             console.log("onReady")
             this.$refs.Camera.initCamera();
+			uni.getSystemInfo({
+				success: (res) => {
+					console.log(res)
+					this.width = res.windowWidth
+					this.height = res.windowHeight
+					this.contentStyle = {
+						width: res.windowWidth,
+						height:res.windowHeight,
+					}
+				}
+			})
         },
         
         methods: {
+			saveVideo(){
+				uni.$u.route('/pages/mine/company/addcompany');
+			},
             /**
              * 初始化相机 默认加载插件的时候已初始化
              * 在横竖屏切换的时候,需要重新初始化,要不然画面是颠倒的
@@ -119,15 +170,24 @@
                     console.log("startVideoCapture: " + JSON.stringify(res))
                     if (res.status == "start") {
                         console.log("开始录像")
+						this.isAlreadyRecord = true
                     } else if (res.status == "end") {
                         console.log("结束录像")
                         videoFilePath = res.filePath;
-                        uni.saveVideoToPhotosAlbum({
-                            filePath: plus.io.convertAbsoluteFileSystem(videoFilePath),
-                            success: function() {
-                                console.log('save success');
-                            }
-                        });
+						uploadImage('mp4',videoFilePath,'appData/',
+							result => {
+								// 上传成功回调函数
+								console.log('视频地址', result)
+								this.videoSrc = result
+							}
+						)
+         //                uni.saveVideoToPhotosAlbum({
+         //                    filePath: plus.io.convertAbsoluteFileSystem(videoFilePath),
+         //                    success: function(e) {
+         //                        console.log('save success');
+								 // console.log(e);
+         //                    }
+         //                });
                     }
                 });
             },
@@ -136,6 +196,7 @@
              * */
             stopVideoCapture() {
                 this.$refs.Camera.stopVideoCapture();
+				this.isSaveVideo = true
             },
             /**
              * 前后摄像头切换
@@ -321,23 +382,41 @@
 
 <style lang="scss">
     .KJ-Camera {
-        width: 100%;
-        position: fixed;
+        width: 100vw;
+        position:fixed;
         top: 0px;
         bottom: 0px;
         left: 0;
         right: 0;
     }
 
-    .btn {
-        height: 35px;
-        width: 260px;
-    }
-
-    .btn-view {
-        position: fixed;
-        bottom: 0;
-        left: 0;
-        right: 0;
+    .view-content {
+        position:fixed;
+		top: 0;
     }
+	.img-bgc{
+		position:fixed;
+		top: 0;
+	}
+	.content{
+		position:fixed;
+		top: 700rpx;
+		// background: red;
+	}
+	.title{
+		flex-direction:row;
+		justify-content: center;
+	}
+	.text{
+		margin-top: -100rpx;
+		flex-direction: column;
+		flex-wrap: wrap;
+		justify-content: center;
+		padding: 20rpx;
+	}
+	.btn-view{
+		position:fixed;
+		bottom: 0rpx;
+		background: red;
+	}
 </style>

+ 463 - 65
pages/mine/company/companyvideo.vue

@@ -1,73 +1,471 @@
-<template>
-	<view>
-		<view class='footer'>
-			<view @click="submit" class='newlyIncreased'>提交</view>
+<<template>
+	<view class="page">
+		<view class='content'>
+			<view class='row'>
+				<view class='img-video'>
+					<view class="video-content">
+						<KJ-Camera ref='Camera' class="KJ-Camera" :style="{width:'100%',height:cameraHeight}">
+						</KJ-Camera>
+					</view>
+				</view>
+			</view>
+			<view class='row2'>
+				请将头像放于圆圈内,并阅读以下文字
+			</view>
+			<view class='row2 text'>
+				网络客服过段时间浪费多少级范德萨快逻辑范德萨拉丝机多亏了房价按时付款了金坷垃所肩负的看离开静安寺了发动机as在考虑家双方都会计分录卡死范德萨拉使肌肤抵抗力
+			</view>
+			<view class='btn'>
+				<!-- <view class="verify-btn" @click="getCamera" v-show="!showVideo">打开摄像头</view> -->
+				<view class='video-btn'>
+					<view class="verify-btn" @click="saveVideo" v-if='!isAlreadyRecord'>开始录制</view>
+					<view class="verify-btn" @click="saveVideo" v-if='isAlreadyRecord' data-action="navigateTo">结束录制
+					</view>
+					<!-- <button class="video-close" @click="closeVideo">×</button>
+					<button class="video-save" @click="saveVideo">
+						{{ isAlreadyRecord ? '结束录制(' + count + 's)' : '开始录制' }}</button> -->
+				</view>
+			</view>
+			<!-- <video ref="videob" controls="" name="media" width="100%" height="100"></video> -->
 		</view>
+		<!--      <view class="btn-view">
+            <button @click="captureImage" class="btn" type="primary">
+                拍照
+            </button>
+            <button @click="startVideoCapture" class="btn" type="primary">
+                开始录像
+            </button>
+            <button @click="stopVideoCapture" class="btn" type="primary">
+                停止录像
+            </button>
+            <button @click="switchCamera" class="btn" type="primary">
+                前后摄像头切换
+            </button>
+            <button @click="setZoomFactor" class="btn" type="primary">
+                设置焦距
+            </button>
+            <button @click="setFlash" class="btn" type="primary">
+                设置闪光灯模式
+            </button>
+            <button @click="setTorch" class="btn" type="primary">
+                设置手电筒
+            </button>
+            <button @click="ios_getSessionPresets" class="btn" type="primary">
+                ios获取支持的分辨率
+            </button>
+            <button @click="ios_setSessionPreset" class="btn" type="primary">
+                ios设置分辨率
+            </button>
+            <button @click="android_getSupportedPictureSizes" class="btn" type="primary">
+                android获取照片支持分辨率列表
+            </button>
+            <button @click="android_getSupportedPreviewSizes" class="btn" type="primary">
+                android获取预览支持分辨率列表
+            </button>
+            <button @click="android_getSupportedVideoSizes" class="btn" type="primary">
+                android获取视频支持分辨率列表
+            </button>
+            <button @click="android_setCameraParams" class="btn" type="primary">
+                android设置相机参数
+            </button>
+            <button @click="setRotation" class="btn" type="primary">
+                android设置旋转角度
+            </button>
+            <button @click="initCamera" class="btn" type="primary">
+                初始化相机
+            </button>
+            <image :src="src" style="width: 50px;height: 50px;"></image>
+        </view> -->
 	</view>
-</template>
+	</template>
 
-<script>
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		onLoad(){
-			var _this=this
-			uni.getStorage({
-				key: 'companydata',
-				success: function (res) {
-					_this.dataDetails = JSON.parse(res.data)
+	<script>
+		var videoFilePath;
+		export default {
+			data() {
+				return {
+					cameraWidth: "100%",
+					cameraHeight: "auto",
+					src: ""
 				}
-			});
-		},
-		methods: {
-			submit(){
-				uni.showLoading({
-					title: '加载中',
-					mask:true
-				})
-				var _this=this
-				this.$request.baseRequest('post', '/companyInfo/api/addCompanyInfo', _this.dataDetails).then(res => {
-					uni.hideLoading()
-					uni.$u.toast('提交成功')
-					this.goDetailPage('/pages/mine/company/index')
-				})
-				.catch(res => {
-					uni.hideLoading()
-					uni.showToast({
-						title: res.message,
-						icon: 'none',
-						duration: 2000
-					})
-				});
 			},
-			goDetailPage(src) {
-				uni.$u.route(src);
+			onReady() {
+				console.log("onReady")
+				// this.$refs.Camera.initCamera();
 			},
+
+			methods: {
+				/**
+				 * 初始化相机 默认加载插件的时候已初始化
+				 * 在横竖屏切换的时候,需要重新初始化,要不然画面是颠倒的
+				 * */
+				initCamera() {
+					this.$refs.Camera.initCamera();
+				},
+				/**
+				 * 拍照
+				 * */
+				captureImage() {
+					var _this = this;
+					var dic = {
+						"savePath": plus.io.convertLocalFileSystemURL("_doc/KJ-Camera"), //保存图片位置,一定要是_doc绝对路径
+						"format": "jpeg", //保存的图片格式 有效值:png、jpeg
+						"quality": 80 //andorid才可用 保存的图片质量,取值1-100
+					}
+					this.$refs.Camera.captureImage(dic, (res) => {
+						console.log("filePath: " + res)
+						//_this.src = "file://" + res.filePath;
+						uni.saveImageToPhotosAlbum({
+							filePath: plus.io.convertAbsoluteFileSystem(res.filePath),
+							success: function() {
+								console.log('save success');
+							},
+							fail: function(e) {
+								console.log(JSON.stringify(e));
+							}
+						});
+					}, (res) => {
+						_this.src = "data:image/png;base64," + res.base64;
+						console.log("base64: " + res)
+					});
+
+				},
+				/**
+				 * 开始录像
+				 * */
+				startVideoCapture() {
+					var _this = this;
+					var dic = {
+						"savePath": plus.io.convertLocalFileSystemURL("_doc/KJ-Camera"), //保存视频位置,一定要是_doc绝对路径
+						"isAddAudio": true, //是否添加音频,默认是true
+						"videoEncoder": 2, //andorid有效,DEFAULT = 0;H263 = 1;H264 = 2;MPEG_4_SP = 3;VP8 = 4;HEVC = 5;
+						"audioEncoder": 0, //andorid有效,DEFAULT = 0;AMR_NB = 1;AMR_WB = 2;AAC = 3;HE_AAC = 4;AAC_ELD = 5;VORBIS = 6;
+					}
+					this.$refs.Camera.startVideoCapture(dic, (res) => {
+						console.log("startVideoCapture: " + JSON.stringify(res))
+						if (res.status == "start") {
+							console.log("开始录像")
+						} else if (res.status == "end") {
+							console.log("结束录像")
+							videoFilePath = res.filePath;
+							uni.saveVideoToPhotosAlbum({
+								filePath: plus.io.convertAbsoluteFileSystem(videoFilePath),
+								success: function() {
+									console.log('save success');
+								}
+							});
+						}
+					});
+				},
+				/**
+				 * 停止录像
+				 * */
+				stopVideoCapture() {
+					this.$refs.Camera.stopVideoCapture();
+				},
+				/**
+				 * 前后摄像头切换
+				 * */
+				switchCamera() {
+					this.$refs.Camera.switchCamera();
+					this.android_setCameraParams(); //因为andorid前后摄像头,设置相机参数不一样,需要重置
+				},
+				/**
+				 * 设置焦距
+				 * */
+				setZoomFactor() {
+					this.$refs.Camera.getZoomFactor((res_zoom) => {
+						console.log("获取当前焦距:" + res_zoom.value);
+						this.$refs.Camera.getMaxZoomFactor((res_max) => {
+							console.log("可设置的最大焦距:" + res_max.value);
+							this.$refs.Camera.getMinZoomFactor((res_min) => {
+								console.log("可设置的最小焦距:" + res_min.value);
+								this.$refs.Camera.setZoomFactor(res_max.value);
+							});
+						});
+					});
+				},
+				/**
+				 * 设置闪光灯模式  默认是auto
+				 * auto-自动
+				 * on-开
+				 * off-关
+				 * */
+				setFlash() {
+					this.$refs.Camera.setFlash("off");
+				},
+				/**
+				 * 设置手电筒  默认是auto
+				 * auto-自动
+				 * on-开
+				 * off-关
+				 * */
+				setTorch() {
+					this.$refs.Camera.setTorch("on");
+				},
+				/**
+				 * ios获取支持的分辨率
+				 * */
+				ios_getSessionPresets() {
+					this.$refs.Camera.ios_getSessionPresets((res) => {
+						console.log("ios_getSessionPresets:" + JSON.stringify(res));
+					});
+				},
+				/**
+				 * ios设置分辨率  默认是high
+				 * photo-适用于高分辨率照片质量输出
+				 * high-适用于高质量视频和音频输出
+				 * medium-适用于中等质量输出
+				 * low-适用于低质量输出
+				 * 其它。。。
+				 * */
+				ios_setSessionPreset() {
+					this.$refs.Camera.ios_setSessionPreset("low"); //从ios_getSessionPresets方法获取
+				},
+				/**
+				 * android获取照片支持分辨率列表
+				 * 只用于设置照片分辨率 或 视频分辨率
+				 * */
+				android_getSupportedPictureSizes() {
+					this.$refs.Camera.android_getSupportedPictureSizes((res) => {
+						console.log("android_getSupportedPictureSizes:" + JSON.stringify(res));
+					});
+				},
+				/**
+				 * android获取预览支持分辨率列表
+				 * 只用于设置预览分辨率
+				 * */
+				android_getSupportedPreviewSizes() {
+					this.$refs.Camera.android_getSupportedPreviewSizes((res) => {
+						console.log("android_getSupportedPreviewSizes:" + JSON.stringify(res));
+					});
+				},
+				/**
+				 * android获取视频支持分辨率列表
+				 * 只用于视频分辨率
+				 * */
+				android_getSupportedVideoSizes() {
+					this.$refs.Camera.android_getSupportedVideoSizes((res) => {
+						console.log("android_getSupportedVideoSizes:" + JSON.stringify(res));
+					});
+				},
+				/**
+				 * android设置旋转角度
+				 * 值参考:0,90,180,270 为null,则为自动设置
+				 * */
+				setRotation() {
+					this.$refs.Camera.setRotation(null);
+				},
+				/**
+				 * android设置相机参数
+				 * 照片和预览分辨率等于0,默认使用从支持分辨率列表中选取合适的分辨率
+				 * 其它等于0的话,不设置这个参数
+				 * */
+				android_setCameraParams() {
+					const res = uni.getSystemInfoSync();
+					var screenBiLi = res.screenWidth / res.screenHeight
+					screenBiLi = Math.floor(screenBiLi * 10) / 10;
+					console.log("screenBiLi:" + screenBiLi)
+
+					//设置最大分辨率
+					this.$refs.Camera.android_getSupportedPictureSizes((PictureSizes) => {
+						this.$refs.Camera.android_getSupportedPreviewSizes((PreviewSizes) => {
+							this.$refs.Camera.android_getSupportedVideoSizes((VideoSizes) => {
+
+								var maxPictureSizesIndex = 0;
+								var maxPictureSizeWidthHeight = 0;
+								for (var i = 0; i < PictureSizes.length; i++) {
+									var item = PictureSizes[i];
+									var PictureSizeBiLi = item.height / item.width;
+									PictureSizeBiLi = Math.floor(PictureSizeBiLi * 10) / 10;
+									console.log("PictureSizeBiLi:" + PictureSizeBiLi)
+									if (PictureSizeBiLi == screenBiLi) {
+										if (maxPictureSizeWidthHeight < item.width * item.height) {
+											maxPictureSizeWidthHeight = item.width * item.height;
+											maxPictureSizesIndex = i;
+										}
+									}
+								}
+
+								var maxPreviewSizesIndex = 0;
+								var maxPreviewSizeWidthHeight = 0;
+								for (var i = 0; i < PreviewSizes.length; i++) {
+									var item = PreviewSizes[i];
+									var PreviewBiLi = item.height / item.width;
+									PreviewBiLi = Math.floor(PreviewBiLi * 10) / 10;
+									console.log("PreviewBiLi:" + PreviewBiLi)
+									if (PreviewBiLi == screenBiLi) {
+										if (maxPreviewSizeWidthHeight < item.width * item.height) {
+											maxPreviewSizeWidthHeight = item.width * item.height;
+											maxPreviewSizesIndex = i;
+										}
+									}
+								}
+
+								var maxVideoSizesIndex = 0;
+								var maxVideoSizesWidthHeight = 0;
+								for (var i = 0; i < VideoSizes.length; i++) {
+									var item = VideoSizes[i];
+									// var PreviewBiLi = item.height / item.width;
+									// PreviewBiLi = Math.floor(PreviewBiLi * 10) / 10;
+									console.log("PreviewBiLi:" + PreviewBiLi)
+									//if (PreviewBiLi == screenBiLi) {
+									if (maxVideoSizesWidthHeight < item.width * item.height) {
+										maxVideoSizesWidthHeight = item.width * item.height;
+										maxVideoSizesIndex = i;
+									}
+									//}
+								}
+
+								var dic = {
+									picSizeWidth: PictureSizes[maxPictureSizesIndex]
+										.width, //照片分辨率宽 从android_getSupportedPictureSizes方法获取
+									picSizeHeight: PictureSizes[maxPictureSizesIndex]
+										.height, //照片分辨率高 从android_getSupportedPictureSizes方法获取
+									jpegQuality: 100, //照片质量 取值1-100
+									preSizeWidth: PreviewSizes[maxPreviewSizesIndex]
+										.width, //预览分辨率宽 从android_getSupportedPreviewSizes方法获取
+									preSizeHeight: PreviewSizes[maxPreviewSizesIndex]
+										.height, //预览分辨率高 从android_getSupportedPreviewSizes方法获取
+									videoSizeWidth: VideoSizes[maxVideoSizesIndex]
+										.width, //视频分辨率宽 从android_getSupportedVideoSizes方法获取
+									videoSizeHeight: VideoSizes[maxVideoSizesIndex]
+										.height, //视频分辨率高 从android_getSupportedVideoSizes方法获取
+									videoEncodingBitRate: 5 * VideoSizes[maxVideoSizesIndex]
+										.width * VideoSizes[maxVideoSizesIndex]
+										.height, //视频编码比特率,如果设置了视频分辨率,这个一定要设置,否则视频不清晰
+								}
+								this.$refs.Camera.android_setCameraParams(dic);
+								console.log(JSON.stringify(dic));
+							});
+						});
+					});
+				}
+			}
+		}
+	</script>
+
+	<style lang="scss">
+		.KJ-Camera {
+			width: 100%;
+			position: fixed;
+			top: 0px;
+			bottom: 0px;
+			left: 0;
+			right: 0;
+		}
+
+		.btn {
+			height: 35px;
+			width: 260px;
 		}
-	}
-</script>
 
-<style lang="scss" scoped>
-.footer{
-		position:fixed;
-		background:#fff;
-		width:100%;
-		bottom:0;
-		left:0;
-		padding:15px 15px 30px;
-		box-sizing: border-box;
-	}
-	.newlyIncreased{
-		width:100%;
-		margin:0 auto;
-		text-align:center;
-		height:46px;
-		line-height: 46px;
-		color:#fff;
-		background:url(../../../static/mine/huozhurenzheng/Mask@3x.png) no-repeat;
-		background-size:100%;
-	}
-</style>
+		.btn-view {
+			position: fixed;
+			bottom: 0;
+			left: 0;
+			right: 0;
+		}
+		.content {
+			background: #F5F6FA;
+			height: 100vh;
+			position: relative;
+		}
+		
+		.row {
+			display: flex;
+			justify-content: center;
+			padding-top: 50px;
+		
+		}
+		
+		.img-video {
+			position: relative;
+			border-radius: 280px;
+			width: 250px;
+			height: 250px;
+			overflow: hidden;
+		}
+		
+		.row2 {
+			display: flex;
+			font-size: 20px;
+			justify-content: center;
+			margin-top: 20px;
+		}
+		
+		.verify-btn {
+			background: #2772FB;
+			font-size: 20px;
+			padding: 10px 0;
+			width: 70%;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			border-radius: 50px;
+			color: white;
+		
+		}
+		
+		.btn {
+			position: absolute;
+			bottom: 0;
+			background: white;
+			width: 100%;
+			display: flex;
+			justify-content: center;
+			padding: 40px 0;
+		}
+		
+		.img {
+			position: absolute;
+			top: 0;
+			bottom: 0;
+			width: 100%;
+			width: 564px;
+			height: 564px;
+			right: 0;
+			left: 0;
+			margin: auto;
+		}
+		
+		.video-content {
+			position: absolute;
+			top: 0;
+			bottom: 0;
+			width: 100%;
+			right: 0;
+			left: 0;
+			// margin: auto;
+		}
+		
+		.video {
+			width: calc(100%);
+			background: #F5F6FA;
+		}
+		
+		.video-btn {
+			width: 100%;
+			display: flex;
+			justify-content: center;
+		}
+		.progressBar {
+			width: 50%;
+			height: 25px;
+			display: block;
+			top: 0;
+			left: 0;
+			bottom: 0;
+			right: 0;
+			// margin: auto;
+			padding: 10px 10px 10px 10px;
+			position: absolute;
+			z-index: 2001;
+			background: rgb(102, 102, 102);
+			color: white;
+			border-radius: 5px;
+		}
+		.text{
+			padding: 20px;
+		}
+	</style>

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

@@ -6,7 +6,7 @@
 			<view @click="goDetailPage('/pages/mine/company/addcompany')" class='add'>去添加</view>
 		</view>
 		<view v-else class='content'>
-			<view class='content1'>所属公司({{company.length}})</view>
+			<!-- <view class='content1'>所属公司({{company.length}})</view> -->
 			<view v-for='item in company' class='wrap'>
 				<view class='flex flex-space-between'>
 					<view>{{item.companyName}}</view>

+ 6 - 6
pages/mine/set.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="content">
-		<view class='avatar'>
+		<view class='avatar'  @click="switchPicture">
 			<image :src="headUrl" class="picture"></image>
 			<view class='setavatar'>
 				<image style='width:39px;height:39px;' src="../../static/mine/set/setavatar.png"></image>
@@ -131,11 +131,11 @@
 				}
 				this.username = this.userInfo.userName
 			},
-			switchPicture() {
-				uni.navigateTo({
-					url: `/pages/user/set_picture`
-				})
-			},
+		switchPicture() {
+			uni.navigateTo({
+				url: `/pages/mine/settings/editAvatar`
+			})
+		},
 			nickname(username) {
 				uni.navigateTo({
 					url: `/pages/user/set_nickname?nickname=${username}`

+ 76 - 14
pages/news/index.vue

@@ -49,6 +49,7 @@
 </template>
 
 <script>
+	var that
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	import {
 		mapState
@@ -61,24 +62,57 @@
 				bgColor: '#317AFE',
 				value: 100,
 				news: [], // 数据列表
-				badgeOffset: [0, -5]
+				badgeOffset: [0, -5],
+				mescroll: null
 			}
 		},
+		onLoad() {
+			that = this
+		},
+		onShow() {
+			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+				reCommonId: this.userInfo.id,
+			}).then(res3 => {
+				if (res3.data) {
+					let name = 'myTip';
+					let value = res3.data
+					if (value == 0) {
+						uni.removeTabBarBadge({
+							index: 2
+						})
+					}
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if (value != 0 && value) {
+						uni.setTabBarBadge({
+							index: 2,
+							text: value + ""
+						})
+					}
+				}
+			})
+				// this.mescroll.resetUpScroll()
+		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo', 'firstAuthentication'])
 		},
 		methods: {
 			rightClick() {
-				console.log(123)
 				uni.showLoading({
-					mask:true,
-					title:'加载中...'
+					title: '加载中',
+					mask: true
 				})
 				this.$request.baseRequest('post', '/newsInfo/api/editAllNewsInfo', {
 						reCommonId: this.userInfo.id,
 					}).then(res => {
-						uni.hideLoading()
 						this.mescroll.resetUpScroll()
+						uni.hideLoading()
+						uni.removeTabBarBadge({
+							index: 2
+						})
+
 					})
 					.catch(res => {
 						uni.$u.toast(res.message);
@@ -86,19 +120,46 @@
 			},
 			read(val) {
 				uni.showLoading({
-					mask:true,
-					title:'加载中...'
+					title: '加载中',
+					mask: true
 				})
 				this.$request.baseRequest('post', '/newsInfo/api/editNewsInfo', {
 						id: val.id,
 					}).then(res => {
-						uni.hideLoading()
 						this.mescroll.resetUpScroll()
+						this.look()
+						uni.hideLoading()
 					})
 					.catch(res => {
 						uni.$u.toast(res.message);
 					});
 			},
+			look(){
+				that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+					reCommonId: this.userInfo.id,
+				}).then(res3 => {
+					
+					if (res3.data||res3.data==0) {
+						let name = 'myTip';
+						let value = res3.data
+						if (value == 0) {
+							uni.removeTabBarBadge({
+								index: 2
+							})
+						}
+						that.$store.commit('$uStore', {
+							name,
+							value
+						});
+						if (value != 0 && value) {
+							uni.setTabBarBadge({
+								index: 2,
+								text: value + ""
+							})
+						}
+					}
+				})
+			},
 			back() {
 				uni.navigateBack({
 
@@ -131,8 +192,7 @@
 						pageSize: page.size,
 						currentPage: page.num,
 					}).then(res => {
-						if (page.num == 1) this.news = [];
-						this.news = this.news.concat(res.data.records); //追加新数据
+						this.news = res.data.records
 						this.mescroll.endBySize(res.data.records.length, res.data.total);
 					})
 					.catch(res => {
@@ -166,10 +226,11 @@
 		// padding: 20rpx;
 		box-sizing: border-box;
 		border-radius: 20rpx;
+		padding-top: 30rpx;
 	}
 
 	.info-item {
-		padding: 30rpx;
+		padding: 0 30rpx 30rpx 30rpx;
 
 		.img {
 			width: 80rpx;
@@ -183,15 +244,16 @@
 		.right {
 			width: 100%;
 			border-bottom: 1px solid #E6E6E6;
+			padding-bottom: 20rpx;
 
 			.row1 {
 				.title {
-					font-size: 28rpx;
+					font-size: 32rpx;
 					color: #000000;
 				}
 
 				.time {
-					font-size: 24rpx;
+					font-size: 32rpx;
 					color: #999999;
 				}
 
@@ -199,7 +261,7 @@
 
 			.row2 {
 				.text {
-					font-size: 24rpx;
+					font-size: 28rpx;
 					color: #999999;
 					width: 500rpx;
 				}

+ 68 - 27
pages/order/index.vue

@@ -116,7 +116,7 @@
 						<!-- <image class="jt-icon" src="@/static/images/order/position.png" mode='widthFix'
 							@click.stop="toMap(good)">
 						</image> -->
-						<view class="start normal" @click.stop="toMap(good)">
+						<view class="start normal look-map" @click.stop="toMap(good)">
 							查看轨迹</view>
 						<view class="stop" @click.stop="accept(good,1)" v-if="good.cargoOwnerStatus=='待接单'">接受
 						</view>
@@ -125,12 +125,12 @@
 						</view>
 						<view class="normal" @click.stop="stop(good)" v-if="good.cargoOwnerStatus=='未装车'">终止</view>
 						<!-- <view class="stop active" @click.stop="stop(good)">终止</view> -->
-						<view class="start normal" @click.stop="confirmLoading(good,1)"
+						<view class="start normal" @click.stop="confirmLoading(good,3)"
 							v-if="good.cargoOwnerStatus=='待确认装车'">确认装车</view>
 						<!-- <view class="start normal" @click.stop="confirmLoading(good,1)">确认装车</view> -->
 						<view class="start normal" v-if="good.cargoOwnerStatus!='待接单'&&good.cargoOwnerStatus!='未装车'">
 							联系客服</view>
-						<view class="start normal" @click.stop="confirmLoading(good,2)"
+						<view class="start normal" @click.stop="confirmLoading(good,4)"
 							v-if="good.cargoOwnerStatus=='待收货'">确认卸车</view>
 						<!-- <view class="start normal" @click.stop="confirmLoading(good,2)">确认卸车</view> -->
 						<view class="normal" @click.stop="stop(good)" v-if="good.cargoOwnerStatus=='已结算'">付款</view>
@@ -300,6 +300,29 @@
 				size: 10,
 				num: 1
 			})
+			that.$request.baseRequest('get', '/newsInfo/unreadMessage', {
+				reCommonId: this.userInfo.id,
+			}).then(res3 => {
+				if (res3.data) {
+					let name = 'myTip';
+					let value = res3.data
+					if (value == 0) {
+						uni.removeTabBarBadge({
+							index: 2
+						})
+					}
+					that.$store.commit('$uStore', {
+						name,
+						value
+					});
+					if (value != 0 && value) {
+						uni.setTabBarBadge({
+							index: 2,
+							text: value + ""
+						})
+					}
+				}
+			})
 		},
 		// onPageScroll(res) {
 		// 	this.scrollTop = res.scrollTop
@@ -368,28 +391,16 @@
 					});
 			},
 			confirmLoading(item, type) {
-				this.$request.baseRequest('post', '//carrierInfo/cargoOwnerLoadingAdd', {
-						id: item.id,
-						loadingFlag: type,
-						flag: 1
-					}).then(res => {
-						if (res.code == 200) {
-							this.$refs.uToast.show({
-								type: 'success',
-								message: "提交成功",
-								complete() {
-									that.upCallback({
-										size: 10,
-										num: 1
-									})
-								}
-							})
-
-						}
-					})
-					.catch(res => {
-						uni.$u.toast(res.message);
-					});
+				this.objData = item
+				this.type = type
+				if (type == 3) {
+					this.alertTitle = '确认装车?'
+					this.confirmText = '确定'
+				} else if (type == 4) {
+					this.alertTitle = '确认卸车?'
+					this.confirmText = '确定'
+				} 
+				this.isShowAlert = true
 				// uni.$u.route('/pages/order/confirmLoading', item);
 			},
 			// confirmUnLoading(item) {
@@ -422,7 +433,6 @@
 				this.isShowAlert = true
 			},
 			confirmClick() {
-				console.log('终止')
 				that.isShowAlert = false
 				if (this.type == 1 || this.type == 2) {
 					let _title = ''
@@ -461,7 +471,34 @@
 						.catch(res => {
 							uni.$u.toast(res.message);
 						});
-				} else {
+				}else if (this.type == 3 || this.type == 4){
+					let _flag=''
+					if (this.type==3) _flag=1
+					if (this.type==4) _flag=2
+					this.$request.baseRequest('post', '/carrierInfo/cargoOwnerLoadingAdd', {
+							id: this.objData.id,
+							loadingFlag: _flag,
+							flag:1
+						}).then(res => {
+							if (res.code == 200) {
+								this.$refs.uToast.show({
+									type: 'success',
+									message: "提交成功",
+									complete() {
+										that.upCallback({
+											size: 10,
+											num: 1
+										})
+									}
+								})
+					
+							}
+						})
+						.catch(res => {
+							uni.$u.toast(res.message);
+						});
+				}
+				 else {
 					this.$request.baseRequest('post', '/orderInfo/api/end', {
 							id: this.id,
 							terminator: 2,
@@ -903,4 +940,8 @@
 		z-index: 99;
 		top: 260rpx;
 	}
+	.look-map{
+		background:#2772FB;
+		color: white;
+	}
 </style>

+ 1 - 1
pages/public/code.vue

@@ -194,7 +194,7 @@
 								that.$store.commit('login', res.data)
 								// that.liangxinLogin()
 								uni.switchTab({
-									url: '/pages/goodSource/index'
+									url: '/pages/order/index'
 								});
 								uni.hideLoading()
 							} else {

+ 1 - 1
pages/public/login.vue

@@ -261,7 +261,7 @@
 							// that.liangxinLogin()
 
 							uni.switchTab({
-								url: '/pages/goodSource/index'
+								url: '/pages/order/index'
 							});
 							uni.hideLoading()
 						} else {

+ 410 - 110
pages/release/editRelease.vue

@@ -12,14 +12,14 @@
 			</view>
 		</view>
 		<view class="content1">
-			<view class="row" @click="selectCargoOwner" v-if="!dataObj.cargoOwner">
-				<view class="left select-sf">选择货主身份</view>
+			<view class="row" @click="selectCargoOwner">
+				<view class="left select-sf">{{dataObj.cargoOwner?dataObj.cargoOwner:'选择货主身份'}}</view>
 				<view class="right">></view>
 			</view>
-			<view class="row" @click="selectCargoOwner" v-if="dataObj.cargoOwner">
+			<!-- 		<view class="row" @click="selectCargoOwner" v-if="dataObj.cargoOwner">
 				<view class="left">{{dataObj.cargoOwner}}</view>
 				<view class="right">></view>
-			</view>
+			</view> -->
 			<u-picker :show="show" :columns="columns" :closeOnClickOverlay='true' @close='selectCargoOwnerClose'
 				@cancel='selectCargoOwnerClose' @confirm='confirmSelectCargoOwner'></u-picker>
 		</view>
@@ -61,6 +61,7 @@
 			<view class="row">
 				<view class="left">距离</view>
 				<input type="text" value="" class="input" placeholder="自动计算" v-model="dataObj.distance" disabled="" />
+				<view>Km</view>
 			</view>
 			<view class="row">
 				<view class="left">货名</view>
@@ -69,7 +70,6 @@
 			</view>
 			<view class="flex row">
 				<view class="left-text">运费计算方式</view>
-				<!-- <u-radio-group v-model="dataDetails.driverSex" placement="row"> -->
 				<u-radio-group placement="row" v-model="dataObj.billingMethod" class="select-type">
 					<u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
 						:label="item.name" :name="item.name" @change="radioChange">
@@ -78,10 +78,10 @@
 			</view>
 			<view class="row">
 				<view class="left">运费单价</view>
-				<view class="right"><input type="text" value="" placeholder="输入运费单价" class="input"
+				<view class="right"><input type="number" value="" placeholder="输入运费单价" class="input"
 						v-model="dataObj.freightPrice" /></view>
 			</view>
-			<view class="row">
+			<view class="row" v-if="dataObj.freightAdvance">
 				<view class="left">该任务申请运费垫付</view>
 				<view class="right">
 					<u-switch v-model="dataObj.freightAdvance" @change="change" size="20"></u-switch>
@@ -102,7 +102,8 @@
 			<view class="row">
 				<view class="left">发货联系人电话</view>
 				<view class="right flex">
-					<input type="text" value="" placeholder="输入发货联系人手机号" class="input" v-model="dataObj.senderPhone" />
+					<input type="number" maxlength="11" value="" placeholder="输入发货联系人手机号" class="input"
+						v-model="dataObj.senderPhone" />
 				</view>
 			</view>
 			<view class="row">
@@ -114,14 +115,15 @@
 			<view class="row">
 				<view class="left">收货联系人电话</view>
 				<view class="right flex">
-					<input type="text" value="" placeholder="输入收货联系人手机号" class="input"
+					<input type="number" maxlength="11" placeholder="输入收货联系人手机号" class="input"
 						v-model="dataObj.receiverPhone" />
 				</view>
 			</view>
 			<view class="row">
 				<view class="left">重量(吨)</view>
 				<view class="right flex">
-					<input type="text" value="" placeholder="输入预计发运重量" class="input" v-model="dataObj.weight" />
+					<input type="text" value="" placeholder="输入预计发运重量" class="number" v-model="dataObj.weight"
+						style="text-align: right;" />
 				</view>
 			</view>
 			<view class="flex row" @click="selectValidityPeriod(0)">
@@ -141,14 +143,14 @@
 			</view>
 			<view class="row flex-space-between row-bgc">
 				<view class="car-row">
-					<input type="text" value="" placeholder="最短不限" class="" v-model="dataObj.carLengthSmall"
+					<input type="number" value="" placeholder="最短不限" class="" v-model="dataObj.carLengthSmall"
 						class="car-input" />
 					<view>m</view>
 				</view>
 
 				<view class="car-line">-</view>
 				<view class="car-row">
-					<input type="text" value="" placeholder="最长不限" class="" v-model="dataObj.carLength"
+					<input type="number" value="" placeholder="最长不限" class="" v-model="dataObj.carLength"
 						class="car-input" />
 					<view>m</view>
 				</view>
@@ -159,13 +161,13 @@
 			</view>
 			<view class="row flex-space-between row-bgc">
 				<view class="car-row">
-					<input type="text" value="" placeholder="最小不限" class="car-input"
+					<input type="number" value="" placeholder="最小不限" class="car-input"
 						v-model="dataObj.loadWeightSmall" />
 					<view>吨</view>
 				</view>
 				<view class="car-line">-</view>
 				<view class="car-row">
-					<input type="text" value="" placeholder="最大不限" class="car-input" v-model="dataObj.loadWeight" />
+					<input type="number" value="" placeholder="最大不限" class="car-input" v-model="dataObj.loadWeight" />
 					<view>吨</view>
 				</view>
 			</view>
@@ -183,13 +185,14 @@
 				<view class="left">任务描述</view>
 			</view>
 			<view class="row">
-				<u--textarea v-model="dataObj.taskDescription" placeholder="请输入内容"></u--textarea>
+				<u--textarea v-model="dataObj.taskDescription" placeholder="请输入内容" :count='true' maxlength='200'>
+				</u--textarea>
 			</view>
 
 
-			<view class="flex row noborder">
+			<view class="flex row noborder" @click="selectValidityPeriodcq">
 				<view class="left-text">任务有效期</view>
-				<view :class="dataObj.taskValidity?'':'select-data'" @click="selectValidityPeriodcq">
+				<view :class="dataObj.taskValidity?'':'select-data'">
 					{{dataObj.taskValidity?dataObj.taskValidity:'选择任务有效期>'}}
 				</view>
 			</view>
@@ -202,6 +205,9 @@
 		<u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
 			:closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
 		</u-picker>
+		<u-modal :show="isShowAlert" :title="alertTitle" :content='alertContent' :closeOnClickOverlay='true'
+			:showCancelButton='true' confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick"
+			@cancel="cancelClick"></u-modal>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -214,12 +220,16 @@
 	export default {
 		data() {
 			return {
+				qyList: [],
+				isShowAlert: false,
+				alertTitle: '确定发布运输任务?',
+				alertContent: null,
 				radioCustomStyle: {
 					margin: '0 0 0 20rpx'
 				},
 				show: false,
 				columns: [
-					['个人货主', '黑龙江中天昊元贸易有限公司', '黑龙江利润元贸易有限公司']
+					[]
 				],
 				dataObj: {
 					commonId: '',
@@ -280,6 +290,9 @@
 				validityPeriod: [],
 				validityPeriodcq: [],
 				isShowValidity: false,
+				dataDetails: {
+					type: '元/车'
+				},
 				radiolist1: [{
 						name: '元/吨',
 						disabled: false
@@ -292,29 +305,12 @@
 				],
 			}
 		},
-		onShow() {
-			// //获取默认收货、发货地
-			// let _faddress = uni.getStorageSync('storage_faddress');
-			// let _saddress = uni.getStorageSync('storage_saddress');
-			// if (_faddress) {
-			// 	this.dataObj.sendCity = _faddress.city
-			// 	this.dataObj.sendArea = _faddress.area
-			// 	this.dataObj.sendPrivate = _faddress.province
-			// 	this.dataObj.sendDetailedAddress = _faddress.detailedAddress
-			// 	this.dataObj.sendLongitude = _faddress.longitude
-			// 	this.dataObj.sendLatitude = _faddress.latitude
-			// }
-			// if (_saddress) {
-			// 	this.dataObj.unloadDetailedAddress = _saddress.detailedAddress
-			// 	this.dataObj.unloadCity = _saddress.city
-			// 	this.dataObj.unloadArea = _saddress.area
-			// 	this.dataObj.unloadPrivate = _saddress.province
-			// 	this.dataObj.unsendLongitude = _saddress.longitude
-			// 	this.dataObj.unsendLatitude = _saddress.latitude
-			// }
+		onShow() {debugger
+			// this.getSFList()
 		},
 		onLoad(options) {
-			
+
+			_this = this;
 			_this = this;
 			this.dataObj = options
 			if (this.dataObj.billingMethod == 1) {
@@ -322,9 +318,9 @@
 			} else {
 				this.dataObj.billingMethod = '元/吨'
 			}
-
+			
 			for (let i = 0; i < this.dataObj.carModel.length; i++) {
-
+			
 				if (this.dataObj.carModel[i] == '1') {
 					this.checkboxValue1.push('不限')
 				} else if (this.dataObj.carModel[i] == '2') {
@@ -340,16 +336,328 @@
 			} else {
 				this.dataObj.freightAdvance = false
 			}
-
-
+			
+			
 			console.log(this.dataObj)
 			this.validityPeriod = this.$helper.makeValidityPeriod(0, '随时')
 			this.validityPeriodcq = this.$helper.makeValidityPeriod(0, '随时')
+
+
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			getSFList() {
+				this.dataObj.commonId = this.userInfo.id
+				this.$request.baseRequest('get', '/cargoOwnerCompInfo/cargoOwnerList', {
+						commonId: this.userInfo.id
+					}).then(res => {
+						if (uni.getStorageSync('releaseCargoOwner')) {
+							this.dataObj.cargoOwner = uni.getStorageSync('releaseCargoOwner')
+						}
+						// 可用企业货主
+						this.qyList = []
+						// 自己法人
+						let _self = res.data.companyInfoList
+						//代理货主
+						let _dlhz = res.data.cargoOwnerCompInfoList
+						for (let i = 0; i < _self.length; i++) {
+							if (_self[i].status == '已认证') {
+								this.qyList.push(_self[i])
+							}
+						}
+
+						for (let i = 0; i < _dlhz.length; i++) {
+							if (_dlhz[i].status == '已认证') {
+								this.qyList.push(_dlhz[i])
+							}
+						}
+						for (let i = 0; i < this.qyList.length; i++) {
+							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({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+
+
+			},
+			validate() {
+				if (uni.$u.test.isEmpty(this.dataObj.cargoOwner)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "货主不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataObj.sendArea)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "发货地区不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataObj.unloadArea)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "收货地区不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataObj.goodsName)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "货名不能为空!",
+					})
+					return true
+				}
+				if (uni.$u.test.isEmpty(this.dataObj.freightPrice)) {
+					this.$refs.uToast.show({
+						type: 'error',
+						message: "运费单价不能为空!",
+					})
+					return true
+				}
+				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) > 2)
+				) {
+					uni.showToast({
+						title: '运费单价输入错误!',
+						duration: 2000,
+						icon: "none",
+					});
+					return true
+				}
+				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) > 2)
+					) {
+						uni.showToast({
+							title: '重量输入错误!',
+							duration: 2000,
+							icon: "none",
+						});
+						return true
+					}
+				}
+				if (this.dataObj.carLengthSmall) {
+					if (this.dataObj.carLengthSmall < 2 || this.dataObj.carLengthSmall > 30) {
+						uni.showToast({
+							title: '最小车长输入错误!',
+							duration: 2000,
+							icon: "none",
+						});
+						return true
+					}
+				}
+				if (this.dataObj.carLength) {
+					if (this.dataObj.carLength < 2 || this.dataObj.carLength > 30) {
+						uni.showToast({
+							title: '最大车长输入错误!',
+							duration: 2000,
+							icon: "none",
+						});
+						return true
+					}
+				}
+				if (this.dataObj.carLengthSmall && this.dataObj.carLength && (this.dataObj.carLengthSmall > this.dataObj
+						.carLength)) {
+					uni.showToast({
+						title: '最小车长应小于最大车长!',
+						duration: 2000,
+						icon: "none",
+					});
+					return true
+				}
+
+				if (this.dataObj.loadWeightSmall) {
+					if (
+						this.dataObj.loadWeightSmall < 0.1 || this.dataObj.loadWeightSmall > 100 || (
+							String(this.dataObj.loadWeightSmall).indexOf('.') != -1 && String(this.dataObj
+								.loadWeightSmall).length -
+							(String(this.dataObj.loadWeightSmall).indexOf(
+								'.') + 1) > 3)
+					) {
+						uni.showToast({
+							title: '最小载重输入错误!',
+							duration: 2000,
+							icon: "none",
+						});
+						return true
+					}
+				}
+				if (this.dataObj.loadWeight) {
+					if (
+						this.dataObj.loadWeight < 0.1 || this.dataObj.loadWeight > 100 || (
+							String(this.dataObj.loadWeight).indexOf('.') != -1 && String(this.dataObj.loadWeight).length -
+							(String(this.dataObj.loadWeight).indexOf(
+								'.') + 1) > 3)
+					) {
+						uni.showToast({
+							title: '最大载重输入错误!',
+							duration: 2000,
+							icon: "none",
+						});
+						return true
+					}
+				}
+				if (this.dataObj.loadWeightSmall && this.dataObj.loadWeight && (this.dataObj.loadWeightSmall > this.dataObj
+						.loadWeight)) {
+					uni.showToast({
+						title: '最小载重应小于最大载重!',
+						duration: 2000,
+						icon: "none",
+					});
+					return true
+				}
+
+
+			},
+			confirmClick() {
+				this.isShowAlert = false
+				if (this.validate()) return
+				if (this.dataObj.billingMethod == '元/吨') {
+					this.dataObj.billingMethod = 0
+				} else {
+					this.dataObj.billingMethod = 1
+				}
+				if (this.dataObj.freightAdvance) {
+					this.dataObj.freightAdvance = 1
+				} else {
+					this.dataObj.freightAdvance = 0
+				}
+				let _list = []
+				for (let i = 0; i < this.checkboxValue1.length; i++) {
+					if (this.checkboxValue1[i] == '不限') {
+						_list.push(1)
+					} else if (this.checkboxValue1[i] == '高栏') {
+						_list.push(2)
+					} else if (this.checkboxValue1[i] == '集装箱') {
+						_list.push(3)
+					} else if (this.checkboxValue1[i] == '自卸车') {
+						_list.push(4)
+					}
+				}
+				this.dataObj.carModel = _list.toString()
+				this.dataObj.commonId = this.userInfo.id
+				this.$request.baseRequest('post', '/publishTaskInfo/api/editTask', this.dataObj).then(res => {
+
+						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: '',
+									sendLatitude: '',
+									unsendLongitude: '',
+									unsendLatitude: '',
+								}
+								_this.checkboxValue1 = ['不限']
+							}
+						})
+
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+
+			},
+			cancelClick() {
+				this.isShowAlert = false
+			},
+			//获取默认发货地、收货地
+			getDefaultPlace(type) {
+				// 0时获取默认发货地址,1时获取默认收货地址 通过选择获取的地址无需获取默认地址
+				uni.showLoading({
+					mask: true,
+					title: '加载中...'
+				})
+				this.$request.baseRequest('get', '/cargoOwnerAddressInfo/addressList', {
+						commonId: this.userInfo.id
+					}).then(res => {
+						for (let i = 0; i < res.data.length; i++) {
+							if (res.data[i].defaultShipment == 1 && type == 0) {
+								this.dataObj.sendCity = res.data[i].city
+								this.dataObj.sendArea = res.data[i].area
+								this.dataObj.sendPrivate = res.data[i].province
+								this.dataObj.sendDetailedAddress = res.data[i].detailedAddress
+								this.dataObj.sendLongitude = res.data[i].longitude
+								this.dataObj.sendLatitude = res.data[i].latitude
+							}
+							if (res.data[i].defaultReceipt == 1 && type == 1) {
+								this.dataObj.unloadDetailedAddress = res.data[i].detailedAddress
+								this.dataObj.unloadCity = res.data[i].city
+								this.dataObj.unloadArea = res.data[i].area
+								this.dataObj.unloadPrivate = res.data[i].province
+								this.dataObj.unsendLongitude = res.data[i].longitude
+								this.dataObj.unsendLatitude = res.data[i].latitude
+							}
+						}
+						if (this.dataObj.sendLatitude && this.dataObj.sendLongitude && this.dataObj.unsendLatitude &&
+							this.dataObj.unsendLongitude) {
+							this.dataObj.distance = this.$helper.getDistance(this.dataObj.unsendLatitude, this.dataObj
+								.unsendLongitude, this.dataObj.sendLatitude, this.dataObj.sendLongitude)
+						}
+						uni.hideLoading()
+
+
+					})
+					.catch(res => {
+						uni.showToast({
+							title: res.message,
+							icon: 'none',
+							duration: 2000
+						})
+					});
+			},
 			changeHandler(e) {
 				const {
 					columnIndex,
@@ -375,48 +683,89 @@
 				this.show = false
 			},
 			confirmSelectCargoOwner(e) {
-				
 				this.dataObj.cargoOwner = e.value[0]
+				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]) {
+						this.dataObj.freightAdvance = this.qyList[i].advanceFreightService == 1 ? true : false
+					}
+				}
+
+				uni.setStorageSync('releaseCargoOwner', this.dataObj.cargoOwner)
 				this.show = false
 			},
 			selectCargoOwner() {
 				this.show = true
 			},
 			selectAddress(type) {
+				// uni.removeStorage({
+				// 	key: 'storage_faddress'
+				// });
+				uni.removeStorage({
+					key: 'storage_saddress'
+				});
 				uni.$u.route('/pages/release/selectAddress', {
 					type: type,
 				});
 			},
 			checkboxChange(n) {
 				console.log('change', n);
+				if (n.length > 1 && n.length < 4 && n.includes('不限')) {
+					n.shift(0)
+				} else if (n.length == 4) {
+					this.checkboxValue1 = n.splice(1, 4)
+				}
 			},
 			selectValidityPeriodcq() {
 				this.isShowcardValidity = true
 			},
 			confirmValidityPeriod(e) {
 				console.log('confirm', e)
-				if (!e.value[1] || !e.value[2]) {
-					this.$refs.uToast.show({
-						type: 'error',
-						message: "日期格式错误,请重新选择!",
-					})
-					return
-				}
-				switch (this.ValidityPeriodType) {
-					case 0:
-						this.dataObj.loadingDateStart = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-						break
-					case 1:
-						this.dataObj.loadingDateEnd = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-						break
+				if (e.value[0] == '随时') {
+					switch (this.ValidityPeriodType) {
+						case 0:
+							this.dataObj.loadingDateStart = e.value[0]
+							break
+						case 1:
+							this.dataObj.loadingDateEnd = e.value[0]
+							break
+					}
+				} else {
+					if (!e.value[1] || !e.value[2]) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "日期格式错误,请重新选择!",
+						})
+						return
+					}
+					switch (this.ValidityPeriodType) {
+						case 0:
+							this.dataObj.loadingDateStart = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+							break
+						case 1:
+							this.dataObj.loadingDateEnd = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+							break
 
+					}
 				}
+
+
 				this.isShowValidity = false
 			},
 			confirmValidityPeriodcq(e) {
 				console.log('confirm', e)
-				this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-
+				if (e.value[0] == '长期') {
+					this.dataObj.taskValidity = e.value[0]
+				} else {
+					if (!e.value[1] || !e.value[2]) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "日期格式错误,请重新选择!",
+						})
+						return
+					}
+					this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+				}
 				this.isShowcardValidity = false
 			},
 			selectValidityPeriod(type) {
@@ -437,56 +786,7 @@
 				this.dataDetails.type = n
 			},
 			submit() {
-				
-				uni.showLoading({
-					mask: true,
-					title: '加载中...'
-				})
-				// 校验没写
-				if (this.dataObj.billingMethod == '元/吨') {
-					this.dataObj.billingMethod = 0
-				} else {
-					this.dataObj.billingMethod = 1
-				}
-				if (this.dataObj.freightAdvance) {
-					this.dataObj.freightAdvance = 1
-				} else {
-					this.dataObj.freightAdvance = 0
-				}
-				let _list = []
-				for (let i = 0; i < this.checkboxValue1.length; i++) {
-					if (this.checkboxValue1 == '不限') {
-						_list.push(1)
-					} else if (this.checkboxValue1 == '高栏') {
-						_list.push(2)
-					} else if (this.checkboxValue1 == '集装箱') {
-						_list.push(3)
-					} else if (this.checkboxValue1 == '自卸车') {
-						_list.push(4)
-					}
-				}
-				this.dataObj.carModel = _list.toString()
-				this.dataObj.commonId = this.userInfo.id
-				this.$request.baseRequest('post', '/publishTaskInfo/api/editTask', this.dataObj).then(res => {
-						
-						uni.hideLoading()
-						this.$refs.uToast.show({
-							type: 'success',
-							message: "发布成功",
-							complete() {
-								this.dataObj = {}
-								uni.$u.route('/pages/release/record');
-							}
-						})
-
-					})
-					.catch(res => {
-						uni.showToast({
-							title: res.message,
-							icon: 'none',
-							duration: 2000
-						})
-					});
+				this.isShowAlert = true;
 			},
 		}
 	}

+ 5 - 5
pages/release/record.vue

@@ -177,13 +177,13 @@
 				if (good.carModel == 1) {
 					_val = '不限'
 				} else {
-					if (good.carModel.includes(2)) {
+					if (good.carModel&&good.carModel.includes(2)) {
 						_val += '高栏/'
 					}
-					if (good.carModel.includes(3)) {
+					if (good.carModel&&good.carModel.includes(3)) {
 						_val += '集装箱/'
 					}
-					if (good.carModel.includes(4)) {
+					if (good.carModel&&good.carModel.includes(4)) {
 						_val += '自卸车'
 					}
 				}
@@ -191,6 +191,7 @@
 			},
 			confirmDel() {
 				let that = this
+					that.isShowAlert = false
 				this.$request.baseRequest('post', '/publishTaskInfo/deleteTask', {
 						id: this.rowObj.id,
 					}).then(res => {
@@ -199,7 +200,7 @@
 								type: 'success',
 								message: "删除成功!",
 								complete() {
-									that.isShowAlert = false
+								
 									that.mescroll.resetUpScroll()
 								}
 							})
@@ -324,7 +325,6 @@
 					title: '加载中...'
 				})
 				this.$request.baseRequest('get', '/publishTaskInfo/selectTask', {
-
 						commonId: this.userInfo.id,
 						searchKeyWord: this.searchKeyWord,
 						searchType: this.searchType,

+ 34 - 22
pages/release/release.vue

@@ -70,7 +70,6 @@
 			</view>
 			<view class="flex row">
 				<view class="left-text">运费计算方式</view>
-				<!-- <u-radio-group v-model="dataDetails.driverSex" placement="row"> -->
 				<u-radio-group placement="row" v-model="dataObj.billingMethod" class="select-type">
 					<u-radio :customStyle="radioCustomStyle" v-for="(item, index) in radiolist1" :key="index"
 						:label="item.name" :name="item.name" @change="radioChange">
@@ -186,13 +185,14 @@
 				<view class="left">任务描述</view>
 			</view>
 			<view class="row">
-				<u--textarea v-model="dataObj.taskDescription" placeholder="请输入内容"></u--textarea>
+				<u--textarea v-model="dataObj.taskDescription" placeholder="请输入内容" :count='true' maxlength='200'>
+				</u--textarea>
 			</view>
 
 
-			<view class="flex row noborder">
+			<view class="flex row noborder" @click="selectValidityPeriodcq">
 				<view class="left-text">任务有效期</view>
-				<view :class="dataObj.taskValidity?'':'select-data'" @click="selectValidityPeriodcq">
+				<view :class="dataObj.taskValidity?'':'select-data'">
 					{{dataObj.taskValidity?dataObj.taskValidity:'选择任务有效期>'}}
 				</view>
 			</view>
@@ -306,7 +306,7 @@
 			}
 		},
 		onShow() {
-			
+
 			console.log("点击发布")
 			if (!_this.hasLogin) {
 				uni.$u.route('/pages/public/login');
@@ -329,14 +329,14 @@
 			this.getSFList()
 		},
 		onLoad(options) {
-			
+
 			_this = this;
 			this.validityPeriod = this.$helper.makeValidityPeriod(0, '随时')
 			this.validityPeriodcq = this.$helper.makeValidityPeriod(0, '长期')
 			let _faddress = uni.getStorageSync('storage_faddress');
 			let _saddress = uni.getStorageSync('storage_saddress');
 			if (_faddress) {
-				
+
 				this.dataObj.sendCity = _faddress.city
 				this.dataObj.sendArea = _faddress.area
 				this.dataObj.sendPrivate = _faddress.province
@@ -367,6 +367,7 @@
 			}
 			this.dataObj.loadingDateStart = '随时'
 			this.dataObj.loadingDateEnd = '随时'
+			this.dataObj.taskValidity = '长期'
 
 
 		},
@@ -466,7 +467,7 @@
 						duration: 2000,
 						icon: "none",
 					});
-					return
+					return true
 				}
 				if (this.dataObj.weight) {
 					if (
@@ -480,7 +481,7 @@
 							duration: 2000,
 							icon: "none",
 						});
-						return
+						return true
 					}
 				}
 				if (this.dataObj.carLengthSmall) {
@@ -500,7 +501,7 @@
 							duration: 2000,
 							icon: "none",
 						});
-						return
+						return true
 					}
 				}
 				if (this.dataObj.carLengthSmall && this.dataObj.carLength && (this.dataObj.carLengthSmall > this.dataObj
@@ -510,7 +511,7 @@
 						duration: 2000,
 						icon: "none",
 					});
-					return
+					return true
 				}
 
 				if (this.dataObj.loadWeightSmall) {
@@ -526,7 +527,7 @@
 							duration: 2000,
 							icon: "none",
 						});
-						return
+						return true
 					}
 				}
 				if (this.dataObj.loadWeight) {
@@ -541,7 +542,7 @@
 							duration: 2000,
 							icon: "none",
 						});
-						return
+						return true
 					}
 				}
 				if (this.dataObj.loadWeightSmall && this.dataObj.loadWeight && (this.dataObj.loadWeightSmall > this.dataObj
@@ -551,13 +552,14 @@
 						duration: 2000,
 						icon: "none",
 					});
-					return
+					return true
 				}
 
 
 			},
 			confirmClick() {
-				this.validate()
+				this.isShowAlert = false
+				if (this.validate()) return
 				if (this.dataObj.billingMethod == '元/吨') {
 					this.dataObj.billingMethod = 0
 				} else {
@@ -588,7 +590,7 @@
 							type: 'success',
 							message: "发布成功",
 							complete() {
-								_this.isShowAlert = false
+								
 								_this.dataObj = {
 									commonId: '',
 									cargoOwner: '',
@@ -736,12 +738,12 @@
 					type: type,
 				});
 			},
-			checkboxChange(n) {debugger
+			checkboxChange(n) {
 				console.log('change', n);
-				if(n.length>1&&n.length<3&&n.includes('不限')){
+				if (n.length > 1 && n.length < 4 && n.includes('不限')) {
 					n.shift(0)
-				}else{
-					
+				} else if (n.length == 4) {
+					this.checkboxValue1 = n.splice(1, 4)
 				}
 			},
 			selectValidityPeriodcq() {
@@ -782,8 +784,18 @@
 			},
 			confirmValidityPeriodcq(e) {
 				console.log('confirm', e)
-				this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
-
+				if (e.value[0] == '长期') {
+					this.dataObj.taskValidity = e.value[0]
+				} else {
+					if (!e.value[1] || !e.value[2]) {
+						this.$refs.uToast.show({
+							type: 'error',
+							message: "日期格式错误,请重新选择!",
+						})
+						return
+					}
+					this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
+				}
 				this.isShowcardValidity = false
 			},
 			selectValidityPeriod(type) {

BIN
static/video-bgc.png


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

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

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

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

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

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

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

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