flat: 备份
This commit is contained in:
8
App.vue
8
App.vue
@@ -43,23 +43,21 @@ onHide(() => {
|
|||||||
|
|
||||||
function getUserInfo() {
|
function getUserInfo() {
|
||||||
lightAppJssdk.user.getUserInfoWithEncryptedParamByAppId({
|
lightAppJssdk.user.getUserInfoWithEncryptedParamByAppId({
|
||||||
appId: 'qdsrgznrgpp', // 接入方在成功创建应用后自动生成
|
appId: config.appInfo.loveShandong, // 接入方在成功创建应用后自动生成
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data == '未登录') onLoginApp();
|
if (data == '未登录') onLoginApp();
|
||||||
else {
|
else {
|
||||||
if (typeof data == 'string') data = JSON.parse(data);
|
if (typeof data == 'string') data = JSON.parse(data);
|
||||||
|
const sm2_privateKey = config.appInfo.sm2PrivateKey;
|
||||||
const sm2_privateKey = '7e14966df4ecd4241ed082ef716d82b52113cb5899ebdc704a98844d0a32b0dc';
|
|
||||||
let sm2_encrypt_result = data.data;
|
let sm2_encrypt_result = data.data;
|
||||||
let sm2_decrypt_result = sm2_Decrypt(sm2_encrypt_result, sm2_privateKey);
|
let sm2_decrypt_result = sm2_Decrypt(sm2_encrypt_result, sm2_privateKey);
|
||||||
|
console.log(sm2_decrypt_result);
|
||||||
if (typeof sm2_decrypt_result == 'string') sm2_decrypt_result = JSON.parse(sm2_decrypt_result);
|
if (typeof sm2_decrypt_result == 'string') sm2_decrypt_result = JSON.parse(sm2_decrypt_result);
|
||||||
|
|
||||||
// 其次,对sm2解密后的结果进行 aes解密
|
// 其次,对sm2解密后的结果进行 aes解密
|
||||||
// aes解密需要用到 appword , 为固定值,使用示例代码中的即可
|
// aes解密需要用到 appword , 为固定值,使用示例代码中的即可
|
||||||
let aes_encrypt_result = sm2_decrypt_result.data;
|
let aes_encrypt_result = sm2_decrypt_result.data;
|
||||||
let aes_decrypt_result = aes_Decrypt(aes_encrypt_result, appword);
|
let aes_decrypt_result = aes_Decrypt(aes_encrypt_result, appword);
|
||||||
|
|
||||||
// 加密
|
// 加密
|
||||||
loginCallback(aes_decrypt_result);
|
loginCallback(aes_decrypt_result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import '@/lib/encryption/sm4.min.js'
|
||||||
import useUserStore from "../stores/useUserStore";
|
import useUserStore from "../stores/useUserStore";
|
||||||
import {
|
import {
|
||||||
createRequest,
|
createRequest,
|
||||||
@@ -7,9 +8,6 @@ import streamRequest, {
|
|||||||
chatRequest
|
chatRequest
|
||||||
} from "../utils/streamRequest.js";
|
} from "../utils/streamRequest.js";
|
||||||
|
|
||||||
const sm4 = typeof window.sm4 !== 'undefined' ? window.sm4 :
|
|
||||||
(typeof window.smCrypto !== 'undefined' ? window.smCrypto.sm4 : null);
|
|
||||||
|
|
||||||
export const CloneDeep = (props) => {
|
export const CloneDeep = (props) => {
|
||||||
if (typeof props !== 'object' || props === null) {
|
if (typeof props !== 'object' || props === null) {
|
||||||
return props
|
return props
|
||||||
@@ -564,7 +562,6 @@ function aes_Decrypt(word, key) {
|
|||||||
})
|
})
|
||||||
return decrypt.toString(CryptoJS.enc.Utf8)
|
return decrypt.toString(CryptoJS.enc.Utf8)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sm2_Decrypt(word, key) {
|
export function sm2_Decrypt(word, key) {
|
||||||
return SM.decrypt(word, key);
|
return SM.decrypt(word, key);
|
||||||
}
|
}
|
||||||
@@ -588,7 +585,7 @@ export function sm4Decrypt(key, value, mode = "hex") {
|
|||||||
return decrypted
|
return decrypted
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('解密失败')
|
console.log('解密失败', e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,157 @@
|
|||||||
|
<template>
|
||||||
|
<view v-for="company in listData" :key="company.id">
|
||||||
|
<view v-if="company.dataType==2" class="cards" @click="nextDetail(company)">
|
||||||
|
<view class="card-company">
|
||||||
|
<text class="company line_1">{{ company.name }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom ">
|
||||||
|
<view class="fl_box fs_14">
|
||||||
|
<view class="mar_ri10">{{company.industry}}</view>
|
||||||
|
<view>{{company.scale }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="ris">
|
||||||
|
<text class="fs_14">
|
||||||
|
在招职位·
|
||||||
|
<text class="color_256BFA">{{ company.totalRecruitment || '-' }}</text>
|
||||||
|
个
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-tags">
|
||||||
|
<view class="tag" v-if="company.nature">
|
||||||
|
{{company.nature}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="cards" @click="nextDetail(company)">
|
||||||
|
<view class="card-company">
|
||||||
|
<text class="company line_1">{{ company.name }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom">
|
||||||
|
<view class="fl_box fs_14">
|
||||||
|
<view class="mar_ri10">{{company.industry}}</view>
|
||||||
|
<view>{{company.scale }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="ris">
|
||||||
|
<text class="fs_14">
|
||||||
|
在招职位·
|
||||||
|
<text class="color_256BFA">{{ company.totalRecruitment || '-' }}</text>
|
||||||
|
个
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-tags">
|
||||||
|
<view class="tag" v-if="company.nature">
|
||||||
|
{{company.nature}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { inject, computed, toRaw } from 'vue';
|
||||||
|
const { insertSortData, navTo, vacanciesTo } = inject('globalFunction');
|
||||||
|
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
|
||||||
|
const recommedIndexDb = useRecommedIndexedDBStore();
|
||||||
|
const props = defineProps({
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: '标题',
|
||||||
|
},
|
||||||
|
longitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 120.382665,
|
||||||
|
},
|
||||||
|
latitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 36.066938,
|
||||||
|
},
|
||||||
|
seeDate: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const listData = computed(() => {
|
||||||
|
return props.list;
|
||||||
|
});
|
||||||
|
|
||||||
|
function nextDetail(company) {
|
||||||
|
if(company.dataType == 2){
|
||||||
|
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${company.gsID}&companyName=${company.name}&zphId=${company.zphID}&dataType=2`);
|
||||||
|
}else{
|
||||||
|
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${company.companyId}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.date-jobTitle{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #495265;
|
||||||
|
padding: 28rpx 0 0 20rpx
|
||||||
|
}
|
||||||
|
.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-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
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{
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
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: 15rpx
|
||||||
|
margin-bottom: 10rpx
|
||||||
|
display: flex
|
||||||
|
justify-content: space-between
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #6C7282;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ris{
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
142
components/renderCompanysOutData/renderCompanysOutData.vue
Normal file
142
components/renderCompanysOutData/renderCompanysOutData.vue
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
<template>
|
||||||
|
<view v-for="job in listData" :key="job.id">
|
||||||
|
<view class="cards" @click="nextDetail(job)">
|
||||||
|
<view class="card-company">
|
||||||
|
<text class="company line_1">{{ job.gsmc }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom" >
|
||||||
|
<view class="fl_box fs_14" >
|
||||||
|
<!-- <dict-tree-Label class="mar_ri10" dictType="industry" :value="job.industry"></dict-tree-Label>
|
||||||
|
<dict-Label dictType="scale" :value="job.scale"></dict-Label> -->
|
||||||
|
<view>{{job.gsxy}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="ris" >
|
||||||
|
<text class="fs_14">
|
||||||
|
在招职位·
|
||||||
|
<text class="color_256BFA">{{ job.zzgwsl || '-' }}</text>
|
||||||
|
个
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-tags">
|
||||||
|
<view class="tag" v-if="job.nature">
|
||||||
|
<dict-Label dictType="nature" :value="job.nature"></dict-Label>
|
||||||
|
<dict-Label dictType="nature" :value="job.nature"></dict-Label>
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{ vacanciesTo(job.vacancies) }}
|
||||||
|
</view>
|
||||||
|
<view class="tag" v-if="job.qyxz">
|
||||||
|
{{job.qyxz}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { inject, computed, toRaw } from 'vue';
|
||||||
|
const { insertSortData, navTo, vacanciesTo } = inject('globalFunction');
|
||||||
|
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
|
||||||
|
const recommedIndexDb = useRecommedIndexedDBStore();
|
||||||
|
const props = defineProps({
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: '标题',
|
||||||
|
},
|
||||||
|
longitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 120.382665,
|
||||||
|
},
|
||||||
|
latitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 36.066938,
|
||||||
|
},
|
||||||
|
seeDate: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
zphId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const listData = computed(() => {
|
||||||
|
return props.list;
|
||||||
|
});
|
||||||
|
|
||||||
|
function nextDetail(company) {
|
||||||
|
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${company.gsID}&companyName=${company.gsmc}&zphId=${props.zphId}&dataType=2`);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.date-jobTitle{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #495265;
|
||||||
|
padding: 28rpx 0 0 20rpx
|
||||||
|
}
|
||||||
|
.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-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
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{
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
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: 15rpx
|
||||||
|
margin-bottom: 10rpx
|
||||||
|
display: flex
|
||||||
|
justify-content: space-between
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #6C7282;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ris{
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
201
components/renderDeliveryRecord/renderDeliveryRecord.vue
Normal file
201
components/renderDeliveryRecord/renderDeliveryRecord.vue
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
<template>
|
||||||
|
<view v-for="job in listData" :key="job.id">
|
||||||
|
<view v-if="!job.isTitle" class="cards" @click="nextDetail(job)">
|
||||||
|
<!-- 数据类型2的完整模块 -->
|
||||||
|
<view v-if="job.dataType == 2">
|
||||||
|
<view class="card-company">
|
||||||
|
<text class="company">{{ job.jobTitle }}</text>
|
||||||
|
<view class="salary">
|
||||||
|
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-companyName">{{ job.companyName }}</view>
|
||||||
|
<view class="card-tags">
|
||||||
|
<view class="tag">
|
||||||
|
{{job.education == '不限' ? '学历不限' : job.education}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{job.experience == '不限' ? '经验不限' : job.experience}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{ vacanciesTo(job.vacancies) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom">
|
||||||
|
<view>{{ parseDateTime(job.createTime).date }}</view>
|
||||||
|
<view>
|
||||||
|
<!-- <convert-distance
|
||||||
|
:alat="job.latitude"
|
||||||
|
:along="job.longitude"
|
||||||
|
:blat="latitude"
|
||||||
|
:blong="longitude"
|
||||||
|
></convert-distance>
|
||||||
|
<dict-Label class="mar_le10" dictType="area" :value="job.jobLocationAreaCode"></dict-Label> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 数据类型1的完整模块 -->
|
||||||
|
<view v-else>
|
||||||
|
<view class="card-company">
|
||||||
|
<text class="company">{{ job.jobTitle }}</text>
|
||||||
|
<view class="salary">
|
||||||
|
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-companyName">{{ job.companyName }}</view>
|
||||||
|
<view class="card-tags">
|
||||||
|
<view class="tag">
|
||||||
|
<dict-Label dictType="education" :value="job.education"></dict-Label>
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
<dict-Label dictType="experience" :value="job.experience"></dict-Label>
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{ vacanciesTo(job.vacancies) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom">
|
||||||
|
<view>{{ job.postingDate }}</view>
|
||||||
|
<view>
|
||||||
|
<convert-distance
|
||||||
|
:alat="job.latitude"
|
||||||
|
:along="job.longitude"
|
||||||
|
:blat="latitude"
|
||||||
|
:blong="longitude"
|
||||||
|
></convert-distance>
|
||||||
|
<dict-Label class="mar_le10" dictType="area" :value="job.jobLocationAreaCode"></dict-Label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="date-jobTitle" v-else>
|
||||||
|
{{ job.title }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { inject, computed, toRaw } from 'vue';
|
||||||
|
const { insertSortData, navTo, vacanciesTo } = inject('globalFunction');
|
||||||
|
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
|
||||||
|
const recommedIndexDb = useRecommedIndexedDBStore();
|
||||||
|
const props = defineProps({
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: '标题',
|
||||||
|
},
|
||||||
|
longitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 120.382665,
|
||||||
|
},
|
||||||
|
latitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 36.066938,
|
||||||
|
},
|
||||||
|
seeDate: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const listData = computed(() => {
|
||||||
|
if (props.seeDate && props.list.length) {
|
||||||
|
const ulist = toRaw(props.list);
|
||||||
|
const [reslist, lastDate] = insertSortData(ulist, props.seeDate);
|
||||||
|
return reslist;
|
||||||
|
}
|
||||||
|
return props.list;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 解析日期时间(用于数据类型2)
|
||||||
|
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 nextDetail(job) {
|
||||||
|
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}`);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.date-jobTitle{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #495265;
|
||||||
|
padding: 28rpx 0 0 20rpx
|
||||||
|
}
|
||||||
|
.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-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.salary{
|
||||||
|
font-family: DIN-Medium;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
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{
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
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>
|
||||||
@@ -0,0 +1,202 @@
|
|||||||
|
<template>
|
||||||
|
<view v-for="job in listData" :key="job.id">
|
||||||
|
<view v-if="!job.isTitle" class="cards" @click="nextDetail(job)">
|
||||||
|
<!-- 数据类型2的完整模块 -->
|
||||||
|
<view v-if="job.dataType == 2">
|
||||||
|
<view class="card-company">
|
||||||
|
<text class="company">{{ job.jobTitle }}</text>
|
||||||
|
<view class="salary">
|
||||||
|
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-companyName">{{ job.companyName }}</view>
|
||||||
|
<view class="card-tags">
|
||||||
|
<view class="tag">
|
||||||
|
{{job.education == '不限' ? '学历不限' : job.education}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{job.experience == '不限' ? '经验不限' : job.experience}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{ vacanciesTo(job.vacancies) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom">
|
||||||
|
<view>{{ parseDateTime(job.createTime).date }}</view>
|
||||||
|
<view>
|
||||||
|
<!-- <convert-distance
|
||||||
|
:alat="job.latitude"
|
||||||
|
:along="job.longitude"
|
||||||
|
:blat="latitude"
|
||||||
|
:blong="longitude"
|
||||||
|
></convert-distance>
|
||||||
|
<dict-Label class="mar_le10" dictType="area" :value="job.jobLocationAreaCode"></dict-Label> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 数据类型1的完整模块 -->
|
||||||
|
<view v-else>
|
||||||
|
<view class="card-company">
|
||||||
|
<text class="company">{{ job.jobTitle }}</text>
|
||||||
|
<view class="salary">
|
||||||
|
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-companyName">{{ job.companyName }}</view>
|
||||||
|
<view class="card-tags">
|
||||||
|
<view class="tag">
|
||||||
|
{{job.education == '不限' ? '学历不限' : job.education}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{job.experience == '不限' ? '经验不限' : job.experience}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{ vacanciesTo(job.vacancies) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom">
|
||||||
|
<view>{{ job.postingDate }}</view>
|
||||||
|
<view>
|
||||||
|
<convert-distance
|
||||||
|
:alat="job.latitude"
|
||||||
|
:along="job.longitude"
|
||||||
|
:blat="latitude"
|
||||||
|
:blong="longitude"
|
||||||
|
></convert-distance>
|
||||||
|
<dict-Label class="mar_le10" dictType="area" :value="job.jobLocationAreaCode"></dict-Label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="date-jobTitle" v-else>
|
||||||
|
{{ job.title }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { inject, computed, toRaw } from 'vue';
|
||||||
|
const { insertSortData, navTo, vacanciesTo } = inject('globalFunction');
|
||||||
|
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
|
||||||
|
const recommedIndexDb = useRecommedIndexedDBStore();
|
||||||
|
const props = defineProps({
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: '标题',
|
||||||
|
},
|
||||||
|
longitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 120.382665,
|
||||||
|
},
|
||||||
|
latitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 36.066938,
|
||||||
|
},
|
||||||
|
seeDate: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const listData = computed(() => {
|
||||||
|
if (props.seeDate && props.list.length) {
|
||||||
|
const ulist = toRaw(props.list);
|
||||||
|
const [reslist, lastDate] = insertSortData(ulist, props.seeDate);
|
||||||
|
return reslist;
|
||||||
|
}
|
||||||
|
return props.list;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 解析日期时间(用于数据类型2)
|
||||||
|
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 nextDetail(job) {
|
||||||
|
// 根据数据类型跳转到不同的详情页
|
||||||
|
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}&dataType=${job.dataType}`);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.date-jobTitle{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #495265;
|
||||||
|
padding: 28rpx 0 0 20rpx
|
||||||
|
}
|
||||||
|
.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-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.salary{
|
||||||
|
font-family: DIN-Medium;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
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{
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
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>
|
||||||
201
components/renderJobViewRecord/renderJobViewRecord.vue
Normal file
201
components/renderJobViewRecord/renderJobViewRecord.vue
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
<template>
|
||||||
|
<view v-for="job in listData" :key="job.id">
|
||||||
|
<view v-if="!job.isTitle" class="cards" @click="nextDetail(job)">
|
||||||
|
<!-- 数据类型2的完整模块 -->
|
||||||
|
<view v-if="job.dataType == 2">
|
||||||
|
<view class="card-company">
|
||||||
|
<text class="company">{{ job.jobTitle }}</text>
|
||||||
|
<view class="salary">
|
||||||
|
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-companyName">{{ job.companyName }}</view>
|
||||||
|
<view class="card-tags">
|
||||||
|
<view class="tag">
|
||||||
|
{{job.education == '不限' ? '学历不限' : job.education}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{job.experience == '不限' ? '经验不限' : job.experience}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{ vacanciesTo(job.vacancies) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom">
|
||||||
|
<view>{{ parseDateTime(job.createTime).date }}</view>
|
||||||
|
<view>
|
||||||
|
<!-- <convert-distance
|
||||||
|
:alat="job.latitude"
|
||||||
|
:along="job.longitude"
|
||||||
|
:blat="latitude"
|
||||||
|
:blong="longitude"
|
||||||
|
></convert-distance>
|
||||||
|
<dict-Label class="mar_le10" dictType="area" :value="job.jobLocationAreaCode"></dict-Label> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 数据类型1的完整模块 -->
|
||||||
|
<view v-else>
|
||||||
|
<view class="card-company">
|
||||||
|
<text class="company">{{ job.jobTitle }}</text>
|
||||||
|
<view class="salary">
|
||||||
|
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-companyName">{{ job.companyName }}</view>
|
||||||
|
<view class="card-tags">
|
||||||
|
<view class="tag">
|
||||||
|
{{job.education == '不限' ? '学历不限' : job.education}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{job.experience == '不限' ? '经验不限' : job.experience}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{ vacanciesTo(job.vacancies) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom">
|
||||||
|
<view>{{ job.postingDate }}</view>
|
||||||
|
<view>
|
||||||
|
<convert-distance
|
||||||
|
:alat="job.latitude"
|
||||||
|
:along="job.longitude"
|
||||||
|
:blat="latitude"
|
||||||
|
:blong="longitude"
|
||||||
|
></convert-distance>
|
||||||
|
<dict-Label class="mar_le10" dictType="area" :value="job.jobLocationAreaCode"></dict-Label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="date-jobTitle" v-else>
|
||||||
|
{{ job.title }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { inject, computed, toRaw } from 'vue';
|
||||||
|
const { insertSortData, navTo, vacanciesTo } = inject('globalFunction');
|
||||||
|
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
|
||||||
|
const recommedIndexDb = useRecommedIndexedDBStore();
|
||||||
|
const props = defineProps({
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: '标题',
|
||||||
|
},
|
||||||
|
longitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 120.382665,
|
||||||
|
},
|
||||||
|
latitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 36.066938,
|
||||||
|
},
|
||||||
|
seeDate: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const listData = computed(() => {
|
||||||
|
if (props.seeDate && props.list.length) {
|
||||||
|
const ulist = toRaw(props.list);
|
||||||
|
const [reslist, lastDate] = insertSortData(ulist, props.seeDate);
|
||||||
|
return reslist;
|
||||||
|
}
|
||||||
|
return props.list;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 解析日期时间(用于数据类型2)
|
||||||
|
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 nextDetail(job) {
|
||||||
|
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}&dataType=${job.dataType}`);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.date-jobTitle{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #495265;
|
||||||
|
padding: 28rpx 0 0 20rpx
|
||||||
|
}
|
||||||
|
.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-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.salary{
|
||||||
|
font-family: DIN-Medium;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
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{
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
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>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation>
|
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-companyName">{{ job.companyName }}</view>
|
<view class="card-companyName">{{ job.gwmc }}</view>
|
||||||
<view class="card-tags">
|
<view class="card-tags">
|
||||||
<view class="tag">
|
<view class="tag">
|
||||||
<dict-Label dictType="education" :value="job.education"></dict-Label>
|
<dict-Label dictType="education" :value="job.education"></dict-Label>
|
||||||
@@ -77,7 +77,7 @@ function nextDetail(job) {
|
|||||||
const recordData = recommedIndexDb.JobParameter(job);
|
const recordData = recommedIndexDb.JobParameter(job);
|
||||||
recommedIndexDb.addRecord(recordData);
|
recommedIndexDb.addRecord(recordData);
|
||||||
}
|
}
|
||||||
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}`);
|
navTo(`/packageA/pages/post/post?jobId=${btoa(job.jobId)}&dataType=1`);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
167
components/renderJobsOutData/renderJobsOutData.vue
Normal file
167
components/renderJobsOutData/renderJobsOutData.vue
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
<template>
|
||||||
|
<view v-for="job in listData" :key="job.id">
|
||||||
|
<view v-if="!job.isTitle" class="cards" @click="nextDetail(job)">
|
||||||
|
<view class="card-company">
|
||||||
|
<text class="company">{{ job.gwmc }}</text>
|
||||||
|
<view class="salary">
|
||||||
|
<Salary-Expectation :max-salary="job.maxSalary" :min-salary="job.minSalary"></Salary-Expectation>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-companyName">{{ job.gsmc }}</view>
|
||||||
|
<view class="card-tags">
|
||||||
|
<view class="tag">
|
||||||
|
{{job.xlyq == '不限' ? '学历不限' : job.xlyq}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{job.gwgzjy == '不限' ? '经验不限' : job.gwgzjy}}
|
||||||
|
</view>
|
||||||
|
<view class="tag">
|
||||||
|
{{ vacanciesTo(job.zprs) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="card-bottom">
|
||||||
|
<view>{{ parseDateTime(job.createTime).date }}</view>
|
||||||
|
<view>
|
||||||
|
<!-- <convert-distance
|
||||||
|
:alat="job.latitude"
|
||||||
|
:along="job.longitude"
|
||||||
|
:blat="latitude"
|
||||||
|
:blong="longitude"
|
||||||
|
></convert-distance>
|
||||||
|
<dict-Label class="mar_le10" dictType="area" :value="job.jobLocationAreaCode"></dict-Label> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="date-jobTitle" v-else>
|
||||||
|
{{ job.title }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { inject, computed, toRaw } from 'vue';
|
||||||
|
const { insertSortData, navTo, vacanciesTo } = inject('globalFunction');
|
||||||
|
import { useRecommedIndexedDBStore } from '@/stores/useRecommedIndexedDBStore.js';
|
||||||
|
const recommedIndexDb = useRecommedIndexedDBStore();
|
||||||
|
const props = defineProps({
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: '标题',
|
||||||
|
},
|
||||||
|
longitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 120.382665,
|
||||||
|
},
|
||||||
|
latitude: {
|
||||||
|
type: Number,
|
||||||
|
default: 36.066938,
|
||||||
|
},
|
||||||
|
seeDate: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const listData = computed(() => {
|
||||||
|
if (props.seeDate && props.list.length) {
|
||||||
|
const ulist = toRaw(props.list);
|
||||||
|
const [reslist, lastDate] = insertSortData(ulist, props.seeDate);
|
||||||
|
return reslist;
|
||||||
|
}
|
||||||
|
return props.list;
|
||||||
|
});
|
||||||
|
|
||||||
|
function nextDetail(job) {
|
||||||
|
// 记录岗位类型,用作数据分析
|
||||||
|
if (job.jobCategory) {
|
||||||
|
const recordData = recommedIndexDb.JobParameter(job);
|
||||||
|
recommedIndexDb.addRecord(recordData);
|
||||||
|
}
|
||||||
|
navTo(`/packageA/pages/post/post?jobId=${btoa(job.id)}&dataType=2`);
|
||||||
|
}
|
||||||
|
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}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.date-jobTitle{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #495265;
|
||||||
|
padding: 28rpx 0 0 20rpx
|
||||||
|
}
|
||||||
|
.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-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.salary{
|
||||||
|
font-family: DIN-Medium;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 26rpx;
|
||||||
|
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{
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
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>
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
export default {
|
export default {
|
||||||
// baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网
|
// baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网
|
||||||
baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
|
baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
|
||||||
// baseUrl: "http://192.168.98.110:18181",
|
// baseUrl: 'http://192.168.3.29:8081',
|
||||||
// baseUrl: "http://192.168.3.19:8080",
|
|
||||||
// sseAI+
|
// sseAI+
|
||||||
// StreamBaseURl: 'http://39.98.44.136:8000',
|
// StreamBaseURl: 'http://39.98.44.136:8000',
|
||||||
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',
|
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',
|
||||||
@@ -22,6 +21,10 @@ export default {
|
|||||||
appInfo: {
|
appInfo: {
|
||||||
// 应用名称
|
// 应用名称
|
||||||
name: "青岛市就业服务",
|
name: "青岛市就业服务",
|
||||||
|
// 爱山东应用标识
|
||||||
|
loveShandong: 'szjxrgznqzzp',
|
||||||
|
// 爱山东应用Key
|
||||||
|
sm2PrivateKey: '0d152c849f10e4469f2af8cedea62004e4f1db7be23c2f7270c1441d8050799d',
|
||||||
// 地区名
|
// 地区名
|
||||||
areaName: '青岛市',
|
areaName: '青岛市',
|
||||||
// AI名称
|
// AI名称
|
||||||
|
|||||||
12
index.html
12
index.html
@@ -24,18 +24,12 @@
|
|||||||
</script>
|
</script>
|
||||||
<!-- 爱山东jssdk 本sdk存在性能问题 -->
|
<!-- 爱山东jssdk 本sdk存在性能问题 -->
|
||||||
<script type="text/javascript" src="https://isdapp.shandong.gov.cn/jmopen/jssdk/index.js"></script>
|
<script type="text/javascript" src="https://isdapp.shandong.gov.cn/jmopen/jssdk/index.js"></script>
|
||||||
|
<!-- 只在内网有效 -->
|
||||||
<script type="text/javascript" src="./static/js/sm4.min.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="./static/js/SM.js"></script>
|
<script type="text/javascript" src="./static/js/SM.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="./static/js/aes.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="./static/js/sm4.min.js"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="./static/js/pixi.min.js"></script>
|
<script type="text/javascript" src="./static/js/pixi.min.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<!-- <body> -->
|
<body>
|
||||||
<div id="app"><!--app-html--></div>
|
<div id="app"><!--app-html--></div>
|
||||||
<script type="module" src="/main.js"></script>
|
<script type="module" src="/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
7
lib/encryption/sm2.min.js
vendored
Normal file
7
lib/encryption/sm2.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
12
main.js
12
main.js
@@ -12,6 +12,12 @@ import SelectPopup from '@/components/selectPopup/selectPopup.vue'
|
|||||||
import SelectPopupPlugin from '@/components/selectPopup/selectPopupPlugin';
|
import SelectPopupPlugin from '@/components/selectPopup/selectPopupPlugin';
|
||||||
import RenderJobs from '@/components/renderJobs/renderJobs.vue';
|
import RenderJobs from '@/components/renderJobs/renderJobs.vue';
|
||||||
import RenderCompanys from '@/components/renderCompanys/renderCompanys.vue';
|
import RenderCompanys from '@/components/renderCompanys/renderCompanys.vue';
|
||||||
|
import RenderJobsOutData from '@/components/renderJobsOutData/renderJobsOutData.vue';
|
||||||
|
import RenderCompanysOutData from '@/components/renderCompanysOutData/renderCompanysOutData.vue';
|
||||||
|
import renderDeliveryRecord from '@/components/renderDeliveryRecord/renderDeliveryRecord.vue';
|
||||||
|
import renderJobCollectionRecord from '@/components/renderJobCollectionRecord/renderJobCollectionRecord.vue';
|
||||||
|
import renderCompanyCollectionRecord from '@/components/renderCompanyCollectionRecord/renderCompanyCollectionRecord.vue';
|
||||||
|
import renderJobViewRecord from '@/components/renderJobViewRecord/renderJobViewRecord.vue';
|
||||||
// import Tabbar from '@/components/tabbar/midell-box.vue'
|
// import Tabbar from '@/components/tabbar/midell-box.vue'
|
||||||
// 自动导入 directives 目录下所有指令
|
// 自动导入 directives 目录下所有指令
|
||||||
const directives = import.meta.glob('./directives/*.js', {
|
const directives = import.meta.glob('./directives/*.js', {
|
||||||
@@ -36,6 +42,12 @@ export function createApp() {
|
|||||||
app.component('SelectPopup', SelectPopup)
|
app.component('SelectPopup', SelectPopup)
|
||||||
app.component('RenderJobs', RenderJobs)
|
app.component('RenderJobs', RenderJobs)
|
||||||
app.component('RenderCompanys', RenderCompanys)
|
app.component('RenderCompanys', RenderCompanys)
|
||||||
|
app.component('RenderJobsOutData', RenderJobsOutData) //渲染外部岗位数据列表
|
||||||
|
app.component('RenderCompanysOutData', RenderCompanysOutData) //渲染外部公司数据列表
|
||||||
|
app.component('renderDeliveryRecord', renderDeliveryRecord) //渲染岗位投递记录
|
||||||
|
app.component('renderJobCollectionRecord', renderJobCollectionRecord) //渲染岗位收藏记录
|
||||||
|
app.component('renderCompanyCollectionRecord', renderCompanyCollectionRecord) //渲染公司收藏记录
|
||||||
|
app.component('renderJobViewRecord', renderJobViewRecord) //渲染岗位浏览记录
|
||||||
// app.component('tabbar-custom', Tabbar)
|
// app.component('tabbar-custom', Tabbar)
|
||||||
|
|
||||||
for (const path in directives) {
|
for (const path in directives) {
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="collection-content">
|
<view class="collection-content">
|
||||||
<renderJobs
|
<renderDeliveryRecord
|
||||||
seeDate="applyTime"
|
|
||||||
v-if="pageState.list.length"
|
v-if="pageState.list.length"
|
||||||
|
seeDate="applyTime"
|
||||||
:list="pageState.list"
|
:list="pageState.list"
|
||||||
:longitude="longitudeVal"
|
:longitude="longitudeVal"
|
||||||
:latitude="latitudeVal"
|
:latitude="latitudeVal">
|
||||||
></renderJobs>
|
</renderDeliveryRecord>
|
||||||
<empty v-else pdTop="200"></empty>
|
<empty v-else pdTop="200"></empty>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -41,9 +41,7 @@ onReachBottom(() => {
|
|||||||
getJobList();
|
getJobList();
|
||||||
});
|
});
|
||||||
|
|
||||||
function navToPost(jobId) {
|
|
||||||
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getJobList(type = 'add') {
|
function getJobList(type = 'add') {
|
||||||
if (type === 'refresh') {
|
if (type === 'refresh') {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<image src="@/static/icon/companyIcon.png" mode=""></image>
|
<image src="@/static/icon/companyIcon.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="companyinfo-right">
|
<view class="companyinfo-right">
|
||||||
<view class="row1">{{ companyInfo?.name }}</view>
|
<view class="row1">{{ dataType === 2 ? companyInfo?.gsmc : companyInfo?.name }}</view>
|
||||||
<view class="row2">
|
<view class="row2">
|
||||||
<dict-tree-Label
|
<dict-tree-Label
|
||||||
v-if="companyInfo?.industry"
|
v-if="companyInfo?.industry"
|
||||||
@@ -30,14 +30,13 @@
|
|||||||
></dict-tree-Label>
|
></dict-tree-Label>
|
||||||
<span v-if="companyInfo?.industry"> </span>
|
<span v-if="companyInfo?.industry"> </span>
|
||||||
<dict-Label dictType="scale" :value="companyInfo?.scale"></dict-Label>
|
<dict-Label dictType="scale" :value="companyInfo?.scale"></dict-Label>
|
||||||
|
<span v-if="dataType === 2">{{ companyInfo.gsxy }}</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="conetent-info" :class="{ expanded: isExpanded }">
|
<view class="conetent-info" :class="{ expanded: isExpanded }">
|
||||||
<view class="info-title">公司介绍</view>
|
<view class="info-title">公司介绍</view>
|
||||||
<view class="info-desirption">{{ companyInfo.description }}</view>
|
<view class="info-desirption">{{ dataType === 2 ? companyInfo.qyxz : companyInfo.description }}</view>
|
||||||
<!-- <view class="info-title title2">公司地址</view>
|
|
||||||
<view class="locationCompany"></view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="expand" @click="expand">
|
<view class="expand" @click="expand">
|
||||||
<text>{{ isExpanded ? '收起' : '展开' }}</text>
|
<text>{{ isExpanded ? '收起' : '展开' }}</text>
|
||||||
@@ -50,8 +49,15 @@
|
|||||||
<scroll-view scroll-y class="Detailscroll-view" @scrolltolower="getJobsList('add')">
|
<scroll-view scroll-y class="Detailscroll-view" @scrolltolower="getJobsList('add')">
|
||||||
<view class="views">
|
<view class="views">
|
||||||
<view class="Detail-title"><text class="title">在招职位</text></view>
|
<view class="Detail-title"><text class="title">在招职位</text></view>
|
||||||
|
<!-- 根据 dataType 使用不同的职位列表组件 -->
|
||||||
|
<renderJobsOutData
|
||||||
|
v-if="dataType === 2 && pageState.list.length"
|
||||||
|
:list="pageState.list"
|
||||||
|
:longitude="longitudeVal"
|
||||||
|
:latitude="latitudeVal"
|
||||||
|
></renderJobsOutData>
|
||||||
<renderJobs
|
<renderJobs
|
||||||
v-if="pageState.list.length"
|
v-else-if="dataType !== 2 && pageState.list.length"
|
||||||
:list="pageState.list"
|
:list="pageState.list"
|
||||||
:longitude="longitudeVal"
|
:longitude="longitudeVal"
|
||||||
:latitude="latitudeVal"
|
:latitude="latitudeVal"
|
||||||
@@ -75,6 +81,7 @@ const { $api, navTo, vacanciesTo, navBack } = inject('globalFunction');
|
|||||||
|
|
||||||
const isExpanded = ref(false);
|
const isExpanded = ref(false);
|
||||||
const pageState = reactive({
|
const pageState = reactive({
|
||||||
|
current: 0,
|
||||||
page: 0,
|
page: 0,
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
@@ -82,35 +89,108 @@ const pageState = reactive({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
const companyInfo = ref({});
|
const companyInfo = ref({});
|
||||||
|
const pageOptions = ref({});
|
||||||
|
const dataType = ref(1); // 1: 原数据, 2: 第三方数据
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
console.log(options);
|
console.log(options);
|
||||||
|
dataType.value = options.dataType ? parseInt(options.dataType) : 1;
|
||||||
|
pageOptions.value = options;
|
||||||
|
|
||||||
|
if (dataType.value === 2) {
|
||||||
|
// 第三方数据
|
||||||
|
getCompanyInfo(options.companyId, options.zphId);
|
||||||
|
getJobsList('refresh');
|
||||||
|
} else {
|
||||||
|
// 原数据
|
||||||
getCompanyInfo(options.companyId || options.bussinessId);
|
getCompanyInfo(options.companyId || options.bussinessId);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function companyCollection() {
|
function companyCollection() {
|
||||||
|
if (dataType.value === 2) {
|
||||||
|
// 第三方数据收藏逻辑
|
||||||
|
const id = companyInfo.value.id;
|
||||||
|
const companyId = companyInfo.value.gsID;
|
||||||
|
const zphId = companyInfo.value.zphID;
|
||||||
|
if (companyInfo.value.isCollection) {
|
||||||
|
$api.createRequest(`/app/company/collection/${id}/2`, {}, 'DELETE').then((resData) => {
|
||||||
|
getCompanyInfo(companyId, zphId);
|
||||||
|
$api.msg('取消收藏成功');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$api.createRequest(`/app/company/collection/${id}/2`, {}, 'POST').then((resData) => {
|
||||||
|
getCompanyInfo(companyId, zphId);
|
||||||
|
$api.msg('收藏成功');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 原数据收藏逻辑
|
||||||
const companyId = companyInfo.value.companyId;
|
const companyId = companyInfo.value.companyId;
|
||||||
if (companyInfo.value.isCollection) {
|
if (companyInfo.value.isCollection) {
|
||||||
$api.createRequest(`/app/company/collection/${companyId}`, {}, 'DELETE').then((resData) => {
|
$api.createRequest(`/app/company/collection/${companyId}/1`, {}, 'DELETE').then((resData) => {
|
||||||
getCompanyInfo(companyId);
|
getCompanyInfo(companyId);
|
||||||
$api.msg('取消收藏成功');
|
$api.msg('取消收藏成功');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$api.createRequest(`/app/company/collection/${companyId}`, {}, 'POST').then((resData) => {
|
$api.createRequest(`/app/company/collection/${companyId}/1`, {}, 'POST').then((resData) => {
|
||||||
getCompanyInfo(companyId);
|
getCompanyInfo(companyId);
|
||||||
$api.msg('收藏成功');
|
$api.msg('收藏成功');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCompanyInfo(id) {
|
function getCompanyInfo(...args) {
|
||||||
$api.createRequest(`/app/company/${id}`).then((resData) => {
|
if (dataType.value === 2) {
|
||||||
|
// 第三方数据接口
|
||||||
|
const [companyId, zphId] = args;
|
||||||
|
$api.createRequest(`/app/internal/companyThirdPart/${companyId}/${zphId}`).then((resData) => {
|
||||||
|
companyInfo.value = resData.data;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 原数据接口
|
||||||
|
const [companyId] = args;
|
||||||
|
$api.createRequest(`/app/company/${companyId}`).then((resData) => {
|
||||||
companyInfo.value = resData.data;
|
companyInfo.value = resData.data;
|
||||||
getJobsList();
|
getJobsList();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getJobsList(type = 'add') {
|
function getJobsList(type = 'add') {
|
||||||
|
if (dataType.value === 2) {
|
||||||
|
// 第三方数据职位列表
|
||||||
|
getThirdPartyJobsList(type);
|
||||||
|
} else {
|
||||||
|
// 原数据职位列表
|
||||||
|
getOriginalJobsList(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getThirdPartyJobsList(type = 'add') {
|
||||||
|
const { companyId, companyName, zphId } = pageOptions.value;
|
||||||
|
|
||||||
|
if (type === 'refresh') {
|
||||||
|
pageState.current = 1;
|
||||||
|
pageState.maxPage = 1;
|
||||||
|
}
|
||||||
|
if (type === 'add' && pageState.current < pageState.maxPage) {
|
||||||
|
pageState.current += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
let params = {
|
||||||
|
current: pageState.current,
|
||||||
|
pageSize: pageState.pageSize,
|
||||||
|
};
|
||||||
|
|
||||||
|
$api.createRequest(`/app/internal/jobThirdPart?gsID=${companyId}&gsmc=${companyName}&zphID=${zphId}`, params).then((resData) => {
|
||||||
|
const { rows, total } = resData;
|
||||||
|
handleJobsListResponse(type, rows, total, 'current');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getOriginalJobsList(type = 'add') {
|
||||||
if (type === 'refresh') {
|
if (type === 'refresh') {
|
||||||
pageState.page = 1;
|
pageState.page = 1;
|
||||||
pageState.maxPage = 1;
|
pageState.maxPage = 1;
|
||||||
@@ -118,23 +198,29 @@ function getJobsList(type = 'add') {
|
|||||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||||
pageState.page += 1;
|
pageState.page += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
current: pageState.page,
|
current: pageState.page,
|
||||||
pageSize: pageState.pageSize,
|
pageSize: pageState.pageSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
$api.createRequest(`/app/company/job/${companyInfo.value.companyId}`, params).then((resData) => {
|
$api.createRequest(`/app/company/job/${companyInfo.value.companyId}`, params).then((resData) => {
|
||||||
const { rows, total } = resData;
|
const { rows, total } = resData;
|
||||||
|
handleJobsListResponse(type, rows, total, 'page');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleJobsListResponse(type, rows, total, pageKey) {
|
||||||
if (type === 'add') {
|
if (type === 'add') {
|
||||||
const str = pageState.pageSize * (pageState.page - 1);
|
const str = pageState.pageSize * (pageState[pageKey] - 1);
|
||||||
const end = pageState.list.length;
|
const end = pageState.list.length;
|
||||||
const reslist = rows;
|
const reslist = rows;
|
||||||
pageState.list.splice(str, end, ...reslist);
|
pageState.list.splice(str, end, ...reslist);
|
||||||
} else {
|
} else {
|
||||||
pageState.list = rows;
|
pageState.list = rows;
|
||||||
}
|
}
|
||||||
pageState.total = resData.total;
|
pageState.total = total;
|
||||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function expand() {
|
function expand() {
|
||||||
@@ -174,7 +260,6 @@ image {
|
|||||||
margin-right: 24rpx
|
margin-right: 24rpx
|
||||||
}
|
}
|
||||||
.companyinfo-right{
|
.companyinfo-right{
|
||||||
|
|
||||||
.row1{
|
.row1{
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
@@ -210,7 +295,7 @@ image {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.expanded {
|
.expanded {
|
||||||
max-height: 1000rpx; // 足够显示完整内容
|
max-height: 1000rpx;
|
||||||
}
|
}
|
||||||
.expand{
|
.expand{
|
||||||
display: flex
|
display: flex
|
||||||
|
|||||||
@@ -25,12 +25,12 @@
|
|||||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="getJobList('add')">
|
<scroll-view scroll-y class="main-scroll" @scrolltolower="getJobList('add')">
|
||||||
<view class="one-cards">
|
<view class="one-cards">
|
||||||
<view class="mian">
|
<view class="mian">
|
||||||
<renderJobs
|
<renderJobViewRecord
|
||||||
:list="pageState.list"
|
:list="pageState.list"
|
||||||
v-if="pageState.list.length"
|
v-if="pageState.list.length"
|
||||||
:longitude="longitudeVal"
|
:longitude="longitudeVal"
|
||||||
:latitude="latitudeVal"
|
:latitude="latitudeVal"
|
||||||
></renderJobs>
|
></renderJobViewRecord>
|
||||||
<empty v-else pdTop="200"></empty>
|
<empty v-else pdTop="200"></empty>
|
||||||
<!-- <loadmore ref="loadmoreRef"></loadmore> -->
|
<!-- <loadmore ref="loadmoreRef"></loadmore> -->
|
||||||
</view>
|
</view>
|
||||||
@@ -88,9 +88,7 @@ function toSelectDate() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function navToPost(jobId) {
|
|
||||||
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function searchCollection(e) {
|
function searchCollection(e) {
|
||||||
const value = e.detail.value;
|
const value = e.detail.value;
|
||||||
|
|||||||
@@ -15,12 +15,12 @@
|
|||||||
<swiper-item class="list">
|
<swiper-item class="list">
|
||||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
|
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
|
||||||
<view class="mian">
|
<view class="mian">
|
||||||
<renderJobs
|
<renderJobCollectionRecord
|
||||||
:list="pageState.list"
|
|
||||||
v-if="pageState.list.length"
|
v-if="pageState.list.length"
|
||||||
|
:list="pageState.list"
|
||||||
:longitude="longitudeVal"
|
:longitude="longitudeVal"
|
||||||
:latitude="latitudeVal"
|
:latitude="latitudeVal">
|
||||||
></renderJobs>
|
</renderJobCollectionRecord>
|
||||||
<empty v-else pdTop="200"></empty>
|
<empty v-else pdTop="200"></empty>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -28,12 +28,12 @@
|
|||||||
<swiper-item class="list">
|
<swiper-item class="list">
|
||||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLowerCompany">
|
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLowerCompany">
|
||||||
<view class="mian">
|
<view class="mian">
|
||||||
<renderCompanys
|
<renderCompanyCollectionRecord
|
||||||
:list="pageCompanyState.list"
|
:list="pageCompanyState.list"
|
||||||
v-if="pageCompanyState.list.length"
|
v-if="pageCompanyState.list.length"
|
||||||
:longitude="longitudeVal"
|
:longitude="longitudeVal"
|
||||||
:latitude="latitudeVal"
|
:latitude="latitudeVal"
|
||||||
></renderCompanys>
|
></renderCompanyCollectionRecord>
|
||||||
<empty v-else pdTop="200"></empty>
|
<empty v-else pdTop="200"></empty>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|||||||
@@ -11,15 +11,15 @@
|
|||||||
<image src="@/static/icon/companyIcon.png" mode=""></image>
|
<image src="@/static/icon/companyIcon.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="companyinfo-right">
|
<view class="companyinfo-right">
|
||||||
<view class="row1 line_2">{{ fairInfo?.name }}</view>
|
<view class="row1 line_2">{{ fairInfo?.zphmc }}</view>
|
||||||
<view class="row2">
|
<view class="row2">
|
||||||
<text>{{ fairInfo.location }}</text>
|
<text>{{ fairInfo.jbf }}</text>
|
||||||
<convert-distance
|
<!-- <convert-distance
|
||||||
:alat="fairInfo.latitude"
|
:alat="fairInfo.latitude"
|
||||||
:along="fairInfo.longitude"
|
:along="fairInfo.longitude"
|
||||||
:blat="latitudeVal"
|
:blat="latitudeVal"
|
||||||
:blong="longitudeVal"
|
:blong="longitudeVal"
|
||||||
></convert-distance>
|
></convert-distance> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -27,36 +27,36 @@
|
|||||||
<image class="location-img" src="/static/icon/mapLine.png"></image>
|
<image class="location-img" src="/static/icon/mapLine.png"></image>
|
||||||
<view class="location-info">
|
<view class="location-info">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<text class="info-title">{{ fairInfo.address }}</text>
|
<text class="info-title">{{ fairInfo.zphdz }}</text>
|
||||||
<text class="info-text">位置</text>
|
<!-- <text class="info-text">位置</text> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="conetent-info" :class="{ expanded: isExpanded }">
|
<view class="conetent-info" :class="{ expanded: isExpanded }">
|
||||||
<view class="info-title">内容描述</view>
|
<view class="info-title">内容描述</view>
|
||||||
<view class="info-desirption">{{ fairInfo.description }}</view>
|
<view class="info-desirption">{{ fairInfo.zphjj }}</view>
|
||||||
<!-- <view class="info-title title2">公司地址</view>
|
<!-- <view class="info-title title2">公司地址</view>
|
||||||
<view class="locationCompany"></view> -->
|
<view class="locationCompany"></view> -->
|
||||||
<view class="company-times">
|
<view class="company-times">
|
||||||
<view class="info-title">内容描述</view>
|
<view class="info-title">内容描述</view>
|
||||||
<view class="card-times">
|
<view class="card-times">
|
||||||
<view class="time-left">
|
<view class="time-left">
|
||||||
<view class="left-date">{{ parseDateTime(fairInfo.startTime).time }}</view>
|
<view class="left-date">{{ parseDateTime(fairInfo.zphjbsj).time }}</view>
|
||||||
<view class="left-dateDay">{{ parseDateTime(fairInfo.startTime).date }}</view>
|
<view class="left-dateDay">{{ parseDateTime(fairInfo.zphjbsj).date }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="time-center">
|
<view class="time-center">
|
||||||
<view class="center-date">
|
<view class="center-date">
|
||||||
{{ getTimeStatus(fairInfo.startTime, fairInfo.endTime).statusText }}
|
{{ getTimeStatus(fairInfo.zphjbsj, fairInfo.zphjzsj).statusText }}
|
||||||
</view>
|
</view>
|
||||||
<view class="center-dateDay">
|
<view class="center-dateDay">
|
||||||
{{ getHoursBetween(fairInfo.startTime, fairInfo.endTime) }}小时
|
{{ getHoursBetween(fairInfo.zphjbsj, fairInfo.zphjzsj) }}小时
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="time-right">
|
<view class="time-right">
|
||||||
<view class="left-date">{{ parseDateTime(fairInfo.endTime).time }}</view>
|
<view class="left-date">{{ parseDateTime(fairInfo.zphjzsj).time }}</view>
|
||||||
<view class="left-dateDay">{{ parseDateTime(fairInfo.endTime).date }}</view>
|
<view class="left-dateDay">{{ parseDateTime(fairInfo.zphjzsj).date }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -69,17 +69,18 @@
|
|||||||
src="@/static/icon/downs.png"
|
src="@/static/icon/downs.png"
|
||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y class="Detailscroll-view">
|
<scroll-view scroll-y class="Detailscroll-view" @scrolltolower="getCompanyList('add')">
|
||||||
<view class="views">
|
<view class="views">
|
||||||
<view class="Detail-title">
|
<view class="Detail-title">
|
||||||
<text class="title">参会单位({{ companyList.length }})</text>
|
<text class="title">参会单位({{ pageState.total }})</text>
|
||||||
</view>
|
</view>
|
||||||
<renderCompanys
|
<renderCompanysOutData
|
||||||
v-if="companyList.length"
|
v-if="pageState.list.length"
|
||||||
:list="companyList"
|
:zphId="zphId"
|
||||||
|
:list="pageState.list"
|
||||||
:longitude="longitudeVal"
|
:longitude="longitudeVal"
|
||||||
:latitude="latitudeVal"
|
:latitude="latitudeVal"
|
||||||
></renderCompanys>
|
></renderCompanysOutData>
|
||||||
<empty v-else pdTop="200"></empty>
|
<empty v-else pdTop="200"></empty>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -110,28 +111,69 @@ const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
|||||||
|
|
||||||
const isExpanded = ref(false);
|
const isExpanded = ref(false);
|
||||||
const fairInfo = ref({});
|
const fairInfo = ref({});
|
||||||
const companyList = ref([]);
|
|
||||||
|
const pageState = reactive({
|
||||||
|
current: 0,
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
maxPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
});
|
||||||
const hasnext = ref(true);
|
const hasnext = ref(true);
|
||||||
|
|
||||||
|
const zphId = ref('');
|
||||||
|
const pageOptions = ref({})
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
getCompanyInfo(options.jobFairId);
|
zphId.value = options.jobFairId
|
||||||
|
pageOptions.value = options
|
||||||
|
getJobFairInfo(options.jobFairId, options.jobFairName);
|
||||||
|
getCompanyList('refresh');
|
||||||
});
|
});
|
||||||
|
|
||||||
function getCompanyInfo(id) {
|
function getJobFairInfo(id,name) {
|
||||||
$api.createRequest(`/app/fair/${id}`).then((resData) => {
|
$api.createRequest(`/app/internal/jobFairThirdPart/${id}`).then((resData) => {
|
||||||
fairInfo.value = resData.data;
|
fairInfo.value = resData.data;
|
||||||
companyList.value = resData.data.companyList;
|
|
||||||
hasAppointment();
|
hasAppointment();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function getCompanyList(type='add') {
|
||||||
|
const { jobFairId,jobFairName} = pageOptions.value
|
||||||
|
if (type === 'refresh') {
|
||||||
|
pageState.current = 1;
|
||||||
|
pageState.maxPage = 1;
|
||||||
|
}
|
||||||
|
if (type === 'add' && pageState.current < pageState.maxPage) {
|
||||||
|
pageState.current += 1;
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
current: pageState.current,
|
||||||
|
pageSize: pageState.pageSize,
|
||||||
|
};
|
||||||
|
$api.createRequest(`/app/internal/companyThirdPart/?zphID=${jobFairId}&zphmc=${jobFairName}`,params ).then((resData) => {
|
||||||
|
const { rows, total } = resData;
|
||||||
|
if (type === 'add') {
|
||||||
|
const str = pageState.pageSize * (pageState.current - 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);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const hasAppointment = () => {
|
const hasAppointment = () => {
|
||||||
const isTimePassed = (timeStr) => {
|
const isTimePassed = (timeStr) => {
|
||||||
|
if(!timeStr) return false
|
||||||
const targetTime = new Date(timeStr.replace(/-/g, '/')).getTime(); // 兼容格式
|
const targetTime = new Date(timeStr.replace(/-/g, '/')).getTime(); // 兼容格式
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
return now < targetTime;
|
return now < targetTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
hasnext.value = isTimePassed(fairInfo.value.startTime);
|
hasnext.value = isTimePassed(fairInfo.value.zphjbsj);
|
||||||
};
|
};
|
||||||
|
|
||||||
function openMap(lat, lng, name = '位置') {
|
function openMap(lat, lng, name = '位置') {
|
||||||
@@ -149,16 +191,16 @@ function expand() {
|
|||||||
|
|
||||||
// 取消/收藏岗位
|
// 取消/收藏岗位
|
||||||
function applyExhibitors() {
|
function applyExhibitors() {
|
||||||
const fairId = fairInfo.value.jobFairId;
|
const fairId = fairInfo.value.zphID;
|
||||||
if (fairInfo.value.isCollection) {
|
if (fairInfo.value.isCollection) {
|
||||||
// $api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
|
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
|
||||||
// getCompanyInfo(fairId);
|
getJobFairInfo(fairId);
|
||||||
// $api.msg('取消预约成功');
|
$api.msg('取消预约成功');
|
||||||
// });
|
});
|
||||||
$api.msg('已预约成功');
|
$api.msg('已预约成功');
|
||||||
} else {
|
} else {
|
||||||
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'POST').then((resData) => {
|
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'POST').then((resData) => {
|
||||||
getCompanyInfo(fairId);
|
getJobFairInfo(fairId);
|
||||||
$api.msg('预约成功');
|
$api.msg('预约成功');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,13 @@
|
|||||||
<image src="@/static/icon/back-white.png" @click="navBack"></image>
|
<image src="@/static/icon/back-white.png" @click="navBack"></image>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
<view v-if="userInfo.resumeOcrStatus && showNotice" class="notice-line" :class="userInfo.resumeOcrStatus?.includes('成功')?'green':'blue'">
|
||||||
|
<image v-if="userInfo.resumeOcrStatus?.includes('成功')" class="icon" src="@/static/icon/notice-green.png" />
|
||||||
|
<image v-else class="icon" src="@/static/icon/notice-blue.png" />
|
||||||
|
<view class="text">{{userInfo.resumeOcrStatus}}</view>
|
||||||
|
<image @click="closeNotice" v-if="userInfo.resumeOcrStatus?.includes('成功')" class="close" src="@/static/icon/close-green.png" />
|
||||||
|
<image @click="closeNotice" v-else class="close" src="@/static/icon/close-blue.png" />
|
||||||
|
</view>
|
||||||
<view class="mys-container">
|
<view class="mys-container">
|
||||||
<!-- 个人信息 -->
|
<!-- 个人信息 -->
|
||||||
<view
|
<view
|
||||||
@@ -164,10 +171,15 @@ const { getUserResume } = useUserStore();
|
|||||||
const { getDictData, oneDictData } = useDictStore();
|
const { getDictData, oneDictData } = useDictStore();
|
||||||
import config from "@/config.js";
|
import config from "@/config.js";
|
||||||
|
|
||||||
|
const showNotice = ref(true)
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
getUserResume();
|
getUserResume();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function closeNotice() {
|
||||||
|
showNotice.value=false
|
||||||
|
}
|
||||||
|
|
||||||
function chooseResume() {
|
function chooseResume() {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
sizeType: ["original", "compressed"],
|
sizeType: ["original", "compressed"],
|
||||||
@@ -254,6 +266,36 @@ function uploadResume(tempFilePath, loading) {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notice-line
|
||||||
|
width 100%;
|
||||||
|
height:60rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding:0 30rpx
|
||||||
|
margin-bottom: 20rpx
|
||||||
|
.icon
|
||||||
|
width:35rpx;
|
||||||
|
height:35rpx;
|
||||||
|
.text
|
||||||
|
flex: 1;
|
||||||
|
overflow hidden
|
||||||
|
padding:0 25rpx
|
||||||
|
.close
|
||||||
|
width:25rpx;
|
||||||
|
height:25rpx;
|
||||||
|
|
||||||
|
.notice-line.blue{
|
||||||
|
background: #E8F1FF
|
||||||
|
color: #1677ff
|
||||||
|
}
|
||||||
|
.notice-line.green{
|
||||||
|
background: #D4FFF1
|
||||||
|
color: #38bb8f
|
||||||
|
}
|
||||||
|
|
||||||
image{
|
image{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%
|
height: 100%
|
||||||
|
|||||||
@@ -28,9 +28,12 @@ watch(
|
|||||||
() => props.value,
|
() => props.value,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
if (newVal && Object.keys(newVal).length > 0) {
|
if (newVal && Object.keys(newVal).length > 0) {
|
||||||
const { skill, experience, education, salary, age, location } = newVal.radarChart;
|
// const { skill, experience, education, salary, age, location } = newVal.radarChart;
|
||||||
const labels = ['学历', '年龄', '工作地', '技能', '工作经验', '期望薪资'];
|
const { experience, education, salary, age, location } = newVal.radarChart;
|
||||||
const data = [education, age, location, skill, experience, salary].map((item) => item * 0.05);
|
// const labels = ['学历', '年龄', '工作地', '技能', '工作经验', '期望薪资'];
|
||||||
|
const labels = ['学历', '年龄', '工作地', '工作经验', '期望薪资'];
|
||||||
|
// const data = [education, age, location, skill, experience, salary].map((item) => item * 0.05);
|
||||||
|
const data = [education, age, location, experience, salary].map((item) => item * 0.05);
|
||||||
rawRadarChart(labels, data);
|
rawRadarChart(labels, data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -43,10 +46,8 @@ function rawRadarChart(labels, data) {
|
|||||||
const height = 80;
|
const height = 80;
|
||||||
const centerX = 150;
|
const centerX = 150;
|
||||||
const centerY = 125;
|
const centerY = 125;
|
||||||
// const data = [2, 3.5, 5, 3.5, 5, 3.5]; // 示例数据
|
|
||||||
// const labels = ['火烧', '泡水', '事故', '外观', '部件', '火烧'];
|
|
||||||
const colors = ['#F5F5F5', '#F5F5F5', '#F5F5F5', '#F5F5F5', '#F5F5F5'];
|
const colors = ['#F5F5F5', '#F5F5F5', '#F5F5F5', '#F5F5F5', '#F5F5F5'];
|
||||||
const maxScore = 5; // 数据最大值
|
const maxScore = 5;
|
||||||
|
|
||||||
const angleStep = (2 * Math.PI) / labels.length;
|
const angleStep = (2 * Math.PI) / labels.length;
|
||||||
|
|
||||||
@@ -62,9 +63,8 @@ function rawRadarChart(labels, data) {
|
|||||||
ctx.fill();
|
ctx.fill();
|
||||||
|
|
||||||
//多边形圈
|
//多边形圈
|
||||||
// 多边形圈
|
|
||||||
for (let i = 5; i > 0; i--) {
|
for (let i = 5; i > 0; i--) {
|
||||||
ctx.setStrokeStyle(colors[i - 1]); // 设置边框颜色
|
ctx.setStrokeStyle(colors[i - 1]);
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
labels.forEach((label, index) => {
|
labels.forEach((label, index) => {
|
||||||
const x = centerX + (width / 5) * i * Math.cos(angleStep * index - Math.PI / 2);
|
const x = centerX + (width / 5) * i * Math.cos(angleStep * index - Math.PI / 2);
|
||||||
@@ -76,19 +76,20 @@ function rawRadarChart(labels, data) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
ctx.closePath();
|
ctx.closePath();
|
||||||
ctx.stroke(); // 只描边,不填充
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
|
|
||||||
// //竖线
|
//竖线
|
||||||
labels.forEach((label, index) => {
|
labels.forEach((label, index) => {
|
||||||
ctx.setStrokeStyle('#F5F5F5');
|
ctx.setStrokeStyle('#F5F5F5');
|
||||||
ctx.setFillStyle('#F5F5F5');
|
ctx.setFillStyle('#F5F5F5');
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
|
|
||||||
const x1 = centerX + width * 0.6 * Math.sin(angleStep * index);
|
// 修改坐标计算,使用与多边形圈相同的角度计算方式
|
||||||
const y1 = centerY + height * 0.6 * Math.cos(angleStep * index);
|
const x1 = centerX + width * 0.6 * Math.cos(angleStep * index - Math.PI / 2);
|
||||||
const x = centerX + width * Math.sin(angleStep * index);
|
const y1 = centerY + height * 0.6 * Math.sin(angleStep * index - Math.PI / 2);
|
||||||
const y = centerY + height * Math.cos(angleStep * index);
|
const x = centerX + width * Math.cos(angleStep * index - Math.PI / 2);
|
||||||
|
const y = centerY + height * Math.sin(angleStep * index - Math.PI / 2);
|
||||||
|
|
||||||
ctx.moveTo(x1, y1);
|
ctx.moveTo(x1, y1);
|
||||||
ctx.lineTo(x, y);
|
ctx.lineTo(x, y);
|
||||||
@@ -102,11 +103,11 @@ function rawRadarChart(labels, data) {
|
|||||||
ctx.setFillStyle('rgba(37,107,250, 0.24)');
|
ctx.setFillStyle('rgba(37,107,250, 0.24)');
|
||||||
ctx.setLineWidth(2);
|
ctx.setLineWidth(2);
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
const pointList = []; // 记录每个点的位置,等会画小圆点
|
const pointList = [];
|
||||||
data.forEach((score, index) => {
|
data.forEach((score, index) => {
|
||||||
const x = centerX + width * (score / maxScore) * Math.cos(angleStep * index - Math.PI / 2);
|
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);
|
const y = centerY + height * (score / maxScore) * Math.sin(angleStep * index - Math.PI / 2);
|
||||||
pointList.push({ x, y }); // 保存位置
|
pointList.push({ x, y });
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
ctx.moveTo(x, y);
|
ctx.moveTo(x, y);
|
||||||
} else {
|
} else {
|
||||||
@@ -118,15 +119,16 @@ function rawRadarChart(labels, data) {
|
|||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
|
|
||||||
// 绘制每个小圆点
|
// 绘制每个小圆点
|
||||||
ctx.setFillStyle('#256BFA'); // 小圆点颜色(你可以改)
|
ctx.setFillStyle('#256BFA');
|
||||||
pointList.forEach((point) => {
|
pointList.forEach((point) => {
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.arc(point.x, point.y, 4, 0, 2 * Math.PI); // 半径 4,可以自己调大小
|
ctx.arc(point.x, point.y, 4, 0, 2 * Math.PI);
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 绘制标签
|
// 绘制标签
|
||||||
ctx.setTextAlign('center');
|
ctx.setTextAlign('center');
|
||||||
|
ctx.setTextBaseline('middle');
|
||||||
|
|
||||||
labels.forEach((label, index) => {
|
labels.forEach((label, index) => {
|
||||||
const x = centerX + (width + 30) * Math.cos(angleStep * index - Math.PI / 2);
|
const x = centerX + (width + 30) * Math.cos(angleStep * index - Math.PI / 2);
|
||||||
@@ -137,30 +139,9 @@ function rawRadarChart(labels, data) {
|
|||||||
ctx.setFontSize(12);
|
ctx.setFontSize(12);
|
||||||
ctx.font = 'bold 12px sans-serif';
|
ctx.font = 'bold 12px sans-serif';
|
||||||
ctx.fillText(label, x, y);
|
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();
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -6,39 +6,59 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template #headerright>
|
<template #headerright>
|
||||||
<!-- <view class="btnshare">
|
|
||||||
<image src="@/static/icon/share.png" @click="shareJob"></image>
|
|
||||||
</view> -->
|
|
||||||
<view class="btn mar_ri10">
|
<view class="btn mar_ri10">
|
||||||
<image src="@/static/icon/collect3.png" v-if="!jobInfo.isCollection" @click="jobCollection"></image>
|
<image src="@/static/icon/collect3.png" v-if="!jobInfo.isCollection" @click="jobCollection"></image>
|
||||||
<image src="@/static/icon/collect2.png" v-else @click="jobCollection"></image>
|
<image src="@/static/icon/collect2.png" v-else @click="jobCollection"></image>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- 根据 dataType 显示不同内容 -->
|
||||||
<view class="content" v-show="!isEmptyObject(jobInfo)">
|
<view class="content" v-show="!isEmptyObject(jobInfo)">
|
||||||
|
<!-- 顶部信息区域 -->
|
||||||
<view class="content-top btn-feel">
|
<view class="content-top btn-feel">
|
||||||
<view class="top-salary">
|
<view class="top-salary" v-if="jobInfo.maxSalary">
|
||||||
<Salary-Expectation
|
<Salary-Expectation
|
||||||
:max-salary="jobInfo.maxSalary"
|
:max-salary="jobInfo.maxSalary"
|
||||||
:min-salary="jobInfo.minSalary"
|
:min-salary="jobInfo.minSalary"
|
||||||
:is-month="true"
|
:is-month="true"
|
||||||
></Salary-Expectation>
|
></Salary-Expectation>
|
||||||
</view>
|
</view>
|
||||||
<view class="top-name">{{ jobInfo.jobTitle }}</view>
|
<view class="top-salary" v-else>
|
||||||
|
<Salary-Expectation
|
||||||
|
:max-salary="jobInfo.maxSalary"
|
||||||
|
:min-salary="jobInfo.minSalary"
|
||||||
|
:is-month="true"
|
||||||
|
></Salary-Expectation>
|
||||||
|
</view>
|
||||||
|
<view class="top-name">{{ dataType === 2 ? jobInfo.gwmc : jobInfo.jobTitle }}</view>
|
||||||
<view class="top-info">
|
<view class="top-info">
|
||||||
<view class="info-img"><image src="/static/icon/post12.png"></image></view>
|
<view class="info-img"><image src="/static/icon/post12.png"></image></view>
|
||||||
<view class="info-text">
|
<!-- 第三方数据展示 -->
|
||||||
|
<view class="info-text" v-if="dataType === 2">
|
||||||
|
{{jobInfo.xlyq == '不限' ? '学历不限' : jobInfo.xlyq}}
|
||||||
|
</view>
|
||||||
|
<!-- 原数据展示 -->
|
||||||
|
<view class="info-text" v-else>
|
||||||
<dict-Label dictType="experience" :value="jobInfo.experience"></dict-Label>
|
<dict-Label dictType="experience" :value="jobInfo.experience"></dict-Label>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="info-img mar_le20"><image src="/static/icon/post13.png"></image></view>
|
<view class="info-img mar_le20"><image src="/static/icon/post13.png"></image></view>
|
||||||
<view class="info-text">
|
<!-- 第三方数据展示 -->
|
||||||
|
<view class="info-text" v-if="dataType === 2">
|
||||||
|
{{jobInfo.gwgzjy == '不限' ? '经验不限' : jobInfo.gwgzjy}}
|
||||||
|
</view>
|
||||||
|
<!-- 原数据展示 -->
|
||||||
|
<view class="info-text" v-else>
|
||||||
<dict-Label dictType="education" :value="jobInfo.education"></dict-Label>
|
<dict-Label dictType="education" :value="jobInfo.education"></dict-Label>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="position-source">
|
<view class="position-source">
|
||||||
<text>来源 </text>
|
<text>来源 </text>
|
||||||
{{ jobInfo.dataSource }}
|
{{ dataType === 2 ? '青岛人才网' : jobInfo.dataSource }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- AI讲解区域 -->
|
||||||
<view class="ai-explain" v-if="jobInfo.isExplain">
|
<view class="ai-explain" v-if="jobInfo.isExplain">
|
||||||
<view class="exbg">
|
<view class="exbg">
|
||||||
<view class="explain-left btn-shaky">
|
<view class="explain-left btn-shaky">
|
||||||
@@ -48,20 +68,24 @@
|
|||||||
<view class="explain-right button-click" @click="seeExplain">点击查看</view>
|
<view class="explain-right button-click" @click="seeExplain">点击查看</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 职位描述区域 -->
|
||||||
<view class="content-card">
|
<view class="content-card">
|
||||||
<view class="card-title">
|
<view class="card-title">
|
||||||
<text class="title">职位描述</text>
|
<text class="title">职位描述</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="description" :style="{ whiteSpace: 'pre-wrap' }">
|
<view class="description" :style="{ whiteSpace: 'pre-wrap' }">
|
||||||
{{ jobInfo.description }}
|
{{ dataType === 2 ? jobInfo.gwms : jobInfo.description }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 公司信息区域 -->
|
||||||
<view class="content-card">
|
<view class="content-card">
|
||||||
<view class="card-title">
|
<view class="card-title">
|
||||||
<text class="title">公司信息</text>
|
<text class="title">公司信息</text>
|
||||||
<text
|
<text
|
||||||
class="btntext button-click"
|
class="btntext button-click"
|
||||||
@click="navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.company.companyId}`)"
|
@click="handleCompanyDetail"
|
||||||
>
|
>
|
||||||
单位详情
|
单位详情
|
||||||
</text>
|
</text>
|
||||||
@@ -71,15 +95,20 @@
|
|||||||
<image src="@/static/icon/companyIcon.png" mode=""></image>
|
<image src="@/static/icon/companyIcon.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="companyinfo-right">
|
<view class="companyinfo-right">
|
||||||
<view class="row1">{{ jobInfo.company?.name }}</view>
|
<view class="row1">{{ dataType === 2 ? jobInfo.gsmc : jobInfo.company?.name }}</view>
|
||||||
<view class="row2">
|
<view class="row2">
|
||||||
<dict-tree-Label
|
<dict-tree-Label
|
||||||
v-if="jobInfo.company?.industry"
|
v-if="dataType !== 2 && jobInfo.company?.industry"
|
||||||
dictType="industry"
|
dictType="industry"
|
||||||
:value="jobInfo.company?.industry"
|
:value="jobInfo.company?.industry"
|
||||||
></dict-tree-Label>
|
></dict-tree-Label>
|
||||||
<span v-if="jobInfo.company?.industry"> </span>
|
<span v-if="dataType !== 2 && jobInfo.company?.industry"> </span>
|
||||||
<dict-Label dictType="scale" :value="jobInfo.company?.scale"></dict-Label>
|
<dict-Label
|
||||||
|
v-if="dataType !== 2"
|
||||||
|
dictType="scale"
|
||||||
|
:value="jobInfo.company?.scale"
|
||||||
|
></dict-Label>
|
||||||
|
<span v-if="dataType === 2">{{jobInfo.qyxz}}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="row2">
|
<view class="row2">
|
||||||
<text>在招</text>
|
<text>在招</text>
|
||||||
@@ -97,7 +126,9 @@
|
|||||||
></map>
|
></map>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content-card">
|
|
||||||
|
<!-- 竞争力分析区域 -->
|
||||||
|
<view class="content-card" v-if="dataType !== 2">
|
||||||
<view class="card-title">
|
<view class="card-title">
|
||||||
<text class="title">竞争力分析</text>
|
<text class="title">竞争力分析</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -125,11 +156,15 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="height: 24px"></view>
|
<view style="height: 24px"></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<view class="footer">
|
<view class="footer">
|
||||||
<view class="btn-wq button-click" @click="jobApply">立即前往</view>
|
<view class="btn-wq button-click" @click="jobApply">
|
||||||
|
{{ dataType === 2 ? '立即投递' : '立即前往' }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<VideoPlayer ref="videoPalyerRef" />
|
<VideoPlayer ref="videoPalyerRef" />
|
||||||
@@ -143,8 +178,10 @@ import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
|
|||||||
import { onLoad, onShow, onHide } from '@dcloudio/uni-app';
|
import { onLoad, onShow, onHide } from '@dcloudio/uni-app';
|
||||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||||
import RadarMap from './component/radarMap.vue';
|
import RadarMap from './component/radarMap.vue';
|
||||||
|
|
||||||
const { $api, navTo, getLenPx, parseQueryParams, navBack, isEmptyObject } = inject('globalFunction');
|
const { $api, navTo, getLenPx, parseQueryParams, navBack, isEmptyObject } = inject('globalFunction');
|
||||||
import config from '@/config.js';
|
import config from '@/config.js';
|
||||||
|
|
||||||
const matchingDegree = ref(['一般', '良好', '优秀', '极好']);
|
const matchingDegree = ref(['一般', '良好', '优秀', '极好']);
|
||||||
const currentStep = ref(1);
|
const currentStep = ref(1);
|
||||||
const companyCount = ref(0);
|
const companyCount = ref(0);
|
||||||
@@ -155,9 +192,11 @@ const jobIdRef = ref();
|
|||||||
const raderData = ref({});
|
const raderData = ref({});
|
||||||
const videoPalyerRef = ref(null);
|
const videoPalyerRef = ref(null);
|
||||||
const explainUrlRef = ref('');
|
const explainUrlRef = ref('');
|
||||||
|
const dataType = ref(1); // 1: 原数据, 2: 第三方数据
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
if (option.jobId) {
|
if (option.jobId) {
|
||||||
|
dataType.value = option.dataType ? parseInt(option.dataType) : 1;
|
||||||
initLoad(option);
|
initLoad(option);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -165,6 +204,7 @@ onLoad((option) => {
|
|||||||
onShow(() => {
|
onShow(() => {
|
||||||
const option = parseQueryParams(); // 兼容微信内置浏览器
|
const option = parseQueryParams(); // 兼容微信内置浏览器
|
||||||
if (option.jobId) {
|
if (option.jobId) {
|
||||||
|
dataType.value = option.dataType ? parseInt(option.dataType) : 1;
|
||||||
initLoad(option);
|
initLoad(option);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -180,20 +220,40 @@ function initLoad(option) {
|
|||||||
function seeExplain() {
|
function seeExplain() {
|
||||||
if (jobInfo.value.explainUrl) {
|
if (jobInfo.value.explainUrl) {
|
||||||
videoPalyerRef.value?.open(jobInfo.value.explainUrl);
|
videoPalyerRef.value?.open(jobInfo.value.explainUrl);
|
||||||
// console.log(jobInfo.value.explainUrl);
|
|
||||||
// explainUrlRef.value = jobInfo.value.explainUrl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDetail(jobId) {
|
function getDetail(jobId) {
|
||||||
|
if (dataType.value === 2) {
|
||||||
|
// 第三方数据接口
|
||||||
return new Promise((reslove, reject) => {
|
return new Promise((reslove, reject) => {
|
||||||
|
$api.createRequest(`/app/internal/jobThirdPart/${jobId}`).then((resData) => {
|
||||||
|
const { gsID, gsmc, zphID } = resData.data;
|
||||||
|
jobInfo.value = resData.data;
|
||||||
|
reslove(resData.data);
|
||||||
|
getCompanyIsAJobs(gsID, gsmc, zphID);
|
||||||
|
|
||||||
|
if (resData.data.latitude && resData.data.longitude) {
|
||||||
|
initMapCovers(resData.data.latitude, resData.data.longitude, resData.data.gsmc);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 原数据接口
|
||||||
$api.createRequest(`/app/job/${jobId}`).then((resData) => {
|
$api.createRequest(`/app/job/${jobId}`).then((resData) => {
|
||||||
const { latitude, longitude, companyName, companyId } = resData.data;
|
const { latitude, longitude, companyName, companyId } = resData.data;
|
||||||
jobInfo.value = resData.data;
|
jobInfo.value = resData.data;
|
||||||
reslove(resData.data);
|
|
||||||
getCompanyIsAJobs(companyId);
|
getCompanyIsAJobs(companyId);
|
||||||
getCompetivetuveness(jobId);
|
getCompetivetuveness(jobId);
|
||||||
|
|
||||||
if (latitude && longitude) {
|
if (latitude && longitude) {
|
||||||
|
initMapCovers(latitude, longitude, companyName);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function initMapCovers(latitude, longitude, companyName) {
|
||||||
mapCovers.value = [
|
mapCovers.value = [
|
||||||
{
|
{
|
||||||
latitude: latitude,
|
latitude: latitude,
|
||||||
@@ -205,39 +265,66 @@ function getDetail(jobId) {
|
|||||||
padding: 3,
|
padding: 3,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
bgColor: '#FFFFFF',
|
bgColor: '#FFFFFF',
|
||||||
anchorX: getTextWidth(companyName), // X 轴调整,负数向左
|
anchorX: getTextWidth(companyName),
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
},
|
},
|
||||||
width: 34,
|
width: 34,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCompanyIsAJobs(companyId) {
|
function getCompanyIsAJobs(...args) {
|
||||||
|
if (dataType.value === 2) {
|
||||||
|
// 第三方数据获取公司职位数量
|
||||||
|
const [gsID, gsmc, zphID] = args;
|
||||||
|
$api.createRequest(`/app/internal/jobThirdPart?gsID=${gsID}&gsmc=${gsmc}&zphID=${zphID}`).then((resData) => {
|
||||||
|
companyCount.value = resData.total;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 原数据获取公司职位数量
|
||||||
|
const [companyId] = args;
|
||||||
$api.createRequest(`/app/company/count/${companyId}`).then((resData) => {
|
$api.createRequest(`/app/company/count/${companyId}`).then((resData) => {
|
||||||
companyCount.value = resData.data;
|
companyCount.value = resData.data;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTextWidth(text, size = 12) {
|
function getTextWidth(text, size = 12) {
|
||||||
const canvas = document.createElement('canvas');
|
const canvas = document.createElement('canvas');
|
||||||
const context = canvas.getContext('2d');
|
const context = canvas.getContext('2d');
|
||||||
context.font = `${12}px Arial`;
|
context.font = `${12}px Arial`;
|
||||||
return -(context.measureText(text).width / 2) - 20; // 计算文字中心点
|
return -(context.measureText(text).width / 2) - 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCompetivetuveness(jobId) {
|
function getCompetivetuveness(jobId) {
|
||||||
|
if (dataType.value !== 2) {
|
||||||
$api.createRequest(`/app/job/competitiveness/${jobId}`, {}, 'GET').then((resData) => {
|
$api.createRequest(`/app/job/competitiveness/${jobId}`, {}, 'GET').then((resData) => {
|
||||||
raderData.value = resData.data;
|
raderData.value = resData.data;
|
||||||
currentStep.value = resData.data.matchScore * 0.04;
|
currentStep.value = resData.data.matchScore * 0.04;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 申请岗位
|
// 申请岗位
|
||||||
function jobApply() {
|
function jobApply() {
|
||||||
|
if (dataType.value === 2) {
|
||||||
|
$api.msg('敬请期待');
|
||||||
|
return
|
||||||
|
// 第三方数据申请逻辑
|
||||||
|
const jobId = jobInfo.value.id;
|
||||||
|
if (jobInfo.value.isApply) {
|
||||||
|
const jobUrl = jobInfo.value.jobUrl;
|
||||||
|
return window.open(jobUrl);
|
||||||
|
} else {
|
||||||
|
$api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => {
|
||||||
|
getDetail(jobIdRef.value);
|
||||||
|
$api.msg('投递成功');
|
||||||
|
const jobUrl = jobInfo.value.jobUrl;
|
||||||
|
return window.open(jobUrl);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 原数据申请逻辑
|
||||||
const jobId = jobInfo.value.jobId;
|
const jobId = jobInfo.value.jobId;
|
||||||
if (jobInfo.value.isApply) {
|
if (jobInfo.value.isApply) {
|
||||||
const jobUrl = jobInfo.value.jobUrl;
|
const jobUrl = jobInfo.value.jobUrl;
|
||||||
@@ -250,22 +337,49 @@ function jobApply() {
|
|||||||
return window.open(jobUrl);
|
return window.open(jobUrl);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消/收藏岗位
|
// 取消/收藏岗位
|
||||||
function jobCollection() {
|
function jobCollection() {
|
||||||
|
if (dataType.value === 2) {
|
||||||
|
// 第三方数据收藏逻辑
|
||||||
|
const id = jobInfo.value.id;
|
||||||
|
if (jobInfo.value.isCollection) {
|
||||||
|
$api.createRequest(`/app/job/collection/${id}/2`, {}, 'DELETE').then((resData) => {
|
||||||
|
getDetail(jobIdRef.value);
|
||||||
|
$api.msg('取消收藏成功');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$api.createRequest(`/app/job/collection/${id}/2`, {}, 'POST').then((resData) => {
|
||||||
|
getDetail(jobIdRef.value);
|
||||||
|
$api.msg('收藏成功');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 原数据收藏逻辑
|
||||||
const jobId = jobInfo.value.jobId;
|
const jobId = jobInfo.value.jobId;
|
||||||
if (jobInfo.value.isCollection) {
|
if (jobInfo.value.isCollection) {
|
||||||
$api.createRequest(`/app/job/collection/${jobId}`, {}, 'DELETE').then((resData) => {
|
$api.createRequest(`/app/job/collection/${jobId}/1`, {}, 'DELETE').then((resData) => {
|
||||||
getDetail(jobId);
|
getDetail(jobId);
|
||||||
$api.msg('取消收藏成功');
|
$api.msg('取消收藏成功');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$api.createRequest(`/app/job/collection/${jobId}`, {}, 'POST').then((resData) => {
|
$api.createRequest(`/app/job/collection/${jobId}/1`, {}, 'POST').then((resData) => {
|
||||||
getDetail(jobId);
|
getDetail(jobId);
|
||||||
$api.msg('收藏成功');
|
$api.msg('收藏成功');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理公司详情跳转
|
||||||
|
function handleCompanyDetail() {
|
||||||
|
if (dataType.value === 2) {
|
||||||
|
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.value.gsID}&companyName=${jobInfo.value.gsmc}&zphId=${jobInfo.value.zphID}&dataType=2`);
|
||||||
|
} else {
|
||||||
|
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.value.company.companyId}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getClass(index) {
|
function getClass(index) {
|
||||||
@@ -285,6 +399,7 @@ function getClass(index) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
/* 样式保持不变,与现在的post页面相同 */
|
||||||
.btnback{
|
.btnback{
|
||||||
width: 64rpx;
|
width: 64rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
@@ -308,15 +423,14 @@ image {
|
|||||||
.progress-container {
|
.progress-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8rpx; /* 间距 */
|
gap: 8rpx;
|
||||||
margin-top: 24rpx
|
margin-top: 24rpx
|
||||||
|
|
||||||
}
|
}
|
||||||
.progress-text{
|
.progress-text{
|
||||||
margin-top: 8rpx
|
margin-top: 8rpx
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8rpx; /* 间距 */
|
gap: 8rpx;
|
||||||
justify-content: space-around
|
justify-content: space-around
|
||||||
width: 100%
|
width: 100%
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -335,12 +449,10 @@ image {
|
|||||||
transition: background-color 0.3s;
|
transition: background-color 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 完整激活格子 */
|
|
||||||
.progress-item.active {
|
.progress-item.active {
|
||||||
background: linear-gradient(to right, #256bfa, #8c68ff);
|
background: linear-gradient(to right, #256bfa, #8c68ff);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 当前进度进行中的格子 */
|
|
||||||
for i in 0..100
|
for i in 0..100
|
||||||
.progress-item.half{i}::before
|
.progress-item.half{i}::before
|
||||||
content ''
|
content ''
|
||||||
@@ -352,36 +464,12 @@ for i in 0..100
|
|||||||
background linear-gradient(to right, #256bfa (i)%, #eaeaea (i)%)
|
background linear-gradient(to right, #256bfa (i)%, #eaeaea (i)%)
|
||||||
border-radius 24rpx
|
border-radius 24rpx
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.card-footer{
|
.card-footer{
|
||||||
.footer-title{
|
.footer-title{
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #000000;
|
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
|
||||||
.ai-explain{
|
.ai-explain{
|
||||||
@@ -527,7 +615,6 @@ for i in 0..100
|
|||||||
margin-right: 24rpx
|
margin-right: 24rpx
|
||||||
}
|
}
|
||||||
.companyinfo-right{
|
.companyinfo-right{
|
||||||
|
|
||||||
.row1{
|
.row1{
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
|
|||||||
@@ -15,24 +15,24 @@
|
|||||||
<scroll-view scroll-y>
|
<scroll-view scroll-y>
|
||||||
<view v-if="pageState.list.length">
|
<view v-if="pageState.list.length">
|
||||||
<view class="card" v-for="(item, index) in pageState.list" :key="index">
|
<view class="card" v-for="(item, index) in pageState.list" :key="index">
|
||||||
<view @click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.jobFairId)">
|
<view @click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.zphID + '&jobFairName=' + item.zphmc)">
|
||||||
<view class="card-row">
|
<view class="card-row">
|
||||||
<Countdown startTime="item.startTime" :endTime="item.endTime" />
|
<Countdown :startTime="item.zphjbsj" :endTime="item.zphjzsj" />
|
||||||
</view>
|
</view>
|
||||||
<view class="card-Title">{{ item.name }}</view>
|
<view class="card-Title">{{ item.zphmc }}</view>
|
||||||
<view class="card-row">
|
<view class="card-row">
|
||||||
<view class="rowleft">{{ item.location }}</view>
|
<view class="rowleft">{{ item.zphdz }}</view>
|
||||||
<view class="rowright">
|
<view class="rowright" style="white-space: nowrap">
|
||||||
<convert-distance
|
<!-- <convert-distance
|
||||||
:alat="item.latitude"
|
:alat="item.latitude"
|
||||||
:along="item.longitude"
|
:along="item.longitude"
|
||||||
:blat="latitudeVal"
|
:blat="latitudeVal"
|
||||||
:blong="longitudeVal"
|
:blong="longitudeVal"
|
||||||
></convert-distance>
|
></convert-distance> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="footer" v-if="isTimePassed(item.startTime)">
|
<view class="footer" v-if="isTimePassed(item.zphjbsj)">
|
||||||
<view class="card_cancel" @click="updateCancel(item)">取消预约</view>
|
<view class="card_cancel" @click="updateCancel(item)">取消预约</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -72,6 +72,7 @@ const ranOptions = ref([
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
function isTimePassed(timeStr) {
|
function isTimePassed(timeStr) {
|
||||||
|
if(!timeStr) return false
|
||||||
const targetTime = new Date(timeStr.replace(/-/g, '/')).getTime(); // 兼容格式
|
const targetTime = new Date(timeStr.replace(/-/g, '/')).getTime(); // 兼容格式
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
return now < targetTime;
|
return now < targetTime;
|
||||||
@@ -88,11 +89,22 @@ function chnageRanOption(item) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateCancel(item) {
|
function updateCancel(item) {
|
||||||
const fairId = item.jobFairId;
|
const fairId = item.zphID;
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '确定要取消预约吗?',
|
||||||
|
showCancel: true,
|
||||||
|
success: ({ confirm, cancel }) => {
|
||||||
|
if(confirm){
|
||||||
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
|
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
|
||||||
getList('refresh');
|
getList('refresh');
|
||||||
$api.msg('取消预约成功');
|
$api.msg('取消预约成功');
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getList(type = 'add', loading = true) {
|
function getList(type = 'add', loading = true) {
|
||||||
@@ -166,6 +178,7 @@ function getList(type = 'add', loading = true) {
|
|||||||
display: flex
|
display: flex
|
||||||
align-items: center
|
align-items: center
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.card-Title{
|
.card-Title{
|
||||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
|||||||
@@ -32,7 +32,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-bottom">
|
<view class="info-bottom">
|
||||||
<view>到岗:2025-11-02</view>
|
<!-- <view>到岗:2025-11-02</view> -->
|
||||||
|
<view></view>
|
||||||
<view>地点:青岛市-<dict-Label dictType="area" :value="Number(userInfo.area)"></dict-Label></view>
|
<view>地点:青岛市-<dict-Label dictType="area" :value="Number(userInfo.area)"></dict-Label></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="des-card" style="margin-top: 24rpx">
|
<view class="des-card" style="margin-top: 24rpx">
|
||||||
@@ -44,10 +45,10 @@
|
|||||||
<view>毕业学校</view>
|
<view>毕业学校</view>
|
||||||
<view>{{ userInfo.graduationSchool || "-" }}</view>
|
<view>{{ userInfo.graduationSchool || "-" }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fl_box fl_justbet">
|
<!-- <view class="fl_box fl_justbet">
|
||||||
<view>当前状态</view>
|
<view>当前状态</view>
|
||||||
<view>在职 看工作机会</view>
|
<view>在职 看工作机会</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
545
pages/careerfair/careerfair copy.vue
Normal file
545
pages/careerfair/careerfair copy.vue
Normal file
@@ -0,0 +1,545 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app-custom-root">
|
||||||
|
<view class="app-container">
|
||||||
|
<!-- 顶部头部区域 -->
|
||||||
|
<view class="container-header">
|
||||||
|
<view class="header-top">
|
||||||
|
<view class="header-btnLf button-click" @click="seemsg(0)" :class="{ active: state.current === 0 }">
|
||||||
|
现场招聘
|
||||||
|
</view>
|
||||||
|
<view class="header-btnLf button-click" @click="seemsg(1)" :class="{ active: state.current === 1 }">
|
||||||
|
VR虚拟招聘会
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="header-input btn-feel">
|
||||||
|
<uni-icons class="iconsearch" color="#666666" type="search" size="18"></uni-icons>
|
||||||
|
<input class="input" placeholder="招聘会" placeholder-class="inputplace" />
|
||||||
|
</view>
|
||||||
|
<view class="header-date">
|
||||||
|
<view class="data-week">
|
||||||
|
<view
|
||||||
|
class="weel-days button-click"
|
||||||
|
:class="{ active: currentDay.fullDate === item.fullDate }"
|
||||||
|
v-for="(item, index) in weekList"
|
||||||
|
:key="index"
|
||||||
|
@click="selectDate(item)"
|
||||||
|
>
|
||||||
|
<view class="label">{{ item.day }}</view>
|
||||||
|
<view class="day">{{ item.date }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="data-all">
|
||||||
|
<image class="allimg button-click" @click="toSelectDate" src="/static/icon/date1.png"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 主体内容区域 -->
|
||||||
|
<view class="container-main">
|
||||||
|
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
|
||||||
|
<view class="cards" v-if="fairList.length">
|
||||||
|
<view
|
||||||
|
class="card press-button"
|
||||||
|
v-for="(item, index) in fairList"
|
||||||
|
:key="index"
|
||||||
|
@click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.jobFairId)"
|
||||||
|
>
|
||||||
|
<view class="card-title">{{ item.zphmc }}</view>
|
||||||
|
<view class="card-row">
|
||||||
|
<text class="">{{ item.zphdz }}</text>
|
||||||
|
<text class="">
|
||||||
|
<convert-distance
|
||||||
|
:alat="item.latitude"
|
||||||
|
:along="item.longitude"
|
||||||
|
:blat="latitudeVal"
|
||||||
|
:blong="longitudeVal"
|
||||||
|
></convert-distance>
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
<view class="card-times">
|
||||||
|
<view class="time-left">
|
||||||
|
<view class="left-date">{{ parseDateTime(item.zphjbsj).time }}</view>
|
||||||
|
<view class="left-dateDay">{{ parseDateTime(item.zphjbsj).date }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="line"></view>
|
||||||
|
<view class="time-center">
|
||||||
|
<view class="center-date">
|
||||||
|
{{ getTimeStatus(item.zphjbsj, item.zphjzsj).statusText }}
|
||||||
|
</view>
|
||||||
|
<view class="center-dateDay">
|
||||||
|
{{ getHoursBetween(item.zphjbsj, item.zphjzsj) }}小时
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="line"></view>
|
||||||
|
<view class="time-right">
|
||||||
|
<view class="left-date">{{ parseDateTime(item.zphjzsj).time }}</view>
|
||||||
|
<view class="left-dateDay">{{ parseDateTime(item.zphjzsj).date }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="recommend-card-line"></view>
|
||||||
|
<view class="card-footer">内容简介:{{ item.zphjj }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<empty v-else pdTop="200"></empty>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
<Tabbar :currentpage="1"></Tabbar>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||||
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
|
import Tabbar from '@/components/tabbar/midell-box.vue';
|
||||||
|
import useLocationStore from '@/stores/useLocationStore';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
|
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||||
|
const { $api, navTo, cloneDeep } = inject('globalFunction');
|
||||||
|
const weekList = ref([]);
|
||||||
|
const fairList = ref([]);
|
||||||
|
const currentDay = ref({});
|
||||||
|
const state = reactive({
|
||||||
|
current: 0,
|
||||||
|
all: [{}],
|
||||||
|
});
|
||||||
|
const pageState = reactive({
|
||||||
|
page: 0,
|
||||||
|
total: 0,
|
||||||
|
maxPage: 2,
|
||||||
|
pageSize: 10,
|
||||||
|
search: {},
|
||||||
|
});
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
const today = new Date();
|
||||||
|
const year = today.getFullYear();
|
||||||
|
const month = String(today.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(today.getDate()).padStart(2, '0');
|
||||||
|
|
||||||
|
const currentDate = `${year}-${month}-${day}`;
|
||||||
|
const result = getNextDates({
|
||||||
|
startDate: currentDate,
|
||||||
|
});
|
||||||
|
weekList.value = result;
|
||||||
|
currentDay.value.fullDate = result[0].fullDate
|
||||||
|
getFair('refresh');
|
||||||
|
});
|
||||||
|
|
||||||
|
function toSelectDate() {
|
||||||
|
navTo('/packageA/pages/selectDate/selectDate', {
|
||||||
|
query: {
|
||||||
|
date: currentDay.value.fullDate,
|
||||||
|
},
|
||||||
|
onBack: (res) => {
|
||||||
|
console.log(res);
|
||||||
|
const result = getNextDates({
|
||||||
|
startDate: res.date,
|
||||||
|
});
|
||||||
|
const formattedDate = res.date.slice(5); // MM-DD
|
||||||
|
const dateFull = {
|
||||||
|
date: res.date.slice(5),
|
||||||
|
day: '周' + res.week,
|
||||||
|
fullDate: res.date,
|
||||||
|
};
|
||||||
|
currentDay.value = dateFull;
|
||||||
|
weekList.value = result;
|
||||||
|
getFair('refresh');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 查看消息类型
|
||||||
|
function changeSwiperMsgType(e) {
|
||||||
|
const currented = e.detail.current;
|
||||||
|
state.current = currented;
|
||||||
|
}
|
||||||
|
|
||||||
|
function seemsg(index) {
|
||||||
|
if (index === 1) {
|
||||||
|
return $api.msg('功能确定中');
|
||||||
|
}
|
||||||
|
state.current = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleScrollToLower = () => {
|
||||||
|
return
|
||||||
|
getFair();
|
||||||
|
console.log('触底');
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
function getFair(type = 'add') {
|
||||||
|
if (type === 'refresh') {
|
||||||
|
pageState.page = 1;
|
||||||
|
pageState.maxPage = 1;
|
||||||
|
}
|
||||||
|
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||||
|
pageState.page += 1;
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
...pageState.search,
|
||||||
|
// current: pageState.page,
|
||||||
|
// pageSize: pageState.pageSize,
|
||||||
|
};
|
||||||
|
// if (currentDay.value?.fullDate) {
|
||||||
|
// params.queryDate = currentDay.value.fullDate;
|
||||||
|
// }
|
||||||
|
if (currentDay.value?.fullDate) {
|
||||||
|
params.zphjbsj = currentDay.value.fullDate.replace(/-/g, '');
|
||||||
|
}
|
||||||
|
$api.createRequest('/app/internal/jobFairThirdPart', params).then((resData) => {
|
||||||
|
const { rows, total } = resData;
|
||||||
|
if (type === 'add') {
|
||||||
|
// const str = pageState.pageSize * (pageState.page - 1);
|
||||||
|
// const end = fairList.value.length;
|
||||||
|
// const reslist = rows;
|
||||||
|
// fairList.value.splice(str, end, ...reslist);
|
||||||
|
fairList.value = rows
|
||||||
|
} else {
|
||||||
|
fairList.value = rows;
|
||||||
|
}
|
||||||
|
// pageState.list = resData.rows;
|
||||||
|
pageState.total = resData.total;
|
||||||
|
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
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 位小数
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectDate = (item) => {
|
||||||
|
if (currentDay.value?.fullDate === item.fullDate) {
|
||||||
|
currentDay.value = {};
|
||||||
|
getFair('refresh');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
currentDay.value = item;
|
||||||
|
getFair('refresh');
|
||||||
|
};
|
||||||
|
|
||||||
|
function getNextDates({ startDate = '', count = 6 }) {
|
||||||
|
const baseDate = startDate ? new Date(startDate) : new Date(); // 指定起点或今天
|
||||||
|
const dates = [];
|
||||||
|
const dayNames = ['日', '一', '二', '三', '四', '五', '六'];
|
||||||
|
|
||||||
|
for (let i = 0; i < count; i++) {
|
||||||
|
const date = new Date(baseDate);
|
||||||
|
date.setDate(baseDate.getDate() + i);
|
||||||
|
|
||||||
|
const fullDate = date.toISOString().slice(0, 10); // YYYY-MM-DD
|
||||||
|
const formattedDate = fullDate.slice(5); // MM-DD
|
||||||
|
const dayOfWeek = dayNames[date.getDay()];
|
||||||
|
|
||||||
|
dates.push({
|
||||||
|
date: formattedDate,
|
||||||
|
fullDate,
|
||||||
|
day: '周' + dayOfWeek,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 可选设置默认选中项
|
||||||
|
// currentDay.value = dates[0];
|
||||||
|
|
||||||
|
return dates;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.app-custom-root {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 10;
|
||||||
|
width: 100vw;
|
||||||
|
height: calc(100% - var(--window-bottom));
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.app-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
.container-header {
|
||||||
|
background: url('@/static/icon/background2.png') 0 0 no-repeat;
|
||||||
|
background-size: 100% 400rpx;
|
||||||
|
.header-top{
|
||||||
|
display: flex;
|
||||||
|
line-height: calc(88rpx - 14rpx);
|
||||||
|
padding: 16rpx 44rpx 14rpx 44rpx;
|
||||||
|
.header-btnLf {
|
||||||
|
display: flex;
|
||||||
|
width: fit-content;
|
||||||
|
white-space: nowrap
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
width: calc(60rpx * 3);
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #696969;
|
||||||
|
margin-right: 44rpx;
|
||||||
|
position: relative;
|
||||||
|
.btns-wd{
|
||||||
|
position: absolute
|
||||||
|
top: 2rpx;
|
||||||
|
right: 2rpx
|
||||||
|
width: 16rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
background: #F73636;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 4rpx solid #EEEEFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.header-input{
|
||||||
|
padding: 0 24rpx
|
||||||
|
width: calc(100% - 48rpx);
|
||||||
|
position: relative
|
||||||
|
.iconsearch{
|
||||||
|
position: absolute
|
||||||
|
left: 50rpx;
|
||||||
|
top: 50%
|
||||||
|
transform: translate(0, -50%)
|
||||||
|
}
|
||||||
|
.input{
|
||||||
|
padding: 0 30rpx 0 80rpx
|
||||||
|
height: 80rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 75rpx 75rpx 75rpx 75rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
.inputplace{
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #B5B5B5;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.header-date{
|
||||||
|
padding: 28rpx
|
||||||
|
display: flex
|
||||||
|
justify-content: space-between
|
||||||
|
align-items: center
|
||||||
|
.data-week{
|
||||||
|
flex: 1
|
||||||
|
display: flex
|
||||||
|
justify-content: space-between
|
||||||
|
flex-wrap: nowrap
|
||||||
|
overflow: hidden
|
||||||
|
.weel-days{
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
display: flex
|
||||||
|
justify-content: center
|
||||||
|
flex-direction: column
|
||||||
|
text-align: center
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #333333;
|
||||||
|
width: 96rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
|
||||||
|
.label{}
|
||||||
|
.day{
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.active{
|
||||||
|
background: rgba(37,107,250,0.1);
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
color: #256BFA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.data-all{
|
||||||
|
width: 66rpx;
|
||||||
|
height: 66rpx;
|
||||||
|
margin-left: 18rpx
|
||||||
|
.allimg{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-main {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
}
|
||||||
|
.main-scroll {
|
||||||
|
width: 100%
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.cards{
|
||||||
|
padding: 28rpx 28rpx 28rpx 28rpx;
|
||||||
|
.card{
|
||||||
|
margin-top: 28rpx
|
||||||
|
padding: 32rpx;
|
||||||
|
background: #FFFFFF
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
|
||||||
|
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||||
|
.card-title{
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
.card-row{
|
||||||
|
display: flex
|
||||||
|
justify-content: space-between
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #495265;
|
||||||
|
margin-top: 4rpx
|
||||||
|
}
|
||||||
|
.card-times{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between
|
||||||
|
align-items: center
|
||||||
|
margin-top: 24rpx
|
||||||
|
.time-left,
|
||||||
|
.time-right{
|
||||||
|
text-align: center
|
||||||
|
.left-date{
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 48rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
|
}
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.recommend-card-line{
|
||||||
|
width: calc(100%);
|
||||||
|
height: 0rpx;
|
||||||
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||||
|
border: 2rpx dashed rgba(0,0,0,0.14);
|
||||||
|
margin-top: 32rpx
|
||||||
|
position: relative
|
||||||
|
}
|
||||||
|
|
||||||
|
.recommend-card-line::before{
|
||||||
|
position: absolute
|
||||||
|
content: ''
|
||||||
|
left: 0
|
||||||
|
top: 0
|
||||||
|
transform: translate(-50% - 110rpx, -50%)
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
background: #F4F4F4;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.recommend-card-line::after{
|
||||||
|
position: absolute
|
||||||
|
content: ''
|
||||||
|
right: 0
|
||||||
|
top: 0
|
||||||
|
transform: translate(50% + 100rpx, -50%)
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
background: #F4F4F4;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.card-footer{
|
||||||
|
margin-top: 32rpx
|
||||||
|
min-height: 50rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #6C7282;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.card:first-child{
|
||||||
|
margin-top: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="header-input btn-feel">
|
<view class="header-input btn-feel">
|
||||||
<uni-icons class="iconsearch" color="#666666" type="search" size="18"></uni-icons>
|
<uni-icons class="iconsearch" color="#666666" type="search" size="18"></uni-icons>
|
||||||
<input class="input" placeholder="招聘会" placeholder-class="inputplace" />
|
<input v-model="pageState.zphmc" confirm-type="search" @confirm="getFair" class="input" placeholder="招聘会" placeholder-class="inputplace" />
|
||||||
</view>
|
</view>
|
||||||
<view class="header-date">
|
<view class="header-date">
|
||||||
<view class="data-week">
|
<view class="data-week">
|
||||||
@@ -42,42 +42,42 @@
|
|||||||
class="card press-button"
|
class="card press-button"
|
||||||
v-for="(item, index) in fairList"
|
v-for="(item, index) in fairList"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.jobFairId)"
|
@click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.zphID + '&jobFairName=' + item.zphmc)"
|
||||||
>
|
>
|
||||||
<view class="card-title">{{ item.name }}</view>
|
<view class="card-title">{{ item.zphmc }}</view>
|
||||||
<view class="card-row">
|
<view class="card-row">
|
||||||
<text class="">{{ item.location }}</text>
|
<text class="">{{ item.jbf }}</text>
|
||||||
<text class="">
|
<text class="">
|
||||||
<convert-distance
|
<!-- <convert-distance
|
||||||
:alat="item.latitude"
|
:alat="item.latitude"
|
||||||
:along="item.longitude"
|
:along="item.longitude"
|
||||||
:blat="latitudeVal"
|
:blat="latitudeVal"
|
||||||
:blong="longitudeVal"
|
:blong="longitudeVal"
|
||||||
></convert-distance>
|
></convert-distance> -->
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-times">
|
<view class="card-times">
|
||||||
<view class="time-left">
|
<view class="time-left">
|
||||||
<view class="left-date">{{ parseDateTime(item.startTime).time }}</view>
|
<view class="left-date">{{ parseDateTime(item.zphjbsj).time }}</view>
|
||||||
<view class="left-dateDay">{{ parseDateTime(item.startTime).date }}</view>
|
<view class="left-dateDay">{{ parseDateTime(item.zphjbsj).date }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="time-center">
|
<view class="time-center">
|
||||||
<view class="center-date">
|
<view class="center-date">
|
||||||
{{ getTimeStatus(item.startTime, item.endTime).statusText }}
|
{{ getTimeStatus(item.zphjbsj, item.zphjzsj).statusText }}
|
||||||
</view>
|
</view>
|
||||||
<view class="center-dateDay">
|
<view class="center-dateDay">
|
||||||
{{ getHoursBetween(item.startTime, item.endTime) }}小时
|
{{ getHoursBetween(item.zphjbsj, item.zphjzsj) }}小时
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="time-right">
|
<view class="time-right">
|
||||||
<view class="left-date">{{ parseDateTime(item.endTime).time }}</view>
|
<view class="left-date">{{ parseDateTime(item.zphjzsj).time }}</view>
|
||||||
<view class="left-dateDay">{{ parseDateTime(item.endTime).date }}</view>
|
<view class="left-dateDay">{{ parseDateTime(item.zphjzsj).date }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="recommend-card-line"></view>
|
<view class="recommend-card-line"></view>
|
||||||
<view class="card-footer">内容简介:{{ item.description }}</view>
|
<view class="card-footer">内容简介:{{ item.zphjj }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<empty v-else pdTop="200"></empty>
|
<empty v-else pdTop="200"></empty>
|
||||||
@@ -95,7 +95,7 @@ import Tabbar from '@/components/tabbar/midell-box.vue';
|
|||||||
import useLocationStore from '@/stores/useLocationStore';
|
import useLocationStore from '@/stores/useLocationStore';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||||
const { $api, navTo, cloneDeep } = inject('globalFunction');
|
const { $api, navTo, cloneDeep,debounce } = inject('globalFunction');
|
||||||
const weekList = ref([]);
|
const weekList = ref([]);
|
||||||
const fairList = ref([]);
|
const fairList = ref([]);
|
||||||
const currentDay = ref({});
|
const currentDay = ref({});
|
||||||
@@ -108,7 +108,7 @@ const pageState = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
maxPage: 2,
|
maxPage: 2,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
search: {},
|
zphmc:''
|
||||||
});
|
});
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
@@ -122,6 +122,7 @@ onLoad(() => {
|
|||||||
startDate: currentDate,
|
startDate: currentDate,
|
||||||
});
|
});
|
||||||
weekList.value = result;
|
weekList.value = result;
|
||||||
|
currentDay.value.fullDate = result[0].fullDate
|
||||||
getFair('refresh');
|
getFair('refresh');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -161,10 +162,12 @@ function seemsg(index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleScrollToLower = () => {
|
const handleScrollToLower = () => {
|
||||||
|
return
|
||||||
getFair();
|
getFair();
|
||||||
console.log('触底');
|
console.log('触底');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function getFair(type = 'add') {
|
function getFair(type = 'add') {
|
||||||
if (type === 'refresh') {
|
if (type === 'refresh') {
|
||||||
pageState.page = 1;
|
pageState.page = 1;
|
||||||
@@ -174,21 +177,24 @@ function getFair(type = 'add') {
|
|||||||
pageState.page += 1;
|
pageState.page += 1;
|
||||||
}
|
}
|
||||||
let params = {
|
let params = {
|
||||||
...pageState.search,
|
zphmc:pageState.zphmc,
|
||||||
current: pageState.page,
|
// current: pageState.page,
|
||||||
pageSize: pageState.pageSize,
|
// pageSize: pageState.pageSize,
|
||||||
};
|
};
|
||||||
|
// if (currentDay.value?.fullDate) {
|
||||||
|
// params.queryDate = currentDay.value.fullDate;
|
||||||
|
// }
|
||||||
if (currentDay.value?.fullDate) {
|
if (currentDay.value?.fullDate) {
|
||||||
params.queryDate = currentDay.value.fullDate;
|
params.zphjbsj = currentDay.value.fullDate.replace(/-/g, '');
|
||||||
}
|
}
|
||||||
$api.createRequest('/app/fair', params).then((resData) => {
|
$api.createRequest('/app/internal/jobFairThirdPart', params).then((resData) => {
|
||||||
const { rows, total } = resData;
|
const { rows, total } = resData;
|
||||||
console.log(rows);
|
|
||||||
if (type === 'add') {
|
if (type === 'add') {
|
||||||
const str = pageState.pageSize * (pageState.page - 1);
|
// const str = pageState.pageSize * (pageState.page - 1);
|
||||||
const end = fairList.value.length;
|
// const end = fairList.value.length;
|
||||||
const reslist = rows;
|
// const reslist = rows;
|
||||||
fairList.value.splice(str, end, ...reslist);
|
// fairList.value.splice(str, end, ...reslist);
|
||||||
|
fairList.value = rows
|
||||||
} else {
|
} else {
|
||||||
fairList.value = rows;
|
fairList.value = rows;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
static/icon/close-blue.png
Normal file
BIN
static/icon/close-blue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
static/icon/close-green.png
Normal file
BIN
static/icon/close-green.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
static/icon/notice-blue.png
Normal file
BIN
static/icon/notice-blue.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
static/icon/notice-green.png
Normal file
BIN
static/icon/notice-green.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
234
static/js/aes.js
234
static/js/aes.js
@@ -1,234 +0,0 @@
|
|||||||
;(function (root, factory, undef) {
|
|
||||||
if (typeof exports === "object") {
|
|
||||||
// CommonJS
|
|
||||||
module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
|
|
||||||
}
|
|
||||||
else if (typeof define === "function" && define.amd) {
|
|
||||||
// AMD
|
|
||||||
define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Global (browser)
|
|
||||||
factory(root.CryptoJS);
|
|
||||||
}
|
|
||||||
}(this, function (CryptoJS) {
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
// Shortcuts
|
|
||||||
var C = CryptoJS;
|
|
||||||
var C_lib = C.lib;
|
|
||||||
var BlockCipher = C_lib.BlockCipher;
|
|
||||||
var C_algo = C.algo;
|
|
||||||
|
|
||||||
// Lookup tables
|
|
||||||
var SBOX = [];
|
|
||||||
var INV_SBOX = [];
|
|
||||||
var SUB_MIX_0 = [];
|
|
||||||
var SUB_MIX_1 = [];
|
|
||||||
var SUB_MIX_2 = [];
|
|
||||||
var SUB_MIX_3 = [];
|
|
||||||
var INV_SUB_MIX_0 = [];
|
|
||||||
var INV_SUB_MIX_1 = [];
|
|
||||||
var INV_SUB_MIX_2 = [];
|
|
||||||
var INV_SUB_MIX_3 = [];
|
|
||||||
|
|
||||||
// Compute lookup tables
|
|
||||||
(function () {
|
|
||||||
// Compute double table
|
|
||||||
var d = [];
|
|
||||||
for (var i = 0; i < 256; i++) {
|
|
||||||
if (i < 128) {
|
|
||||||
d[i] = i << 1;
|
|
||||||
} else {
|
|
||||||
d[i] = (i << 1) ^ 0x11b;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Walk GF(2^8)
|
|
||||||
var x = 0;
|
|
||||||
var xi = 0;
|
|
||||||
for (var i = 0; i < 256; i++) {
|
|
||||||
// Compute sbox
|
|
||||||
var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);
|
|
||||||
sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;
|
|
||||||
SBOX[x] = sx;
|
|
||||||
INV_SBOX[sx] = x;
|
|
||||||
|
|
||||||
// Compute multiplication
|
|
||||||
var x2 = d[x];
|
|
||||||
var x4 = d[x2];
|
|
||||||
var x8 = d[x4];
|
|
||||||
|
|
||||||
// Compute sub bytes, mix columns tables
|
|
||||||
var t = (d[sx] * 0x101) ^ (sx * 0x1010100);
|
|
||||||
SUB_MIX_0[x] = (t << 24) | (t >>> 8);
|
|
||||||
SUB_MIX_1[x] = (t << 16) | (t >>> 16);
|
|
||||||
SUB_MIX_2[x] = (t << 8) | (t >>> 24);
|
|
||||||
SUB_MIX_3[x] = t;
|
|
||||||
|
|
||||||
// Compute inv sub bytes, inv mix columns tables
|
|
||||||
var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);
|
|
||||||
INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);
|
|
||||||
INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);
|
|
||||||
INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);
|
|
||||||
INV_SUB_MIX_3[sx] = t;
|
|
||||||
|
|
||||||
// Compute next counter
|
|
||||||
if (!x) {
|
|
||||||
x = xi = 1;
|
|
||||||
} else {
|
|
||||||
x = x2 ^ d[d[d[x8 ^ x2]]];
|
|
||||||
xi ^= d[d[xi]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}());
|
|
||||||
|
|
||||||
// Precomputed Rcon lookup
|
|
||||||
var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AES block cipher algorithm.
|
|
||||||
*/
|
|
||||||
var AES = C_algo.AES = BlockCipher.extend({
|
|
||||||
_doReset: function () {
|
|
||||||
var t;
|
|
||||||
|
|
||||||
// Skip reset of nRounds has been set before and key did not change
|
|
||||||
if (this._nRounds && this._keyPriorReset === this._key) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Shortcuts
|
|
||||||
var key = this._keyPriorReset = this._key;
|
|
||||||
var keyWords = key.words;
|
|
||||||
var keySize = key.sigBytes / 4;
|
|
||||||
|
|
||||||
// Compute number of rounds
|
|
||||||
var nRounds = this._nRounds = keySize + 6;
|
|
||||||
|
|
||||||
// Compute number of key schedule rows
|
|
||||||
var ksRows = (nRounds + 1) * 4;
|
|
||||||
|
|
||||||
// Compute key schedule
|
|
||||||
var keySchedule = this._keySchedule = [];
|
|
||||||
for (var ksRow = 0; ksRow < ksRows; ksRow++) {
|
|
||||||
if (ksRow < keySize) {
|
|
||||||
keySchedule[ksRow] = keyWords[ksRow];
|
|
||||||
} else {
|
|
||||||
t = keySchedule[ksRow - 1];
|
|
||||||
|
|
||||||
if (!(ksRow % keySize)) {
|
|
||||||
// Rot word
|
|
||||||
t = (t << 8) | (t >>> 24);
|
|
||||||
|
|
||||||
// Sub word
|
|
||||||
t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
|
|
||||||
|
|
||||||
// Mix Rcon
|
|
||||||
t ^= RCON[(ksRow / keySize) | 0] << 24;
|
|
||||||
} else if (keySize > 6 && ksRow % keySize == 4) {
|
|
||||||
// Sub word
|
|
||||||
t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
|
|
||||||
}
|
|
||||||
|
|
||||||
keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compute inv key schedule
|
|
||||||
var invKeySchedule = this._invKeySchedule = [];
|
|
||||||
for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
|
|
||||||
var ksRow = ksRows - invKsRow;
|
|
||||||
|
|
||||||
if (invKsRow % 4) {
|
|
||||||
var t = keySchedule[ksRow];
|
|
||||||
} else {
|
|
||||||
var t = keySchedule[ksRow - 4];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (invKsRow < 4 || ksRow <= 4) {
|
|
||||||
invKeySchedule[invKsRow] = t;
|
|
||||||
} else {
|
|
||||||
invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^
|
|
||||||
INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
encryptBlock: function (M, offset) {
|
|
||||||
this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
|
|
||||||
},
|
|
||||||
|
|
||||||
decryptBlock: function (M, offset) {
|
|
||||||
// Swap 2nd and 4th rows
|
|
||||||
var t = M[offset + 1];
|
|
||||||
M[offset + 1] = M[offset + 3];
|
|
||||||
M[offset + 3] = t;
|
|
||||||
|
|
||||||
this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
|
|
||||||
|
|
||||||
// Inv swap 2nd and 4th rows
|
|
||||||
var t = M[offset + 1];
|
|
||||||
M[offset + 1] = M[offset + 3];
|
|
||||||
M[offset + 3] = t;
|
|
||||||
},
|
|
||||||
|
|
||||||
_doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {
|
|
||||||
// Shortcut
|
|
||||||
var nRounds = this._nRounds;
|
|
||||||
|
|
||||||
// Get input, add round key
|
|
||||||
var s0 = M[offset] ^ keySchedule[0];
|
|
||||||
var s1 = M[offset + 1] ^ keySchedule[1];
|
|
||||||
var s2 = M[offset + 2] ^ keySchedule[2];
|
|
||||||
var s3 = M[offset + 3] ^ keySchedule[3];
|
|
||||||
|
|
||||||
// Key schedule row counter
|
|
||||||
var ksRow = 4;
|
|
||||||
|
|
||||||
// Rounds
|
|
||||||
for (var round = 1; round < nRounds; round++) {
|
|
||||||
// Shift rows, sub bytes, mix columns, add round key
|
|
||||||
var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];
|
|
||||||
var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];
|
|
||||||
var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];
|
|
||||||
var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];
|
|
||||||
|
|
||||||
// Update state
|
|
||||||
s0 = t0;
|
|
||||||
s1 = t1;
|
|
||||||
s2 = t2;
|
|
||||||
s3 = t3;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Shift rows, sub bytes, add round key
|
|
||||||
var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];
|
|
||||||
var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];
|
|
||||||
var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];
|
|
||||||
var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];
|
|
||||||
|
|
||||||
// Set output
|
|
||||||
M[offset] = t0;
|
|
||||||
M[offset + 1] = t1;
|
|
||||||
M[offset + 2] = t2;
|
|
||||||
M[offset + 3] = t3;
|
|
||||||
},
|
|
||||||
|
|
||||||
keySize: 256/32
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Shortcut functions to the cipher's object interface.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
*
|
|
||||||
* var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);
|
|
||||||
* var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);
|
|
||||||
*/
|
|
||||||
C.AES = BlockCipher._createHelper(AES);
|
|
||||||
}());
|
|
||||||
|
|
||||||
|
|
||||||
return CryptoJS.AES;
|
|
||||||
|
|
||||||
}));
|
|
||||||
@@ -76,8 +76,8 @@ export function createRequest(url, data = {}, method = 'GET', loading = false, h
|
|||||||
// 响应拦截
|
// 响应拦截
|
||||||
if (resData.statusCode === 200) {
|
if (resData.statusCode === 200) {
|
||||||
if (resData.data.encrypted) {
|
if (resData.data.encrypted) {
|
||||||
const decryptedData = sm4Decrypt(config
|
const decryptedData = sm4Decrypt(config.sm4Config.key, resData.data
|
||||||
.sm4Config.key, resData.data.encryptedData)
|
.encryptedData)
|
||||||
resData.data = JSON.parse(decryptedData)
|
resData.data = JSON.parse(decryptedData)
|
||||||
}
|
}
|
||||||
const {
|
const {
|
||||||
|
|||||||
Reference in New Issue
Block a user