فهرست منبع

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

wangchao 3 سال پیش
والد
کامیت
c7a52e8501
3فایلهای تغییر یافته به همراه10 افزوده شده و 2 حذف شده
  1. 1 0
      pageD/identity/companyIdentity.vue
  2. 2 0
      pageD/identity/driverIdentityThree.vue
  3. 7 2
      pages/user/user.vue

+ 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()