zhongtianhaoyuan 3 年之前
父節點
當前提交
1d514bcf58
共有 3 個文件被更改,包括 84 次插入76 次删除
  1. 82 74
      pages/mine/cargoowner/editpersonalinformation.vue
  2. 1 1
      pages/mine/settings/editPassword.vue
  3. 1 1
      pages/order/index.vue

+ 82 - 74
pages/mine/cargoowner/editpersonalinformation.vue

@@ -33,7 +33,8 @@
 			<view style='padding:5px 0 10px;border-bottom:1px solid #eee;' class="flex width100">
 				<view style='width:100px;font-size:14px;'>姓名</view>
 				<view class="flex">
-					<u--input @input='nameinput' placeholder="输入姓名" inputAlign='left' border="none" v-model="dataDetails.name">
+					<u--input @input='nameinput' placeholder="输入姓名" inputAlign='left' border="none"
+						v-model="dataDetails.name">
 					</u--input>
 				</view>
 			</view>
@@ -49,13 +50,13 @@
 				<view style='width:100px;font-size:14px;'>称呼</view>
 				<view style="width: 60rpx;">
 					<u--input placeholder="输入姓氏" class="ch-style" inputAlign='left' border="none"
-					v-model="dataDetails.call">
-				</u--input>
+						v-model="dataDetails.call">
+					</u--input>
 				</view>
 				<view class="flex align-center" v-if="dataDetails.sex=='男'">先生</view>
 				<view class="flex align-center" v-else>女士</view>
 			</view>
-			
+
 			<view style='padding:10px 0 5px;border-bottom:1px solid #eee;' class="flex width100">
 				<view style='width:100px;font-size:14px;'>联系电话</view>
 				<view class="flex">
@@ -66,7 +67,8 @@
 			</view>
 			<view class="flex row">
 				<view class="left-text">身份证号</view>
-				<u--input :disabled='dataDetails.id' placeholder="请输入身份证号" inputAlign='left' border="none" v-model="dataDetails.cardNumber">
+				<u--input :disabled='dataDetails.id' placeholder="请输入身份证号" inputAlign='left' border="none"
+					v-model="dataDetails.cardNumber">
 				</u--input>
 			</view>
 
@@ -89,9 +91,9 @@
 
 		<view class="content4">
 			<view style='margin:0 0 18px;font-size:12px;color:#999;' class='flex items-center'>
-				<u--image style='margin-right:5px;' @click='consent'
+				<u--image style='margin-right:5px;margin-top: 4rpx;' @click='consent'
 					:src="checked?'../../../static/mine/duihao@2x.png':'../../../static/mine/wxz.png'" width="12px"
-					height="12px"></u--image>
+					height="12px" ></u--image>
 				我已阅读并同意全部细则
 			</view>
 			<view class='line'></view>
@@ -148,7 +150,7 @@
 					cardBackAddressUrl: '',
 					cardValidityDate: '',
 					driverSex: '男',
-					cardValidityDate:"",
+					cardValidityDate: "",
 				},
 				checked: false,
 				isShowcardValidity: false,
@@ -169,8 +171,8 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
-			nameinput(){
-				this.dataDetails.call=this.dataDetails.name[0]
+			nameinput() {
+				this.dataDetails.call = this.dataDetails.name[0]
 			},
 			// 性别切换
 			radioChange(n) {
@@ -197,12 +199,12 @@
 					_this.savePhoto(e.path);
 				}
 			},
-			delCard(status){
-				if(status==1){
-					this.dataDetails.cardAddressUrl=''
+			delCard(status) {
+				if (status == 1) {
+					this.dataDetails.cardAddressUrl = ''
 					this.$forceUpdate()
-				}else{
-					this.dataDetails.cardBackAddressUrl=''
+				} else {
+					this.dataDetails.cardBackAddressUrl = ''
 					this.$forceUpdate()
 				}
 			},
@@ -263,7 +265,7 @@
 				this.index = index
 				this.imgTypeSelect()
 				// this.isShowimgType = true
-				
+
 			},
 			validate() {
 				if (uni.$u.test.isEmpty(this.dataDetails.name)) {
@@ -273,14 +275,14 @@
 					})
 					return true
 				}
-				if (this.dataDetails.name.length<2||this.dataDetails.name.length>10) {
+				if (this.dataDetails.name.length < 2 || this.dataDetails.name.length > 10) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "姓名输入错误!",
 					})
 					return true
 				}
-				if (this.dataDetails.call.length>4) {
+				if (this.dataDetails.call.length > 4) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "称呼输入错误!",
@@ -301,7 +303,7 @@
 					})
 					return true
 				}
