招聘会模块

This commit is contained in:
2025-11-05 17:21:01 +08:00
parent 2fbd8ade5b
commit 19c48d7c71
9 changed files with 2885 additions and 1615 deletions

View File

@@ -0,0 +1,639 @@
<template>
<view class="job-dialog">
<view class="header-title">
<image :src="`${imgBaseUrl}/jobfair/xb.png`" mode=""></image>
<text>招聘会报名</text>
</view>
<view class="dialog-content">
<view class="detail-item" v-if="type == 2">
<view class="gw-label">选择展区展位</view>
<!-- 展位状态说明 -->
<view class="status-description">
<view class="status-title">
<text>展位状态说明</text>
</view>
<view class="status-item">
<view class="status-color available"></view>
<text class="status-text">未被占用</text>
</view>
<view class="status-item">
<view class="status-color occupied"></view>
<text class="status-text">已被占用</text>
</view>
<view class="status-item">
<view class="status-color pending"></view>
<text class="status-text">待审核占用</text>
</view>
<view class="status-item">
<view class="status-color selected"></view>
<text class="status-text">当前选中</text>
</view>
</view>
<view class="gw-value">
<view class="cd-detail" v-for="(item, index) in areaAndBoothList" :key="index">
<view class="cd-name">{{ item.jobFairAreaName }}</view>
<view class="cd-con">
<view class="cd-con-item" :class="getBoothStatusClass(booth)"
v-for="(booth, boothIndex) in item.boothList" :key="boothIndex"
@click="selectBooth(booth, item.jobFairAreaId)">
<text>{{ booth.jobFairBoothName }}</text>
</view>
</view>
</view>
</view>
</view>
<view class="detail-item">
<view class="gw-label">请选择招聘岗位</view>
<view class="gw-value">
<view class="checkbox-group">
<view class="checkbox-item job-item" v-for="(item, index) in jobList" :key="index"
:class="{ 'checked': checkList.includes(item) }" @click="toggleJobSelection(item)">
<view class="item-checkbox">
<view class="checkbox-icon" :class="{ 'checked': checkList.includes(item) }">
<text v-if="checkList.includes(item)"></text>
</view>
<view class="job-info">
<view class="job-name">{{ item.jobTitle }}</view>
<view class="salary">{{ item.salaryRange }}/</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="detail-item">
<view class="gw-label">请上传招聘海报</view>
<view class="gw-value">
<view v-if="imageUrl">
<image v-if="imageUrl" :src="publicUrl + '/file/file/minio' + imageUrl" class="avatar"
mode="aspectFit" />
<button type="warn" class="del-icon" @click="imageUrl = ''" size="mini">删除</button>
</view>
<view v-else>
<button @click="chooseImage" class="avatar-uploader transparent-btn" type="default">
<view class="avatar-uploader-icon">+</view>
</button>
</view>
</view>
</view>
</view>
<view class="btn-box">
<button style="background: #409EFF;color: #fff;" @click="submitForm">提交</button>
<button type="default" @click="closeDialog">取消</button>
</view>
</view>
</template>
<script setup>
import config from "@/config.js"
import {
ref,
reactive,
onMounted,
nextTick,
watch,
inject
} from 'vue';
const emit = defineEmits(['closePopup']);
import {
createRequest
} from '@/utils/request.js';
const {
$api
} = inject('globalFunction');
// 定义props
const props = defineProps({
// 招聘会类型1线上 2线下
signType: {
type: Number,
default: 1
},
// 报名角色 ent企业 person个人
signRole: {
type: String,
default: 'ent'
},
// 招聘会id
jobFairId: {
type: String,
default: ''
}
});
// 监听props变化
watch(() => props.signType, (newVal) => {
type.value = newVal;
});
// 响应式数据
const checkList = ref([]);
const imageUrl = ref('');
const type = ref('');
const id = ref('');
const jobList = ref([]);
const userId = ref('');
const areaAndBoothList = ref([]);
const jobFairAreaId = ref(null);
const jobFairBoothId = ref(null);
const avatarUploader = ref(null);
// 配置
const publicUrl = config.LCBaseUrl;
const imgBaseUrl = config.imgBaseUrl
const uploadUrl = config.LCBaseUrl + "/file/file/upload";
// 方法
const selectBooth = (booth, jobFairAreaIdVal) => {
if (booth.status == 0) {
jobFairBoothId.value = booth.jobFairBoothId;
jobFairAreaId.value = jobFairAreaIdVal;
}
};
const submitForm = async () => {
if (type.value == "2") {
if (!jobFairBoothId.value || !jobFairAreaId.value) {
uni.showToast({
title: '请选择展区展位',
icon: 'none'
});
return;
}
}
if (checkList.value.length === 0) {
uni.showToast({
title: '请选择招聘岗位',
icon: 'none'
});
return;
}
if (!imageUrl.value) {
uni.showToast({
title: '请上传招聘海报',
icon: 'none'
});
return;
}
$api.myRequest("/system/user/login/user/info", {}, "GET", 10100, {
Authorization: `Bearer ${uni.getStorageSync("Padmin-Token")}`
}).then((userInfo) => {
let data = {}
if (type.value == "2") {
data = {
jobFairId: id.value,
enterpriseId: userInfo.info.userId,
jobInfoList: checkList.value,
poster: imageUrl.value,
jobFairAreaId: jobFairAreaId.value,
jobFairBoothId: jobFairBoothId.value,
code: userInfo.info.entCreditCode
};
} else {
data = {
jobFairId: id.value,
enterpriseId: userInfo.info.userId,
jobInfoList: checkList.value,
poster: imageUrl.value,
code: userInfo.info.entCreditCode
};
}
$api.myRequest("/jobfair/public/job-fair-sign-up-enterprise/sign-up", data, "post", 9100, {
Authorization: `Bearer ${uni.getStorageSync("Padmin-Token")}`
}).then((res) => {
if (res.code === 200) {
uni.showToast({
title: '报名成功',
icon: 'success'
});
closeDialog();
} else {
uni.showToast({
title: res.msg || '报名失败',
icon: 'none'
});
}
});
})
};
const closeDialog = () => {
checkList.value = [];
imageUrl.value = '';
jobFairBoothId.value = null;
jobFairAreaId.value = null;
emit('closePopup')
};
const handleAvatarSuccess = (response) => {
imageUrl.value = response.data.url;
uni.showToast({
title: '海报上传成功',
icon: 'success'
});
};
const showDialog = (dialogType, dialogId) => {
type.value = dialogType;
id.value = dialogId;
nextTick(() => {
getJobList();
if (type.value === "2") {
getAreaAndBoothInfo();
}
});
};
// 展区展位列表
const getAreaAndBoothInfo = () => {
const data = {
jobFairId: props.jobFairId,
}
$api.myRequest("/jobfair/public/jobfair/area-and-booth-info-by-job-fair-id", data, "GET", 9100, {
Authorization: `Bearer ${uni.getStorageSync("Padmin-Token")}`
}).then((resData) => {
areaAndBoothList.value = resData.data || [];
});
};
// 岗位列表
const getJobList = () => {
$api.myRequest("/system/user/login/user/info", {}, "GET", 10100, {
Authorization: `Bearer ${uni.getStorageSync("Padmin-Token")}`
}).then((userInfo) => {
const data = {
jobFairId: id.value,
enterpriseId: userInfo.info.userId,
pageNum: 1,
pageSize: 1000,
code: userInfo.info.entCreditCode
}
$api.myRequest("/jobfair/public/job-info/list", data, "GET", 9100, {
Authorization: `Bearer ${uni.getStorageSync("Padmin-Token")}`
}).then((resData) => {
jobList.value = resData.data.list || [];
});
});
};
const getBoothStatusClass = (booth) => {
const s = booth.status || 0;
if (s == 1) return "cd-con-item-checked";
if (s == 2) return "cd-con-item-review";
if (jobFairBoothId.value && jobFairBoothId.value == booth.jobFairBoothId)
return "cd-con-item-mychecked";
return "";
};
// 选择图片
const chooseImage = () => {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
const tempFilePath = res.tempFilePaths[0];
uploadImage(tempFilePath);
}
});
};
// 上传图片
const uploadImage = (tempFilePath) => {
uni.uploadFile({
url: uploadUrl,
filePath: tempFilePath,
name: 'file',
success: (uploadFileRes) => {
try {
const response = JSON.parse(uploadFileRes.data);
handleAvatarSuccess(response);
} catch (e) {
uni.showToast({
title: '上传失败,请重试',
icon: 'none'
});
}
},
fail: (err) => {
console.error('上传失败:', err);
uni.showToast({
title: '上传失败,请重试',
icon: 'none'
});
}
});
};
// 切换岗位选择
const toggleJobSelection = (item) => {
const index = checkList.value.indexOf(item);
if (index > -1) {
checkList.value.splice(index, 1);
} else {
checkList.value.push(item);
}
};
// 暴露方法给父组件
defineExpose({
showDialog
});
onMounted(() => {
setTimeout(() => {
type.value = props.signType;
if (props.jobFairId) {
id.value = props.jobFairId;
getJobList();
if (props.signType == 2) {
getAreaAndBoothInfo();
}
}
}, 100);
});
// 监听jobFairId变化
watch(() => props.jobFairId, (newVal) => {
if (newVal) {
id.value = newVal;
getJobList();
if (type.value === 2) {
getAreaAndBoothInfo();
}
}
});
</script>
<style lang="scss" scoped>
.del-icon {
margin-left: 30rpx;
}
.btn-box {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
margin-top: 30rpx;
}
.btn-box button {
padding: 0 80rpx;
height: 80rpx;
line-height: 80rpx;
}
.avatar-uploader {
border: 2rpx solid #0983ff;
border-radius: 12rpx;
cursor: pointer;
position: relative;
overflow: hidden;
width: 400rpx;
height: 200rpx;
}
.avatar-uploader-icon {
font-size: 56rpx;
color: #007AFF;
line-height: 200rpx;
text-align: center;
}
.job-dialog {
width: 100%;
height: 100%;
}
.dialog-content {
padding: 0 20rpx;
height: calc(100% - 17vh);
overflow-y: auto;
box-sizing: border-box;
}
.checkbox-group {
width: 100%;
}
.checkbox-item {
display: flex;
align-items: center;
border-bottom: 2rpx solid #b5d3ff;
padding: 30rpx 0;
}
.job-item {
width: 97%;
}
.checkbox-icon {
width: 40rpx;
height: 40rpx;
border: 2rpx solid #ddd;
border-radius: 8rpx;
margin-right: 20rpx;
display: flex;
align-items: center;
justify-content: center;
}
.checkbox-icon.checked {
background-color: #409eff;
border-color: #409eff;
color: white;
}
.job-info {
flex: 1;
display: flex;
justify-content: space-between;
align-items: center;
}
.detail-item {
margin-bottom: 40rpx;
}
.detail-item .gw-label {
font-size: 32rpx;
color: #333333;
margin-bottom: 20rpx;
}
.detail-item .gw-value {
display: flex;
flex-wrap: wrap;
overflow-y: auto;
}
.detail-item .gw-value .cd-detail {
width: 100%;
background: #fff;
border-radius: 20rpx;
margin-bottom: 28rpx;
margin-top: 28rpx;
}
.detail-item .gw-value .cd-detail .cd-name {
background: #d3e8ff;
color: #0076d9;
font-size: 40rpx;
height: 80rpx;
line-height: 80rpx;
padding: 0 40rpx;
border-radius: 16rpx;
overflow: hidden;
position: relative;
}
.detail-item .gw-value .cd-detail .cd-name::after {
content: "";
position: absolute;
left: 0;
top: 0;
width: 10rpx;
height: 100%;
background: #349cfc;
}
.detail-item .gw-value .cd-detail .cd-con {
display: flex;
align-items: center;
flex-wrap: wrap;
padding: 30rpx 40rpx;
gap: 20rpx;
}
.detail-item .gw-value .cd-detail .cd-con .cd-con-item {
width: 80rpx;
height: 80rpx;
background: #67CFA7;
line-height: 80rpx;
text-align: center;
color: #fff;
border: 2rpx solid #ddd;
border-radius: 20rpx;
cursor: pointer;
font-weight: 600;
font-size: 32rpx;
}
.detail-item .gw-value .cd-detail .cd-con .cd-con-item-review {
background-color: #F8BB92;
}
.detail-item .gw-value .cd-detail .cd-con .cd-con-item-checked {
background: #F6A1A1;
}
.detail-item .gw-value .cd-detail .cd-con .cd-con-item-mychecked {
background: #79BEFE;
}
.item-checkbox {
width: 100%;
padding: 0;
display: flex;
align-items: center;
justify-content: space-between;
}
.job-name {
font-size: 32rpx;
color: #409eff;
}
.salary {
font-size: 32rpx;
color: #ff6e27;
font-weight: 600;
}
.header-title {
font-size: 38rpx;
font-weight: 600;
color: #303133;
padding: 20rpx;
padding-bottom: 40rpx;
background: #fff;
display: flex;
align-items: center;
position: sticky;
top: 0;
}
.header-title image {
width: 14rpx;
height: 33rpx;
margin-right: 14rpx;
}
.avatar {
width: 400rpx;
height: 200rpx;
border-radius: 12rpx;
}
/* 展位状态说明样式 */
.status-description {
margin-top: 30rpx;
padding: 20rpx;
background-color: #f5f7fa;
border-radius: 8rpx;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.status-title {
font-weight: bold;
margin-bottom: 16rpx;
width: 100%;
}
.status-item {
width: 43%;
display: flex;
align-items: center;
margin-right: 30rpx;
margin-bottom: 10rpx;
}
.status-color {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.status-color.available {
background-color: #67CFA7;
border: 2rpx solid #ddd;
}
.status-color.occupied {
background-color: #F6A1A1;
}
.status-color.pending {
background-color: #F8BB92;
}
.status-color.selected {
background-color: #79BEFE;
}
.status-text {
margin-right: 16rpx;
}
/* 透明按钮样式 */
.transparent-btn {
background: transparent !important;
border: 2rpx dashed #0983ff !important;
}
</style>

View File

@@ -7,10 +7,7 @@
</template> </template>
<template #headerright> <template #headerright>
<view class="btn mar_ri10"> <view class="btn mar_ri10">
<image <image src="@/static/icon/collect3.png" v-if="!companyInfo.isCollection"></image>
src="@/static/icon/collect3.png"
v-if="!companyInfo.isCollection"
></image>
<image src="@/static/icon/collect2.png" v-else></image> <image src="@/static/icon/collect2.png" v-else></image>
</view> </view>
</template> </template>
@@ -36,11 +33,8 @@
</view> </view>
<view class="expand" @click="expand"> <view class="expand" @click="expand">
<text>{{ isExpanded ? "收起" : "展开" }}</text> <text>{{ isExpanded ? "收起" : "展开" }}</text>
<image <image class="expand-img" :class="{ 'expand-img-active': !isExpanded }" src="@/static/icon/downs.png">
class="expand-img" </image>
:class="{ 'expand-img-active': !isExpanded }"
src="@/static/icon/downs.png"
></image>
</view> </view>
<scroll-view scroll-y class="Detailscroll-view"> <scroll-view scroll-y class="Detailscroll-view">
<view class="views"> <view class="views">
@@ -48,7 +42,8 @@
<template v-if="companyInfo.jobInfoList.length != 0"> <template v-if="companyInfo.jobInfoList.length != 0">
<view v-for="job in companyInfo.jobInfoList" :key="job.id"> <view v-for="job in companyInfo.jobInfoList" :key="job.id">
<!-- @click="navTo(`/packageA/pages/post/post?jobId=${JSON.stringify(job)}`)" --> <!-- @click="navTo(`/packageA/pages/post/post?jobId=${JSON.stringify(job)}`)" -->
<view class="cards" :style="getItemBackgroundStyle('bj2.png')"> <!-- :style="getItemBackgroundStyle('bj2.png')" -->
<view class="cards">
<view class="card-company"> <view class="card-company">
<text class="company">{{ job.jobTitle }}</text> <text class="company">{{ job.jobTitle }}</text>
<view class="salary"> {{ job.salaryRange }}/ </view> <view class="salary"> {{ job.salaryRange }}/ </view>
@@ -68,10 +63,13 @@
</view> </view>
</view> </view>
<view class="card-companyName"> <view class="card-companyName">
<image :src="`${baseUrl}/jobfair/hd.png`" mode=""></image>
{{ job.jobDescription }} {{ job.jobDescription }}
</view> </view>
<view class="deliver-box">
<view class="deliver-btn" @click="deliverResume">
简历投递
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
@@ -83,64 +81,110 @@
</template> </template>
<script setup> <script setup>
import { reactive, inject, watch, ref, onMounted, computed } from "vue"; import {
import { onLoad, onShow } from "@dcloudio/uni-app"; reactive,
import dictLabel from "@/components/dict-Label/dict-Label.vue"; inject,
import config from "@/config.js"; watch,
import { storeToRefs } from "pinia"; ref,
import useLocationStore from "@/stores/useLocationStore"; onMounted,
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore()); computed
const { $api, navTo, vacanciesTo, navBack } = inject("globalFunction"); } from "vue";
const isExpanded = ref(false); import {
const pageState = reactive({ onLoad,
onShow
} from "@dcloudio/uni-app";
import dictLabel from "@/components/dict-Label/dict-Label.vue";
import config from "@/config.js";
import {
storeToRefs
} from "pinia";
import useLocationStore from "@/stores/useLocationStore";
const {
longitudeVal,
latitudeVal
} = storeToRefs(useLocationStore());
const {
$api,
navTo,
vacanciesTo,
navBack
} = inject("globalFunction");
const isExpanded = ref(false);
const pageState = reactive({
page: 0, page: 0,
list: [], list: [],
total: 0, total: 0,
maxPage: 1, maxPage: 1,
pageSize: 10, pageSize: 10,
}); });
const companyInfo = ref({ const companyInfo = ref({
jobInfoList: [], jobInfoList: [],
}); });
const baseUrl = config.imgBaseUrl; const baseUrl = config.imgBaseUrl;
const getItemBackgroundStyle = (imageName) => ({ const getItemBackgroundStyle = (imageName) => ({
backgroundImage: `url(${baseUrl}/jobfair/${imageName})`, backgroundImage: `url(${baseUrl}/jobfair/${imageName})`,
backgroundSize: "100% 100%", // 覆盖整个容器 backgroundSize: "100% 100%", // 覆盖整个容器
backgroundPosition: "center", // 居中 backgroundPosition: "center", // 居中
backgroundRepeat: "no-repeat", backgroundRepeat: "no-repeat",
}); });
onLoad((options) => { onLoad((options) => {
companyInfo.value = JSON.parse(options.job); companyInfo.value = JSON.parse(options.job);
console.log(companyInfo.value, "companyInfo.value"); });
});
function expand() { function expand() {
isExpanded.value = !isExpanded.value; isExpanded.value = !isExpanded.value;
} }
function deliverResume() {
const raw = uni.getStorageSync("Padmin-Token");
const token = typeof raw === "string" ? raw.trim() : "";
const headers = token ? {
Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
} : {};
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData1) => {
if (resData1.code == 200) {
$api.myRequest("/system/user/login/user/info", {}, "GET", 10100, headers).then((resData) => {
$api.myRequest("/jobfair/public/job-fair-person-job/insert", {}, "GET", 9100, {
"Content-Type": "application/json"
}).then((data) => {
if (data && data.code === 200) {
$api.msg("简历投递成功");
} else {
$api.msg((data && data.msg) || "简历投递失败");
}
});
});
} else {
$api.msg('请先登录')
}
});
}
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.btnback { .btnback {
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
} }
.btn { .btn {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
width: 52rpx; width: 52rpx;
height: 52rpx; height: 52rpx;
} }
image { image {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.content { .content {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -223,9 +267,9 @@ image {
transform: rotate(180deg); transform: rotate(180deg);
} }
} }
} }
.Detailscroll-view { .Detailscroll-view {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
background: #F4F4F4; background: #F4F4F4;
@@ -266,16 +310,18 @@ image {
border-radius: 20rpx 20rpx 20rpx 20rpx; border-radius: 20rpx 20rpx 20rpx 20rpx;
margin-top: 22rpx; margin-top: 22rpx;
padding-bottom: 18rpx; padding-bottom: 18rpx;
background: #f2f8fc;
.card-company { .card-company {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: flex-start;
border-bottom: 1rpx solid #c2d7ea;
.company { .company {
font-weight: 600; font-weight: 600;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #207AC7;
} }
.salary { .salary {
@@ -287,14 +333,29 @@ image {
} }
} }
.deliver-box {
width: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
margin-top: 5rpx;
.deliver-btn {
padding: 10rpx 25rpx;
background: #53ACFF;
width: max-content;
color: #fff;
}
}
.card-companyName { .card-companyName {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #fff;
margin-top: 23rpx; margin-top: 23rpx;
display: flex; display: flex;
align-items: center; align-items: center;
image{
image {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
margin-right: 8rpx; margin-right: 8rpx;
@@ -305,11 +366,13 @@ image {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin: 25rpx 0 35rpx; margin: 25rpx 0 35rpx;
image{
image {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
margin-right: 8rpx; margin-right: 8rpx;
} }
.jy { .jy {
background: #D9EDFF; background: #D9EDFF;
color: #0086FF; color: #0086FF;
@@ -319,6 +382,7 @@ image {
background: #FFF1D5; background: #FFF1D5;
color: #FF7F01; color: #FF7F01;
} }
.yd { .yd {
background: #FFD8D8; background: #FFD8D8;
color: #F83A3C; color: #F83A3C;
@@ -349,5 +413,5 @@ image {
} }
} }
} }
} }
</style> </style>

View File

@@ -105,16 +105,23 @@
</view> </view>
<template #footer> <template #footer>
<view class="footer" v-if="hasnext"> <view class="footer" v-if="hasnext">
<view class="btn-wq button-click" :class="{ 'btn-desbel': fairInfo.isCollection }" <view class="btn-wq button-click" :class="{ 'btn-desbel': fairInfo.isSignUp==1 }"
@click="applyExhibitors"> @click="applyExhibitors">
{{ fairInfo.isCollection ? '预约招聘会' : '预约招聘会' }} {{ fairInfo.isSignUp==1 ? '报名' : '报名招聘会' }}
</view> </view>
</view> </view>
</template> </template>
<uni-popup ref="CompanySignPopup" background-color="#fff" :mask-click="false">
<view class="popup-content">
<signDialog v-if="signDialogisshow" :signType="signType" :signRole="signRole"
:jobFairId="fairInfo.jobFairId" @closePopup="closePopup"></signDialog>
</view>
</uni-popup>
</AppLayout> </AppLayout>
</template> </template>
<script setup> <script setup>
import signDialog from '@/components/jobfair/signDialog.vue';
import config from "@/config.js" import config from "@/config.js"
import { import {
reactive, reactive,
@@ -128,7 +135,6 @@
onLoad, onLoad,
onShow onShow
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
import dictLabel from '@/components/dict-Label/dict-Label.vue';
import useLocationStore from '@/stores/useLocationStore'; import useLocationStore from '@/stores/useLocationStore';
const { const {
$api, $api,
@@ -148,6 +154,15 @@
const fairInfo = ref({}); const fairInfo = ref({});
const companyList = ref([]); const companyList = ref([]);
const hasnext = ref(true); const hasnext = ref(true);
const userInfo = ref({});
const signDialogisshow = ref(false)
// 弹窗
const signType = ref(1);
// person个人 ent企业
const signRole = ref('ent');
const CompanySignPopup = ref(null)
const jobFairId = ref(null)
const baseUrl = config.imgBaseUrl const baseUrl = config.imgBaseUrl
const getItemBackgroundStyle = (imageName) => ({ const getItemBackgroundStyle = (imageName) => ({
@@ -157,28 +172,59 @@
backgroundRepeat: 'no-repeat' backgroundRepeat: 'no-repeat'
}); });
onLoad((options) => { onLoad((options) => {
getCompanyInfo(options.jobFairId); jobFairId.value=options.jobFairId
const raw = uni.getStorageSync("Padmin-Token");
const token = typeof raw === "string" ? raw.trim() : "";
const headers = token ? {
Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
} : {};
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
if (resData.code == 200) {
$api.myRequest("/system/user/login/user/info", {}, "GET", 10100, {
Authorization: `Bearer ${uni.getStorageSync("Padmin-Token")}`
}).then((userinfo) => {
userInfo.value = userinfo
getCompanyInfo(userInfo.value.info.userId, options.jobFairId);
});
} else {
getCompanyInfo('', options.jobFairId);
}
});
}); });
function getCompanyInfo(id) { function closePopup() {
// $api.createRequest(`/app/fair/${id}`).then((resData) => { CompanySignPopup.value.close()
// fairInfo.value = resData.data; getCompanyInfo(userInfo.value.info.userId, jobFairId.value)
// companyList.value = resData.data.companyList; }
// hasAppointment();
// }); function getCompanyInfo(userId, id) {
$api.myRequest('/jobfair/public/jobfair/detail', { let data={}
jobFairId: id if (userInfo.value&&userInfo.value.userType == 'ent') {
}).then((resData) => { data={
console.log(resData, 'resData'); jobFairId: id,
enterpriseId: userId,
code:userInfo.value.info.entCreditCode
}
}else if(userInfo.value&&userInfo.value.userType == 'ent'){
data={
jobFairId: id,
personId: userId,
idCard:userInfo.value.info.personCardNo
}
}else{
data={
jobFairId: id,
personId: userId
}
}
$api.myRequest('/jobfair/public/jobfair/detail', data).then((resData) => {
fairInfo.value = resData.data; fairInfo.value = resData.data;
console.log(fairInfo.value, 'fairInfo.value');
// hasAppointment()
}); });
$api.myRequest('/jobfair/public/jobfair/enterprises-with-jobs-by-job-fair-id', { $api.myRequest('/jobfair/public/jobfair/enterprises-with-jobs-by-job-fair-id', {
jobFairId: id jobFairId: id
}).then((resData) => { }).then((resData) => {
companyList.value = resData.data; companyList.value = resData.data;
// hasAppointment()
}); });
}; };
@@ -205,21 +251,56 @@
isExpanded.value = !isExpanded.value; isExpanded.value = !isExpanded.value;
} }
// 取消/收藏岗位 // 报名招聘会
function applyExhibitors() { function applyExhibitors() {
const fairId = fairInfo.value.jobFairId; if (fairInfo.value.isSignUp == 1) {
if (fairInfo.value.isCollection) { $api.msg('请勿重复报名');
// $api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => { return
// getCompanyInfo(fairId); }
// $api.msg('取消预约成功'); const raw = uni.getStorageSync("Padmin-Token");
// }); const token = typeof raw === "string" ? raw.trim() : "";
$api.msg('已预约成功'); const headers = token ? {
Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
} : {};
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
if (resData.code == 200) {
if (userInfo.value.userType == 'ent') {
// 企业
signType.value = fairInfo.value.jobFairType;
signRole.value = userInfo.userType;
signDialogisshow.value = true
CompanySignPopup.value.open()
}else{
$api.myRequest("/jobfair/public/job-fair-sign-up-person/sign-up", {
personId: userInfo.value.info.userId,
jobFairId: jobFairId.value,
idCard:userInfo.value.info.personCardNo
}, "POST", 9100, { "Content-Type": "application/json",...headers }).then((res) => {
if (res.code === 200) {
uni.showToast({
title: '报名成功',
icon: 'success'
});
getCompanyInfo(userInfo.value.info.userId, jobFairId.value)
} else { } else {
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'POST').then((resData) => { uni.showToast({
getCompanyInfo(fairId); title: res.msg || '报名失败',
$api.msg('预约成功'); icon: 'none'
}); });
} }
})
}
} else {
$api.msg('请先登录');
setTimeout(() => {
uni.redirectTo({
url: '/packageB/login'
})
}, 1000)
}
});
} }
function parseDateTime(datetimeStr) { function parseDateTime(datetimeStr) {
@@ -288,6 +369,12 @@
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>
.popup-content {
width: 90vw;
height: 80vh;
position: relative;
}
.btnback { .btnback {
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
@@ -528,6 +615,7 @@
color: #333333; color: #333333;
display: flex; display: flex;
align-items: center; align-items: center;
image { image {
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
@@ -577,7 +665,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 20rpx; margin-right: 20rpx;
image{
image {
width: 22rpx; width: 22rpx;
height: 22rpx; height: 22rpx;
margin-right: 8rpx; margin-right: 8rpx;

View File

@@ -240,6 +240,7 @@ const applicants = ref([
]); ]);
onLoad((option) => { onLoad((option) => {
console.log(option, 'option');
if (option.jobId) { if (option.jobId) {
initLoad(option); initLoad(option);
} }

View File

@@ -1,559 +0,0 @@
<template>
<AppLayout title="" :use-scroll-view="false">
<template #headerleft>
<view class="btnback">
<image src="@/static/icon/back.png" @click="navBack"></image>
</view>
</template>
<view class="content">
<view class="content-top">
<view class="companyinfo-left">
<image src="@/static/icon/companyIcon.png" mode=""></image>
</view>
<view class="companyinfo-right">
<view class="row1 line_2">{{ fairInfo?.name }}</view>
<view class="row2">
<text>{{ fairInfo.location }}</text>
<convert-distance
:alat="fairInfo.latitude"
:along="fairInfo.longitude"
:blat="latitudeVal"
:blong="longitudeVal"
></convert-distance>
</view>
</view>
</view>
<view class="locations">
<image class="location-img" src="/static/icon/mapLine.png"></image>
<view class="location-info">
<view class="info">
<text class="info-title">{{ fairInfo.address }}</text>
<text class="info-text">位置</text>
</view>
</view>
</view>
<view class="conetent-info" :class="{ expanded: isExpanded }">
<view class="info-title">内容描述</view>
<view class="info-desirption">{{ fairInfo.description }}</view>
<!-- <view class="info-title title2">公司地址</view>
<view class="locationCompany"></view> -->
<view class="company-times">
<view class="info-title">内容描述</view>
<view class="card-times">
<view class="time-left">
<view class="left-date">{{ parseDateTime(fairInfo.startTime).time }}</view>
<view class="left-dateDay">{{ parseDateTime(fairInfo.startTime).date }}</view>
</view>
<view class="line"></view>
<view class="time-center">
<view class="center-date">
{{ getTimeStatus(fairInfo.startTime, fairInfo.endTime).statusText }}
</view>
<view class="center-dateDay">
{{ getHoursBetween(fairInfo.startTime, fairInfo.endTime) }}小时
</view>
</view>
<view class="line"></view>
<view class="time-right">
<view class="left-date">{{ parseDateTime(fairInfo.endTime).time }}</view>
<view class="left-dateDay">{{ parseDateTime(fairInfo.endTime).date }}</view>
</view>
</view>
</view>
</view>
<view class="expand" @click="expand">
<text>{{ isExpanded ? '收起' : '展开' }}</text>
<image
class="expand-img"
:class="{ 'expand-img-active': !isExpanded }"
src="@/static/icon/downs.png"
></image>
</view>
<scroll-view scroll-y class="Detailscroll-view">
<view class="views">
<view class="Detail-title">
<text class="title">参会单位{{ companyList.length }}</text>
</view>
<renderCompanys
v-if="companyList.length"
:list="companyList"
:longitude="longitudeVal"
:latitude="latitudeVal"
></renderCompanys>
<empty v-else pdTop="200"></empty>
</view>
</scroll-view>
</view>
<template #footer>
<view class="footer" v-if="hasnext">
<view
class="btn-wq button-click"
:class="{ 'btn-desbel': fairInfo.isCollection }"
@click="applyExhibitors"
>
{{ fairInfo.isCollection ? '已预约招聘会' : '预约招聘会' }}
</view>
</view>
</template>
</AppLayout>
</template>
<script setup>
import point from '@/static/icon/point.png';
import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import dictLabel from '@/components/dict-Label/dict-Label.vue';
import useLocationStore from '@/stores/useLocationStore';
const { $api, navTo, vacanciesTo, navBack } = inject('globalFunction');
import { storeToRefs } from 'pinia';
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
const isExpanded = ref(false);
const fairInfo = ref({});
const companyList = ref([]);
const hasnext = ref(true);
onLoad((options) => {
getCompanyInfo(options.jobFairId);
});
function getCompanyInfo(id) {
$api.createRequest(`/app/fair/${id}`).then((resData) => {
fairInfo.value = resData.data;
companyList.value = resData.data.companyList;
hasAppointment();
});
}
const hasAppointment = () => {
const isTimePassed = (timeStr) => {
const targetTime = new Date(timeStr.replace(/-/g, '/')).getTime(); // 兼容格式
const now = Date.now();
return now < targetTime;
};
hasnext.value = isTimePassed(fairInfo.value.startTime);
};
function openMap(lat, lng, name = '位置') {
const isConfirmed = window.confirm('是否打开地图查看位置?');
if (!isConfirmed) return;
// 使用高德地图或百度地图的 H5 链接打开
const url = `https://uri.amap.com/marker?position=${lng},${lat}&name=${encodeURIComponent(name)}`;
window.location.href = url;
}
function expand() {
isExpanded.value = !isExpanded.value;
}
// 取消/收藏岗位
function applyExhibitors() {
const fairId = fairInfo.value.jobFairId;
if (fairInfo.value.isCollection) {
// $api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
// getCompanyInfo(fairId);
// $api.msg('取消预约成功');
// });
$api.msg('已预约成功');
} else {
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'POST').then((resData) => {
getCompanyInfo(fairId);
$api.msg('预约成功');
});
}
}
function toIOSDate(input) {
if (!input) return null;
if (input instanceof Date) return isNaN(input.getTime()) ? null : input;
if (typeof input === 'number') {
const d = new Date(input);
return isNaN(d.getTime()) ? null : d;
}
if (typeof input !== 'string') return null;
let s = input.trim();
if (/^\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}(:\d{2})?$/.test(s)) {
s = s.replace(' ', 'T');
if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(s)) {
s = s + ':00';
}
}
const d = new Date(s);
return isNaN(d.getTime()) ? null : d;
}
function parseDateTime(datetimeStr) {
if (!datetimeStr) return { time: '', date: '' };
const dateObj = toIOSDate(datetimeStr);
if (isNaN(dateObj.getTime())) return { time: '', date: '' }; // 无效时间
const year = dateObj.getFullYear();
const month = String(dateObj.getMonth() + 1).padStart(2, '0');
const day = String(dateObj.getDate()).padStart(2, '0');
const hours = String(dateObj.getHours()).padStart(2, '0');
const minutes = String(dateObj.getMinutes()).padStart(2, '0');
return {
time: `${hours}:${minutes}`,
date: `${year}${month}${day}`,
};
}
function getTimeStatus(startTimeStr, endTimeStr) {
const now = new Date();
const startTime = toIOSDate(startTimeStr);
const endTime = toIOSDate(endTimeStr);
if (!startTime || !endTime) {
return { status: 1, statusText: '时间异常' };
}
let status = 0;
let statusText = '开始中';
if (now < startTime) {
status = 2;
statusText = '待开始';
} else if (now > endTime) {
status = 1;
statusText = '已过期';
} else {
status = 0;
statusText = '进行中';
}
return { status, statusText };
}
function getHoursBetween(startTimeStr, endTimeStr) {
const start = toIOSDate(startTimeStr);
const end = toIOSDate(endTimeStr);
if (!start || !end) return 0;
const diffMs = end - start;
const diffHours = diffMs / (1000 * 60 * 60);
return +diffHours.toFixed(2);
}
</script>
<style lang="stylus" scoped>
.btnback{
width: 64rpx;
height: 64rpx;
}
.btn {
display: flex;
justify-content: space-between;
align-items: center;
width: 52rpx;
height: 52rpx;
}
image {
height: 100%;
width: 100%;
}
.content{
height: 100%
display: flex;
flex-direction: column
.content-top{
padding: 28rpx
padding-top: 50rpx
display: flex
flex-direction: row
flex-wrap: nowrap
.companyinfo-left{
width: 96rpx;
height: 96rpx;
margin-right: 24rpx
}
.companyinfo-right{
flex: 1
.row1{
font-weight: 500;
font-size: 32rpx;
color: #333333;
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
}
.row2{
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
line-height: 45rpx;
display: flex
justify-content: space-between
}
}
}
.locations{
padding: 0 28rpx
height: 86rpx;
position: relative
margin-bottom: 36rpx
.location-img{
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 2rpx solid #EFEFEF;
}
.location-info{
position: absolute
top: 0
left: 0
width: 100%
height: 100%
.info{
padding: 0 60rpx
height: 100%
display: flex
align-items: center
justify-content: space-between
white-space: nowrap
padding-top: rpx
.info-title{
font-weight: 600;
font-size: 28rpx;
color: #333333;
}
.info-text{
font-weight: 400;
font-size: 28rpx;
color: #9B9B9B;
position: relative;
padding-right: 20rpx
}
.info-text::before{
position: absolute;
right: 0;
top: 50%;
content: '';
width: 4rpx;
height: 16rpx;
border-radius: 2rpx
background: #9B9B9B;
transform: translate(0, -75%) rotate(-45deg)
}
.info-text::after {
position: absolute;
right: 0;
top: 50%;
content: '';
width: 4rpx;
height: 16rpx;
border-radius: 2rpx
background: #9B9B9B;
transform: translate(0, -25%) rotate(45deg)
}
}
}
}
.conetent-info{
padding: 0 28rpx
overflow: hidden;
max-height: 0rpx;
transition: max-height 0.3s ease;
.info-title{
font-weight: 600;
font-size: 28rpx;
color: #000000;
}
.info-desirption{
margin-top: 12rpx
font-weight: 400;
font-size: 28rpx;
color: #495265;
text-align: justified;
}
.title2{
margin-top: 48rpx
}
}
.company-times{
padding-top: 40rpx
.info-title{
font-weight: 600;
font-size: 28rpx;
color: #000000;
}
}
.expanded {
max-height: 1000rpx; // 足够显示完整内容
}
.expand{
display: flex
flex-wrap: nowrap
white-space: nowrap
justify-content: center
margin-bottom: 46rpx
font-weight: 400;
font-size: 28rpx;
color: #256BFA;
.expand-img{
width: 40rpx;
height: 40rpx;
}
.expand-img-active{
transform: rotate(180deg)
}
}
}
.Detailscroll-view{
flex: 1;
overflow: hidden;
background: #F4F4F4;
.views{
padding: 28rpx
.Detail-title{
font-weight: 600;
font-size: 32rpx;
color: #000000;
position: relative;
display: flex
justify-content: space-between
.title{
position: relative;
z-index: 2;
}
}
.Detail-title::before{
position: absolute
content: '';
left: -14rpx
bottom: 0
height: 16rpx;
width: 108rpx;
background: linear-gradient(to right, #CBDEFF, #FFFFFF);
border-radius: 8rpx;
z-index: 1;
}
.cards{
padding: 32rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
border-radius: 20rpx 20rpx 20rpx 20rpx;
margin-top: 22rpx;
.card-company{
display: flex
justify-content: space-between
align-items: flex-start
.company{
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
.salary{
font-weight: 500;
font-size: 28rpx;
color: #4C6EFB;
white-space: nowrap
line-height: 48rpx
}
}
.card-companyName{
font-weight: 400;
font-size: 28rpx;
color: #6C7282;
}
.card-tags{
display: flex
flex-wrap: wrap
.tag{
width: fit-content;
height: 30rpx;
background: #F4F4F4;
border-radius: 4rpx;
padding: 6rpx 20rpx;
line-height: 30rpx;
font-weight: 400;
font-size: 24rpx;
color: #6C7282;
text-align: center;
margin-top: 14rpx;
white-space: nowrap
margin-right: 20rpx
}
}
.card-bottom{
margin-top: 32rpx
display: flex
justify-content: space-between
font-size: 28rpx;
color: #6C7282;
}
}
}
}
.card-times{
display: flex;
justify-content: space-between
align-items: center
padding: 24rpx 30rpx 10rpx 30rpx
.time-left,
.time-right{
text-align: center
.left-date{
font-weight: 500;
font-size: 48rpx;
color: #333333;
}
.left-dateDay{
font-weight: 400;
font-size: 24rpx;
color: #333333;
margin-top: 12rpx
}
}
.line{
width: 40rpx;
height: 0rpx;
border: 2rpx solid #D4D4D4;
margin-top: 64rpx
}
.time-center{
text-align: center;
display: flex
flex-direction: column
justify-content: center
align-items: center
.center-date{
font-weight: 400;
font-size: 28rpx;
color: #FF881A;
padding-top: 10rpx
}
.center-dateDay{
font-weight: 400;
font-size: 24rpx;
color: #333333;
margin-top: 6rpx
line-height: 48rpx;
width: 104rpx;
height: 48rpx;
background: #F9F9F9;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
}
.footer{
background: #FFFFFF;
box-shadow: 0rpx -4rpx 24rpx 0rpx rgba(11,44,112,0.12);
border-radius: 0rpx 0rpx 0rpx 0rpx;
padding: 40rpx 28rpx 20rpx 28rpx
.btn-wq{
height: 90rpx;
background: #256BFA;
border-radius: 12rpx 12rpx 12rpx 12rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
line-height: 90rpx
}
.btn-desbel{
background: #6697FB;
box-shadow: 0rpx -4rpx 24rpx 0rpx rgba(11,44,112,0.12);
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -350,7 +350,8 @@
"root": "packageB", "root": "packageB",
"pages": [ "pages": [
{ {
"path" : "jobFair/detail", // 我参与的招聘会详情
"path" : "jobFair/detailCom",
"style" : "style" :
{ {
"navigationBarTitleText" : "招聘会详情", "navigationBarTitleText" : "招聘会详情",

View File

@@ -4,73 +4,37 @@
<!-- 顶部头部区域 --> <!-- 顶部头部区域 -->
<view class="container-header"> <view class="container-header">
<view class="header-top"> <view class="header-top">
<view <view class="header-btnLf button-click" @click="seemsg(1)" :class="{ active: state.current === 1 }">
class="header-btnLf button-click"
@click="seemsg(1)"
:class="{ active: state.current === 1 }"
>
线上招聘会 线上招聘会
</view> </view>
<view <view class="header-btnLf button-click" @click="seemsg(2)" :class="{ active: state.current === 2 }">
class="header-btnLf button-click"
@click="seemsg(2)"
:class="{ active: state.current === 2 }"
>
线下招聘会 线下招聘会
</view> </view>
<view <view class="header-btnLf button-click" @click="seemsg(3)" :class="{ active: state.current === 3 }">
class="header-btnLf button-click"
@click="seemsg(3)"
:class="{ active: state.current === 3 }"
>
我参与的 我参与的
</view> </view>
<view <view class="header-btnLf button-click" @click="navTo('/packageB/login')">
class="header-btnLf button-click"
@click="navTo('/packageB/login')"
>
登录 登录
</view> </view>
</view> </view>
<view class="header-input btn-feel"> <view class="header-input btn-feel">
<uni-icons <uni-icons class="iconsearch" color="#666666" type="search" size="18"
class="iconsearch" @click="getFair('refresh')"></uni-icons>
color="#666666" <input class="input" placeholder="招聘会" placeholder-class="inputplace"
type="search" v-model="pageState.jobFairTitle" />
size="18"
@click="getFair('refresh')"
></uni-icons>
<input
class="input"
placeholder="招聘会"
placeholder-class="inputplace"
v-model="pageState.jobFairTitle"
/>
</view> </view>
</view> </view>
<!-- 主体内容区域 --> <!-- 主体内容区域 -->
<view class="container-main"> <view class="container-main">
<scroll-view <scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
scroll-y
class="main-scroll"
@scrolltolower="handleScrollToLower"
>
<view class="cards" v-if="fairList.length"> <view class="cards" v-if="fairList.length">
<view <view class="card press-button" v-for="(item, index) in fairList" :key="index"
class="card press-button" @click="goDetail(item.jobFairId)">
v-for="(item, index) in fairList"
:key="index"
@click="
navTo(
'/packageA/pages/exhibitors/exhibitors?jobFairId=' +
item.jobFairId
)
"
>
<view class="card-title"> <view class="card-title">
{{ item.jobFairTitle }} {{ item.jobFairTitle }}
<view class="center-date" :style="{ color: getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).color }"> <view class="center-date"
:style="{ color: getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).color,borderColor: getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).color }">
{{ getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).statusText }} {{ getTimeStatus(item.jobFairStartTime, item.jobFairEndTime).statusText }}
</view> </view>
</view> </view>
@@ -79,38 +43,31 @@
</view> </view>
<view class="card-times"> <view class="card-times">
<view class="time-left"> <view class="time-left">
<view class="left-date">{{ <view class="left-date">
parseDateTime(item.jobFairStartTime).time {{parseDateTime(item.jobFairStartTime).time}}
}}</view> </view>
<view class="left-dateDay">{{ <view class="left-dateDay">
parseDateTime(item.jobFairStartTime).date {{parseDateTime(item.jobFairStartTime).date}}
}}</view> </view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="time-center"> <view class="time-center">
<view class="center-dateDay"> <view class="center-dateDay">
{{ {{getHoursBetween(item.jobFairStartTime,item.jobFairEndTime)}}小时
getHoursBetween(
item.jobFairStartTime,
item.jobFairEndTime
)
}}小时
</view> </view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="time-right"> <view class="time-right">
<view class="left-date">{{ <view class="left-date">
parseDateTime(item.jobFairEndTime).time {{parseDateTime(item.jobFairEndTime).time}}
}}</view> </view>
<view class="left-dateDay">{{ <view class="left-dateDay">
parseDateTime(item.jobFairEndTime).date {{parseDateTime(item.jobFairEndTime).date}}
}}</view> </view>
</view> </view>
</view> </view>
<view class="recommend-card-line"></view> <view class="recommend-card-line"></view>
<view class="card-footer" <view class="card-footer">内容简介{{ item.jobFairIntroduction || "暂无" }}</view>
>内容简介{{ item.jobFairIntroduction || "暂无" }}</view
>
</view> </view>
</view> </view>
<empty v-else pdTop="200"></empty> <empty v-else pdTop="200"></empty>
@@ -120,44 +77,62 @@
<CustomTabBar :currentPage="1" /> <CustomTabBar :currentPage="1" />
<!-- 微信授权登录弹窗 --> <!-- 微信授权登录弹窗 -->
<WxAuthLogin <WxAuthLogin ref="wxAuthLoginRef" @success="handleLoginSuccess"></WxAuthLogin>
ref="wxAuthLoginRef"
@success="handleLoginSuccess"
></WxAuthLogin>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { reactive, inject, watch, ref, onMounted, onUnmounted } from "vue"; import {
import { onLoad, onShow } from "@dcloudio/uni-app"; reactive,
import useLocationStore from "@/stores/useLocationStore"; inject,
import { storeToRefs } from "pinia"; watch,
import { tabbarManager } from "@/utils/tabbarManager"; ref,
import WxAuthLogin from "@/components/WxAuthLogin/WxAuthLogin.vue"; onMounted,
import config from "@/config.js"; onUnmounted
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore()); } from "vue";
const wxAuthLoginRef = ref(null); import {
const { $api, navTo, cloneDeep } = inject("globalFunction"); onLoad,
const isLogin = ref(false); onShow
const weekList = ref([]); } from "@dcloudio/uni-app";
const fairList = ref([]); import useLocationStore from "@/stores/useLocationStore";
const currentDay = ref({}); import {
const userInfo = ref({}); storeToRefs
const state = reactive({ } from "pinia";
import {
tabbarManager
} from "@/utils/tabbarManager";
import WxAuthLogin from "@/components/WxAuthLogin/WxAuthLogin.vue";
import config from "@/config.js";
const {
longitudeVal,
latitudeVal
} = storeToRefs(useLocationStore());
const wxAuthLoginRef = ref(null);
const {
$api,
navTo,
cloneDeep
} = inject("globalFunction");
const isLogin = ref(false);
const weekList = ref([]);
const fairList = ref([]);
const currentDay = ref({});
const userInfo = ref({});
const state = reactive({
current: 1, current: 1,
all: [{}], all: [{}],
}); });
const pageState = reactive({ const pageState = reactive({
pageNum: 0, pageNum: 0,
total: 0, total: 0,
maxPage: 2, maxPage: 2,
pageSize: 10, pageSize: 10,
jobFairTitle: "", jobFairTitle: "",
}); });
const baseUrl = config.imgBaseUrl; const baseUrl = config.imgBaseUrl;
onLoad(() => { onLoad(() => {
// const today = new Date(); // const today = new Date();
// const year = today.getFullYear(); // const year = today.getFullYear();
// const month = String(today.getMonth() + 1).padStart(2, '0'); // const month = String(today.getMonth() + 1).padStart(2, '0');
@@ -169,31 +144,39 @@ onLoad(() => {
// }); // });
// weekList.value = result; // weekList.value = result;
getHeart(); getHeart();
}); });
onShow(() => { onShow(() => {
// 更新自定义tabbar选中状态 // 更新自定义tabbar选中状态
tabbarManager.updateSelected(1); tabbarManager.updateSelected(1);
}); });
onMounted(() => { onMounted(() => {
// 监听退出登录事件,显示微信登录弹窗 // 监听退出登录事件,显示微信登录弹窗
uni.$on("showLoginModal", () => { uni.$on("showLoginModal", () => {
wxAuthLoginRef.value?.open(); wxAuthLoginRef.value?.open();
}); });
}); });
onUnmounted(() => { onUnmounted(() => {
uni.$off("showLoginModal"); uni.$off("showLoginModal");
}); });
// 登录成功回调 // 登录成功回调
const handleLoginSuccess = () => { const handleLoginSuccess = () => {
console.log("登录成功"); console.log("登录成功");
// 可以在这里添加登录成功后的处理逻辑 // 可以在这里添加登录成功后的处理逻辑
}; };
function toSelectDate() { function goDetail(jobFairId){
if(state.current != 3){
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
}else{
navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId)
}
}
function toSelectDate() {
navTo("/packageA/pages/selectDate/selectDate", { navTo("/packageA/pages/selectDate/selectDate", {
query: { query: {
date: currentDay.value.fullDate, date: currentDay.value.fullDate,
@@ -213,22 +196,19 @@ function toSelectDate() {
getFair("refresh"); getFair("refresh");
}, },
}); });
} }
// 查看消息类型 // 查看消息类型
function changeSwiperMsgType(e) { function changeSwiperMsgType(e) {
const currented = e.detail.current; const currented = e.detail.current;
state.current = currented; state.current = currented;
} }
function seemsg(index) { function seemsg(index) {
state.current = index; state.current = index;
console.log(index, "index");
if (index != 3) { if (index != 3) {
getFair("refresh"); getFair("refresh");
} else { } else {
if (!isLogin.value) { if (!isLogin.value) {
// 未登录则先触发心跳与登录流程
getHeart(); getHeart();
return; return;
} }
@@ -241,9 +221,9 @@ function seemsg(index) {
getMyFair("refresh"); getMyFair("refresh");
} }
} }
} }
const handleScrollToLower = () => { const handleScrollToLower = () => {
if (pageState.pageNum >= pageState.maxPage) { if (pageState.pageNum >= pageState.maxPage) {
return; return;
} else { } else {
@@ -255,45 +235,44 @@ const handleScrollToLower = () => {
}); });
} }
} }
}; };
function getHeart() { function getHeart() {
const raw = uni.getStorageSync("Padmin-Token"); const raw = uni.getStorageSync("Padmin-Token");
const token = typeof raw === "string" ? raw.trim() : ""; const token = typeof raw === "string" ? raw.trim() : "";
const headers = token const headers = token ? {
? { Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}` } Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
: {}; } : {};
$api $api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers)
.then((resData) => {
if (resData.code == 200) { if (resData.code == 200) {
isLogin.value = true; isLogin.value = true;
getUser(); getUser();
} else { } else {
isLogin.value = false; isLogin.value = false;
$api.msg('请先登录')
getFair("refresh"); getFair("refresh");
} }
}); });
} }
function getUser() {
function getUser() {
const raw = uni.getStorageSync("Padmin-Token"); const raw = uni.getStorageSync("Padmin-Token");
const token = typeof raw === "string" ? raw.trim() : ""; const token = typeof raw === "string" ? raw.trim() : "";
const headers = token const headers = token ? {
? { Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}` } Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
: {}; } : {};
return $api return $api.myRequest("/system/user/login/user/info", {}, "GET", 10100, headers).then((resData) => {
.myRequest("/system/user/login/user/info", {}, "GET", 10100, headers)
.then((resData) => {
// 正确映射响应为用户信息(优先使用 data 字段) // 正确映射响应为用户信息(优先使用 data 字段)
const data = resData?.data ?? resData; const data = resData?.data ?? resData;
userInfo.value = data || {}; userInfo.value = data || {};
getFair("refresh"); getFair("refresh");
return userInfo.value; return userInfo.value;
}); });
} }
function getMyFair(type = "add") {
function getMyFair(type = "add") {
if (type === "refresh") { if (type === "refresh") {
pageState.pageNum = 1; pageState.pageNum = 1;
pageState.maxPage = 1; pageState.maxPage = 1;
@@ -307,15 +286,10 @@ function getMyFair(type = "add") {
jobFairTitle: pageState.jobFairTitle, jobFairTitle: pageState.jobFairTitle,
}; };
if (isLogin.value) { if (isLogin.value) {
console.log(userInfo, 'userInfo');
if (userInfo.value.userType == "ent") { if (userInfo.value.userType == "ent") {
params.enterpriseId = userInfo.value.info.userId; params.enterpriseId = userInfo.value.info.userId;
} else { $api.myRequest("/jobfair/public/jobfair/enterprise/my-sign-up-job-fair", params).then((resData) => {
params.personId = userInfo.value.info.userId;
}
}
$api
.myRequest("/jobfair/public/jobfair/enterprise/my-sign-up-job-fair", params)
.then((resData) => {
if (type === "add") { if (type === "add") {
const reslist = resData.data.list; const reslist = resData.data.list;
fairList.value = fairList.value.concat(reslist); fairList.value = fairList.value.concat(reslist);
@@ -325,8 +299,27 @@ function getMyFair(type = "add") {
pageState.total = resData.data.total; pageState.total = resData.data.total;
pageState.maxPage = resData.data.pages; pageState.maxPage = resData.data.pages;
}); });
} } else {
function getFair(type = "add") { params.personId = userInfo.value.info.userId;
$api.myRequest("/jobfair/public/jobfair/person/my-sign-up-job-fair", params).then((resData) => {
if (type === "add") {
const reslist = resData.data.list;
fairList.value = fairList.value.concat(reslist);
} else {
fairList.value = resData.data.list;
}
pageState.total = resData.data.total;
pageState.maxPage = resData.data.pages;
});
}
console.log(params, 'params');
} else {
$api.msg('请先登录');
}
}
function getFair(type = "add") {
if (type === "refresh") { if (type === "refresh") {
pageState.pageNum = 1; pageState.pageNum = 1;
pageState.maxPage = 1; pageState.maxPage = 1;
@@ -357,9 +350,9 @@ function getFair(type = "add") {
pageState.total = resData.data.total; pageState.total = resData.data.total;
pageState.maxPage = resData.data.pages; pageState.maxPage = resData.data.pages;
}); });
} }
function toIOSDate(input) { function toIOSDate(input) {
if (!input) return null; if (!input) return null;
if (input instanceof Date) return isNaN(input.getTime()) ? null : input; if (input instanceof Date) return isNaN(input.getTime()) ? null : input;
if (typeof input === "number") { if (typeof input === "number") {
@@ -379,9 +372,9 @@ function toIOSDate(input) {
// 其余已是 iOS 可解析格式:"YYYY/MM/DD[ HH:mm:ss]"、"YYYY-MM-DD"、ISO 8601 等 // 其余已是 iOS 可解析格式:"YYYY/MM/DD[ HH:mm:ss]"、"YYYY-MM-DD"、ISO 8601 等
const d = new Date(s); const d = new Date(s);
return isNaN(d.getTime()) ? null : d; return isNaN(d.getTime()) ? null : d;
} }
function parseDateTime(datetimeStr) { function parseDateTime(datetimeStr) {
if (!datetimeStr) if (!datetimeStr)
return { return {
time: "", time: "",
@@ -406,15 +399,19 @@ function parseDateTime(datetimeStr) {
time: `${hours}:${minutes}`, time: `${hours}:${minutes}`,
date: `${year}${month}${day}`, date: `${year}${month}${day}`,
}; };
} }
function getTimeStatus(startTimeStr, endTimeStr) { function getTimeStatus(startTimeStr, endTimeStr) {
const now = new Date(); const now = new Date();
const startTime = toIOSDate(startTimeStr); const startTime = toIOSDate(startTimeStr);
const endTime = toIOSDate(endTimeStr); const endTime = toIOSDate(endTimeStr);
if (!startTime || !endTime) { if (!startTime || !endTime) {
return { status: 1, statusText: "时间异常", color: "#999999" }; return {
status: 1,
statusText: "时间异常",
color: "#999999"
};
} }
// 判断状态0 开始中1 过期2 未开始 // 判断状态0 开始中1 过期2 未开始
@@ -439,9 +436,9 @@ function getTimeStatus(startTimeStr, endTimeStr) {
statusText, statusText,
color color
}; };
} }
function getHoursBetween(startTimeStr, endTimeStr) { function getHoursBetween(startTimeStr, endTimeStr) {
const start = toIOSDate(startTimeStr); const start = toIOSDate(startTimeStr);
const end = toIOSDate(endTimeStr); const end = toIOSDate(endTimeStr);
@@ -451,9 +448,9 @@ function getHoursBetween(startTimeStr, endTimeStr) {
const diffHours = diffMs / (1000 * 60 * 60); const diffHours = diffMs / (1000 * 60 * 60);
return +diffHours.toFixed(2); // 保留 2 位小数 return +diffHours.toFixed(2); // 保留 2 位小数
} }
const selectDate = (item) => { const selectDate = (item) => {
if (currentDay.value?.fullDate === item.fullDate) { if (currentDay.value?.fullDate === item.fullDate) {
currentDay.value = {}; currentDay.value = {};
getFair("refresh"); getFair("refresh");
@@ -461,9 +458,12 @@ const selectDate = (item) => {
} }
currentDay.value = item; currentDay.value = item;
getFair("refresh"); getFair("refresh");
}; };
function getNextDates({ startDate = "", count = 6 }) { function getNextDates({
startDate = "",
count = 6
}) {
const baseDate = startDate ? toIOSDate(startDate) || new Date() : new Date(); // 指定起点或今天 const baseDate = startDate ? toIOSDate(startDate) || new Date() : new Date(); // 指定起点或今天
const dates = []; const dates = [];
const dayNames = ["日", "一", "二", "三", "四", "五", "六"]; const dayNames = ["日", "一", "二", "三", "四", "五", "六"];
@@ -487,37 +487,37 @@ function getNextDates({ startDate = "", count = 6 }) {
// currentDay.value = dates[0]; // currentDay.value = dates[0];
return dates; return dates;
} }
</script> </script>
<style scoped lang="stylus"> <style scoped lang="stylus">
.app-custom-root { .app-custom-root {
position: fixed; position: fixed;
z-index: 10; z-index: 10;
width: 100vw; width: 100vw;
height: calc(100% - var(--window-bottom)); height: calc(100% - var(--window-bottom));
overflow: hidden; overflow: hidden;
} }
.app-container { .app-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.app-container .container-header { .app-container .container-header {
background: url("@/static/icon/background2.png") 0 0 no-repeat; background: url("@/static/icon/background2.png") 0 0 no-repeat;
background-size: 100% 400rpx; background-size: 100% 400rpx;
} }
.app-container .container-header .header-top { .app-container .container-header .header-top {
display: flex; display: flex;
line-height: calc(88rpx - 14rpx); line-height: calc(88rpx - 14rpx);
padding: 16rpx 44rpx 14rpx 44rpx; padding: 16rpx 44rpx 14rpx 44rpx;
} }
.app-container .container-header .header-top .header-btnLf { .app-container .container-header .header-top .header-btnLf {
display: flex; display: flex;
white-space: nowrap; white-space: nowrap;
justify-content: flex-start; justify-content: flex-start;
@@ -528,9 +528,9 @@ function getNextDates({ startDate = "", count = 6 }) {
color: #696969; color: #696969;
margin-right: 44rpx; margin-right: 44rpx;
position: relative; position: relative;
} }
.app-container .container-header .header-top .header-btnLf .btns-wd { .app-container .container-header .header-top .header-btnLf .btns-wd {
position: absolute; position: absolute;
top: 2rpx; top: 2rpx;
right: 2rpx; right: 2rpx;
@@ -539,57 +539,57 @@ function getNextDates({ startDate = "", count = 6 }) {
background: #f73636; background: #f73636;
border-radius: 50%; border-radius: 50%;
border: 4rpx solid #eeeeff; border: 4rpx solid #eeeeff;
} }
.app-container .container-header .header-top .active { .app-container .container-header .header-top .active {
font-weight: 600; font-weight: 600;
font-size: 40rpx; font-size: 40rpx;
color: #000000; color: #000000;
} }
.app-container .container-header .header-input { .app-container .container-header .header-input {
padding: 0 24rpx; padding: 0 24rpx;
width: calc(100% - 48rpx); width: calc(100% - 48rpx);
position: relative; position: relative;
} }
.app-container .container-header .header-input .iconsearch { .app-container .container-header .header-input .iconsearch {
position: absolute; position: absolute;
left: 50rpx; left: 50rpx;
top: 50%; top: 50%;
transform: translate(0, -50%); transform: translate(0, -50%);
} }
.app-container .container-header .header-input .input { .app-container .container-header .header-input .input {
padding: 0 30rpx 0 80rpx; padding: 0 30rpx 0 80rpx;
height: 80rpx; height: 80rpx;
background: #ffffff; background: #ffffff;
border-radius: 75rpx; border-radius: 75rpx;
font-size: 28rpx; font-size: 28rpx;
} }
.app-container .container-header .header-input .inputplace { .app-container .container-header .header-input .inputplace {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #b5b5b5; color: #b5b5b5;
} }
.app-container .container-header .header-date { .app-container .container-header .header-date {
padding: 28rpx; padding: 28rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.app-container .container-header .header-date .data-week { .app-container .container-header .header-date .data-week {
flex: 1; flex: 1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: nowrap; flex-wrap: nowrap;
overflow: hidden; overflow: hidden;
} }
.app-container .container-header .header-date .data-week .weel-days { .app-container .container-header .header-date .data-week .weel-days {
font-family: "PingFangSC-Medium", "PingFang SC", "Helvetica Neue", Helvetica, font-family: "PingFangSC-Medium", "PingFang SC", "Helvetica Neue", Helvetica,
Arial, "Microsoft YaHei", sans-serif; Arial, "Microsoft YaHei", sans-serif;
display: flex; display: flex;
@@ -601,60 +601,64 @@ function getNextDates({ startDate = "", count = 6 }) {
color: #333333; color: #333333;
width: 96rpx; width: 96rpx;
height: 88rpx; height: 88rpx;
} }
.app-container .container-header .header-date .data-week .weel-days .day { .app-container .container-header .header-date .data-week .weel-days .day {
font-weight: 500; font-weight: 500;
} }
.app-container .container-header .header-date .data-week .active { .app-container .container-header .header-date .data-week .active {
background: rgba(37, 107, 250, 0.1); background: rgba(37, 107, 250, 0.1);
border-radius: 12rpx; border-radius: 12rpx;
color: #256bfa; color: #256bfa;
} }
.app-container .container-header .header-date .data-all { .app-container .container-header .header-date .data-all {
width: 66rpx; width: 66rpx;
height: 66rpx; height: 66rpx;
margin-left: 18rpx; margin-left: 18rpx;
} }
.app-container .container-header .header-date .data-all .allimg { .app-container .container-header .header-date .data-all .allimg {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.container-main { .container-main {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
background-color: #f4f4f4; background-color: #f4f4f4;
} }
.main-scroll { .main-scroll {
width: 100%; width: 100%;
height: calc(100% - 150rpx); height: calc(100% - 150rpx);
} }
.cards { .cards {
padding: 28rpx; padding: 28rpx;
} }
.cards .card { .cards .card {
margin-top: 28rpx; margin-top: 28rpx;
padding: 32rpx; padding: 32rpx;
background: linear-gradient(to bottom, #e3efff 0%, #fbfdff 100%); background: linear-gradient(to bottom, #e3efff 0%, #fbfdff 100%);
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.04); box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.04);
border-radius: 20rpx; border-radius: 20rpx;
} }
.cards .card-title { .cards .card-title {
font-family: "PingFangSC-Medium", "PingFang SC", "Helvetica Neue", Helvetica, font-family: "PingFangSC-Medium", "PingFang SC", "Helvetica Neue", Helvetica,
Arial, "Microsoft YaHei", sans-serif; Arial, "Microsoft YaHei", sans-serif;
font-weight: 600; font-weight: 600;
font-size: 34rpx; font-size: 34rpx;
color: #005eb6; color: #005eb6;
text-align: center; text-align: center;
position relative position relative;
display: flex;
align-items: center;
justify-content: center;
&::after { &::after {
content: ""; content: "";
width: 120rpx; width: 120rpx;
@@ -665,69 +669,73 @@ function getNextDates({ startDate = "", count = 6 }) {
bottom: -14rpx; bottom: -14rpx;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.center-date { .center-date {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 24rpx;
color: #ff881a; // position: absolute;
position: absolute; // right: 0;
right: 0; // top: 0;
border: 1rpx solid;
padding: 5rpx 10rpx;
margin-left: 10rpx;
}
} }
}
.cards .card-row { .cards .card-row {
display: flex; display: flex;
justify-content: center; justify-content: center;
font-size: 26rpx; font-size: 26rpx;
color: #3e8ff3; color: #3e8ff3;
margin-top: 23rpx; margin-top: 23rpx;
} }
.cards .card-times { .cards .card-times {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-top: 24rpx; margin-top: 24rpx;
} }
.cards .card-times .time-left, .cards .card-times .time-left,
.cards .card-times .time-right { .cards .card-times .time-right {
text-align: center; text-align: center;
} }
.cards .card-times .left-date { .cards .card-times .left-date {
font-weight: 600; font-weight: 600;
font-size: 48rpx; font-size: 48rpx;
font-family: "PingFangSC-Medium", "PingFang SC", "Helvetica Neue", Helvetica, font-family: "PingFangSC-Medium", "PingFang SC", "Helvetica Neue", Helvetica,
Arial, "Microsoft YaHei", sans-serif; Arial, "Microsoft YaHei", sans-serif;
background: linear-gradient(180deg, #015EEA 0%, #00C0FA 100%); background: linear-gradient(180deg, #015EEA 0%, #00C0FA 100%);
-webkit-background-clip: text; -webkit-background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
} }
.cards .card-times .left-dateDay { .cards .card-times .left-dateDay {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #333333; color: #333333;
margin-top: 12rpx; margin-top: 12rpx;
} }
.cards .card-times .line { .cards .card-times .line {
width: 40rpx; width: 40rpx;
height: 2rpx; height: 2rpx;
background: #7BB6FF; background: #7BB6FF;
margin-top: 64rpx; margin-top: 7rpx;
} }
.cards .card-times .time-center { .cards .card-times .time-center {
text-align: center; text-align: center;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.cards .card-times .time-center .center-dateDay { .cards .card-times .time-center .center-dateDay {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #fff; color: #fff;
@@ -738,18 +746,18 @@ function getNextDates({ startDate = "", count = 6 }) {
background: #71B1FF; background: #71B1FF;
border-radius: 8rpx; border-radius: 8rpx;
padding: 0 30rpx; padding: 0 30rpx;
} }
.cards .recommend-card-line { .cards .recommend-card-line {
width: 100%; width: 100%;
height: 0; height: 0;
border-radius: 0; border-radius: 0;
border-bottom: 2rpx dashed rgba(0, 0, 0, 0.14); border-bottom: 2rpx dashed rgba(0, 0, 0, 0.14);
margin-top: 32rpx; margin-top: 32rpx;
position: relative; position: relative;
} }
.cards .recommend-card-line::before { .cards .recommend-card-line::before {
content: ""; content: "";
position: absolute; position: absolute;
left: 0; left: 0;
@@ -759,9 +767,9 @@ function getNextDates({ startDate = "", count = 6 }) {
height: 28rpx; height: 28rpx;
background: #f4f4f4; background: #f4f4f4;
border-radius: 50%; border-radius: 50%;
} }
.cards .recommend-card-line::after { .cards .recommend-card-line::after {
content: ""; content: "";
position: absolute; position: absolute;
right: 0; right: 0;
@@ -771,18 +779,18 @@ function getNextDates({ startDate = "", count = 6 }) {
height: 28rpx; height: 28rpx;
background: #f4f4f4; background: #f4f4f4;
border-radius: 50%; border-radius: 50%;
} }
.cards .card-footer { .cards .card-footer {
margin-top: 32rpx; margin-top: 32rpx;
min-height: 50rpx; min-height: 50rpx;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #6c7282; color: #6c7282;
text-align: center; text-align: center;
} }
.cards .card:first-child { .cards .card:first-child {
margin-top: 0; margin-top: 0;
} }
</style> </style>

View File

@@ -593,8 +593,6 @@ const { columnCount, columnSpace } = useColumnCount(() => {
const getCompanyInfo = () => { const getCompanyInfo = () => {
try { try {
const cachedUserInfo = uni.getStorageSync('userInfo') || {}; const cachedUserInfo = uni.getStorageSync('userInfo') || {};
console.log('缓存中的userInfo:', cachedUserInfo);
// 重置企业信息 // 重置企业信息
companyInfo.name = ''; companyInfo.name = '';
companyInfo.avatar = ''; companyInfo.avatar = '';