소스 검색

默认头像

张文飞 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