tanxue il y a 5 jours
Parent
commit
2ba15c4cde
2 fichiers modifiés avec 16 ajouts et 7 suppressions
  1. 12 2
      common/styles/global/pages.scss
  2. 4 5
      pages/client/my/myInfo.vue

+ 12 - 2
common/styles/global/pages.scss

@@ -506,8 +506,8 @@
 .my-info-page{
 .my-info-page{
 	background-color: #f8f9fd;height: 100vh;
 	background-color: #f8f9fd;height: 100vh;
 	.user-img-box{
 	.user-img-box{
-		display: flex;background-color: #fff;margin-bottom: 24rpx;
-		padding: 16rpx;box-sizing: border-box;align-items: center;
+		height: 240rpx;display: flex;background-color: #fff;margin-bottom: 24rpx;position: relative;
+		padding: 16rpx;box-sizing: border-box;align-items: center;justify-content: space-between;
 		.uni-file-picker__container{justify-content: center;border: 0;border-radius: 50%;}
 		.uni-file-picker__container{justify-content: center;border: 0;border-radius: 50%;}
 		.file-picker__box-content{border: 0;border-width: 0 !important;}
 		.file-picker__box-content{border: 0;border-width: 0 !important;}
 		.user-file-picker{
 		.user-file-picker{
@@ -520,6 +520,16 @@
 		.user-title{font-size: 30rpx;color: #333;margin-left: 20rpx;}
 		.user-title{font-size: 30rpx;color: #333;margin-left: 20rpx;}
 		.user-jt-icon{width: 30rpx;height: 30rpx;@include ezy-no-repeat-cover;
 		.user-jt-icon{width: 30rpx;height: 30rpx;@include ezy-no-repeat-cover;
 			transform: rotate(270deg);margin-left: 4rpx;}
 			transform: rotate(270deg);margin-left: 4rpx;}
+		.user-img{
+			max-height: 200rpx;max-width: 160rpx;margin: 0 auto;display: block;
+			position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);
+			z-index: 1;
+			}
+		.user-add-box{
+			width: 200rpx;height: 200rpx;position: absolute;
+			top: 50%;left: 50%;transform: translate(-40%,-50%);
+			border: 2rpx solid #eee;border-radius: 8rpx;font-size: 36rpx;
+		}
 	}
 	}
 	.info-btn{width: 360rpx;margin: 100rpx auto 24rpx;font-size: 30rpx;}
 	.info-btn{width: 360rpx;margin: 100rpx auto 24rpx;font-size: 30rpx;}
 }
 }

+ 4 - 5
pages/client/my/myInfo.vue

@@ -3,12 +3,11 @@
 		<!-- 导航区域 -->
 		<!-- 导航区域 -->
 		<customNavbarVue title="个人信息" :show-back-btn="true" @back="handleBack"></customNavbarVue>
 		<customNavbarVue title="个人信息" :show-back-btn="true" @back="handleBack"></customNavbarVue>
 		<!-- 头像 -->
 		<!-- 头像 -->
-		<view class="user-img-box" >
+		
+		<view class="user-img-box"  @click="openFilePicker">
 			<view class="user-title">头像</view>
 			<view class="user-title">头像</view>
-
-      <img :src="defaultImage1" v-if="!data.images" @click="openFilePicker" />
-      <img v-else :src="data.images" @click="openFilePicker">
-
+			<img  :src="data.images" class="user-img" v-if="data.images">
+			<view class="user-add-box" v-else ></view>
 			<uni-file-picker ref="filePicker" v-show="false" return-type="object" v-model="data.images" :del-icon="false" mode="grid" disable-preview :auto-upload="false"
 			<uni-file-picker ref="filePicker" v-show="false" return-type="object" v-model="data.images" :del-icon="false" mode="grid" disable-preview :auto-upload="false"
 				@select="handleSelect" file-mediatype="image" class="phone-file-picker user-file-picker">
 				@select="handleSelect" file-mediatype="image" class="phone-file-picker user-file-picker">
 			</uni-file-picker>
 			</uni-file-picker>