Browse Source

修改用户头像

jwyu 3 years ago
parent
commit
71787d81a6
2 changed files with 5 additions and 3 deletions
  1. 3 2
      pages/user/user.vue
  2. 2 1
      utils/config.js

+ 3 - 2
pages/user/user.vue

@@ -3,9 +3,10 @@
 		<view class="top-box">
 			<view class="flex">
 			<view class="avatar">
-				<open-data type="userAvatarUrl"></open-data>
+				<!-- <open-data type="userAvatarUrl"></open-data> -->
+				<image style="width:100%;height:100%" :src="globalImgUrls.defaultAvatar" mode="aspectFill"/>
 			</view>
-			<view>
+			<view style="padding-top:10rpx">
 				<view class="user-name">{{userInfo.real_name||'--'}}</view>
 				<view class="tel" v-if="userInfo.mobile">{{userInfo.mobile}}</view>
 				<view class="tel" v-else>{{userInfo.email}}</view>

+ 2 - 1
utils/config.js

@@ -28,7 +28,8 @@ const globalImgUrls={
     activityNoAuth:'https://hzstatic.hzinsights.com/static/icon/hzyb/activity_no_auth.png',
     imgSuccess:'https://hzstatic.hzinsights.com/static/icon/hzyb/success_icon.png',
     loginTop:'https://hzstatic.hzinsights.com/static/icon/hzyb/login_top_img.png',
-    idCardExp:'https://hzstatic.hzinsights.com/static/icon/hzyb/idcard_exp.jpg'
+    idCardExp:'https://hzstatic.hzinsights.com/static/icon/hzyb/idcard_exp.jpg',
+    defaultAvatar:'https://hzstatic.hzinsights.com/static/icon/hzyb/default_avatar.png',
 }
 
 // 默认tabbar数据