-				if(!this.checked){
+				if (!this.checked) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "请勾选细则!",
@@ -350,59 +352,62 @@
 
 			imgTypeSelect(val) {
 				let that = this
-					uni.chooseImage({
-						count: 1,
-						success: function(res) {
-							console.log(JSON.stringify(res.tempFilePaths));
-							uploadImage("image",res.tempFilePaths[0], 'appData/',
-								result => {
-									// 上传成功回调函数
-									console.log('图片地址', result)
-									
-									switch (that.uploadType) {
-										// 身份正面
-										case 1:
-											that.dataDetails.cardAddressUrl = result
-											// 识别
-											that.$request.baseRequest('get',
-													'/driverInfo/personShibie', {
-														personImg: result,
-														flag:1
-													}).then(res => {
+				uni.chooseImage({
+					count: 1,
+					success: function(res) {
+						console.log(JSON.stringify(res.tempFilePaths));
+						uploadImage("image", res.tempFilePaths[0], 'appData/',
+							result => {
+								// 上传成功回调函数
+								console.log('图片地址', result)
+
+								switch (that.uploadType) {
+									// 身份正面
+									case 1:
+										that.dataDetails.cardAddressUrl = result
+										// 识别
+										that.$request.baseRequest('get',
+												'/driverInfo/personShibie', {
+													personImg: result,
+													flag: 1
+												}).then(res => {
+												if (res.data.recPersonNo) {
 													that.dataDetails.cardNumber = res.data.recPersonNo
-													if (!that.dataDetails.name) {
-														that.dataDetails.name = res.data.recPerson
-													}
-													that.$forceUpdate()
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											break
-											// 身份反面
-										case 2:
-											that.dataDetails.cardBackAddressUrl = result
-											// 识别
-											that.$request.baseRequest('get',
-													'/driverInfo/personShibie', {
-														personImg: result,
-														flag:2
-													}).then(res => {
-														if(res.data.idCardValidity){
-															let date = res.data.idCardValidity.split("-")[1]
-														    that.dataDetails.cardValidityDate = date.replace('.', '-').replace('.', '-')
-														}
-													that.$forceUpdate()
-												})
-												.catch(res => {
-													uni.$u.toast(res.message);
-												});
-											break
-									}
+												}
+												if (res.data.recPerson) {
+													that.dataDetails.name = res.data.recPerson
+												}
+												that.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break
+										// 身份反面
+									case 2:
+										that.dataDetails.cardBackAddressUrl = result
+										// 识别
+										that.$request.baseRequest('get',
+												'/driverInfo/personShibie', {
+													personImg: result,
+													flag: 2
+												}).then(res => {
+												if (res.data.idCardValidity) {
+													let date = res.data.idCardValidity.split("-")[1]
+													that.dataDetails.cardValidityDate = date.replace(
+														'.', '-').replace('.', '-')
+												}
+												that.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
+										break
 								}
-							)
-						}
-					});
+							}
+						)
+					}
+				});
 				// 	switch (this.uploadType) {
 				// 		case 1:
 				// 			uni.$u.route('/pages/mine/camera/idcard/idcard?dotype=idcardface');
@@ -450,15 +455,15 @@
 </script>
 
 <style lang="scss" scoped>
-	
 	// .preview-card-img {
 	// 	/deep/uni-image>div, uni-image>img {
 	// 	    transform: scale(1.5) rotate(-90deg);
 	// 	}
 	// }
-	/deep/.uni-input-input:disabled{
-		background:#fff;
+	/deep/.uni-input-input:disabled {
+		background: #fff;
 	}
+
 	.picture {
 		margin-top: 20rpx;
 		background: #F5F6FA;
@@ -477,6 +482,7 @@
 		margin: 20rpx;
 		padding: 20rpx;
 		border-radius: 20rpx;
+
 		.row-ch {
 			padding-right: 180rpx;
 			box-sizing: border-box;
@@ -527,6 +533,7 @@
 			width: 100%;
 			height: 440rpx;
 			position: relative;
+
 			.text {
 				margin-top: 20rpx;
 			}
@@ -602,7 +609,8 @@
 		height: 80rpx;
 		z-index: 9;
 	}
-	.bz{
+
+	.bz {
 		font-size: 28rpx;
 	}
 </style>

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

@@ -5,7 +5,7 @@
 				<h2 class="Semibold">重置密码</h2>
 			<u--form labelPosition="left" :model="registerData" ref="registerForm" labelWidth="80">
 				<u-form-item label="手机号" prop="phone" borderBottom>
-					<u--input v-model="registerData.phone" border="none" placeholder="请输入手机号码"></u--input>
+					<u--input v-model="registerData.phone" border="none" maxlength="11" placeholder="请输入手机号码"></u--input>
 				</u-form-item>
 			
 				<u-form-item label="验证码" prop="code"borderBottom>

+ 1 - 1
pages/order/index.vue

@@ -142,7 +142,7 @@
 						<view v-if="good.cargoOwnerStatus=='待确认装车'" class="start normal" @click.stop="toDetail(good.id)"
 							>确认装车</view>
 						<!-- <view class="start normal" @click.stop="confirmLoading(good,1)">确认装车</view> -->
-						<view class="start normal" v-if="good.cargoOwnerStatus!='待接单'&&good.cargoOwnerStatus!='未装车'" @click="$helper.contactCustomerService()">
+						<view class="start normal" v-if="good.cargoOwnerStatus!='待接单'&&good.cargoOwnerStatus!='未装车'" @click.stop="$helper.contactCustomerService()">
 							联系客服</view>
 							<view class="start normal" @click.stop="toDetail(good.id)"
 								v-if="good.cargoOwnerStatus=='待收货'">确认卸车</view>