Преглед на файлове

人才列表、详情添加性别标识

Xiao_123 преди 2 месеца
родител
ревизия
843435b305

+ 20 - 6
pages/index/components/talentItem.vue

@@ -3,7 +3,10 @@
 		<uni-card v-for="(val, index) in items" :key="index" :is-shadow="true" @tap.stop="handleDetail(val)" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
 			<!-- 基本信息 -->
 			<view class="d-flex align-center">
-				<image class="avatar" :src="getUserAvatar(val.avatar, val.sex)" mode="scaleToFill"></image>
+				<view class="user-avatar">
+					<image class="user-avatar-img" :src="getUserAvatar(val.avatar, val.sex)" mode="scaleToFill"></image>
+					<image class="user-avatar-sex" :src="val?.sex ? val?.sex === '1' ? '/static/img/man.png' : '/static/img/female.png' : ''" alt="" mode="scaleToFill" />
+				</view>
 				<view style="flex: 1; margin-left: 10px;">
 					<view class="font-size-18">{{ val.name }}</view>
 					<view class="ss-m-t-10">
@@ -92,10 +95,21 @@ const handleDetail = ({ userId }) => {
 </script>
 
 <style scoped lang="scss">
-.avatar {
-  width: 60px;
-  height: 60px;
-  border-radius: 50%;
-  margin: auto;
+.user-avatar {
+	position: relative;
+	&-img {
+		width: 60px;
+		height: 60px;
+		border-radius: 50%;
+	}
+	&-sex {
+		position: absolute;
+		right: 0;
+		bottom: 2px;
+		width: 20px;
+		height: 20px;
+		background-color: #fff;
+		border-radius: 50%;
+	}
 }
 </style>

+ 22 - 7
pagesB/personnelDetails/components/baseInfo.vue

@@ -1,6 +1,10 @@
 <template>
 	<view>
 		<view class="d-flex">
+			<view class="user-avatar">
+				<image class="user-avatar-img" :src="getUserAvatar(data?.avatar, data?.sex)" alt="" mode="scaleToFill" />
+				<image class="user-avatar-sex" :src="data?.sex ? data?.sex === '1' ? '/static/img/man.png' : '/static/img/female.png' : ''" alt="" mode="scaleToFill" />
+			</view>
 			<view class="user-left">
 				<view class="user-name">{{ data?.name }}</view>
 				<view class="ss-m-t-10">
@@ -14,9 +18,6 @@
 					</span>
 				</view>
 			</view>
-			<view class="user-avatar">
-				<image :src="data?.avatar" alt="" mode="scaleToFill" />
-			</view>
 		</view>
 		<view class="ss-m-t-10">
       <uni-tag 
@@ -34,18 +35,32 @@
 
 <script setup>
 defineProps({ data: Object })
+import { getUserAvatar } from '@/utils/avatar'
 
 const desc = ['jobStatusName', 'eduName', 'expName']
 </script>
 
 <style scoped lang="scss">
-.user-avatar image {
-	width: 65px;
-	height: 65px;
-	border-radius: 50%;
+.user-avatar {
+	position: relative;
+	&-img {
+		width: 65px;
+		height: 65px;
+		border-radius: 50%;
+	}
+	&-sex {
+		position: absolute;
+		right: 0;
+		bottom: 0;
+		width: 20px;
+		height: 20px;
+		background-color: #fff;
+		border-radius: 50%;
+	}
 }
 .user-left {
 	flex: 1;
+	margin-left: 10px;
 	.user-name {
 		font-size: 25px;
 		font-weight: 600;

BIN
static/img/copy/company-fill.png


BIN
static/img/copy/message-fill.png


BIN
static/img/copy/position-fill.png


BIN
static/img/female.png


BIN
static/img/man.png