Explorar o código

修改个人中心手机号中间四位遮挡

wangchao %!s(int64=3) %!d(string=hai) anos
pai
achega
c7a52e8501

+ 1 - 0
pageD/identity/companyIdentity.vue

@@ -345,6 +345,7 @@
 
 	.btns {
 		background-color: #22C572;
+		color: white;
 	}
 
 	.switchs1 {

+ 2 - 0
pageD/identity/driverIdentityThree.vue

@@ -384,6 +384,8 @@
 
 	.btns {
 		background-color: #22C572;
+		margin-bottom: 30rpx;
+		color: white;
 	}
 
 	.words {

+ 7 - 2
pages/user/user.vue

@@ -19,7 +19,7 @@
 			<image v-bind:src="headUrl" class="headPortrait"></image>
 			<view class="personal">
 				<view @click="toLogin" class="information">{{hasLogin? username : '立即登录' }}</view>
-				<view class="information">{{userphone}}</view>
+				<view class="information">{{starUserphone}}</view>
 			</view>
 
 		</view>
@@ -257,7 +257,12 @@
 		},
 		// #endif
 		computed: {
-			...mapState(['hasLogin', 'userInfo'])
+			...mapState(['hasLogin', 'userInfo']),
+			// 手机号中间4位加*
+			starUserphone(){
+				let reg = /^(\d{3})\d{4}(\d{4})$/;
+				return this.userphone.replace(reg, "$1****$2");
+			}
 		},
 		onShow() {
 			uni.showTabBar()