Files
ks-app-employment-service/pages/mine/mine.vue

472 lines
16 KiB
Vue
Raw Normal View History

2024-11-08 11:55:23 +08:00
<template>
2025-11-04 21:12:12 +08:00
<AppLayout back-gorund-color="#F4F4F4">
2025-10-23 17:16:16 +08:00
<!-- 自定义tabbar -->
<CustomTabBar :currentPage="4" />
2025-10-24 11:34:11 +08:00
<!-- 企业用户信息卡片 -->
2025-10-27 12:39:33 +08:00
<view v-if="userType === 0" class="company-info-card btn-feel" @click="seeDetail">
2025-10-24 11:34:11 +08:00
<view class="company-avatar">
<image class="company-avatar-img" :src="companyInfo.avatar || '/static/icon/company-default.png'"></image>
</view>
<view class="company-details">
<view class="company-name">{{ companyInfo.name || '科里喀什分公司' }}</view>
<view class="company-completeness">信息完整度 {{ companyInfo.completeness || '100%' }}</view>
</view>
<view class="company-arrow">
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
</view>
</view>
<!-- 求职者用户信息卡片 -->
<view v-else class="mine-userinfo btn-feel" @click="seeDetail">
2024-11-18 16:33:37 +08:00
<view class="userindo-head">
2025-05-13 11:10:38 +08:00
<image class="userindo-head-img" v-if="userInfo.sex === '0'" src="/static/icon/boy.png"></image>
2025-03-28 15:19:42 +08:00
<image class="userindo-head-img" v-else src="/static/icon/girl.png"></image>
2024-11-18 16:33:37 +08:00
</view>
<view class="userinfo-ls">
2025-03-28 15:19:42 +08:00
<view class="userinfo-ls-name">{{ userInfo.name || '暂无用户名' }}</view>
<view class="userinfo-ls-resume" v-if="isAbove90(Completion)">
简历完成度 {{ Completion }}建议优化
</view>
<view class="userinfo-ls-resume" v-else>简历完成度 {{ Completion }}</view>
2024-11-18 16:33:37 +08:00
</view>
</view>
2025-05-13 11:10:38 +08:00
<view class="mini-number">
<view class="numbe-item button-click" @click="navTo('/packageA/pages/Intendedposition/Intendedposition')">
<view class="mini-num">{{ counts.applyCount }}</view>
<view class="mini-text">投递</view>
2024-11-18 16:33:37 +08:00
</view>
2025-05-13 11:10:38 +08:00
<view class="numbe-item button-click" @click="navTo('/packageA/pages/collection/collection')">
<view class="mini-num">{{ counts.collectionCount }}</view>
<view class="mini-text">收藏</view>
2024-11-18 16:33:37 +08:00
</view>
2025-05-13 11:10:38 +08:00
<view class="numbe-item button-click" @click="navTo('/packageA/pages/browseJob/browseJob')">
<view class="mini-num">{{ counts.jobReviewCount }}</view>
<view class="mini-text">足迹</view>
2024-11-18 16:33:37 +08:00
</view>
2025-05-13 11:10:38 +08:00
<view class="numbe-item button-click" @click="navTo('/packageA/pages/reservation/reservation')">
<view class="mini-num">{{ counts.fairCollecitonCount }}</view>
<view class="mini-text">预约</view>
2024-11-18 16:33:37 +08:00
</view>
2026-01-27 15:12:05 +08:00
<view class="numbe-item button-click" @click="navTo('/packageA/pages/cancelApplication/cancelApplication')">
<view class="mini-num">{{ counts.applyCencalCount || 0 }}</view>
<view class="mini-text">取消投递</view>
</view>
2024-11-18 16:33:37 +08:00
</view>
2025-05-13 11:10:38 +08:00
<view class="mini-cards">
<view class="card-top btn-feel">
<view class="top-title line_1">
<text>{{ userInfo.name || '暂无用户名' }}</text>
&nbsp;|&nbsp;
<dict-Label dictType="education" :value="userInfo.education"></dict-Label>
</view>
<view class="top-subTitle line_1">
<text v-for="(item, index) in userInfo.jobTitle" :key="index">
&nbsp;{{ item }}&nbsp;
<text v-if="userInfo.jobTitle.length - 1 !== index">|</text>
</text>
</view>
<view class="top-btn button-click" @click="navTo('/packageA/pages/personalInfo/personalInfo')">
修改简历
</view>
</view>
<view class="card-main">
<view class="main-title">服务专区</view>
<view class="main-row btn-feel">
<view class="row-left">
<image class="left-img" src="@/static/icon/server1.png"></image>
<text class="left-text">实名认证</text>
</view>
<view class="row-right">已认证</view>
</view>
<view class="main-row btn-feel" @click="goCa()">
2025-05-13 11:10:38 +08:00
<view class="row-left">
<image class="left-img" src="@/static/icon/server2.png"></image>
<text class="left-text">素质测评</text>
</view>
<view class="row-right">
<uni-icons color="#909090" type="right" size="14"></uni-icons>
</view>
</view>
<view class="main-row btn-feel" @click="goCaAI()">
2025-05-13 11:10:38 +08:00
<view class="row-left">
<image class="left-img" src="@/static/icon/server3.png"></image>
<text class="left-text">AI面试</text>
</view>
<view class="row-right">
<uni-icons color="#909090" type="right" size="14"></uni-icons>
</view>
</view>
2026-02-04 10:49:25 +08:00
<view class="main-row btn-feel" @click="goToMessage()">
<view class="row-left">
<image class="left-img" src="@/static/tabbar/chat4.png"></image>
<text class="left-text">消息</text>
</view>
<view class="row-right">
<uni-icons color="#909090" type="right" size="14"></uni-icons>
</view>
</view>
2025-05-13 11:10:38 +08:00
<view class="main-row btn-feel">
<view class="row-left">
<image class="left-img" src="@/static/icon/server4.png"></image>
<text class="left-text">通知与提醒</text>
</view>
<view class="row-right">已开启</view>
</view>
</view>
2025-10-27 12:39:33 +08:00
<view v-if="userType === 2" class="card-help button-click" @click="goToJobHelper">求职帮</view>
<view class="card-back button-click" @click="logOut">退出登录</view>
2025-05-13 11:10:38 +08:00
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog
mode="base"
title="确定退出登录吗?"
type="info"
:duration="2000"
:before-close="true"
@confirm="confirm"
@close="close"
></uni-popup-dialog>
</uni-popup>
2024-11-18 16:33:37 +08:00
</view>
2025-06-26 08:56:42 +08:00
<template #footer>
2025-10-20 11:05:11 +08:00
<!-- 统一使用系统tabBar -->
2025-06-26 08:56:42 +08:00
</template>
2025-05-13 11:10:38 +08:00
</AppLayout>
2024-11-08 11:55:23 +08:00
</template>
2024-11-18 16:33:37 +08:00
<script setup>
2025-10-27 12:39:33 +08:00
import { reactive, inject, watch, ref, onMounted, onUnmounted, computed } from 'vue';
2025-04-07 09:10:55 +08:00
import { storeToRefs } from 'pinia';
2024-11-18 16:33:37 +08:00
import { onLoad, onShow } from '@dcloudio/uni-app';
const { $api, navTo } = inject('globalFunction');
2025-03-28 15:19:42 +08:00
import useUserStore from '@/stores/useUserStore';
2025-10-23 17:16:16 +08:00
import { tabbarManager } from '@/utils/tabbarManager';
2025-03-28 15:19:42 +08:00
const popup = ref(null);
2025-04-07 09:10:55 +08:00
const { userInfo, Completion } = storeToRefs(useUserStore());
2025-05-13 11:10:38 +08:00
const counts = ref({});
2025-10-24 11:34:11 +08:00
2025-10-27 12:39:33 +08:00
// 获取用户类型,参考首页的实现方式
const userType = computed(() => {
// 优先从store获取如果为空则从缓存获取
const storeIsCompanyUser = userInfo.value?.isCompanyUser;
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
const cachedIsCompanyUser = cachedUserInfo.isCompanyUser;
// 获取用户类型优先使用store中的isCompanyUser如果store中没有使用缓存中的isCompanyUser
// 缓存中的值可能是字符串,需要转换为数值类型
return storeIsCompanyUser !== undefined ? Number(storeIsCompanyUser) : Number(cachedIsCompanyUser);
});
2025-10-24 11:34:11 +08:00
// 企业信息数据
const companyInfo = reactive({
name: '科里喀什分公司',
avatar: '/static/icon/company-avatar.png',
completeness: '100%'
});
2025-03-28 15:19:42 +08:00
function logOut() {
popup.value.open();
}
2025-05-13 11:10:38 +08:00
onShow(() => {
getUserstatistics();
2025-10-23 17:16:16 +08:00
// 更新自定义tabbar选中状态
tabbarManager.updateSelected(4);
2025-05-13 11:10:38 +08:00
});
2025-03-28 15:19:42 +08:00
2025-10-24 16:54:52 +08:00
// 监听退出登录事件,显示微信登录弹窗
onMounted(() => {
uni.$on('showLoginModal', () => {
// 这里可以显示微信登录弹窗
// 由于这个页面没有 WxAuthLogin 组件,我们跳转到首页让首页处理
uni.reLaunch({
url: '/pages/index/index'
});
});
});
onUnmounted(() => {
uni.$off('showLoginModal');
});
2025-03-28 15:19:42 +08:00
function close() {
popup.value.close();
}
function confirm() {
useUserStore().logOut();
2026-04-02 10:55:11 +08:00
// alert('退出登录成功');
// window.location.reload();
2025-03-28 15:19:42 +08:00
}
const isAbove90 = (percent) => parseFloat(percent) < 90;
2025-05-13 11:10:38 +08:00
function getUserstatistics() {
$api.createRequest('/app/user/statistics').then((resData) => {
console.log(resData);
counts.value = resData.data;
});
}
2025-09-29 11:53:10 +08:00
function seeDetail() {
2025-10-27 12:39:33 +08:00
if (userType === 0) {
2025-10-24 11:34:11 +08:00
// 企业用户跳转到企业信息页面
navTo('/pages/mine/company-info');
2025-09-29 11:53:10 +08:00
} else {
2025-10-24 11:34:11 +08:00
// 求职者用户跳转到简历页面
2025-09-29 11:53:10 +08:00
navTo('/packageA/pages/myResume/myResume');
}
}
2025-10-27 12:39:33 +08:00
function goToJobHelper() {
// 跳转到求职者信息补全页面
2026-01-22 18:58:19 +08:00
navTo('/packageA/pages/complete-info/complete-info');
2025-10-27 12:39:33 +08:00
}
// 跳转到素质测评
function goCa(){
let userInfo = uni.getStorageSync('userInfo')
navTo(`/packageCa/search/search?name=${userInfo.name}&userId=${userInfo.idCard}`);
}
// 跳转到AI面试
function goCaAI(){
let userInfo = uni.getStorageSync('userInfo')
navTo(`/packageCa/search/AIAudition?name=${userInfo.name}&userId=${userInfo.idCard}`);
}
2026-02-04 10:49:25 +08:00
// 跳转到消息页面
function goToMessage(){
navTo('/pages/msglog/msglog');
}
2024-11-08 11:55:23 +08:00
</script>
2024-11-18 16:33:37 +08:00
<style lang="stylus" scoped>
2025-05-13 11:10:38 +08:00
.card-top {
transition: transform 0.3s ease;
transform-style: preserve-3d;
}
.card-top.tilt {
transform: perspective(600px) rotateY(8deg) rotateX(4deg);
}
.mini-cards{
2026-03-12 17:10:34 +08:00
padding: 42rpx
2025-05-13 11:10:38 +08:00
.card-top{
background-image: url('@/static/icon/backAI2.png'), linear-gradient(to left, #9E74FD 0%, #256BFA 63%, #4180FF 100%);
background-repeat: no-repeat, no-repeat;
background-position: right top, center;
2026-03-12 17:10:34 +08:00
background-size: 594rpx 318rpx, cover;
padding: 54rpx 54rpx 96rpx 54rpx
border-radius: 30rpx 30rpx 0rpx 0rpx;
2025-05-13 11:10:38 +08:00
position: relative
2025-07-09 15:15:37 +08:00
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
2025-05-13 11:10:38 +08:00
.top-title{
font-weight: 500;
2026-03-12 17:10:34 +08:00
font-size: 48rpx;
2025-05-13 11:10:38 +08:00
color: #FFFFFF;
2025-05-19 12:02:53 +08:00
width: auto;
max-width: 60%;
white-space: nowrap
overflow:visible;
2025-05-13 11:10:38 +08:00
}
.top-subTitle{
2026-03-12 17:10:34 +08:00
margin-top: 12rpx;
2025-05-13 11:10:38 +08:00
font-weight: 500;
2026-03-12 17:10:34 +08:00
font-size: 48rpx;
2025-05-13 11:10:38 +08:00
color: #FFFFFF;
2025-05-19 12:02:53 +08:00
width: auto;
max-width: 60%;
white-space: nowrap
2025-06-26 08:56:42 +08:00
overflow:hidden;
2025-05-19 12:02:53 +08:00
text-overflow: ellipsis;
2025-05-13 11:10:38 +08:00
}
.top-btn{
2026-03-12 17:10:34 +08:00
width: 246rpx;
height: 96rpx;
2025-05-13 11:10:38 +08:00
background: radial-gradient( 0% 24% at 57% 42%, rgba(255,255,255,0) 0%, rgba(255,255,255,0.27) 100%);
2026-03-12 17:10:34 +08:00
box-shadow: 0rpx 12rpx 60rpx 0rpx rgba(210,210,210,0.14);
border-radius: 120rpx 120rpx 120rpx 120rpx;
border: 3rpx solid #D2D2D2;
2025-05-13 11:10:38 +08:00
text-align: center
2026-03-12 17:10:34 +08:00
line-height: 96rpx
2025-05-13 11:10:38 +08:00
font-weight: 500;
2026-03-12 17:10:34 +08:00
font-size: 42rpx;
2025-05-13 11:10:38 +08:00
color: #FFFFFF;
position: absolute
2026-03-12 17:10:34 +08:00
right: 54rpx
top: 75rpx
2025-05-13 11:10:38 +08:00
}
}
.card-main{
2024-11-18 16:33:37 +08:00
background: #FFFFFF;
2026-03-12 17:10:34 +08:00
border-radius: 30rpx 30rpx 30rpx 30rpx;
2025-05-13 11:10:38 +08:00
position: relative;
top: -28rpx
2026-03-12 17:10:34 +08:00
padding: 39rpx 90rpx 0 48rpx
2025-05-13 11:10:38 +08:00
.main-title{
font-weight: 600;
2026-03-12 17:10:34 +08:00
font-size: 48rpx;
2025-05-13 11:10:38 +08:00
color: #000000;
}
.main-row{
display: flex
align-items: center
justify-content: space-between
.row-left{
display: flex
align-items: center
.left-img{
2026-03-12 17:10:34 +08:00
width: 66rpx;
height: 66rpx;
margin: 48rpx 24rpx 48rpx 15rpx
2025-05-13 11:10:38 +08:00
}
.left-text{
2025-07-09 15:15:37 +08:00
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
2025-05-13 11:10:38 +08:00
font-weight: 500;
2026-03-12 17:10:34 +08:00
font-size: 42rpx;
2025-05-13 11:10:38 +08:00
color: #333333;
}
}
.row-right{
color: #6E6E6E;
2026-03-12 17:10:34 +08:00
font-size: 42rpx;
2025-05-13 11:10:38 +08:00
}
}
.main-row:last-child{
margin: 0
}
}
2025-10-27 12:39:33 +08:00
.card-help{
2026-03-12 17:10:34 +08:00
height: 144rpx;
2025-10-27 12:39:33 +08:00
background: #FFFFFF;
2026-03-12 17:10:34 +08:00
border-radius: 30rpx 30rpx 30rpx 30rpx;
2025-10-27 12:39:33 +08:00
text-align: center;
2026-03-12 17:10:34 +08:00
line-height: 144rpx;
font-size: 42rpx;
2025-10-27 12:39:33 +08:00
color: #256BFA;
2026-03-12 17:10:34 +08:00
margin-bottom: 30rpx;
2025-10-27 12:39:33 +08:00
}
2025-05-13 11:10:38 +08:00
.card-back{
2026-03-12 17:10:34 +08:00
height: 144rpx;
2024-11-18 16:33:37 +08:00
background: #FFFFFF;
2026-03-12 17:10:34 +08:00
border-radius: 30rpx 30rpx 30rpx 30rpx;
2025-05-13 11:10:38 +08:00
text-align: center;
2026-03-12 17:10:34 +08:00
line-height: 144rpx
font-size: 42rpx;
2025-05-13 11:10:38 +08:00
color: #256BFA;
}
}
.mini-number{
2026-03-12 17:10:34 +08:00
padding: 36rpx
2025-05-13 11:10:38 +08:00
display: flex
justify-content: space-around
.numbe-item{
display: flex
flex-direction: column
justify-content: center
align-items: center
.mini-num{
2025-07-09 15:15:37 +08:00
font-family: DIN-Medium;
2025-05-13 11:10:38 +08:00
font-weight: 500;
2026-03-12 17:10:34 +08:00
font-size: 69rpx;
2025-05-13 11:10:38 +08:00
color: #333333;
}
.mini-text{
font-weight: 400;
2026-03-12 17:10:34 +08:00
font-size: 42rpx;
2025-05-13 11:10:38 +08:00
color: #6C7282;
}
}
}
.mine-userinfo
display: flex;
justify-content: flex-start;
align-items: center;
2026-03-12 17:10:34 +08:00
padding: 45rpx;
2025-05-13 11:10:38 +08:00
position: relative;
.userindo-head
2026-03-12 17:10:34 +08:00
width: 152rpx;
height: 152rpx;
2025-05-13 11:10:38 +08:00
overflow: hidden
border-radius: 50%
2026-03-12 17:10:34 +08:00
margin-right: 33rpx;
2025-05-13 11:10:38 +08:00
.userindo-head-img
width: 100%;
height: 100%;
.userinfo-ls
2024-11-18 16:33:37 +08:00
display: flex;
flex-direction: column;
2025-05-13 11:10:38 +08:00
align-items: flex-start;
.userinfo-ls-name
2025-07-09 15:15:37 +08:00
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
2025-05-13 11:10:38 +08:00
font-weight: 600;
2026-03-12 17:10:34 +08:00
font-size: 60rpx;
2025-05-13 11:10:38 +08:00
color: #333333;
border-radius: 50%
.userinfo-ls-resume
font-weight: 400;
2026-03-12 17:10:34 +08:00
font-size: 42rpx;
2025-05-13 11:10:38 +08:00
color: #6C7282;
.mine-userinfo::before
position: absolute;
2026-03-12 17:10:34 +08:00
right: 60rpx;
2025-05-13 11:10:38 +08:00
top: 50%;
content: '';
2026-03-12 17:10:34 +08:00
width: 6rpx;
height: 27rpx;
border-radius: 3rpx
2025-05-13 11:10:38 +08:00
background: #A2A2A2;
transform: translate(0, -50%) rotate(-45deg);
.mine-userinfo::after
position: absolute;
2026-03-12 17:10:34 +08:00
right: 60rpx;
top: calc(50% + 2rpx);
2025-05-13 11:10:38 +08:00
content: '';
2026-03-12 17:10:34 +08:00
width: 6rpx;
height: 27rpx;
border-radius: 3rpx
2025-05-13 11:10:38 +08:00
background: #A2A2A2;
transform: rotate(45deg)
2025-10-24 11:34:11 +08:00
// 企业信息卡片样式
.company-info-card {
display: flex;
align-items: center;
2026-03-12 17:10:34 +08:00
padding: 45rpx;
2025-10-24 11:34:11 +08:00
background: #FFFFFF;
2026-03-12 17:10:34 +08:00
margin: 30rpx;
border-radius: 30rpx;
box-shadow: 0 6rpx 30rpx rgba(0, 0, 0, 0.08);
2025-10-24 11:34:11 +08:00
.company-avatar {
2026-03-12 17:10:34 +08:00
width: 150rpx;
height: 150rpx;
2025-10-24 11:34:11 +08:00
border-radius: 50%;
overflow: hidden;
2026-03-12 17:10:34 +08:00
margin-right: 36rpx;
2025-10-24 11:34:11 +08:00
.company-avatar-img {
width: 100%;
height: 100%;
}
}
.company-details {
flex: 1;
.company-name {
2026-03-12 17:10:34 +08:00
font-size: 54rpx;
2025-10-24 11:34:11 +08:00
font-weight: 600;
color: #333333;
2026-03-12 17:10:34 +08:00
margin-bottom: 12rpx;
2025-10-24 11:34:11 +08:00
}
.company-completeness {
2026-03-12 17:10:34 +08:00
font-size: 42rpx;
2025-10-24 11:34:11 +08:00
color: #6C7282;
}
}
.company-arrow {
2026-03-12 17:10:34 +08:00
margin-left: 30rpx;
2025-10-24 11:34:11 +08:00
}
}
2025-06-26 08:56:42 +08:00
</style>