zhongtianhaoyuan 3 роки тому
батько
коміт
2367c4b766

+ 11 - 3
pages/mine/cargoowner/cargoowner.vue

@@ -34,7 +34,7 @@
 								<u-icon name="arrow-right" color="#7E7E7E" size="10" v-if="datastatus"></u-icon>
 							</view>
 							<view v-else class='flex flex-space-between' style='width:100%;color:#999999;font-size:14px;'>
-								{{phone}}
+								{{starUserphone}}
 								<u-icon name="arrow-right" color="#7E7E7E" size="10"></u-icon>
 							</view>
 						</view>
@@ -112,7 +112,14 @@
 			this.getList()
 		},
 		computed: {
-			...mapState(['hasLogin', 'userInfo']),
+			...mapState(['hasLogin', 'userInfo', "firstAuthentication"]),
+			// 手机号中间4位加*
+			starUserphone() {
+				let reg = /^(\d{3})\d{4}(\d{4})$/;
+				if (this.phone) {
+					return this.phone.replace(reg, "$1****$2");
+				}
+			}
 		},
 		methods: {
 			toEditPage(){
@@ -176,7 +183,8 @@
 								// } else {
 								// 	this.status = true
 								// }
-								this.phone = this.personage.phone.replace(this.personage.phone.substring(3, 7), "****")
+								this.phone = this.personage.phone
+								// this.phone = this.personage.phone.replace(this.personage.phone.substring(3, 7), "****")
 							}
 
 						} else {

+ 4 - 3
pages/mine/cargoowner/editpersonalinformation.vue

@@ -110,6 +110,7 @@
 			@select="imgTypeSelect" @cancel='isShowimgType=false' :closeOnClickOverlay="true" :closeOnClickAction="true"
 			@close="isShowimgType=false">
 		</u-action-sheet>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -269,14 +270,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: "称呼输入错误!",
@@ -290,7 +291,7 @@
 					})
 					return true
 				}
-				if (this.dataDetails.call.length<18) {
+				if (this.dataDetails.cardNumber.length != 18) {
 					this.$refs.uToast.show({
 						type: 'error',
 						message: "身份证号输入错误!",

+ 11 - 10
pages/mine/index.vue

@@ -19,7 +19,7 @@
 							<view v-if='status' class='currectstatus'>已认证</view>
 							<view v-if='!status' class='currectstatus1'>未认证</view>
 						</view>
-						<view class='phone'>{{phone}}</view>
+						<view class='phone'>{{starUserphone}}</view>
 					</view>
 					<view class='information' v-else @click="toLogin">立即登录</view>
 				</view>
@@ -192,11 +192,12 @@
 						} else {
 							this.cargoCall = "女士"
 						}
+					}else{
+						this.userName = this.userInfo.userName
 					}
-
 				})
-				this.phone = this.userInfo.phone ? this.userInfo.phone.replace(this.userInfo.phone.substring(3, 7),
-					"****") : ''
+				// this.phone = this.userInfo.phone ? this.userInfo.phone.replace(this.userInfo.phone.substring(3, 7),"****") : ''
+				this.phone = this.userInfo.phone
 				if (!this.cargoCall) {
 					this.userName = this.userInfo.userName
 				}
@@ -213,12 +214,12 @@
 		computed: {
 			...mapState(['hasLogin', 'userInfo', "firstAuthentication"]),
 			// 手机号中间4位加*
-			// starUserphone() {
-			// 	let reg = /^(\d{3})\d{4}(\d{4})$/;
-			// 	if (this.userphone) {
-			// 		return this.userphone.replace(reg, "$1****$2");
-			// 	}
-			// }
+			starUserphone() {
+				let reg = /^(\d{3})\d{4}(\d{4})$/;
+				if (this.phone) {
+					return this.phone.replace(reg, "$1****$2");
+				}
+			}
 		},
 		methods: {
 			scanCode() {