tanxue 2 месяцев назад
Родитель
Сommit
10d98cf467
2 измененных файлов с 25 добавлено и 3 удалено
  1. 1 1
      common/styles/global/components.scss
  2. 24 2
      pages/client/my/myInfo.vue

+ 1 - 1
common/styles/global/components.scss

@@ -50,7 +50,7 @@ view{box-sizing: border-box;}
 
 /***** 富文本处理  *****/
 @mixin ezy-rich-text() {
-	white-space: pre-wrap;
+	white-space: pre-wrap;text-align: justify;
 	div,p,span{margin: 0;padding: 0;}
 	img{max-width: 100%;}
 	

+ 24 - 2
pages/client/my/myInfo.vue

@@ -7,11 +7,12 @@
 		</view>
 		<!-- 头像 -->
 		<view class="user-img-box">
-			<uni-file-picker limit="1" :del-icon="false" disable-preview :auto-upload="false" v-if="data.icon"
+			<uni-file-picker limit="1" :del-icon="false" disable-preview :auto-upload="false"
 				@select="handleSelect" file-mediatype="image" class="phone-file-picker user-file-picker">
 				<img class="head-img" :src="data.icon" v-if="data.icon">
+				<icon class="head-icon-box" v-else></icon>
 			</uni-file-picker>
-			<icon class="head-icon-box" v-else></icon>
+			
 			<!-- <view>图片地址:{{data.icon}}</view> -->
 		</view>
 		<!-- 姓名 -->
@@ -156,6 +157,27 @@
 	}
 
 	function handleUpdate() {
+		let arr = [];
+		if (!data.realName) {
+			arr.push('姓名');
+		}
+		if (!data.userName) {
+			arr.push('电话');
+		}
+		if (!data.icon) {
+			arr.push('头像');
+		}
+		if (!data.idcard) {
+			arr.push('证件号');
+		}
+		if (!data.realName || !data.userName||!data.icon||!data.idcard) {
+			uni.showToast({
+				icon: 'none',
+				title: `请完善${arr.join('、')}信息!`
+			})
+			return;
+		}
+		
 		const opt = {
 			gender: data.gender,
 			icon: data.icon,