张文飞 преди 3 години
родител
ревизия
48834460ea
променени са 2 файла, в които са добавени 7 реда и са изтрити 6 реда
  1. 7 6
      components/subComponents/dmMine.vue
  2. BIN
      static/icons/icon_default_head.png

+ 7 - 6
components/subComponents/dmMine.vue

@@ -1,26 +1,27 @@
 <template>
 	<dmDialog ref='popView' :isShowTitle="true" title="我的信息" :isShowClose="true" :isShowConfirm="false" >
 		<view class="content">
-			<image class="img_head" :src="userInfo.head" mode=""></image>
+			<image class="img_head" v-if="userInfo.head" :src="userInfo.head" mode=""></image>
+			<image class="img_head" v-else src="../../static/icons/icon_default_head.png" mode=""></image>
 			<view class="item_info">
 				<text class="info_title">用户名</text>
-				<text class="info_name">{{userInfo.name}}</text>
+				<text class="info_name">{{userInfo.name||'-'}}</text>
 			</view>
 			<view class="item_info">
 				<text class="info_title">性别</text>
-				<text class="info_name">{{userInfo.sex}}</text>
+				<text class="info_name">{{userInfo.sex||'-'}}</text>
 			</view>
 			<view class="item_info">
 				<text class="info_title">手机</text>
-				<text class="info_name">{{userInfo.phone}}</text>
+				<text class="info_name">{{userInfo.phone||'-'}}</text>
 			</view>
 			<view class="item_info">
 				<text class="info_title">证件号</text>
-				<text class="info_name">{{userInfo.cardNo}}</text>
+				<text class="info_name">{{userInfo.cardNo||'-'}}</text>
 			</view>
 			<view class="item_info">
 				<text class="info_title">房间信息</text>
-				<text class="info_name">{{userInfo.room}}</text>
+				<text class="info_name">{{userInfo.room||'-'}}</text>
 			</view>
 			
 		</view>

BIN
static/icons/icon_default_head.png