init
This commit is contained in:
85
packageA/pages/Intendedposition/Intendedposition.vue
Normal file
85
packageA/pages/Intendedposition/Intendedposition.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<view class="collection-content">
|
||||
<renderJobs
|
||||
seeDate="applyTime"
|
||||
v-if="pageState.list.length"
|
||||
:list="pageState.list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { $api, navTo, vacanciesTo } = inject('globalFunction');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
const userStore = useUserStore();
|
||||
const state = reactive({});
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
onLoad(() => {
|
||||
console.log('onLoad');
|
||||
// $api.sleep(2000).then(() => {
|
||||
// navTo('/pages/login/login');
|
||||
// });
|
||||
getJobList();
|
||||
});
|
||||
|
||||
onReachBottom(() => {
|
||||
getJobList();
|
||||
});
|
||||
|
||||
function navToPost(jobId) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
|
||||
}
|
||||
|
||||
function getJobList(type = 'add') {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
};
|
||||
$api.createRequest('/app/user/apply/job', params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
// pageState.list = resData.rows;
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
console.log(pageState.list);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.collection-content{
|
||||
padding: 1rpx 28rpx 20rpx 28rpx;
|
||||
background: #F4F4F4;
|
||||
height: 100%
|
||||
min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
|
||||
}
|
||||
</style>
|
||||
320
packageA/pages/UnitDetails/UnitDetails.vue
Normal file
320
packageA/pages/UnitDetails/UnitDetails.vue
Normal file
@@ -0,0 +1,320 @@
|
||||
<template>
|
||||
<AppLayout title="" :use-scroll-view="false">
|
||||
<template #headerleft>
|
||||
<view class="btnback">
|
||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<template #headerright>
|
||||
<view class="btn mar_ri10">
|
||||
<image
|
||||
src="@/static/icon/collect3.png"
|
||||
v-if="!companyInfo.isCollection"
|
||||
@click="companyCollection"
|
||||
></image>
|
||||
<image src="@/static/icon/collect2.png" v-else @click="companyCollection"></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">{{ companyInfo?.name }}</view>
|
||||
<view class="row2">
|
||||
<dict-tree-Label
|
||||
v-if="companyInfo?.industry"
|
||||
dictType="industry"
|
||||
:value="companyInfo?.industry"
|
||||
></dict-tree-Label>
|
||||
<span v-if="companyInfo?.industry"> </span>
|
||||
<dict-Label dictType="scale" :value="companyInfo?.scale"></dict-Label>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="conetent-info" :class="{ expanded: isExpanded }">
|
||||
<view class="info-title">公司介绍</view>
|
||||
<view class="info-desirption">{{ companyInfo.description }}</view>
|
||||
<!-- <view class="info-title title2">公司地址</view>
|
||||
<view class="locationCompany"></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" @scrolltolower="getJobsList('add')">
|
||||
<view class="views">
|
||||
<view class="Detail-title"><text class="title">在招职位</text></view>
|
||||
<renderJobs
|
||||
v-if="pageState.list.length"
|
||||
:list="pageState.list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</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 { 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,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const companyInfo = ref({});
|
||||
|
||||
onLoad((options) => {
|
||||
console.log(options);
|
||||
getCompanyInfo(options.companyId || options.bussinessId);
|
||||
});
|
||||
|
||||
function companyCollection() {
|
||||
const companyId = companyInfo.value.companyId;
|
||||
if (companyInfo.value.isCollection) {
|
||||
$api.createRequest(`/app/company/collection/${companyId}`, {}, 'DELETE').then((resData) => {
|
||||
getCompanyInfo(companyId);
|
||||
$api.msg('取消收藏成功');
|
||||
});
|
||||
} else {
|
||||
$api.createRequest(`/app/company/collection/${companyId}`, {}, 'POST').then((resData) => {
|
||||
getCompanyInfo(companyId);
|
||||
$api.msg('收藏成功');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getCompanyInfo(id) {
|
||||
$api.createRequest(`/app/company/${id}`).then((resData) => {
|
||||
companyInfo.value = resData.data;
|
||||
getJobsList();
|
||||
});
|
||||
}
|
||||
|
||||
function getJobsList(type = 'add') {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
};
|
||||
$api.createRequest(`/app/company/job/${companyInfo.value.companyId}`, params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
});
|
||||
}
|
||||
|
||||
function expand() {
|
||||
isExpanded.value = !isExpanded.value;
|
||||
}
|
||||
</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{
|
||||
|
||||
.row1{
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.row2{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6C7282;
|
||||
line-height: 45rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.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
|
||||
}
|
||||
}
|
||||
.expanded {
|
||||
max-height: 1000rpx; // 足够显示完整内容
|
||||
}
|
||||
.expand{
|
||||
display: flex
|
||||
flex-wrap: nowrap
|
||||
white-space: nowrap
|
||||
justify-content: center
|
||||
margin-top: 20rpx
|
||||
margin-bottom: 28rpx
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
133
packageA/pages/addPosition/addPosition.vue
Normal file
133
packageA/pages/addPosition/addPosition.vue
Normal file
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<AppLayout title="添加岗位">
|
||||
<template #headerleft>
|
||||
<view class="btn">
|
||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<view class="main">
|
||||
<view class="content-title">
|
||||
<view class="title-lf">
|
||||
<view class="lf-h1">想找什么工作?</view>
|
||||
<view class="lf-text">选择想找的工作,我的将在首页为你推荐</view>
|
||||
</view>
|
||||
<view class="title-ri">
|
||||
<!-- <text style="color: #256bfa">2</text>
|
||||
<text>/2</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-list">
|
||||
<view class="list-row" v-for="(item, index) in userInfo.jobTitle" :key="index">
|
||||
<text>{{ item }}</text>
|
||||
<image
|
||||
class="row-image button-click"
|
||||
@click="deleteItem(item, index)"
|
||||
src="@/static/icon/delete1.png"
|
||||
mode=""
|
||||
></image>
|
||||
</view>
|
||||
<view class="list-row-add button-click" @click="changeJobs">添加求职岗位</view>
|
||||
</view>
|
||||
</view>
|
||||
<SelectJobs ref="selectJobsModel"></SelectJobs>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject, ref, reactive } from 'vue';
|
||||
import SelectJobs from '@/components/selectJobs/selectJobs.vue';
|
||||
const { $api, navBack } = inject('globalFunction');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { getUserResume } = useUserStore();
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const selectJobsModel = ref(null);
|
||||
|
||||
function deleteItem(item, index) {
|
||||
const ids = userInfo.value.jobTitleId
|
||||
.split(',')
|
||||
.filter((_, vIndex) => vIndex !== index)
|
||||
.join(',');
|
||||
complete({ jobTitleId: ids });
|
||||
}
|
||||
|
||||
function changeJobs() {
|
||||
selectJobsModel.value?.open({
|
||||
title: '添加岗位',
|
||||
maskClick: true,
|
||||
success: (ids, labels) => {
|
||||
complete({ jobTitleId: ids });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function complete(values) {
|
||||
if (!values.jobTitleId.length) {
|
||||
return $api.msg('至少添加一份期望岗位');
|
||||
}
|
||||
$api.createRequest('/app/user/resume', values, 'post').then((resData) => {
|
||||
$api.msg('完成');
|
||||
getUserResume();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.main{
|
||||
padding: 54rpx 28rpx 28rpx 28rpx
|
||||
.content-list{
|
||||
.list-row{
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
border: 2rpx solid #DCDCDC;
|
||||
padding: 30rpx 28rpx
|
||||
display: flex;
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
margin-bottom: 28rpx;
|
||||
.row-image{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
}
|
||||
.list-row-add{
|
||||
background: #FFFFFF;
|
||||
color: #256BFA
|
||||
font-size: 28rpx
|
||||
font-weight: 500
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
border: 2rpx dashed #256BFA;
|
||||
padding: 30rpx 28rpx
|
||||
text-align: center
|
||||
}
|
||||
}
|
||||
}
|
||||
.content-title
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
align-items: center
|
||||
margin-bottom: 50rpx
|
||||
.title-lf
|
||||
font-size: 44rpx;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
.lf-text
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6C7282;
|
||||
.title-ri
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
</style>
|
||||
224
packageA/pages/browseJob/browseJob.vue
Normal file
224
packageA/pages/browseJob/browseJob.vue
Normal file
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<AppLayout title="我的浏览" :show-bg-image="false" :use-scroll-view="false">
|
||||
<template #headerleft>
|
||||
<view class="btnback">
|
||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<view class="collection-content">
|
||||
<view class="collection-search">
|
||||
<view class="search-content">
|
||||
<view class="header-input button-click">
|
||||
<uni-icons class="iconsearch" color="#6A6A6A" type="search" size="22"></uni-icons>
|
||||
<input
|
||||
class="input"
|
||||
@confirm="searchCollection"
|
||||
placeholder="招聘会"
|
||||
placeholder-class="inputplace"
|
||||
/>
|
||||
</view>
|
||||
<view class="data-all">
|
||||
<image class="allimg button-click" @click="toSelectDate" src="/static/icon/date1.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="getJobList('add')">
|
||||
<view class="one-cards">
|
||||
<view class="mian">
|
||||
<renderJobs
|
||||
:list="pageState.list"
|
||||
v-if="pageState.list.length"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
<!-- <loadmore ref="loadmoreRef"></loadmore> -->
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { $api, navTo, navBack } = inject('globalFunction');
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
const userStore = useUserStore();
|
||||
const browseDate = ref('');
|
||||
const weekday = ref([]);
|
||||
const monthDay = ref([]);
|
||||
const currentDay = ref('');
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
search: {},
|
||||
lastDate: '',
|
||||
});
|
||||
const currentDate = ref('');
|
||||
|
||||
onLoad(() => {
|
||||
getBrowseDate();
|
||||
getJobList('refresh');
|
||||
// const today = new Date().toISOString().split('T')[0];
|
||||
// currentDate.value = today;
|
||||
});
|
||||
|
||||
function toSelectDate() {
|
||||
navTo('/packageA/pages/selectDate/selectDate', {
|
||||
query: {
|
||||
date: currentDate.value,
|
||||
record: true,
|
||||
},
|
||||
onBack: (res) => {
|
||||
currentDate.value = res.date;
|
||||
pageState.search.startDate = getPreviousDay(res.date);
|
||||
pageState.search.endDate = res.date;
|
||||
getJobList('refresh');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function navToPost(jobId) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
|
||||
}
|
||||
|
||||
function searchCollection(e) {
|
||||
const value = e.detail.value;
|
||||
pageState.search.jobTitle = value;
|
||||
getJobList('refresh');
|
||||
}
|
||||
|
||||
function getBrowseDate() {
|
||||
$api.createRequest('/app/user/review/array').then((res) => {
|
||||
browseDate.value = res.data.join(',');
|
||||
});
|
||||
}
|
||||
|
||||
function getJobList(type = 'add', loading = true) {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
...pageState.search,
|
||||
};
|
||||
$api.createRequest('/app/user/review', params, 'GET', loading).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
const end = pageState.list.length;
|
||||
const [reslist, lastDate] = $api.insertSortData(rows, 'reviewDate');
|
||||
if (reslist.length) {
|
||||
// 日期监测是否一致
|
||||
if (reslist[0].title === pageState.lastDate) {
|
||||
reslist.shift();
|
||||
}
|
||||
}
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
pageState.lastDate = lastDate;
|
||||
} else {
|
||||
const [reslist, lastDate] = $api.insertSortData(rows, 'reviewDate');
|
||||
pageState.list = reslist;
|
||||
pageState.lastDate = lastDate;
|
||||
}
|
||||
// pageState.list = resData.rows;
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
});
|
||||
}
|
||||
|
||||
function getPreviousDay(dateStr) {
|
||||
const date = new Date(dateStr);
|
||||
date.setDate(date.getDate() - 1); // 减去一天
|
||||
|
||||
// 格式化成 YYYY-MM-DD
|
||||
return date.toISOString().split('T')[0];
|
||||
}
|
||||
</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%;
|
||||
}
|
||||
.collection-content
|
||||
height: 100%
|
||||
display: flex
|
||||
flex-direction: column
|
||||
.collection-search
|
||||
padding: 10rpx 20rpx;
|
||||
|
||||
.search-content
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
padding: 14rpx 0
|
||||
.header-input{
|
||||
padding: 0
|
||||
width: calc(100% - 48rpx);
|
||||
position: relative
|
||||
.iconsearch{
|
||||
position: absolute
|
||||
left: 30rpx;
|
||||
top: 50%
|
||||
transform: translate(0, -50%)
|
||||
}
|
||||
.input{
|
||||
padding: 0 30rpx 0 80rpx
|
||||
height: 80rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 75rpx 75rpx 75rpx 75rpx;
|
||||
border: 2rpx solid #ECECEC
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.inputplace{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #B5B5B5;
|
||||
}
|
||||
}
|
||||
.data-all{
|
||||
width: 66rpx;
|
||||
height: 66rpx;
|
||||
margin-left: 18rpx
|
||||
.allimg{
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
}
|
||||
.main-scroll{
|
||||
flex: 1
|
||||
overflow: hidden
|
||||
}
|
||||
.one-cards{
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
background: #f4f4f4
|
||||
|
||||
}
|
||||
</style>
|
||||
152
packageA/pages/choiceness/choiceness.vue
Normal file
152
packageA/pages/choiceness/choiceness.vue
Normal file
@@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<AppLayout title="精选企业">
|
||||
<template #headerleft>
|
||||
<view class="btn">
|
||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<view class="main">
|
||||
<view class="main-header">
|
||||
<view class="header-title btn-feel">企业推荐站</view>
|
||||
<view class="header-text btn-feel">AI智联青岛,岗位触手可“职”!</view>
|
||||
<image class="header-img btn-shaky" src="/static/icon/companyBG.png"></image>
|
||||
</view>
|
||||
<view class="main-content">
|
||||
<view class="cards btn-feel" v-for="item in list" :key="item.companyCardId" @click="seeDetail(item)">
|
||||
<view class="card-title">{{ item.name }}</view>
|
||||
<view class="card-text">{{ item.description }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject, ref, reactive } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { $api, navBack, navTo } = inject('globalFunction');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { getUserResume } = useUserStore();
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const list = ref([]);
|
||||
|
||||
onLoad(() => {
|
||||
getPremiumList();
|
||||
});
|
||||
|
||||
function CollectionCard(item) {
|
||||
$api.createRequest(`/app/company/card/collection/${item.companyCardId}`, {}, 'PUT').then((resData) => {
|
||||
getPremiumList();
|
||||
$api.msg('关注成功');
|
||||
});
|
||||
}
|
||||
|
||||
function delCollectionCard(item) {
|
||||
$api.createRequest(`/app/company/card/collection/${item.companyCardId}`, {}, 'DELETE').then((resData) => {
|
||||
getPremiumList();
|
||||
$api.msg('取消关注');
|
||||
});
|
||||
}
|
||||
|
||||
function getPremiumList() {
|
||||
$api.createRequest('/app/company/card').then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
list.value = rows;
|
||||
});
|
||||
}
|
||||
|
||||
function seeDetail(item) {
|
||||
uni.setStorageSync('jinxuan', item);
|
||||
navTo('/packageA/pages/choicenessList/choicenessList');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.main{
|
||||
.main-content{
|
||||
padding: 28rpx
|
||||
.cards{
|
||||
padding: 32rpx
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
border: 2rpx solid #DCDCDC;
|
||||
margin-bottom: 36rpx;
|
||||
position: relative;
|
||||
.card-title{
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
}
|
||||
.card-text{
|
||||
margin-top: 16rpx
|
||||
width: 502rpx;
|
||||
height: 80rpx;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6C7282;
|
||||
}
|
||||
}
|
||||
.cards::before{
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 50%;
|
||||
content: '';
|
||||
width: 4rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 2rpx
|
||||
background: #6C7282;
|
||||
transform: translate(0, -50%) rotate(-45deg) ;
|
||||
}
|
||||
|
||||
.cards::after{
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: calc(50% + 1rpx);
|
||||
content: '';
|
||||
width: 4rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 2rpx
|
||||
background: #6C7282;
|
||||
transform: rotate(45deg)
|
||||
}
|
||||
|
||||
}
|
||||
.main-header{
|
||||
padding: 80rpx 40rpx
|
||||
position: relative
|
||||
.header-title{
|
||||
font-weight: 400;
|
||||
font-size: 56rpx;
|
||||
color: #333333;
|
||||
font-family: DingTalk JinBuTi;
|
||||
}
|
||||
.header-text{
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: rgba(3,3,3,0.5);
|
||||
margin-top: 10rpx
|
||||
}
|
||||
.header-img{
|
||||
position: absolute
|
||||
right: 0
|
||||
bottom: 0
|
||||
// transform: translate(0, -50%)
|
||||
width: 280rpx;
|
||||
height: 272rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
156
packageA/pages/choicenessList/choicenessList.vue
Normal file
156
packageA/pages/choicenessList/choicenessList.vue
Normal file
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<AppLayout :title="title" :show-bg-image="false" @onScrollBottom="getDataList('add')">
|
||||
<template #headerleft>
|
||||
<view class="btnback">
|
||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<template #headContent>
|
||||
<view class="collection-search">
|
||||
<view class="search-content">
|
||||
<view class="header-input button-click">
|
||||
<uni-icons class="iconsearch" color="#6A6A6A" type="search" size="22"></uni-icons>
|
||||
<input
|
||||
class="input"
|
||||
@confirm="searchCollection"
|
||||
placeholder="输入企业名称"
|
||||
placeholder-class="inputplace"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="main-list">
|
||||
<renderCompanys
|
||||
v-if="pageState.list.length"
|
||||
:list="pageState.list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderCompanys>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject, ref, reactive } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { storeToRefs } from 'pinia';
|
||||
const { $api, navTo, navBack } = inject('globalFunction');
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
// state
|
||||
const title = ref('事业单位');
|
||||
const cardInfo = ref({});
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
search: {},
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
const options = uni.getStorageSync('jinxuan');
|
||||
if (options) {
|
||||
cardInfo.value = options;
|
||||
title.value = options.name;
|
||||
} else {
|
||||
$api.msg('请传入精选企业参数');
|
||||
}
|
||||
getDataList('refresh');
|
||||
});
|
||||
|
||||
// search
|
||||
function searchCollection(e) {
|
||||
const value = e.detail.value;
|
||||
pageState.search.companyName = value;
|
||||
getDataList('refresh');
|
||||
}
|
||||
|
||||
// list
|
||||
function getDataList(type = 'add') {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
cardId: cardInfo.value.companyCardId,
|
||||
...pageState.search,
|
||||
};
|
||||
$api.createRequest('/app/company/label', params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
});
|
||||
}
|
||||
</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%;
|
||||
}
|
||||
.collection-search{
|
||||
padding: 10rpx 20rpx;
|
||||
.search-content{
|
||||
position: relative
|
||||
display: flex
|
||||
align-items: center
|
||||
padding: 14rpx 0
|
||||
.header-input{
|
||||
padding: 0
|
||||
width: calc(100%);
|
||||
position: relative
|
||||
.iconsearch{
|
||||
position: absolute
|
||||
left: 30rpx;
|
||||
top: 50%
|
||||
transform: translate(0, -50%)
|
||||
}
|
||||
.input{
|
||||
padding: 0 30rpx 0 80rpx
|
||||
height: 80rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 75rpx 75rpx 75rpx 75rpx;
|
||||
border: 2rpx solid #ECECEC
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.inputplace{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #B5B5B5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.main-list{
|
||||
background-color: #F4F4F4;
|
||||
padding: 1rpx 28rpx 28rpx 28rpx
|
||||
}
|
||||
</style>
|
||||
195
packageA/pages/collection/collection.vue
Normal file
195
packageA/pages/collection/collection.vue
Normal file
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<AppLayout title="我的收藏" :show-bg-image="false" :use-scroll-view="false">
|
||||
<template #headerleft>
|
||||
<view class="btn">
|
||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<view class="collection-content">
|
||||
<view class="header">
|
||||
<view class="button-click" :class="{ active: type === 0 }" @click="changeType(0)">工作职位</view>
|
||||
<view class="button-click" :class="{ active: type === 1 }" @click="changeType(1)">公司企业</view>
|
||||
</view>
|
||||
<view class="coll-main">
|
||||
<swiper class="swiper" :current="type" @change="changeSwiperType">
|
||||
<swiper-item class="list">
|
||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
|
||||
<view class="mian">
|
||||
<renderJobs
|
||||
:list="pageState.list"
|
||||
v-if="pageState.list.length"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
<swiper-item class="list">
|
||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLowerCompany">
|
||||
<view class="mian">
|
||||
<renderCompanys
|
||||
:list="pageCompanyState.list"
|
||||
v-if="pageCompanyState.list.length"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderCompanys>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject, ref, reactive } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
const { $api, navBack } = inject('globalFunction');
|
||||
const type = ref(0);
|
||||
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
const pageCompanyState = reactive({
|
||||
page: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
getJobList();
|
||||
getCompanyList();
|
||||
});
|
||||
|
||||
function changeSwiperType(e) {
|
||||
const current = e.detail.current;
|
||||
type.value = current;
|
||||
}
|
||||
|
||||
function changeType(e) {
|
||||
type.value = e;
|
||||
}
|
||||
|
||||
function handleScrollToLower() {
|
||||
getJobList();
|
||||
}
|
||||
|
||||
function handleScrollToLowerCompany() {
|
||||
getCompanyList();
|
||||
}
|
||||
|
||||
function getJobList(type = 'add') {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
};
|
||||
$api.createRequest('/app/user/collection/job', params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
// pageState.list = resData.rows;
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
});
|
||||
}
|
||||
|
||||
function getCompanyList(type = 'add') {
|
||||
if (type === 'refresh') {
|
||||
pageCompanyState.page = 1;
|
||||
pageCompanyState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageCompanyState.page < pageCompanyState.maxPage) {
|
||||
pageCompanyState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageCompanyState.page,
|
||||
pageSize: pageCompanyState.pageSize,
|
||||
};
|
||||
$api.createRequest('/app/user/collection/company', params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageCompanyState.pageSize * (pageCompanyState.page - 1);
|
||||
const end = pageCompanyState.list.length;
|
||||
const reslist = rows;
|
||||
pageCompanyState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageCompanyState.list = rows;
|
||||
}
|
||||
// pageCompanyState.list = resData.rows;
|
||||
pageCompanyState.total = resData.total;
|
||||
pageCompanyState.maxPage = Math.ceil(pageCompanyState.total / pageCompanyState.pageSize);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.collection-content{
|
||||
background: #F4F4F4;
|
||||
height: 100%
|
||||
display: flex
|
||||
flex-direction: column
|
||||
.header{
|
||||
background: #FFFFFF;
|
||||
display: flex
|
||||
justify-content: space-evenly;
|
||||
align-items: center
|
||||
padding: 28rpx 100rpx
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
.active {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
.coll-main{
|
||||
flex: 1
|
||||
overflow: hidden
|
||||
.main-scroll,
|
||||
.swiper{
|
||||
height: 100%
|
||||
.mian{
|
||||
padding: 0 28rpx 28rpx 28rpx
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
541
packageA/pages/exhibitors/exhibitors.vue
Normal file
541
packageA/pages/exhibitors/exhibitors.vue
Normal file
@@ -0,0 +1,541 @@
|
||||
<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 parseDateTime(datetimeStr) {
|
||||
if (!datetimeStr) return { time: '', date: '' };
|
||||
|
||||
const dateObj = new Date(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 = new Date(startTimeStr);
|
||||
const endTime = new Date(endTimeStr);
|
||||
|
||||
// 判断状态:0 开始中,1 过期,2 待开始
|
||||
let status = 0;
|
||||
let statusText = '开始中';
|
||||
if (now < startTime) {
|
||||
status = 2; // 待开始
|
||||
statusText = '待开始';
|
||||
} else if (now > endTime) {
|
||||
status = 1; // 已过期
|
||||
statusText = '已过期';
|
||||
} else {
|
||||
status = 0; // 进行中
|
||||
statusText = '进行中';
|
||||
}
|
||||
return {
|
||||
status, // 0: 进行中,1: 已过期,2: 待开始
|
||||
statusText,
|
||||
};
|
||||
}
|
||||
|
||||
function getHoursBetween(startTimeStr, endTimeStr) {
|
||||
const start = new Date(startTimeStr);
|
||||
const end = new Date(endTimeStr);
|
||||
|
||||
const diffMs = end - start;
|
||||
const diffHours = diffMs / (1000 * 60 * 60);
|
||||
|
||||
return +diffHours.toFixed(2); // 保留 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>
|
||||
278
packageA/pages/jobExpect/jobExpect.vue
Normal file
278
packageA/pages/jobExpect/jobExpect.vue
Normal file
@@ -0,0 +1,278 @@
|
||||
<template>
|
||||
<AppLayout
|
||||
title="求职期望"
|
||||
:sub-title="`完成度${percent}`"
|
||||
border
|
||||
back-gorund-color="#ffffff"
|
||||
:show-bg-image="false"
|
||||
>
|
||||
<template #headerleft>
|
||||
<view class="btn mar_le20 button-click" @click="navBack">取消</view>
|
||||
</template>
|
||||
<template #headerright>
|
||||
<view class="btn mar_ri20 button-click" @click="confirm">确认</view>
|
||||
</template>
|
||||
<view class="content">
|
||||
<view class="content-input" @click="changeSalary">
|
||||
<view class="input-titile">期望薪资</view>
|
||||
<input class="input-con triangle" v-model="state.salayText" disabled placeholder="请选择您的期望薪资" />
|
||||
</view>
|
||||
<view class="content-input" @click="changeArea">
|
||||
<view class="input-titile">期望工作地</view>
|
||||
<input
|
||||
class="input-con triangle"
|
||||
v-model="state.areaText"
|
||||
disabled
|
||||
placeholder="请选择您的期望工作地"
|
||||
/>
|
||||
</view>
|
||||
<view class="content-input" @click="changeJobs">
|
||||
<view class="input-titile">求职岗位</view>
|
||||
<input
|
||||
class="input-con triangle"
|
||||
disabled
|
||||
v-if="!state.jobsText.length"
|
||||
placeholder="请选择您的求职岗位"
|
||||
/>
|
||||
<view class="input-nx" @click="changeJobs" v-else>
|
||||
<view class="nx-item button-click" v-for="item in state.jobsText">{{ item }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<SelectJobs ref="selectJobsModel"></SelectJobs>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import SelectJobs from '@/components/selectJobs/selectJobs.vue';
|
||||
const { $api, navTo, navBack } = inject('globalFunction');
|
||||
const openSelectPopup = inject('openSelectPopup');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { getUserResume } = useUserStore();
|
||||
const { dictLabel, oneDictData } = useDictStore();
|
||||
|
||||
const selectJobsModel = ref();
|
||||
const percent = ref('0%');
|
||||
const salay = [2, 5, 10, 15, 20, 25, 30, 50, 80, 100];
|
||||
const state = reactive({
|
||||
lfsalay: [2, 5, 10, 15, 20, 25, 30, 50],
|
||||
risalay: JSON.parse(JSON.stringify(salay)),
|
||||
salayText: '',
|
||||
areaText: '',
|
||||
jobsText: [],
|
||||
});
|
||||
const fromValue = reactive({
|
||||
salaryMin: 0,
|
||||
salaryMax: 0,
|
||||
area: '',
|
||||
jobTitleId: [],
|
||||
});
|
||||
onLoad(() => {
|
||||
initLoad();
|
||||
});
|
||||
const confirm = () => {
|
||||
if (!fromValue.jobTitleId) {
|
||||
return $api.msg('请选择您的求职岗位');
|
||||
}
|
||||
$api.createRequest('/app/user/resume', fromValue, 'post').then((resData) => {
|
||||
$api.msg('完成');
|
||||
state.disbleDate = true;
|
||||
getUserResume().then(() => {
|
||||
navBack();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
watch(userInfo, (newValue, oldValue) => {
|
||||
initLoad();
|
||||
});
|
||||
|
||||
function initLoad() {
|
||||
fromValue.salaryMin = userInfo.value.salaryMin;
|
||||
fromValue.salaryMax = userInfo.value.salaryMax;
|
||||
fromValue.area = userInfo.value.area;
|
||||
fromValue.jobTitleId = userInfo.value.jobTitleId;
|
||||
// 回显
|
||||
state.areaText = dictLabel('area', Number(userInfo.value.area));
|
||||
state.salayText = `${userInfo.value.salaryMin}-${userInfo.value.salaryMax}`;
|
||||
state.jobsText = userInfo.value.jobTitle;
|
||||
const result = getFormCompletionPercent(fromValue);
|
||||
percent.value = result;
|
||||
}
|
||||
|
||||
const changeSalary = () => {
|
||||
let leftIndex = 0;
|
||||
openSelectPopup({
|
||||
title: '薪资',
|
||||
maskClick: true,
|
||||
data: [state.lfsalay, state.risalay],
|
||||
unit: 'k',
|
||||
success: (_, [min, max]) => {
|
||||
fromValue.salaryMin = min.value * 1000;
|
||||
fromValue.salaryMax = max.value * 1000;
|
||||
state.salayText = `${fromValue.salaryMin}-${fromValue.salaryMax}`;
|
||||
},
|
||||
change(e) {
|
||||
const salayData = e.detail.value;
|
||||
if (leftIndex !== salayData[0]) {
|
||||
const copyri = JSON.parse(JSON.stringify(salay));
|
||||
const [lf, ri] = e.detail.value;
|
||||
const risalay = copyri.slice(lf, copyri.length);
|
||||
this.setColunm(1, risalay);
|
||||
leftIndex = salayData[0];
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
function changeArea() {
|
||||
openSelectPopup({
|
||||
title: '区域',
|
||||
maskClick: true,
|
||||
data: [oneDictData('area')],
|
||||
success: (_, [value]) => {
|
||||
fromValue.area = value.value;
|
||||
state.areaText = '青岛市-' + value.label;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function changeJobs() {
|
||||
selectJobsModel.value?.open({
|
||||
title: '添加岗位',
|
||||
defaultId: fromValue.jobTitleId,
|
||||
success: (ids, labels) => {
|
||||
console.log(ids, labels);
|
||||
fromValue.jobTitleId = ids;
|
||||
state.jobsText = labels.split(',');
|
||||
},
|
||||
cancel: (ids, labels) => {
|
||||
console.log(ids, labels);
|
||||
// fromValue.jobTitleId = ids;
|
||||
// state.jobsText = labels.split(',');
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function getFormCompletionPercent(form) {
|
||||
let total = Object.keys(form).length;
|
||||
let filled = 0;
|
||||
|
||||
for (const key in form) {
|
||||
const value = form[key];
|
||||
if (value !== '' && value !== null && value !== undefined) {
|
||||
if (typeof value === 'number') {
|
||||
filled += 1;
|
||||
} else if (typeof value === 'string' && value.trim() !== '') {
|
||||
filled += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (total === 0) return '0%';
|
||||
const percent = (filled / total) * 100;
|
||||
return percent.toFixed(0) + '%'; // 取整,不要小数点
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.btn{
|
||||
margin-top: -30rpx
|
||||
}
|
||||
.content{
|
||||
padding: 28rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start
|
||||
height: calc(100% - 120rpx)
|
||||
|
||||
}
|
||||
.content-input
|
||||
margin-bottom: 52rpx
|
||||
.input-titile
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6A6A6A;
|
||||
.input-con
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
line-height: 80rpx;
|
||||
height: 80rpx;
|
||||
border-bottom: 2rpx solid #EBEBEB
|
||||
position: relative;
|
||||
.triangle::before
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: calc(50% - 2rpx);
|
||||
content: '';
|
||||
width: 4rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 2rpx
|
||||
background: #697279;
|
||||
transform: translate(0, -50%) rotate(-45deg) ;
|
||||
.triangle::after
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 50%;
|
||||
content: '';
|
||||
width: 4rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 2rpx
|
||||
background: #697279;
|
||||
transform: rotate(45deg)
|
||||
.content-sex
|
||||
height: 110rpx;
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
border-bottom: 2rpx solid #EBEBEB
|
||||
margin-bottom: 52rpx
|
||||
.sex-titile
|
||||
line-height: 80rpx;
|
||||
.sext-ri
|
||||
display: flex
|
||||
align-items: center;
|
||||
.sext-box
|
||||
height: 76rpx;
|
||||
width: 152rpx;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx
|
||||
border: 2rpx solid #E8EAEE;
|
||||
margin-left: 28rpx
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
.sext-boxactive
|
||||
color: #256BFA
|
||||
background: rgba(37,107,250,0.1);
|
||||
border: 2rpx solid #256BFA;
|
||||
.next-btn
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background: #256BFA;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 90rpx
|
||||
.input-nx
|
||||
position: relative
|
||||
border-bottom: 2rpx solid #EBEBEB
|
||||
padding-bottom: 30rpx
|
||||
display: flex
|
||||
flex-wrap: wrap
|
||||
.nx-item
|
||||
padding: 20rpx 28rpx
|
||||
width: fit-content
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
border: 2rpx solid #E8EAEE;
|
||||
margin-right: 24rpx
|
||||
margin-top: 24rpx
|
||||
</style>
|
||||
73
packageA/pages/moreJobs/moreJobs.vue
Normal file
73
packageA/pages/moreJobs/moreJobs.vue
Normal file
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<view class="collection-content">
|
||||
<renderJobs :list="list" :longitude="longitudeVal" :latitude="latitudeVal"></renderJobs>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { $api, navTo, navBack, vacanciesTo } = inject('globalFunction');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
import { usePagination } from '@/hook/usePagination';
|
||||
import { jobMoreMap } from '@/utils/markdownParser';
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
const loadmoreRef = ref(null);
|
||||
|
||||
// 响应式搜索条件(可以被修改)
|
||||
const searchParams = ref({});
|
||||
const pageSize = ref(10);
|
||||
const { list, loading, refresh, loadMore } = usePagination(
|
||||
(params) => $api.createRequest('/app/job/list', params, 'GET', true),
|
||||
null, // 转换函数
|
||||
{
|
||||
pageSize: pageSize,
|
||||
search: searchParams,
|
||||
autoWatchSearch: true,
|
||||
onBeforeRequest: () => {
|
||||
loadmoreRef.value?.change('loading');
|
||||
},
|
||||
onAfterRequest: () => {
|
||||
loadmoreRef.value?.change('more');
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
onLoad((options) => {
|
||||
let params = jobMoreMap.get(options.jobId);
|
||||
if (params) {
|
||||
uni.setStorageSync('jobMoreMap', params);
|
||||
} else {
|
||||
params = uni.getStorageSync('jobMoreMap');
|
||||
}
|
||||
const objs = removeNullProperties(params);
|
||||
searchParams.value = objs;
|
||||
refresh();
|
||||
});
|
||||
|
||||
function removeNullProperties(obj) {
|
||||
for (const key in obj) {
|
||||
if (obj.hasOwnProperty(key) && obj[key] === null) {
|
||||
delete obj[key]; // 删除值为 null 的属性
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
onReachBottom(() => {
|
||||
loadMore();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.collection-content{
|
||||
padding: 1rpx 28rpx 20rpx 28rpx;
|
||||
background: #F4F4F4;
|
||||
height: 100%
|
||||
min-height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
|
||||
}
|
||||
</style>
|
||||
182
packageA/pages/myResume/myResume.vue
Normal file
182
packageA/pages/myResume/myResume.vue
Normal file
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<view class="mys-container">
|
||||
<!-- 个人信息 -->
|
||||
<view class="mys-tops btn-feel">
|
||||
<view class="tops-left">
|
||||
<view class="name">
|
||||
<text>{{ userInfo.name || '编辑用户名' }}</text>
|
||||
<view class="edit-icon mar_le10">
|
||||
<image
|
||||
class="button-click"
|
||||
src="@/static/icon/edit1.png"
|
||||
@click="navTo('/packageA/pages/personalInfo/personalInfo')"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="subName">
|
||||
<dict-Label class="mar_ri10" dictType="sex" :value="userInfo.sex"></dict-Label>
|
||||
<text class="mar_ri10">{{ userInfo.age }}岁</text>
|
||||
<dict-Label class="mar_ri10" dictType="education" :value="userInfo.education"></dict-Label>
|
||||
<dict-Label
|
||||
class="mar_ri10"
|
||||
dictType="affiliation"
|
||||
:value="userInfo.politicalAffiliation"
|
||||
></dict-Label>
|
||||
</view>
|
||||
<view class="subName">{{ userInfo.phone }}</view>
|
||||
</view>
|
||||
<view class="tops-right">
|
||||
<view class="right-imghead">
|
||||
<image v-if="userInfo.sex === '0'" src="@/static/icon/boy.png"></image>
|
||||
<image v-else src="@/static/icon/girl.png"></image>
|
||||
</view>
|
||||
<view class="right-sex">
|
||||
<image v-if="userInfo.sex === '0'" src="@/static/icon/boy1.png"></image>
|
||||
<image v-else src="@/static/icon/girl1.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 求职期望 -->
|
||||
<view class="mys-line"></view>
|
||||
<view class="mys-info">
|
||||
<view class="mys-h4">
|
||||
<text>求职期望</text>
|
||||
<view class="mys-edit-icon">
|
||||
<image
|
||||
class="button-click"
|
||||
src="@/static/icon/edit1.png"
|
||||
@click="navTo('/packageA/pages/jobExpect/jobExpect')"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mys-text">
|
||||
<text>期望薪资:</text>
|
||||
<text>{{ userInfo.salaryMin / 1000 }}k-{{ userInfo.salaryMax / 1000 }}k</text>
|
||||
</view>
|
||||
<view class="mys-text">
|
||||
<text>期望工作地:</text>
|
||||
<text>青岛市-</text>
|
||||
<dict-Label dictType="area" :value="Number(userInfo.area)"></dict-Label>
|
||||
</view>
|
||||
<view class="mys-list">
|
||||
<view class="cards button-click" v-for="(title, index) in userInfo.jobTitle" :key="index">
|
||||
{{ title }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
|
||||
const { $api, navTo } = inject('globalFunction');
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { getUserResume } = useUserStore();
|
||||
const { getDictData, oneDictData } = useDictStore();
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
.mys-container{
|
||||
.mys-tops{
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 52rpx 48rpx
|
||||
.tops-left{
|
||||
.name{
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 44rpx;
|
||||
color: #333333;
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: flex-start
|
||||
.edit-icon{
|
||||
display: inline-block
|
||||
width: 40rpx;
|
||||
height: 40rpx
|
||||
padding-bottom: 10rpx
|
||||
}
|
||||
}
|
||||
.subName{
|
||||
margin-top: 12rpx
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
.tops-right{
|
||||
position: relative
|
||||
.right-imghead{
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
border-radius: 50%;
|
||||
background: #e8e8e8
|
||||
overflow: hidden
|
||||
}
|
||||
.right-sex{
|
||||
position: absolute
|
||||
right: -10rpx
|
||||
top: -10rpx
|
||||
width: 50rpx
|
||||
height: 50rpx
|
||||
}
|
||||
}
|
||||
}
|
||||
.mys-line{
|
||||
margin: 0 28rpx
|
||||
height: 0rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
border: 2rpx dashed #000000;
|
||||
opacity: 0.16;
|
||||
}
|
||||
.mys-info{
|
||||
padding: 28rpx
|
||||
.mys-h4{
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
margin-bottom: 8rpx
|
||||
display: flex;
|
||||
justify-content: space-between
|
||||
align-items: center
|
||||
.mys-edit-icon{
|
||||
display: inline-block
|
||||
width: 40rpx;
|
||||
height: 40rpx
|
||||
}
|
||||
}
|
||||
.mys-text{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-top: 16rpx
|
||||
}
|
||||
.mys-list{
|
||||
display: flex
|
||||
align-items: center
|
||||
flex-wrap: wrap;
|
||||
.cards{
|
||||
margin: 28rpx 28rpx 0 0
|
||||
height: 80rpx;
|
||||
padding: 0 38rpx;
|
||||
width: fit-content
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
border: 2rpx solid #E8EAEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
147
packageA/pages/newJobPosition/newJobPosition.vue
Normal file
147
packageA/pages/newJobPosition/newJobPosition.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<view class="reser-content">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="content-top">
|
||||
<view
|
||||
class="top-item button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="changeOption('all')"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="top-item button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="changeOption(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="main">
|
||||
<scroll-view class="scroll-view" scroll-y @scrolltolower="scrollBottom">
|
||||
<view class="list">
|
||||
<renderJobs
|
||||
:list="pageState.list"
|
||||
v-if="pageState.list.length"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
search: {},
|
||||
lastDate: '',
|
||||
});
|
||||
const state = reactive({
|
||||
tabIndex: 'all',
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
getList('refresh');
|
||||
});
|
||||
|
||||
function scrollBottom() {
|
||||
getList();
|
||||
}
|
||||
|
||||
function changeOption(index) {
|
||||
state.tabIndex = index;
|
||||
if (index === 'all') {
|
||||
pageState.search = {};
|
||||
getList('refresh');
|
||||
} else {
|
||||
pageState.search.jobTitle = userInfo.value.jobTitle[index];
|
||||
getList('refresh');
|
||||
}
|
||||
}
|
||||
|
||||
function getList(type = 'add', loading = true) {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
...pageState.search,
|
||||
};
|
||||
$api.createRequest('/app/notice/recommend', params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.reser-content{
|
||||
width: 100%;
|
||||
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.content-top{
|
||||
display: flex
|
||||
padding: 28rpx
|
||||
.top-item{
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
margin-right: 48rpx
|
||||
color: #666D7F;
|
||||
white-space: nowrap
|
||||
}
|
||||
.top-item:last-child{
|
||||
padding-right: 38rpx
|
||||
}
|
||||
.active{
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
.main{
|
||||
flex: 1
|
||||
overflow: hidden
|
||||
background: #F4F4F4
|
||||
.scroll-view{
|
||||
height: 100%
|
||||
.list{
|
||||
padding: 0 28rpx 28rpx 28rpx
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
340
packageA/pages/personalInfo/personalInfo.vue
Normal file
340
packageA/pages/personalInfo/personalInfo.vue
Normal file
@@ -0,0 +1,340 @@
|
||||
<template>
|
||||
<AppLayout
|
||||
title="个人信息"
|
||||
:sub-title="`完成度${percent}`"
|
||||
border
|
||||
back-gorund-color="#ffffff"
|
||||
:show-bg-image="false"
|
||||
>
|
||||
<template #headerleft>
|
||||
<view class="btn mar_le20 button-click" @click="navBack">取消</view>
|
||||
</template>
|
||||
<template #headerright>
|
||||
<view class="btn mar_ri20 button-click" @click="confirm">确认</view>
|
||||
</template>
|
||||
<view class="content">
|
||||
<view class="content-input">
|
||||
<view class="input-titile">姓名</view>
|
||||
<input class="input-con" v-model="fromValue.name" placeholder="请输入您的姓名" />
|
||||
</view>
|
||||
<view class="content-sex">
|
||||
<view class="sex-titile">性别</view>
|
||||
<view class="sext-ri">
|
||||
<view class="sext-box" :class="{ 'sext-boxactive': fromValue.sex === 0 }" @click="changeSex(0)">
|
||||
男
|
||||
</view>
|
||||
<view class="sext-box" :class="{ 'sext-boxactive': fromValue.sex === 1 }" @click="changeSex(1)">
|
||||
女
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-input" @click="changeDateBirt">
|
||||
<view class="input-titile">出生年月</view>
|
||||
<input
|
||||
class="input-con triangle"
|
||||
v-model="fromValue.birthDate"
|
||||
disabled
|
||||
placeholder="请选择您的出生年月"
|
||||
/>
|
||||
</view>
|
||||
<view class="content-input" @click="changeEducation">
|
||||
<view class="input-titile">学历</view>
|
||||
<input class="input-con triangle" v-model="state.educationText" disabled placeholder="请选择您的学历" />
|
||||
</view>
|
||||
<view class="content-input" @click="changePoliticalAffiliation">
|
||||
<view class="input-titile">政治面貌</view>
|
||||
<input
|
||||
class="input-con triangle"
|
||||
v-model="state.politicalAffiliationText"
|
||||
disabled
|
||||
placeholder="请选择您的政治面貌"
|
||||
/>
|
||||
</view>
|
||||
<view class="content-input">
|
||||
<view class="input-titile">手机号码</view>
|
||||
<input class="input-con" v-model="fromValue.phone" placeholder="请输入您的手机号码" />
|
||||
</view>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, navBack, checkingPhoneRegExp } = inject('globalFunction');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { getUserResume } = useUserStore();
|
||||
const { dictLabel, oneDictData } = useDictStore();
|
||||
const openSelectPopup = inject('openSelectPopup');
|
||||
|
||||
const percent = ref('0%');
|
||||
const state = reactive({
|
||||
educationText: '',
|
||||
politicalAffiliationText: '',
|
||||
});
|
||||
const fromValue = reactive({
|
||||
name: '',
|
||||
sex: 0,
|
||||
birthDate: '',
|
||||
education: '',
|
||||
politicalAffiliation: '',
|
||||
});
|
||||
onLoad(() => {
|
||||
initLoad();
|
||||
// setTimeout(() => {
|
||||
// const { age, birthDate } = useUserStore().userInfo;
|
||||
// const newAge = calculateAge(birthDate);
|
||||
// // 计算年龄是否对等
|
||||
// if (age != newAge) {
|
||||
// completeResume();
|
||||
// }
|
||||
// }, 1000);
|
||||
});
|
||||
|
||||
function initLoad() {
|
||||
fromValue.name = userInfo.value.name;
|
||||
fromValue.sex = Number(userInfo.value.sex);
|
||||
fromValue.phone = userInfo.value.phone;
|
||||
fromValue.birthDate = userInfo.value.birthDate;
|
||||
fromValue.education = userInfo.value.education;
|
||||
fromValue.politicalAffiliation = userInfo.value.politicalAffiliation;
|
||||
// 回显
|
||||
state.educationText = dictLabel('education', userInfo.value.education);
|
||||
state.politicalAffiliationText = dictLabel('affiliation', userInfo.value.politicalAffiliation);
|
||||
const result = getFormCompletionPercent(fromValue);
|
||||
percent.value = result;
|
||||
}
|
||||
const confirm = () => {
|
||||
if (!fromValue.name) {
|
||||
return $api.msg('请输入姓名');
|
||||
}
|
||||
if (!fromValue.birthDate) {
|
||||
return $api.msg('请选择出生年月');
|
||||
}
|
||||
if (!fromValue.education) {
|
||||
return $api.msg('请选择学历');
|
||||
}
|
||||
if (!fromValue.politicalAffiliation) {
|
||||
return $api.msg('请选择政治面貌');
|
||||
}
|
||||
if (!checkingPhoneRegExp(fromValue.phone)) {
|
||||
return $api.msg('请输入正确手机号');
|
||||
}
|
||||
const params = {
|
||||
...fromValue,
|
||||
age: calculateAge(fromValue.birthDate),
|
||||
};
|
||||
$api.createRequest('/app/user/resume', params, 'post').then((resData) => {
|
||||
$api.msg('完成');
|
||||
state.disbleDate = true;
|
||||
getUserResume().then(() => {
|
||||
navBack();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const changeDateBirt = () => {
|
||||
const datearray = generateDatePickerArrays();
|
||||
const defaultIndex = getDatePickerIndexes(fromValue.birthDate);
|
||||
openSelectPopup({
|
||||
title: '年龄段',
|
||||
maskClick: true,
|
||||
data: datearray,
|
||||
defaultIndex,
|
||||
success: (_, value) => {
|
||||
const [year, month, day] = value;
|
||||
const dateStr = `${year.value}-${month.value}-${day.value}`;
|
||||
if (isValidDate(dateStr)) {
|
||||
fromValue.birthDate = dateStr;
|
||||
} else {
|
||||
$api.msg('没有这一天');
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
const changeEducation = () => {
|
||||
openSelectPopup({
|
||||
title: '学历',
|
||||
maskClick: true,
|
||||
data: [oneDictData('education')],
|
||||
success: (_, [value]) => {
|
||||
fromValue.education = value.value;
|
||||
state.educationText = value.label;
|
||||
},
|
||||
});
|
||||
};
|
||||
const changeSex = (sex) => {
|
||||
fromValue.sex = sex;
|
||||
};
|
||||
|
||||
const changePoliticalAffiliation = () => {
|
||||
openSelectPopup({
|
||||
title: '政治面貌',
|
||||
maskClick: true,
|
||||
data: [oneDictData('affiliation')],
|
||||
success: (_, [value]) => {
|
||||
fromValue.politicalAffiliation = value.value;
|
||||
state.politicalAffiliationText = value.label;
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
function generateDatePickerArrays(startYear = 1975, endYear = new Date().getFullYear()) {
|
||||
const years = [];
|
||||
const months = [];
|
||||
const days = [];
|
||||
|
||||
for (let y = startYear; y <= endYear; y++) {
|
||||
years.push(y.toString());
|
||||
}
|
||||
for (let m = 1; m <= 12; m++) {
|
||||
months.push(m.toString().padStart(2, '0'));
|
||||
}
|
||||
for (let d = 1; d <= 31; d++) {
|
||||
days.push(d.toString().padStart(2, '0'));
|
||||
}
|
||||
|
||||
return [years, months, days];
|
||||
}
|
||||
|
||||
function isValidDate(dateString) {
|
||||
const [year, month, day] = dateString.split('-').map(Number);
|
||||
|
||||
const date = new Date(year, month - 1, day); // 月份从0开始
|
||||
return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day;
|
||||
}
|
||||
|
||||
const calculateAge = (birthDate) => {
|
||||
const birth = new Date(birthDate);
|
||||
const today = new Date();
|
||||
let age = today.getFullYear() - birth.getFullYear();
|
||||
const monthDiff = today.getMonth() - birth.getMonth();
|
||||
const dayDiff = today.getDate() - birth.getDate();
|
||||
|
||||
// 如果生日的月份还没到,或者刚到生日月份但当天还没过,则年龄减 1
|
||||
if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) {
|
||||
age--;
|
||||
}
|
||||
|
||||
return age;
|
||||
};
|
||||
|
||||
function getFormCompletionPercent(form) {
|
||||
let total = Object.keys(form).length;
|
||||
let filled = 0;
|
||||
|
||||
for (const key in form) {
|
||||
const value = form[key];
|
||||
if (value !== '' && value !== null && value !== undefined) {
|
||||
if (typeof value === 'number') {
|
||||
filled += 1;
|
||||
} else if (typeof value === 'string' && value.trim() !== '') {
|
||||
filled += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (total === 0) return '0%';
|
||||
const percent = (filled / total) * 100;
|
||||
return percent.toFixed(0) + '%'; // 取整,不要小数点
|
||||
}
|
||||
// 主函数
|
||||
function getDatePickerIndexes(dateStr) {
|
||||
const [year, month, day] = dateStr.split('-');
|
||||
|
||||
const [years, months, days] = generateDatePickerArrays();
|
||||
|
||||
const yearIndex = years.indexOf(year);
|
||||
const monthIndex = months.indexOf(month);
|
||||
const dayIndex = days.indexOf(day);
|
||||
|
||||
return [yearIndex, monthIndex, dayIndex];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.btn{
|
||||
margin-top: -30rpx
|
||||
}
|
||||
.content{
|
||||
padding: 28rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start
|
||||
height: calc(100% - 120rpx)
|
||||
|
||||
}
|
||||
.content-input
|
||||
margin-bottom: 52rpx
|
||||
.input-titile
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6A6A6A;
|
||||
.input-con
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
line-height: 80rpx;
|
||||
height: 80rpx;
|
||||
border-bottom: 2rpx solid #EBEBEB
|
||||
position: relative;
|
||||
.triangle::before
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: calc(50% - 2rpx);
|
||||
content: '';
|
||||
width: 4rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 2rpx
|
||||
background: #697279;
|
||||
transform: translate(0, -50%) rotate(-45deg) ;
|
||||
.triangle::after
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 50%;
|
||||
content: '';
|
||||
width: 4rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 2rpx
|
||||
background: #697279;
|
||||
transform: rotate(45deg)
|
||||
.content-sex
|
||||
height: 110rpx;
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
border-bottom: 2rpx solid #EBEBEB
|
||||
margin-bottom: 52rpx
|
||||
.sex-titile
|
||||
line-height: 80rpx;
|
||||
.sext-ri
|
||||
display: flex
|
||||
align-items: center;
|
||||
.sext-box
|
||||
height: 76rpx;
|
||||
width: 152rpx;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx
|
||||
border: 2rpx solid #E8EAEE;
|
||||
margin-left: 28rpx
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
.sext-boxactive
|
||||
color: #256BFA
|
||||
background: rgba(37,107,250,0.1);
|
||||
border: 2rpx solid #256BFA;
|
||||
.next-btn
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background: #256BFA;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 90rpx
|
||||
</style>
|
||||
167
packageA/pages/post/component/radarMap.vue
Normal file
167
packageA/pages/post/component/radarMap.vue
Normal file
@@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<view style="display: flex; justify-content: center; padding: 0px 0">
|
||||
<canvas canvas-id="radarCanvas" id="radarCanvas" style="width: 300px; height: 250px"></canvas>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
// const src = ref('');
|
||||
|
||||
const props = defineProps({
|
||||
value: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
|
||||
// 监听页面初始化
|
||||
onMounted(() => {
|
||||
if (Object.keys(props.value).length > 0) {
|
||||
rawRadarChart();
|
||||
}
|
||||
});
|
||||
|
||||
// 监听 props.value 变化
|
||||
watch(
|
||||
() => props.value,
|
||||
(newVal) => {
|
||||
if (newVal && Object.keys(newVal).length > 0) {
|
||||
const { skill, experience, education, salary, age, location } = newVal.radarChart;
|
||||
const labels = ['学历', '年龄', '工作地', '技能', '工作经验', '期望薪资'];
|
||||
const data = [education, age, location, skill, experience, salary].map((item) => item * 0.05);
|
||||
rawRadarChart(labels, data);
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: false } // deep 递归监听对象内部变化
|
||||
);
|
||||
|
||||
function rawRadarChart(labels, data) {
|
||||
const ctx = uni.createCanvasContext('radarCanvas');
|
||||
const width = 80;
|
||||
const height = 80;
|
||||
const centerX = 150;
|
||||
const centerY = 125;
|
||||
// const data = [2, 3.5, 5, 3.5, 5, 3.5]; // 示例数据
|
||||
// const labels = ['火烧', '泡水', '事故', '外观', '部件', '火烧'];
|
||||
const colors = ['#F5F5F5', '#F5F5F5', '#F5F5F5', '#F5F5F5', '#F5F5F5'];
|
||||
const maxScore = 5; // 数据最大值
|
||||
|
||||
const angleStep = (2 * Math.PI) / labels.length;
|
||||
|
||||
// 绘制背景多边形
|
||||
ctx.setLineWidth(1);
|
||||
ctx.setStrokeStyle('#F6F6F6');
|
||||
|
||||
//底部圆盘
|
||||
ctx.beginPath();
|
||||
ctx.arc(centerX, centerY, width, 0, 2 * Math.PI);
|
||||
ctx.setFillStyle('#FFFFFF');
|
||||
ctx.closePath();
|
||||
ctx.fill();
|
||||
|
||||
//多边形圈
|
||||
// 多边形圈
|
||||
for (let i = 5; i > 0; i--) {
|
||||
ctx.setStrokeStyle(colors[i - 1]); // 设置边框颜色
|
||||
ctx.beginPath();
|
||||
labels.forEach((label, index) => {
|
||||
const x = centerX + (width / 5) * i * Math.cos(angleStep * index - Math.PI / 2);
|
||||
const y = centerY + (height / 5) * i * Math.sin(angleStep * index - Math.PI / 2);
|
||||
if (index === 0) {
|
||||
ctx.moveTo(x, y);
|
||||
} else {
|
||||
ctx.lineTo(x, y);
|
||||
}
|
||||
});
|
||||
ctx.closePath();
|
||||
ctx.stroke(); // 只描边,不填充
|
||||
}
|
||||
|
||||
// //竖线
|
||||
labels.forEach((label, index) => {
|
||||
ctx.setStrokeStyle('#F5F5F5');
|
||||
ctx.setFillStyle('#F5F5F5');
|
||||
ctx.beginPath();
|
||||
|
||||
const x1 = centerX + width * 0.6 * Math.sin(angleStep * index);
|
||||
const y1 = centerY + height * 0.6 * Math.cos(angleStep * index);
|
||||
const x = centerX + width * Math.sin(angleStep * index);
|
||||
const y = centerY + height * Math.cos(angleStep * index);
|
||||
|
||||
ctx.moveTo(x1, y1);
|
||||
ctx.lineTo(x, y);
|
||||
|
||||
ctx.closePath();
|
||||
ctx.stroke();
|
||||
});
|
||||
|
||||
// 绘制雷达图数据
|
||||
ctx.setStrokeStyle('#256BFA');
|
||||
ctx.setFillStyle('rgba(37,107,250, 0.24)');
|
||||
ctx.setLineWidth(2);
|
||||
ctx.beginPath();
|
||||
const pointList = []; // 记录每个点的位置,等会画小圆点
|
||||
data.forEach((score, index) => {
|
||||
const x = centerX + width * (score / maxScore) * Math.cos(angleStep * index - Math.PI / 2);
|
||||
const y = centerY + height * (score / maxScore) * Math.sin(angleStep * index - Math.PI / 2);
|
||||
pointList.push({ x, y }); // 保存位置
|
||||
if (index === 0) {
|
||||
ctx.moveTo(x, y);
|
||||
} else {
|
||||
ctx.lineTo(x, y);
|
||||
}
|
||||
});
|
||||
ctx.closePath();
|
||||
ctx.fill();
|
||||
ctx.stroke();
|
||||
|
||||
// 绘制每个小圆点
|
||||
ctx.setFillStyle('#256BFA'); // 小圆点颜色(你可以改)
|
||||
pointList.forEach((point) => {
|
||||
ctx.beginPath();
|
||||
ctx.arc(point.x, point.y, 4, 0, 2 * Math.PI); // 半径 4,可以自己调大小
|
||||
ctx.fill();
|
||||
});
|
||||
|
||||
// 绘制标签
|
||||
ctx.setTextAlign('center');
|
||||
|
||||
labels.forEach((label, index) => {
|
||||
const x = centerX + (width + 30) * Math.cos(angleStep * index - Math.PI / 2);
|
||||
const y = centerY + (height + 26) * Math.sin(angleStep * index - Math.PI / 2);
|
||||
|
||||
//标题
|
||||
ctx.setFillStyle('#000');
|
||||
ctx.setFontSize(12);
|
||||
ctx.font = 'bold 12px sans-serif';
|
||||
ctx.fillText(label, x, y);
|
||||
|
||||
// ctx.setFillStyle('#A2A4A2');
|
||||
// ctx.font = '12px sans-serif';
|
||||
// ctx.setFontSize(12);
|
||||
// ctx.fillText(data[index], x, y + 16);
|
||||
});
|
||||
|
||||
ctx.draw();
|
||||
|
||||
//转图片
|
||||
|
||||
// uni.canvasToTempFilePath({
|
||||
// x: 0,
|
||||
// y: 0,
|
||||
// width: 320,
|
||||
// height: 320,
|
||||
// destWidth: 840,
|
||||
// destHeight: 840,
|
||||
// canvasId: 'radarCanvas',
|
||||
// success: (res) => {
|
||||
// // 在H5平台下,tempFilePath 为 base64
|
||||
// src = res.tempFilePath;
|
||||
// },
|
||||
// });
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
190
packageA/pages/post/component/videoPlayer.vue
Normal file
190
packageA/pages/post/component/videoPlayer.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<!-- 小窗播放容器 -->
|
||||
<view
|
||||
v-if="visible"
|
||||
class="mini-player"
|
||||
:style="{
|
||||
left: position.x + 'px',
|
||||
top: position.y + 'px',
|
||||
width: isFullScreen ? '100%' : videoWidth + 'rpx',
|
||||
height: isFullScreen ? '100vh' : videoHeight + 'rpx',
|
||||
}"
|
||||
@touchstart="handleTouchStart"
|
||||
@touchmove="handleTouchMove"
|
||||
@touchend="handleTouchEnd"
|
||||
@touchmove.stop.prevent
|
||||
>
|
||||
<!-- 视频组件 -->
|
||||
<video
|
||||
:src="videoUrl"
|
||||
:controls="true"
|
||||
:show-progress="isFullScreen"
|
||||
:style="{
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
}"
|
||||
id="myVideo"
|
||||
ref="videoRef"
|
||||
@play="onPlay"
|
||||
@pause="onPause"
|
||||
@loadedmetadata="onLoadedMetadata"
|
||||
></video>
|
||||
|
||||
<!-- 控制栏 -->
|
||||
<view class="controls">
|
||||
<!-- <text @click="togglePlay">{{ isPlaying ? '暂停' : '播放' }}</text>
|
||||
<text @click="toggleFullScreen">{{ isFullScreen ? '退出全屏' : '全屏' }}</text> -->
|
||||
<text @click="close">关闭</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const videoRef = ref(null);
|
||||
|
||||
const visible = ref(false);
|
||||
const isPlaying = ref(false);
|
||||
const isFullScreen = ref(false);
|
||||
const videoUrl = ref('');
|
||||
const position = reactive({ x: 20, y: 100 });
|
||||
const videoContext = ref(null);
|
||||
const startPos = reactive({ x: 0, y: 0 });
|
||||
const moving = ref(false);
|
||||
const videoWidth = ref(0);
|
||||
const videoHeight = ref(0);
|
||||
|
||||
// 初始化视频上下文
|
||||
onMounted(() => {
|
||||
videoContext.value = uni.createVideoContext('myVideo');
|
||||
});
|
||||
|
||||
// 触摸开始
|
||||
const handleTouchStart = (e) => {
|
||||
if (isFullScreen.value) return;
|
||||
startPos.x = e.touches[0].clientX - position.x;
|
||||
startPos.y = e.touches[0].clientY - position.y;
|
||||
moving.value = true;
|
||||
};
|
||||
|
||||
// 触摸移动
|
||||
const handleTouchMove = (e) => {
|
||||
if (!moving.value || isFullScreen.value) return;
|
||||
|
||||
const newX = e.touches[0].clientX - startPos.x;
|
||||
const newY = e.touches[0].clientY - startPos.y;
|
||||
|
||||
// 边界检测
|
||||
const maxX = window.innerWidth - videoWidth.value / 2; // 300rpx换算后的值
|
||||
const maxY = window.innerHeight - videoHeight.value / 2;
|
||||
|
||||
position.x = Math.max(0, Math.min(newX, maxX));
|
||||
position.y = Math.max(0, Math.min(newY, maxY));
|
||||
};
|
||||
|
||||
// 触摸结束
|
||||
const handleTouchEnd = () => {
|
||||
moving.value = false;
|
||||
};
|
||||
|
||||
// 播放状态变化
|
||||
const onPlay = () => {
|
||||
isPlaying.value = true;
|
||||
};
|
||||
|
||||
const onPause = () => {
|
||||
isPlaying.value = false;
|
||||
};
|
||||
|
||||
// 切换播放状态
|
||||
const togglePlay = () => {
|
||||
isPlaying.value ? videoContext.value.pause() : videoContext.value.play();
|
||||
};
|
||||
|
||||
// 切换全屏
|
||||
const toggleFullScreen = () => {
|
||||
isFullScreen.value = !isFullScreen.value;
|
||||
if (!isFullScreen.value) {
|
||||
// 退出全屏时恢复原位
|
||||
position.x = 20;
|
||||
position.y = 100;
|
||||
}
|
||||
};
|
||||
|
||||
// 关闭播放器
|
||||
const close = () => {
|
||||
visible.value = false;
|
||||
videoContext.value.stop();
|
||||
isPlaying.value = false;
|
||||
isFullScreen.value = false;
|
||||
};
|
||||
|
||||
// 打开播放器方法
|
||||
const open = (url) => {
|
||||
videoUrl.value = url;
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
videoContext.value.play();
|
||||
});
|
||||
};
|
||||
|
||||
const onLoadedMetadata = (e) => {
|
||||
const video = e.detail;
|
||||
const width = video.width;
|
||||
const height = video.height;
|
||||
const ratio = width / height;
|
||||
|
||||
// 设置宽度:横屏宽 300,竖屏宽 180(可自定义)
|
||||
if (ratio >= 1) {
|
||||
videoWidth.value = 300; // 横屏
|
||||
videoHeight.value = 300 * (height / width); // 保持比例
|
||||
} else {
|
||||
videoWidth.value = 180; // 竖屏
|
||||
videoHeight.value = 180 * (height / width); // 保持比例
|
||||
}
|
||||
// console.log(`宽高: ${width}x${height}`);
|
||||
// console.log(`比例: ${ratio.toFixed(2)} (${getRatioName(ratio)})`);
|
||||
};
|
||||
|
||||
function getRatioName(ratio) {
|
||||
const rounded = Math.round(ratio * 100) / 100;
|
||||
if (Math.abs(rounded - 16 / 9) < 0.01) return '16:9';
|
||||
if (Math.abs(rounded - 4 / 3) < 0.01) return '4:3';
|
||||
if (Math.abs(rounded - 1) < 0.01) return '1:1';
|
||||
return `${rounded.toFixed(2)}:1`;
|
||||
}
|
||||
|
||||
// 暴露方法
|
||||
defineExpose({ open });
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.mini-player {
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
background: #000;
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.controls {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
/* background: rgba(0, 0, 0, 0.7); */
|
||||
padding: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.controls text {
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
</style>
|
||||
568
packageA/pages/post/post.vue
Normal file
568
packageA/pages/post/post.vue
Normal file
@@ -0,0 +1,568 @@
|
||||
<template>
|
||||
<AppLayout title="" backGorundColor="#F4F4F4">
|
||||
<template #headerleft>
|
||||
<view class="btnback">
|
||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<template #headerright>
|
||||
<!-- <view class="btnshare">
|
||||
<image src="@/static/icon/share.png" @click="shareJob"></image>
|
||||
</view> -->
|
||||
<view class="btn mar_ri10">
|
||||
<image src="@/static/icon/collect3.png" v-if="!jobInfo.isCollection" @click="jobCollection"></image>
|
||||
<image src="@/static/icon/collect2.png" v-else @click="jobCollection"></image>
|
||||
</view>
|
||||
</template>
|
||||
<view class="content" v-show="!isEmptyObject(jobInfo)">
|
||||
<view class="content-top btn-feel">
|
||||
<view class="top-salary">
|
||||
<Salary-Expectation
|
||||
:max-salary="jobInfo.maxSalary"
|
||||
:min-salary="jobInfo.minSalary"
|
||||
:is-month="true"
|
||||
></Salary-Expectation>
|
||||
</view>
|
||||
<view class="top-name">{{ jobInfo.jobTitle }}</view>
|
||||
<view class="top-info">
|
||||
<view class="info-img"><image src="/static/icon/post12.png"></image></view>
|
||||
<view class="info-text">
|
||||
<dict-Label dictType="experience" :value="jobInfo.experience"></dict-Label>
|
||||
</view>
|
||||
<view class="info-img mar_le20"><image src="/static/icon/post13.png"></image></view>
|
||||
<view class="info-text">
|
||||
<dict-Label dictType="education" :value="jobInfo.education"></dict-Label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="position-source">
|
||||
<text>来源 </text>
|
||||
{{ jobInfo.dataSource }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="ai-explain" v-if="jobInfo.isExplain">
|
||||
<view class="exbg">
|
||||
<view class="explain-left btn-shaky">
|
||||
<view class="leftText">AI+智能讲解,职位一听就懂</view>
|
||||
<view class="leftdownText">懒得看文字?我用AI讲给你听</view>
|
||||
</view>
|
||||
<view class="explain-right button-click" @click="seeExplain">点击查看</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-card">
|
||||
<view class="card-title">
|
||||
<text class="title">职位描述</text>
|
||||
</view>
|
||||
<view class="description" :style="{ whiteSpace: 'pre-wrap' }">
|
||||
{{ jobInfo.description }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-card">
|
||||
<view class="card-title">
|
||||
<text class="title">公司信息</text>
|
||||
<text
|
||||
class="btntext button-click"
|
||||
@click="navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.company.companyId}`)"
|
||||
>
|
||||
单位详情
|
||||
</text>
|
||||
</view>
|
||||
<view class="company-info">
|
||||
<view class="companyinfo-left">
|
||||
<image src="@/static/icon/companyIcon.png" mode=""></image>
|
||||
</view>
|
||||
<view class="companyinfo-right">
|
||||
<view class="row1">{{ jobInfo.company?.name }}</view>
|
||||
<view class="row2">
|
||||
<dict-tree-Label
|
||||
v-if="jobInfo.company?.industry"
|
||||
dictType="industry"
|
||||
:value="jobInfo.company?.industry"
|
||||
></dict-tree-Label>
|
||||
<span v-if="jobInfo.company?.industry"> </span>
|
||||
<dict-Label dictType="scale" :value="jobInfo.company?.scale"></dict-Label>
|
||||
</view>
|
||||
<view class="row2">
|
||||
<text>在招</text>
|
||||
<text style="color: #256bfa">{{ companyCount }}</text>
|
||||
<text>个职位</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="company-map" v-if="jobInfo.latitude && jobInfo.longitude">
|
||||
<map
|
||||
style="width: 100%; height: 100%"
|
||||
:latitude="jobInfo.latitude"
|
||||
:longitude="jobInfo.longitude"
|
||||
:markers="mapCovers"
|
||||
></map>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-card">
|
||||
<view class="card-title">
|
||||
<text class="title">竞争力分析</text>
|
||||
</view>
|
||||
<view class="description">
|
||||
三个月内共15位求职者申请,你的简历匹配度为{{ raderData.matchScore }}分,排名位于第{{
|
||||
raderData.rank
|
||||
}}位,超过{{ raderData.percentile }}%的竞争者,处在优秀位置。
|
||||
</view>
|
||||
<RadarMap :value="raderData"></RadarMap>
|
||||
|
||||
<view class="card-footer">
|
||||
<view class="footer-title">你与职位的匹配度</view>
|
||||
<view class="footer-content">
|
||||
<view class="progress-container">
|
||||
<view
|
||||
v-for="(item, index) in matchingDegree"
|
||||
:key="index"
|
||||
class="progress-item"
|
||||
:class="getClass(index)"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="progress-text">
|
||||
<view class="text-rpx" v-for="(item, index) in matchingDegree" :key="index">{{ item }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 24px"></view>
|
||||
</view>
|
||||
<template #footer>
|
||||
<view class="footer">
|
||||
<view class="btn-wq button-click" @click="jobApply">立即前往</view>
|
||||
</view>
|
||||
</template>
|
||||
<VideoPlayer ref="videoPalyerRef" />
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import point from '@/static/icon/point.png';
|
||||
import VideoPlayer from './component/videoPlayer.vue';
|
||||
import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
|
||||
import { onLoad, onShow, onHide } from '@dcloudio/uni-app';
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import RadarMap from './component/radarMap.vue';
|
||||
const { $api, navTo, getLenPx, parseQueryParams, navBack, isEmptyObject } = inject('globalFunction');
|
||||
import config from '@/config.js';
|
||||
const matchingDegree = ref(['一般', '良好', '优秀', '极好']);
|
||||
const currentStep = ref(1);
|
||||
const companyCount = ref(0);
|
||||
const jobInfo = ref({});
|
||||
const state = reactive({});
|
||||
const mapCovers = ref([]);
|
||||
const jobIdRef = ref();
|
||||
const raderData = ref({});
|
||||
const videoPalyerRef = ref(null);
|
||||
const explainUrlRef = ref('');
|
||||
|
||||
onLoad((option) => {
|
||||
if (option.jobId) {
|
||||
initLoad(option);
|
||||
}
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
const option = parseQueryParams(); // 兼容微信内置浏览器
|
||||
if (option.jobId) {
|
||||
initLoad(option);
|
||||
}
|
||||
});
|
||||
|
||||
function initLoad(option) {
|
||||
const jobId = atob(option.jobId);
|
||||
if (jobId !== jobIdRef.value) {
|
||||
jobIdRef.value = jobId;
|
||||
getDetail(jobId);
|
||||
}
|
||||
}
|
||||
|
||||
function seeExplain() {
|
||||
if (jobInfo.value.explainUrl) {
|
||||
videoPalyerRef.value?.open(jobInfo.value.explainUrl);
|
||||
// console.log(jobInfo.value.explainUrl);
|
||||
// explainUrlRef.value = jobInfo.value.explainUrl;
|
||||
}
|
||||
}
|
||||
|
||||
function getDetail(jobId) {
|
||||
return new Promise((reslove, reject) => {
|
||||
$api.createRequest(`/app/job/${jobId}`).then((resData) => {
|
||||
const { latitude, longitude, companyName, companyId } = resData.data;
|
||||
jobInfo.value = resData.data;
|
||||
reslove(resData.data);
|
||||
getCompanyIsAJobs(companyId);
|
||||
getCompetivetuveness(jobId);
|
||||
if (latitude && longitude) {
|
||||
mapCovers.value = [
|
||||
{
|
||||
latitude: latitude,
|
||||
longitude: longitude,
|
||||
iconPath: point,
|
||||
label: {
|
||||
content: companyName,
|
||||
textAlign: 'center',
|
||||
padding: 3,
|
||||
fontSize: 12,
|
||||
bgColor: '#FFFFFF',
|
||||
anchorX: getTextWidth(companyName), // X 轴调整,负数向左
|
||||
borderRadius: 5,
|
||||
},
|
||||
width: 34,
|
||||
},
|
||||
];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getCompanyIsAJobs(companyId) {
|
||||
$api.createRequest(`/app/company/count/${companyId}`).then((resData) => {
|
||||
companyCount.value = resData.data;
|
||||
});
|
||||
}
|
||||
|
||||
function getTextWidth(text, size = 12) {
|
||||
const canvas = document.createElement('canvas');
|
||||
const context = canvas.getContext('2d');
|
||||
context.font = `${12}px Arial`;
|
||||
return -(context.measureText(text).width / 2) - 20; // 计算文字中心点
|
||||
}
|
||||
|
||||
function getCompetivetuveness(jobId) {
|
||||
$api.createRequest(`/app/job/competitiveness/${jobId}`, {}, 'GET').then((resData) => {
|
||||
raderData.value = resData.data;
|
||||
currentStep.value = resData.data.matchScore * 0.04;
|
||||
});
|
||||
}
|
||||
|
||||
// 申请岗位
|
||||
function jobApply() {
|
||||
const jobId = jobInfo.value.jobId;
|
||||
if (jobInfo.value.isApply) {
|
||||
const jobUrl = jobInfo.value.jobUrl;
|
||||
return window.open(jobUrl);
|
||||
} else {
|
||||
$api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => {
|
||||
getDetail(jobId);
|
||||
$api.msg('申请成功');
|
||||
const jobUrl = jobInfo.value.jobUrl;
|
||||
return window.open(jobUrl);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 取消/收藏岗位
|
||||
function jobCollection() {
|
||||
const jobId = jobInfo.value.jobId;
|
||||
if (jobInfo.value.isCollection) {
|
||||
$api.createRequest(`/app/job/collection/${jobId}`, {}, 'DELETE').then((resData) => {
|
||||
getDetail(jobId);
|
||||
$api.msg('取消收藏成功');
|
||||
});
|
||||
} else {
|
||||
$api.createRequest(`/app/job/collection/${jobId}`, {}, 'POST').then((resData) => {
|
||||
getDetail(jobId);
|
||||
$api.msg('收藏成功');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getClass(index) {
|
||||
const current = currentStep.value;
|
||||
const floorIndex = Math.floor(current);
|
||||
|
||||
if (index < floorIndex) {
|
||||
return 'active';
|
||||
} else if (index === floorIndex) {
|
||||
const decimal = current % 1;
|
||||
const percent = Math.round(decimal * 100);
|
||||
return `half${percent}`;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.btnback{
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
}
|
||||
.btnshare {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-right: 46rpx;
|
||||
}
|
||||
image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.progress-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx; /* 间距 */
|
||||
margin-top: 24rpx
|
||||
|
||||
}
|
||||
.progress-text{
|
||||
margin-top: 8rpx
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx; /* 间距 */
|
||||
justify-content: space-around
|
||||
width: 100%
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.progress-item {
|
||||
width: 25%;
|
||||
height: 24rpx;
|
||||
background-color: #eee;
|
||||
border-radius: 24rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
/* 完整激活格子 */
|
||||
.progress-item.active {
|
||||
background: linear-gradient(to right, #256bfa, #8c68ff);
|
||||
}
|
||||
|
||||
/* 当前进度进行中的格子 */
|
||||
for i in 0..100
|
||||
.progress-item.half{i}::before
|
||||
content ''
|
||||
position absolute
|
||||
left 0
|
||||
top 0
|
||||
bottom 0
|
||||
width 100%
|
||||
background linear-gradient(to right, #256bfa (i)%, #eaeaea (i)%)
|
||||
border-radius 24rpx
|
||||
|
||||
|
||||
|
||||
.card-footer{
|
||||
.footer-title{
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.footer-content{
|
||||
.content-line{
|
||||
display: grid
|
||||
grid-template-columns: repeat(4, 1fr)
|
||||
background: linear-gradient( to left, #9E74FD 0%, #256BFA 100%);
|
||||
border-radius: 10rpx
|
||||
.line-pargrah{
|
||||
height: 20rpx;
|
||||
position: relative
|
||||
}
|
||||
.line-pargrah::after{
|
||||
position: absolute;
|
||||
content: '';
|
||||
right: 10
|
||||
top: 0
|
||||
width: 6rpx
|
||||
height: 20rpx
|
||||
background: #FFFFFF
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ai
|
||||
.ai-explain{
|
||||
margin-top: 28rpx
|
||||
background-color: #FFFFFF
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
overflow: hidden
|
||||
.exbg{
|
||||
padding: 28rpx 40rpx;
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: space-between
|
||||
background: url('@/static/icon/aibg.png') center center no-repeat;
|
||||
background-size: 100% 100%
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.explain-left{
|
||||
.leftText{
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.leftdownText{
|
||||
margin-top: 12rpx
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #495265;
|
||||
}
|
||||
}
|
||||
.explain-right{
|
||||
width: 168rpx;
|
||||
height: 72rpx;
|
||||
border-radius: 40rpx 40rpx 40rpx 40rpx;
|
||||
border: 2rpx solid #E7E9ED;
|
||||
text-align: center;
|
||||
line-height: 72rpx
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
padding: 0 28rpx
|
||||
height: 100%
|
||||
.content-top{
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
padding: 52rpx 32rpx 34rpx 32rpx
|
||||
position: relative
|
||||
overflow: hidden
|
||||
.top-salary{
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #4C6EFB;
|
||||
}
|
||||
.top-name{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
margin-top: 8rpx
|
||||
}
|
||||
.top-info{
|
||||
margin-top: 22rpx
|
||||
display: flex;
|
||||
align-items: center
|
||||
.info-img{
|
||||
width: 40rpx;
|
||||
height: 40rpx
|
||||
}
|
||||
.info-text{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6C7282;
|
||||
margin-left: 10rpx
|
||||
}
|
||||
}
|
||||
.position-source{
|
||||
position: absolute
|
||||
top: 0
|
||||
right: 0
|
||||
width: fit-content;
|
||||
height: 76rpx;
|
||||
padding: 0 24rpx
|
||||
background: rgba(37,107,250,0.1);
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
|
||||
text-align: center
|
||||
line-height: 76rpx
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #64779F;
|
||||
border-bottom-left-radius: 20rpx
|
||||
}
|
||||
}
|
||||
.content-card{
|
||||
padding: 24rpx
|
||||
margin-top: 28rpx
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
.card-title{
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
position: relative;
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
.title{
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
.btntext{
|
||||
white-space: nowrap
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #256BFA;
|
||||
}
|
||||
}
|
||||
.card-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;
|
||||
}
|
||||
.description{
|
||||
margin-top: 30rpx
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #495265;
|
||||
}
|
||||
.company-info{
|
||||
padding-top: 30rpx
|
||||
display: flex
|
||||
flex-direction: row
|
||||
flex-wrap: nowrap
|
||||
.companyinfo-left{
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
margin-right: 24rpx
|
||||
}
|
||||
.companyinfo-right{
|
||||
|
||||
.row1{
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.row2{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6C7282;
|
||||
line-height: 45rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.company-map{
|
||||
margin-top: 28rpx
|
||||
height: 416rpx;
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
overflow: hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
.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
|
||||
}
|
||||
}
|
||||
</style>
|
||||
162
packageA/pages/reservation/component/countdown.vue
Normal file
162
packageA/pages/reservation/component/countdown.vue
Normal file
@@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<div class="countdown-wrapper" style="width: 100%">
|
||||
<template v-if="isNotStarted">
|
||||
<view class="fl_box fl_nowarp fl_justbet" style="width: 100%">
|
||||
<view class="fl_box">
|
||||
<span class="colon">距离开始还剩</span>
|
||||
<div class="time-block">{{ days }}</div>
|
||||
<span class="colon">天</span>
|
||||
</view>
|
||||
<view style="color: #ff881a">待开始</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template v-else-if="isEnd">
|
||||
<view class="fl_box fl_nowarp fl_justbet" style="width: 100%">
|
||||
<view class="fl_box">
|
||||
<span class="colon hui">距离结束还剩</span>
|
||||
<div class="time-block huibg">00</div>
|
||||
<span class="colon hui">:</span>
|
||||
<div class="time-block huibg">00</div>
|
||||
<span class="colon hui">:</span>
|
||||
<div class="time-block huibg">00</div>
|
||||
</view>
|
||||
<view class="hui">已结束</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<template v-if="showDays">
|
||||
<view class="fl_box fl_nowarp fl_justbet" style="width: 100%">
|
||||
<view class="fl_box">
|
||||
<span class="colon">距离结束还剩</span>
|
||||
<div class="time-block">{{ days }}</div>
|
||||
<span class="colon">天</span>
|
||||
</view>
|
||||
<view style="color: #18a14f">进行中</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="fl_box fl_nowarp fl_justbet" style="width: 100%">
|
||||
<view class="fl_box">
|
||||
<span class="colon">距离结束还剩</span>
|
||||
<div class="time-block">{{ hours }}</div>
|
||||
<span class="colon">:</span>
|
||||
<div class="time-block">{{ minutes }}</div>
|
||||
<span class="colon">:</span>
|
||||
<div class="time-block">{{ seconds }}</div>
|
||||
</view>
|
||||
<view style="color: #18a14f">进行中</view>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted, onUnmounted } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
startTime: { type: [String, Number, Date], required: true },
|
||||
endTime: { type: [String, Number, Date], required: true },
|
||||
interval: { type: Number, default: 1000 },
|
||||
});
|
||||
|
||||
const now = ref(Date.now());
|
||||
let timer = null;
|
||||
|
||||
const startTimestamp = computed(() => new Date(props.startTime).getTime());
|
||||
const endTimestamp = computed(() => new Date(props.endTime).getTime());
|
||||
|
||||
const isEnd = computed(() => now.value >= endTimestamp.value);
|
||||
const isNotStarted = computed(() => now.value < startTimestamp.value);
|
||||
|
||||
const targetTimestamp = computed(() => {
|
||||
if (isNotStarted.value) return startTimestamp.value;
|
||||
if (!isEnd.value) return endTimestamp.value;
|
||||
return now.value;
|
||||
});
|
||||
|
||||
const remainingMs = computed(() => Math.max(0, targetTimestamp.value - now.value));
|
||||
const secondsTotal = computed(() => Math.floor(remainingMs.value / 1000));
|
||||
|
||||
const showDays = computed(() => secondsTotal.value >= 86400);
|
||||
const days = computed(() => Math.ceil(secondsTotal.value / 86400));
|
||||
|
||||
const hours = computed(() => {
|
||||
const h = Math.floor(secondsTotal.value / 3600) % 24;
|
||||
return h.toString().padStart(2, '0');
|
||||
});
|
||||
const minutes = computed(() => {
|
||||
const m = Math.floor((secondsTotal.value % 3600) / 60);
|
||||
return m.toString().padStart(2, '0');
|
||||
});
|
||||
const seconds = computed(() => {
|
||||
const s = secondsTotal.value % 60;
|
||||
return s.toString().padStart(2, '0');
|
||||
});
|
||||
|
||||
const startTimer = () => {
|
||||
timer = setInterval(() => {
|
||||
now.value = Date.now();
|
||||
}, props.interval);
|
||||
};
|
||||
|
||||
const stopTimer = () => {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
startTimer();
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
stopTimer();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.countdown-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.time-block {
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
padding: 0 14rpx;
|
||||
background: #256bfa;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
|
||||
.colon {
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #256bfa;
|
||||
}
|
||||
|
||||
.day-text {
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hui {
|
||||
color: #b6b6b6;
|
||||
}
|
||||
.huibg {
|
||||
background-color: #b6b6b6;
|
||||
}
|
||||
.lan {
|
||||
color: #256bfa;
|
||||
}
|
||||
</style>
|
||||
195
packageA/pages/reservation/reservation.vue
Normal file
195
packageA/pages/reservation/reservation.vue
Normal file
@@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<view class="reser-content">
|
||||
<view class="content-top">
|
||||
<view
|
||||
class="top-item"
|
||||
:class="{ active: ranItem.value === item.value }"
|
||||
v-for="(item, index) in ranOptions"
|
||||
:key="index"
|
||||
@click="chnageRanOption(item)"
|
||||
>
|
||||
{{ item.label }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="main">
|
||||
<scroll-view scroll-y>
|
||||
<view v-if="pageState.list.length">
|
||||
<view class="card" v-for="(item, index) in pageState.list" :key="index">
|
||||
<view @click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.jobFairId)">
|
||||
<view class="card-row">
|
||||
<Countdown startTime="item.startTime" :endTime="item.endTime" />
|
||||
</view>
|
||||
<view class="card-Title">{{ item.name }}</view>
|
||||
<view class="card-row">
|
||||
<view class="rowleft">{{ item.location }}</view>
|
||||
<view class="rowright">
|
||||
<convert-distance
|
||||
:alat="item.latitude"
|
||||
:along="item.longitude"
|
||||
:blat="latitudeVal"
|
||||
:blong="longitudeVal"
|
||||
></convert-distance>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer" v-if="isTimePassed(item.startTime)">
|
||||
<view class="card_cancel" @click="updateCancel(item)">取消预约</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
|
||||
import Countdown from './component/countdown.vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
search: {},
|
||||
lastDate: '',
|
||||
});
|
||||
const ranItem = ref({});
|
||||
const ranOptions = ref([
|
||||
{ label: '全部', value: 0 },
|
||||
{ label: '待开始', value: 1 },
|
||||
{ label: '进行中', value: 2 },
|
||||
{ label: '已结束', value: 3 },
|
||||
]);
|
||||
|
||||
function isTimePassed(timeStr) {
|
||||
const targetTime = new Date(timeStr.replace(/-/g, '/')).getTime(); // 兼容格式
|
||||
const now = Date.now();
|
||||
return now < targetTime;
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
ranItem.value = ranOptions.value[0];
|
||||
getList();
|
||||
});
|
||||
|
||||
function chnageRanOption(item) {
|
||||
ranItem.value = item;
|
||||
getList();
|
||||
}
|
||||
|
||||
function updateCancel(item) {
|
||||
const fairId = item.jobFairId;
|
||||
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
|
||||
getList('refresh');
|
||||
$api.msg('取消预约成功');
|
||||
});
|
||||
}
|
||||
|
||||
function getList(type = 'add', loading = true) {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
type: ranItem.value.value,
|
||||
};
|
||||
$api.createRequest('/app/user/collection/fair', params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
// pageState.list = resData.rows;
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.reser-content{
|
||||
width: 100%;
|
||||
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.content-top{
|
||||
display: flex
|
||||
padding: 28rpx
|
||||
.top-item{
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
margin-right: 48rpx
|
||||
color: #666D7F;
|
||||
}
|
||||
.active{
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
.main{
|
||||
flex: 1
|
||||
overflow: hidden
|
||||
background: #F4F4F4
|
||||
padding: 28rpx
|
||||
.card{
|
||||
padding: 30rpx
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
color: #495264
|
||||
margin-bottom: 28rpx
|
||||
.card-row{
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
.rowleft{
|
||||
display: flex
|
||||
align-items: center
|
||||
}
|
||||
}
|
||||
.card-Title{
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
line-height: 70rpx
|
||||
color: #333333;
|
||||
}
|
||||
.footer{
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: flex-end
|
||||
}
|
||||
.card_cancel{
|
||||
width: 228rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
border: 2rpx solid #E8EAEE;
|
||||
margin-top: 32rpx
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
311
packageA/pages/selectDate/selectDate.vue
Normal file
311
packageA/pages/selectDate/selectDate.vue
Normal file
@@ -0,0 +1,311 @@
|
||||
<template>
|
||||
<AppLayout title="选择日期" :use-scroll-view="false" back-gorund-color="#FAFAFA">
|
||||
<template #headerleft>
|
||||
<view class="btn">
|
||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<template #headerright>
|
||||
<view class="btn mar_ri10 button-click" @click="backParams">确认</view>
|
||||
</template>
|
||||
<view class="content">
|
||||
<view class="top-date">
|
||||
<view
|
||||
class="weekText"
|
||||
:class="{ color_256BFA: item === '日' || item === '六' }"
|
||||
v-for="(item, index) in weekMap"
|
||||
:key="index"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="onScrollBottom">
|
||||
<view class="date-list" v-for="(vItem, vIndex) in calendarData" :key="vIndex">
|
||||
<view class="list-title">{{ vItem.title }}</view>
|
||||
<view class="list-item">
|
||||
<view
|
||||
class="item button-click"
|
||||
:class="{
|
||||
noOptional: !item.isThisMonth,
|
||||
active: current.date === item.date && item.isThisMonth,
|
||||
}"
|
||||
v-for="(item, index) in vItem.list"
|
||||
:key="index"
|
||||
@click="selectDay(item)"
|
||||
>
|
||||
<view class="item-top">{{ item.day }}</view>
|
||||
<view class="item-nong">{{ item.nl }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, navBack } = inject('globalFunction');
|
||||
const weekMap = ['日', '一', '二', '三', '四', '五', '六'];
|
||||
const calendarData = ref([]);
|
||||
const current = ref({});
|
||||
import { Solar, Lunar } from '@/lib/lunar-javascript@1.7.2.js';
|
||||
|
||||
const isRecord = ref(false);
|
||||
const recordNum = ref(4);
|
||||
const pages = reactive({
|
||||
year: 0,
|
||||
month: 0,
|
||||
});
|
||||
|
||||
onLoad((options) => {
|
||||
if (options.date) {
|
||||
current.value = {
|
||||
date: options?.date || null,
|
||||
};
|
||||
}
|
||||
if (options.record) {
|
||||
isRecord.value = true;
|
||||
initOldPagesDate();
|
||||
new Array(recordNum.value + 1).fill(null).map(() => {
|
||||
addMonth();
|
||||
});
|
||||
} else {
|
||||
initPagesDate();
|
||||
new Array(recordNum.value).fill(null).map(() => {
|
||||
addMonth();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function backParams() {
|
||||
if (isValidDateString(current.value.date)) {
|
||||
navBack({
|
||||
data: current.value,
|
||||
});
|
||||
} else {
|
||||
$api.msg('请选择日期');
|
||||
}
|
||||
}
|
||||
|
||||
function isValidDateString(dateStr) {
|
||||
const regex = /^\d{4}-\d{2}-\d{2}$/;
|
||||
if (!regex.test(dateStr)) return false;
|
||||
|
||||
const date = new Date(dateStr);
|
||||
if (isNaN(date.getTime())) return false;
|
||||
|
||||
// 检查日期部分是否一致(防止 "2020-02-31" 这种被 Date 自动修正)
|
||||
const [year, month, day] = dateStr.split('-').map(Number);
|
||||
return date.getFullYear() === year && date.getMonth() + 1 === month && date.getDate() === day;
|
||||
}
|
||||
|
||||
function onScrollBottom() {
|
||||
if (isRecord.value) return;
|
||||
addMonth();
|
||||
}
|
||||
|
||||
function selectDay(item) {
|
||||
current.value = item;
|
||||
}
|
||||
|
||||
function initOldPagesDate() {
|
||||
const d = new Date();
|
||||
const yue = d.getMonth();
|
||||
if (yue < recordNum.value) {
|
||||
pages.month = 12 + (yue - recordNum.value);
|
||||
pages.year = d.getFullYear() - 1;
|
||||
} else {
|
||||
pages.month = yue - recordNum.value;
|
||||
pages.year = d.getFullYear();
|
||||
}
|
||||
}
|
||||
|
||||
function initPagesDate() {
|
||||
const d = new Date();
|
||||
pages.month = d.getMonth();
|
||||
pages.year = d.getFullYear();
|
||||
}
|
||||
|
||||
function addMonth() {
|
||||
if (pages.month >= 12) {
|
||||
pages.year += 1;
|
||||
pages.month = 1;
|
||||
} else {
|
||||
pages.month += 1;
|
||||
}
|
||||
const month = getMonthCalendarData(pages);
|
||||
calendarData.value.push(month);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {Array<string>} selectedDates - 选中的日期数组 ['2025-04-21', ...]
|
||||
* @returns {Array<Object>} 六个月日历数据
|
||||
*/
|
||||
function getMonthCalendarData({ year, month, selectableDates = [] }) {
|
||||
const todayStr = new Date().toISOString().split('T')[0];
|
||||
const isSelected = (y, m, d) =>
|
||||
selectableDates.includes(`${y}-${String(m).padStart(2, '0')}-${String(d).padStart(2, '0')}`);
|
||||
|
||||
const list = [];
|
||||
|
||||
const firstDay = new Date(year, month - 1, 1);
|
||||
const firstWeekday = firstDay.getDay(); // 0 是周日
|
||||
const lastDate = new Date(year, month, 0).getDate();
|
||||
|
||||
// 补全前一月天数(上月最后几天)
|
||||
if (firstWeekday !== 0) {
|
||||
const prevLastDate = new Date(year, month - 1, 0).getDate();
|
||||
for (let i = firstWeekday - 1; i >= 0; i--) {
|
||||
const d = prevLastDate - i;
|
||||
const prevMonth = month - 1 <= 0 ? 12 : month - 1;
|
||||
const prevYear = month - 1 <= 0 ? year - 1 : year;
|
||||
const solar = Solar.fromYmd(prevYear, prevMonth, d);
|
||||
const lunar = Lunar.fromSolar(solar);
|
||||
const dateStr = `${prevYear}-${String(prevMonth).padStart(2, '0')}-${String(d).padStart(2, '0')}`;
|
||||
list.push({
|
||||
day: d,
|
||||
nl: lunar.getDayInChinese(),
|
||||
isThisMonth: false,
|
||||
isToday: dateStr === todayStr,
|
||||
isSelectable: isSelected(prevYear, prevMonth, d),
|
||||
week: weekMap[new Date(prevYear, prevMonth - 1, d).getDay()],
|
||||
date: dateStr,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 当前月天数
|
||||
for (let d = 1; d <= lastDate; d++) {
|
||||
const solar = Solar.fromYmd(year, month, d);
|
||||
const lunar = Lunar.fromSolar(solar);
|
||||
const dateStr = `${year}-${String(month).padStart(2, '0')}-${String(d).padStart(2, '0')}`;
|
||||
list.push({
|
||||
day: d,
|
||||
nl: lunar.getDayInChinese(),
|
||||
isThisMonth: true,
|
||||
isToday: dateStr === todayStr,
|
||||
isSelectable: isSelected(year, month, d),
|
||||
week: weekMap[new Date(year, month - 1, d).getDay()],
|
||||
date: dateStr,
|
||||
});
|
||||
}
|
||||
|
||||
// 补全下个月天数(让最后一行完整 7 个)
|
||||
const remaining = 7 - (list.length % 7);
|
||||
if (remaining < 7) {
|
||||
for (let d = 1; d <= remaining; d++) {
|
||||
const nextMonth = month + 1 > 12 ? 1 : month + 1;
|
||||
const nextYear = month + 1 > 12 ? year + 1 : year;
|
||||
const solar = Solar.fromYmd(nextYear, nextMonth, d);
|
||||
const lunar = Lunar.fromSolar(solar);
|
||||
const dateStr = `${nextYear}-${String(nextMonth).padStart(2, '0')}-${String(d).padStart(2, '0')}`;
|
||||
list.push({
|
||||
day: d,
|
||||
nl: lunar.getDayInChinese(),
|
||||
isThisMonth: false,
|
||||
isToday: dateStr === todayStr,
|
||||
isSelectable: isSelected(nextYear, nextMonth, d),
|
||||
week: weekMap[new Date(nextYear, nextMonth - 1, d).getDay()],
|
||||
date: dateStr,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title: `${year}年${month}月`,
|
||||
list,
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
white-space: nowrap
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.content{
|
||||
height: 100%
|
||||
display: flex
|
||||
flex-direction: column
|
||||
border-radius: 40rpx 40rpx 0 0
|
||||
background: #FFFFFF;
|
||||
overflow: hidden
|
||||
margin-top: 20rpx
|
||||
.top-date{
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 28rpx
|
||||
.weekText{
|
||||
text-align: center
|
||||
width: 99rpx;
|
||||
}
|
||||
|
||||
}
|
||||
.main-scroll{
|
||||
flex: 1
|
||||
overflow: hidden
|
||||
}
|
||||
.date-list{
|
||||
.list-title{
|
||||
height: 84rpx;
|
||||
line-height: 84rpx
|
||||
background: #FAFAFA;
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
color: #1A1A1A;
|
||||
padding: 0 28rpx;
|
||||
box-sizing: border-box
|
||||
}
|
||||
.list-item{
|
||||
padding: 16rpx 28rpx 20rpx 28rpx;
|
||||
display: grid
|
||||
grid-template-columns: repeat(7, 1fr)
|
||||
grid-gap: 0rpx
|
||||
.item{
|
||||
display: flex
|
||||
flex-direction: column
|
||||
align-items: center
|
||||
justify-content: center
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
padding: 16rpx 0
|
||||
margin-bottom: 20rpx
|
||||
.item-top{
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.item-nong{
|
||||
font-size: 16rpx;
|
||||
color: #666666
|
||||
margin-top: 2rpx
|
||||
}
|
||||
}
|
||||
.optional{
|
||||
// height: 96rpx;
|
||||
border: 2rpx solid #92B5FC;
|
||||
}
|
||||
.noOptional{
|
||||
color: #B8B8B8;
|
||||
}
|
||||
.active{
|
||||
background: linear-gradient( 225deg, #9E74FD 0%, #256BFA 100%);
|
||||
color: #FFFFFF
|
||||
.item-nong{
|
||||
font-size: 16rpx;
|
||||
color: #FFFFFF
|
||||
margin-top: 2rpx
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
138
packageA/pages/systemNotification/systemNotification.vue
Normal file
138
packageA/pages/systemNotification/systemNotification.vue
Normal file
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<view class="notifi-content">
|
||||
<scroll-view class="scroll-view" scroll-y @scrolltolower="scrollBottom">
|
||||
<view class="list">
|
||||
<view class="card btn-light" v-for="(item, index) in pageState.list" :key="index">
|
||||
<view class="card-Date">{{ item.date }}</view>
|
||||
<view class="card-Title">{{ item.title }}</view>
|
||||
<view class="card-subTitle">{{ item.subTitle }}</view>
|
||||
<view class="card-btns" v-if="item.noticeType === '2'" @click="seeBussiness(item)">
|
||||
<view class="btns-text">立即查看</view>
|
||||
<view class="btns-text"><uni-icons type="forward" color="#256bfa" size="18"></uni-icons></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
|
||||
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
search: {},
|
||||
lastDate: '',
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
getList('refresh');
|
||||
});
|
||||
|
||||
function scrollBottom() {
|
||||
getList();
|
||||
}
|
||||
|
||||
function seeBussiness(item) {
|
||||
if (item.bussinessId) {
|
||||
navTo(`/packageA/pages/UnitDetails/UnitDetails?bussinessId=${item.bussinessId}`);
|
||||
}
|
||||
}
|
||||
|
||||
function setRead(row) {
|
||||
const ids = row
|
||||
.filter((item) => !item.isRead)
|
||||
.map((item) => item.noticeId)
|
||||
.join(',');
|
||||
if (ids) {
|
||||
$api.createRequest(`/app/notice/read/sysNotice?id=${ids}`, {}, 'POST').then((resData) => {
|
||||
console.log('设置已读');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getList(type = 'add', loading = true) {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
...pageState.search,
|
||||
};
|
||||
$api.createRequest('/app/notice/sysNotice', params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
setRead(rows);
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.notifi-content {
|
||||
background-color: #f4f4f4;
|
||||
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
|
||||
.scroll-view {
|
||||
height: 100%;
|
||||
}
|
||||
.list {
|
||||
padding: 28rpx;
|
||||
.card {
|
||||
background: #ffffff;
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.04);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
padding: 32rpx;
|
||||
margin-bottom: 28rpx;
|
||||
.card-Date {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6c7282;
|
||||
}
|
||||
.card-Title {
|
||||
margin-top: 24rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.card-subTitle {
|
||||
margin-top: 16rpx;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #495265;
|
||||
}
|
||||
.card-btns {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #256bfa;
|
||||
line-height: 45rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-top: 2rpx solid #efefef;
|
||||
width: 630rpx;
|
||||
margin-top: 28rpx;
|
||||
padding-top: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
136
packageA/pages/tiktok/tiktok.vue
Normal file
136
packageA/pages/tiktok/tiktok.vue
Normal file
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<div class="video-container">
|
||||
<view class="back-box">
|
||||
<view class="btn">
|
||||
<uni-icons type="left" size="26" color="#FFFFFF" @click="navBack"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<mTikTok :video-list="state.videoList" :pause-type="1" :controls="false" @loadMore="loadMore" @change="change">
|
||||
<template v-slot="data">
|
||||
<view class="video-layer">
|
||||
<view class="title line_1">{{ currentItem.companyName }}</view>
|
||||
<view class="discription">
|
||||
<text class="line_1">
|
||||
{{ currentItem.jobTitle }}
|
||||
</text>
|
||||
<view class="seedetail" @click="nextDetail">
|
||||
查看详情
|
||||
<uni-icons type="right" color="#FFFFFF" size="14"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</mTikTok>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { inject, ref, reactive } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { $api, navBack, navTo } = inject('globalFunction');
|
||||
import mTikTok from '@/components/TikTok/TikTok.vue';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
|
||||
const recommedIndexDb = useRecommedIndexedDBStore();
|
||||
const state = reactive({
|
||||
videoList: [],
|
||||
});
|
||||
const currentItem = ref(null);
|
||||
|
||||
onLoad(() => {
|
||||
const jobInfo = uni.getStorageSync(`job-Info`);
|
||||
if (jobInfo) {
|
||||
currentItem.value = jobInfo;
|
||||
state.videoList.push(jobInfo);
|
||||
}
|
||||
getNextVideoSrc(2);
|
||||
});
|
||||
|
||||
function nextDetail() {
|
||||
const job = currentItem.value;
|
||||
// 记录岗位类型,用作数据分析
|
||||
if (job.jobCategory) {
|
||||
const recordData = recommedIndexDb.JobParameter(job);
|
||||
recommedIndexDb.addRecord(recordData);
|
||||
}
|
||||
console.log(job.jobId);
|
||||
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}`);
|
||||
}
|
||||
|
||||
function getNextVideoSrc(num) {
|
||||
let params = {
|
||||
uuid: useUserStore().seesionId,
|
||||
count: num || 1,
|
||||
};
|
||||
$api.createRequest('/app/job/littleVideo/random', params).then((resData) => {
|
||||
const { data, code } = resData;
|
||||
state.videoList.push(...data);
|
||||
});
|
||||
}
|
||||
|
||||
const loadMore = () => {
|
||||
// 触发加载更多
|
||||
console.log('加载更多');
|
||||
getNextVideoSrc();
|
||||
};
|
||||
|
||||
const change = (e) => {
|
||||
currentItem.value = e.detail;
|
||||
console.log('🚀 ~ file: index.vue:53 ~ change ~ data:', e);
|
||||
};
|
||||
</script>
|
||||
<style lang="stylus" scoped>
|
||||
.video-container{
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: relative
|
||||
.back-box{
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
top: 20rpx
|
||||
color: #FFFFFF
|
||||
z-index: 2
|
||||
}
|
||||
}
|
||||
.video-layer {
|
||||
position: absolute;
|
||||
left: 24rpx;
|
||||
right: 24rpx;
|
||||
bottom: 30rpx;
|
||||
color: #fff;
|
||||
.title{
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
line-height: 100%;
|
||||
letter-spacing: 0%;
|
||||
}
|
||||
.discription{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
letter-spacing: 0%;
|
||||
margin-top: 20rpx
|
||||
display: flex
|
||||
align-items: center
|
||||
.seedetail{
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
line-height: 100%;
|
||||
letter-spacing: 0%;
|
||||
white-space: nowrap
|
||||
padding-left: 20rpx
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
|
||||
image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user