Compare commits
12 Commits
CareerMap
...
f5bd523985
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5bd523985 | ||
|
|
be47e94196 | ||
|
|
99aea9e243 | ||
|
|
aa4b185aa2 | ||
|
|
92c6488d18 | ||
|
|
f1c8d0457b | ||
|
|
5378031a58 | ||
|
|
d2f61bcc45 | ||
|
|
d79d79f750 | ||
|
|
40127060b8 | ||
|
|
16d1e50c85 | ||
|
|
6006f5cd28 |
@@ -139,13 +139,15 @@ const validateRole = () => {
|
|||||||
|
|
||||||
const getPhoneNumber = (e) => {
|
const getPhoneNumber = (e) => {
|
||||||
console.log('获取手机号:', e);
|
console.log('获取手机号:', e);
|
||||||
|
console.log('userType.value', userType.value)
|
||||||
// 验证角色是否已选择
|
// 验证角色是否已选择
|
||||||
if (!validateRole()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
if (e.detail.errMsg === 'getPhoneNumber:ok') {
|
||||||
|
if (userType.value === null) {
|
||||||
|
$api.msg('请先选择您的角色');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: (loginRes) => {
|
success: (loginRes) => {
|
||||||
|
|||||||
@@ -19,37 +19,47 @@ export function useColumnCount(onChange = () => {}) {
|
|||||||
// columnCount.value = count < 2 ? 2 : count
|
// columnCount.value = count < 2 ? 2 : count
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
const calcColumn = () => {
|
const calcColumn = () => {
|
||||||
// 使用新的API替代已废弃的getSystemInfoSync
|
// 使用新的API替代已废弃的getSystemInfoSync
|
||||||
let width
|
let width
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
const mpSystemInfo = uni.getWindowInfo()
|
const mpSystemInfo = uni.getWindowInfo()
|
||||||
width = mpSystemInfo.windowWidth
|
width = mpSystemInfo.windowWidth
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef MP-WEIXIN
|
// #ifndef MP-WEIXIN
|
||||||
const otherSystemInfo = uni.getSystemInfoSync()
|
const otherSystemInfo = uni.getSystemInfoSync()
|
||||||
width = otherSystemInfo.windowWidth
|
width = otherSystemInfo.windowWidth
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
let count = 2
|
let count = 2
|
||||||
if (width >= 1000) {
|
if (width >= 1000) {
|
||||||
count = 5
|
// #ifdef H5
|
||||||
} else if (width >= 750) {
|
count = 3 // H5端最多显示3列
|
||||||
count = 4
|
// #endif
|
||||||
} else if (width >= 500) {
|
// #ifndef H5
|
||||||
count = 3
|
count = 5
|
||||||
} else {
|
// #endif
|
||||||
count = 2
|
} else if (width >= 750) {
|
||||||
}
|
// #ifdef H5
|
||||||
|
count = 3 // H5端最多显示3列
|
||||||
if (count !== columnCount.value) {
|
// #endif
|
||||||
columnCount.value = count
|
// #ifndef H5
|
||||||
}
|
count = 4
|
||||||
|
// #endif
|
||||||
// 计算间距:count=2 => 1,count=5 => 2,中间线性插值
|
} else if (width >= 500) {
|
||||||
const spacing = 2 - (count - 2) * (1 / 3)
|
count = 3
|
||||||
// console.log('列数:', count, '间距:', spacing.toFixed(2))
|
} else {
|
||||||
columnSpace.value = spacing
|
count = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count !== columnCount.value) {
|
||||||
|
columnCount.value = count
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算间距:count=2 => 1,count=5 => 2,中间线性插值
|
||||||
|
const spacing = 2 - (count - 2) * (1 / 3)
|
||||||
|
// console.log('列数:', count, '间距:', spacing.toFixed(2))
|
||||||
|
columnSpace.value = spacing
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -2,82 +2,83 @@
|
|||||||
<view class="job-comparison-container">
|
<view class="job-comparison-container">
|
||||||
<scroll-view class="horizontal-scroll" scroll-x="true">
|
<scroll-view class="horizontal-scroll" scroll-x="true">
|
||||||
<view class="comparison-table">
|
<view class="comparison-table">
|
||||||
<view class="table-row table-header">
|
<view class="table-row table-header">
|
||||||
<view class="table-cell fixed-column"></view>
|
<view class="table-cell fixed-column"></view>
|
||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell job-title-cell">
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell job-title-cell">
|
||||||
<text>{{ job.jobTitle }}</text>
|
<text>{{ job?.jobTitle || '' }}</text>
|
||||||
<text class="company">{{ job.company }}</text>
|
<text class="company">{{ job?.company || '' }}</text>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="table-cell fixed-column detail-label">
|
<view class="table-cell fixed-column detail-label">
|
||||||
<text>薪资</text>
|
<text>薪资</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||||
<view>
|
<view>
|
||||||
<Salary-Expectation
|
<Salary-Expectation
|
||||||
:max-salary="job.maxSalary"
|
v-if="job"
|
||||||
:min-salary="job.minSalary"
|
:max-salary="job.maxSalary"
|
||||||
:is-month="true"
|
:min-salary="job.minSalary"
|
||||||
></Salary-Expectation>
|
:is-month="true"
|
||||||
</view>
|
></Salary-Expectation>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="table-cell fixed-column detail-label">
|
<view class="table-cell fixed-column detail-label">
|
||||||
<text>公司名称</text>
|
<text>公司名称</text>
|
||||||
</view>
|
|
||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
|
||||||
<view>{{ job.companyName }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||||
|
<view>{{ job?.companyName || '' }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="table-cell fixed-column detail-label">
|
<view class="table-cell fixed-column detail-label">
|
||||||
<text>学历</text>
|
<text>学历</text>
|
||||||
</view>
|
|
||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
|
||||||
<view><dict-Label dictType="education" :value="job.education"></dict-Label></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||||
|
<view><dict-Label dictType="education" :value="job?.education"></dict-Label></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="table-cell fixed-column detail-label">
|
<view class="table-cell fixed-column detail-label">
|
||||||
<text>经验</text>
|
<text>经验</text>
|
||||||
</view>
|
|
||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
|
||||||
<view><dict-Label dictType="experience" :value="job.experience"></dict-Label></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||||
|
<view><dict-Label dictType="experience" :value="job?.experience"></dict-Label></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="table-cell fixed-column detail-label">
|
<view class="table-cell fixed-column detail-label">
|
||||||
<text>工作地点</text>
|
<text>工作地点</text>
|
||||||
</view>
|
|
||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
|
||||||
<view>{{ job.jobLocation }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||||
|
<view>{{ job?.jobLocation || '' }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="table-cell fixed-column detail-label">
|
<view class="table-cell fixed-column detail-label">
|
||||||
<text>来源</text>
|
<text>来源</text>
|
||||||
</view>
|
|
||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
|
||||||
<view>{{ job.dataSource }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||||
|
<view>{{ job?.dataSource || '' }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="table-cell fixed-column detail-label">
|
<view class="table-cell fixed-column detail-label">
|
||||||
<text>职位描述</text>
|
<text>职位描述</text>
|
||||||
</view>
|
|
||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
|
||||||
<view>{{ job.description }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||||
|
<view>{{ job?.description || '' }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="table-row">
|
<view class="table-row">
|
||||||
<view class="table-cell fixed-column detail-label">
|
<view class="table-cell fixed-column detail-label">
|
||||||
<text>工业</text>
|
<text>工业</text>
|
||||||
@@ -85,9 +86,9 @@
|
|||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||||
<view>
|
<view>
|
||||||
<dict-tree-Label
|
<dict-tree-Label
|
||||||
v-if="jobInfo.company && jobInfo.company.industry"
|
v-if="job.company && job.company.industry"
|
||||||
dictType="industry"
|
dictType="industry"
|
||||||
:value="jobInfo.company.industry"
|
:value="job.company.industry"
|
||||||
></dict-tree-Label>
|
></dict-tree-Label>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -98,7 +99,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||||
<view>
|
<view>
|
||||||
<dict-Label dictType="scale" :value="jobInfo.company?.scale"></dict-Label>
|
<dict-Label dictType="scale" :value="job.company?.scale"></dict-Label>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -108,7 +109,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||||
<view>
|
<view>
|
||||||
{{ job.isHot ? '是' : '否' }}
|
{{ job?.isHot ? '是' : '否' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -125,7 +126,7 @@ const jobs = ref([]);
|
|||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
let compareData = uni.getStorageSync('compare');
|
let compareData = uni.getStorageSync('compare');
|
||||||
jobs.value = compareData;
|
jobs.value = Array.isArray(compareData) ? compareData : [];
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,19 @@
|
|||||||
<view class="input-titile">姓名</view>
|
<view class="input-titile">姓名</view>
|
||||||
<input class="input-con" v-model="fromValue.name" placeholder="请输入您的姓名" />
|
<input class="input-con" v-model="fromValue.name" placeholder="请输入您的姓名" />
|
||||||
</view>
|
</view>
|
||||||
|
<view class="content-input" :class="{ 'input-error': passwordError }">
|
||||||
|
<view class="input-titile">设置密码</view>
|
||||||
|
<input
|
||||||
|
class="input-con"
|
||||||
|
v-model="fromValue.ytjPassword"
|
||||||
|
placeholder="请输入密码"
|
||||||
|
type="password"
|
||||||
|
maxlength="8"
|
||||||
|
@input="validatePassword"
|
||||||
|
/>
|
||||||
|
<view v-if="passwordError" class="error-message">{{ passwordError }}</view>
|
||||||
|
<view v-if="fromValue.ytjPassword && !passwordError" class="success-message">✓ 密码格式正确</view>
|
||||||
|
</view>
|
||||||
<view class="content-sex">
|
<view class="content-sex">
|
||||||
<view class="sex-titile">性别</view>
|
<view class="sex-titile">性别</view>
|
||||||
<view class="sext-ri">
|
<view class="sext-ri">
|
||||||
@@ -160,6 +173,7 @@ const state = reactive({
|
|||||||
});
|
});
|
||||||
const fromValue = reactive({
|
const fromValue = reactive({
|
||||||
name: '',
|
name: '',
|
||||||
|
ytjPassword: '', // 新增密码字段
|
||||||
sex: 0,
|
sex: 0,
|
||||||
birthDate: '',
|
birthDate: '',
|
||||||
education: '',
|
education: '',
|
||||||
@@ -167,6 +181,9 @@ const fromValue = reactive({
|
|||||||
idCard: '',
|
idCard: '',
|
||||||
phone: ''
|
phone: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 输入校验相关
|
||||||
|
const passwordError = ref('');
|
||||||
// 移除重复的onLoad定义,已在上方实现
|
// 移除重复的onLoad定义,已在上方实现
|
||||||
|
|
||||||
// 在onLoad中初始化数据,确保页面加载时就能获取技能信息
|
// 在onLoad中初始化数据,确保页面加载时就能获取技能信息
|
||||||
@@ -240,6 +257,7 @@ function initLoad() {
|
|||||||
const currentUserInfo = userInfo.value && Object.keys(userInfo.value).length > 0 ? userInfo.value : cachedUserInfo;
|
const currentUserInfo = userInfo.value && Object.keys(userInfo.value).length > 0 ? userInfo.value : cachedUserInfo;
|
||||||
|
|
||||||
fromValue.name = currentUserInfo.name || '';
|
fromValue.name = currentUserInfo.name || '';
|
||||||
|
fromValue.ytjPassword = ''; // 密码输入框默认为空,不加载已有密码
|
||||||
fromValue.sex = currentUserInfo.sex !== undefined ? Number(currentUserInfo.sex) : 0;
|
fromValue.sex = currentUserInfo.sex !== undefined ? Number(currentUserInfo.sex) : 0;
|
||||||
fromValue.phone = currentUserInfo.phone || '';
|
fromValue.phone = currentUserInfo.phone || '';
|
||||||
fromValue.birthDate = currentUserInfo.birthDate || '';
|
fromValue.birthDate = currentUserInfo.birthDate || '';
|
||||||
@@ -356,6 +374,12 @@ const confirm = () => {
|
|||||||
return $api.msg('请输入正确手机号');
|
return $api.msg('请输入正确手机号');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 密码校验
|
||||||
|
validatePassword();
|
||||||
|
if (fromValue.ytjPassword && passwordError.value) {
|
||||||
|
return $api.msg(passwordError.value);
|
||||||
|
}
|
||||||
|
|
||||||
// 构建appSkillsList数据结构 - 使用新的技能数据结构,包含id字段
|
// 构建appSkillsList数据结构 - 使用新的技能数据结构,包含id字段
|
||||||
const appSkillsList = state.skills
|
const appSkillsList = state.skills
|
||||||
.filter(skill => skill.name && skill.name.trim() !== '')
|
.filter(skill => skill.name && skill.name.trim() !== '')
|
||||||
@@ -613,6 +637,54 @@ const changeSex = (sex) => {
|
|||||||
fromValue.sex = sex;
|
fromValue.sex = sex;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 密码实时校验
|
||||||
|
const validatePassword = () => {
|
||||||
|
const password = (fromValue.ytjPassword || '').trim();
|
||||||
|
|
||||||
|
// 如果为空,清除错误信息
|
||||||
|
if (!password) {
|
||||||
|
passwordError.value = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 校验规则:长度8位,包含大小写字母和数字,至少各有一个
|
||||||
|
if (password.length !== 8) {
|
||||||
|
passwordError.value = '密码长度必须为8位';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否包含大写字母
|
||||||
|
const hasUpperCase = /[A-Z]/.test(password);
|
||||||
|
// 检查是否包含小写字母
|
||||||
|
const hasLowerCase = /[a-z]/.test(password);
|
||||||
|
// 检查是否包含数字
|
||||||
|
const hasNumber = /[0-9]/.test(password);
|
||||||
|
|
||||||
|
if (!hasUpperCase) {
|
||||||
|
passwordError.value = '密码必须包含至少一个大写字母';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hasLowerCase) {
|
||||||
|
passwordError.value = '密码必须包含至少一个小写字母';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hasNumber) {
|
||||||
|
passwordError.value = '密码必须包含至少一个数字';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否只包含字母和数字
|
||||||
|
if (!/^[A-Za-z0-9]+$/.test(password)) {
|
||||||
|
passwordError.value = '密码只能包含大小写字母和数字';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 校验通过
|
||||||
|
passwordError.value = '';
|
||||||
|
};
|
||||||
|
|
||||||
const changePoliticalAffiliation = () => {
|
const changePoliticalAffiliation = () => {
|
||||||
openSelectPopup({
|
openSelectPopup({
|
||||||
title: '政治面貌',
|
title: '政治面貌',
|
||||||
@@ -770,6 +842,19 @@ function getDatePickerIndexes(dateStr) {
|
|||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
border-bottom: 2rpx solid #EBEBEB
|
border-bottom: 2rpx solid #EBEBEB
|
||||||
position: relative;
|
position: relative;
|
||||||
|
.error-message
|
||||||
|
color: #ff4757;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
line-height: 1.4;
|
||||||
|
.success-message
|
||||||
|
color: #2ed573;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
line-height: 1.4;
|
||||||
|
.input-error
|
||||||
|
.input-con
|
||||||
|
border-bottom-color: #ff4757;
|
||||||
.triangle::before
|
.triangle::before
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
|
|||||||
@@ -171,7 +171,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content-card" v-else>
|
<!-- <view class="content-card" v-if="false">
|
||||||
<view class="card-title">
|
<view class="card-title">
|
||||||
<view class="title">申请人列表</view>
|
<view class="title">申请人列表</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 34px"></view>
|
<view style="height: 34px"></view>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@@ -525,6 +525,11 @@ function previewImage(url, index) {
|
|||||||
current: index
|
current: index
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查看简历
|
||||||
|
function viewResume(userId) {
|
||||||
|
navTo(`/packageA/pages/myResume/myResume?userId=${userId}`);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
|||||||
@@ -58,8 +58,57 @@ const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction
|
|||||||
import useUserStore from '@/stores/useUserStore';
|
import useUserStore from '@/stores/useUserStore';
|
||||||
import useDictStore from '@/stores/useDictStore';
|
import useDictStore from '@/stores/useDictStore';
|
||||||
|
|
||||||
function jumps(url){
|
onLoad(() => {
|
||||||
navTo(url);
|
thirdLogin()
|
||||||
|
});
|
||||||
|
|
||||||
|
async function jumps(url){
|
||||||
|
if(await thirdLogin()){
|
||||||
|
navTo(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function thirdLogin(){
|
||||||
|
let form={}
|
||||||
|
if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||||
|
form={
|
||||||
|
usertype: '1',
|
||||||
|
idno: uni.getStorageSync('userInfo').idCard,
|
||||||
|
name: uni.getStorageSync('userInfo').name,
|
||||||
|
enterprisecode:"",
|
||||||
|
enterprisename: "",
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
}
|
||||||
|
}else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||||
|
form={
|
||||||
|
usertype: "2",
|
||||||
|
enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||||
|
enterprisename: uni.getStorageSync('userInfo').name,
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
idno: "",
|
||||||
|
name: ""
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请先登录'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
|
||||||
|
if (resLogin.code=='200') {
|
||||||
|
uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '单点异常'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -202,12 +202,10 @@ function getData() {
|
|||||||
function getHeart() {
|
function getHeart() {
|
||||||
const raw = uni.getStorageSync("Padmin-Token");
|
const raw = uni.getStorageSync("Padmin-Token");
|
||||||
const token = typeof raw === "string" ? raw.trim() : "";
|
const token = typeof raw === "string" ? raw.trim() : "";
|
||||||
const headers = token ? { Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}` }: {}
|
const headers = token ? { Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}` }: {};
|
||||||
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
|
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
|
||||||
if (resData.code == 200) {
|
if (resData.code == 200) {
|
||||||
getUserInfo();
|
getUserInfo();
|
||||||
} else {
|
|
||||||
navTo('/packageB/login')
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -218,6 +216,7 @@ function getUserInfo(){
|
|||||||
$api.myRequest('/system/user/login/user/info', {},'get',10100,header).then((resData) => {
|
$api.myRequest('/system/user/login/user/info', {},'get',10100,header).then((resData) => {
|
||||||
userId.value=resData.info.userId
|
userId.value=resData.info.userId
|
||||||
getData()
|
getData()
|
||||||
|
updateVideoInfo()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getDictionary(){
|
function getDictionary(){
|
||||||
@@ -277,15 +276,20 @@ function updateVideoInfo(){
|
|||||||
'Authorization':uni.getStorageSync('Padmin-Token'),
|
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||||
'Content-Type': "application/x-www-form-urlencoded"
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
}
|
}
|
||||||
if(videoInfo.value.isCollect===null && videoInfo.value.process ===null){
|
|
||||||
$api.myRequest('/train/public/videoUser/add', paramsData,'post',9100,header).then((resData) => {
|
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, header).then((resData) => {
|
||||||
console.log("视频播放时长更新成功")
|
if (resData.code == 200) {
|
||||||
});
|
if(videoInfo.value.isCollect===null && videoInfo.value.process ===null){
|
||||||
}else{
|
$api.myRequest('/train/public/videoUser/add', paramsData,'post',9100,header).then((resData) => {
|
||||||
$api.myRequest('/train/public/videoUser/update', paramsData,'post',9100,header).then((resData) => {
|
console.log("视频播放时长更新成功")
|
||||||
console.log("视频播放时长更新成功")
|
});
|
||||||
});
|
}else{
|
||||||
}
|
$api.myRequest('/train/public/videoUser/update', paramsData,'post',9100,header).then((resData) => {
|
||||||
|
console.log("视频播放时长更新成功")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 计算并上报停留时长
|
// 计算并上报停留时长
|
||||||
function reportPageDuration() {
|
function reportPageDuration() {
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ const getItemBackgroundStyle = (imageName) => ({
|
|||||||
});
|
});
|
||||||
const trainVideoImgUrl=config.trainVideoImgUrl
|
const trainVideoImgUrl=config.trainVideoImgUrl
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(async () => {
|
||||||
|
await thirdLogin()
|
||||||
getDataList('refresh');
|
getDataList('refresh');
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -135,8 +136,53 @@ function getDataList(type = 'add') {
|
|||||||
|
|
||||||
|
|
||||||
// 播放视频
|
// 播放视频
|
||||||
function playVideo(video) {
|
async function playVideo(video) {
|
||||||
navTo(`/packageB/train/video/videoDetail?id=${video.videoId}`);
|
if(await thirdLogin()){
|
||||||
|
navTo(`/packageB/train/video/videoDetail?id=${video.videoId}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function thirdLogin(){
|
||||||
|
let form={}
|
||||||
|
if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||||
|
form={
|
||||||
|
usertype: '1',
|
||||||
|
idno: uni.getStorageSync('userInfo').idCard,
|
||||||
|
name: uni.getStorageSync('userInfo').name,
|
||||||
|
enterprisecode:"",
|
||||||
|
enterprisename: "",
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
}
|
||||||
|
}else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||||
|
form={
|
||||||
|
usertype: "2",
|
||||||
|
enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||||
|
enterprisename: uni.getStorageSync('userInfo').name,
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
idno: "",
|
||||||
|
name: ""
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请先登录'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
|
||||||
|
if (resLogin.code=='200') {
|
||||||
|
uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '单点异常'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
});
|
});
|
||||||
const baseUrl = config.imgBaseUrl;
|
const baseUrl = config.imgBaseUrl;
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(async () => {
|
||||||
// const today = new Date();
|
// const today = new Date();
|
||||||
// const year = today.getFullYear();
|
// const year = today.getFullYear();
|
||||||
// const month = String(today.getMonth() + 1).padStart(2, '0');
|
// const month = String(today.getMonth() + 1).padStart(2, '0');
|
||||||
@@ -149,7 +149,51 @@
|
|||||||
onShow(() => {
|
onShow(() => {
|
||||||
// 更新自定义tabbar选中状态
|
// 更新自定义tabbar选中状态
|
||||||
tabbarManager.updateSelected(1);
|
tabbarManager.updateSelected(1);
|
||||||
});
|
});//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
async function thirdLogin(){
|
||||||
|
let form={}
|
||||||
|
if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||||
|
form={
|
||||||
|
usertype: '1',
|
||||||
|
idno: uni.getStorageSync('userInfo').idCard,
|
||||||
|
name: uni.getStorageSync('userInfo').name,
|
||||||
|
enterprisecode:"",
|
||||||
|
enterprisename: "",
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
}
|
||||||
|
}else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||||
|
form={
|
||||||
|
usertype: "2",
|
||||||
|
enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||||
|
enterprisename: uni.getStorageSync('userInfo').name,
|
||||||
|
contactperson: "",
|
||||||
|
contactphone: "",
|
||||||
|
idno: "",
|
||||||
|
name: ""
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请先登录'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
|
||||||
|
if (resLogin.code=='200') {
|
||||||
|
uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '单点异常'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 监听退出登录事件,显示微信登录弹窗
|
// 监听退出登录事件,显示微信登录弹窗
|
||||||
@@ -168,19 +212,21 @@
|
|||||||
// 可以在这里添加登录成功后的处理逻辑
|
// 可以在这里添加登录成功后的处理逻辑
|
||||||
};
|
};
|
||||||
|
|
||||||
function goDetail(jobFairId){
|
async function goDetail(jobFairId){
|
||||||
if(state.current != 3){
|
if(await thirdLogin()){
|
||||||
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
|
if(state.current != 3){
|
||||||
}else{
|
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
|
||||||
console.log(userInfo.value, 'userInfo');
|
}else{
|
||||||
if(userInfo.value){
|
console.log(userInfo.value, 'userInfo');
|
||||||
if(userInfo.value.userType=='ent'){
|
if(userInfo.value){
|
||||||
navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId)
|
if(userInfo.value.userType=='ent'){
|
||||||
}else{
|
navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId)
|
||||||
navTo('/packageB/jobFair/detailPerson?jobFairId=' + jobFairId)
|
}else{
|
||||||
|
navTo('/packageB/jobFair/detailPerson?jobFairId=' + jobFairId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toSelectDate() {
|
function toSelectDate() {
|
||||||
@@ -257,7 +303,6 @@
|
|||||||
getUser();
|
getUser();
|
||||||
} else {
|
} else {
|
||||||
isLogin.value = false;
|
isLogin.value = false;
|
||||||
$api.msg('请先登录')
|
|
||||||
getFair("refresh");
|
getFair("refresh");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -25,9 +25,7 @@
|
|||||||
<view class="company-info">
|
<view class="company-info">
|
||||||
<view class="company-name">{{ companyInfo.name || '企业名称' }}</view>
|
<view class="company-name">{{ companyInfo.name || '企业名称' }}</view>
|
||||||
<view class="company-details">
|
<view class="company-details">
|
||||||
<text class="industry">{{ companyInfo.industry || '互联网' }}</text>
|
<text class="size">企业规模: {{ getDictLabel('scale', companyInfo.scale) || '暂无规模数据' }}</text>
|
||||||
<text class="separator">·</text>
|
|
||||||
<text class="size">{{ companyInfo.scale || '100-999人' }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -516,7 +514,7 @@ const shouldShowCompanyContent = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
import useDictStore from '@/stores/useDictStore';
|
import useDictStore from '@/stores/useDictStore';
|
||||||
const { getTransformChildren, oneDictData } = useDictStore();
|
const { getTransformChildren, oneDictData, dictLabel: getDictLabel, industryLabel } = useDictStore();
|
||||||
import useLocationStore from '@/stores/useLocationStore';
|
import useLocationStore from '@/stores/useLocationStore';
|
||||||
import selectFilter from '@/components/selectFilter/selectFilter.vue';
|
import selectFilter from '@/components/selectFilter/selectFilter.vue';
|
||||||
import { useRecommedIndexedDBStore, jobRecommender } from '@/stores/useRecommedIndexedDBStore.js';
|
import { useRecommedIndexedDBStore, jobRecommender } from '@/stores/useRecommedIndexedDBStore.js';
|
||||||
|
|||||||
@@ -216,6 +216,14 @@
|
|||||||
v-model="contact.name"
|
v-model="contact.name"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="form-group">
|
||||||
|
<view class="label">职位</view>
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
placeholder="请输入职位"
|
||||||
|
v-model="contact.position"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
<view class="form-group">
|
<view class="form-group">
|
||||||
<view class="label">联系电话</view>
|
<view class="label">联系电话</view>
|
||||||
<input
|
<input
|
||||||
@@ -280,6 +288,7 @@ const formData = reactive({
|
|||||||
contacts: [
|
contacts: [
|
||||||
{
|
{
|
||||||
name: '',
|
name: '',
|
||||||
|
position: '',
|
||||||
phone: ''
|
phone: ''
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -504,6 +513,7 @@ const addContact = () => {
|
|||||||
if (formData.contacts.length < 3) {
|
if (formData.contacts.length < 3) {
|
||||||
formData.contacts.push({
|
formData.contacts.push({
|
||||||
name: '',
|
name: '',
|
||||||
|
position: '',
|
||||||
phone: ''
|
phone: ''
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -653,7 +663,11 @@ const publishJob = async () => {
|
|||||||
jobCategory: formData.jobCategory,
|
jobCategory: formData.jobCategory,
|
||||||
companyId: formData.companyId,
|
companyId: formData.companyId,
|
||||||
companyName: formData.companyName,
|
companyName: formData.companyName,
|
||||||
jobContactList: formData.contacts.filter(contact => contact.name.trim() && contact.phone.trim()),
|
jobContactList: formData.contacts.filter(contact => contact.name.trim() && contact.phone.trim()).map(contact => ({
|
||||||
|
contactPerson: contact.name,
|
||||||
|
contactPersonPhone: contact.phone,
|
||||||
|
position: contact.position
|
||||||
|
})),
|
||||||
filesList: formData.images.map(image => ({ bussinessid: image.bussinessid })) // 新增:岗位图片列表,使用bussinessid
|
filesList: formData.images.map(image => ({ bussinessid: image.bussinessid })) // 新增:岗位图片列表,使用bussinessid
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,8 @@ const handleLogin = async () => {
|
|||||||
title: '登录成功',
|
title: '登录成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
})
|
})
|
||||||
window.location.assign('http://222.80.110.161:11111/mechine-dual-vue/login')
|
// window.location.assign('http://222.80.110.161:11111/mechine-dual-vue/login')
|
||||||
|
window.location.assign('http://222.80.110.161:11111/mechine-single-vue/login')
|
||||||
// // 跳转到首页
|
// // 跳转到首页
|
||||||
// uni.reLaunch({
|
// uni.reLaunch({
|
||||||
// url: '/pages/index/index'
|
// url: '/pages/index/index'
|
||||||
|
|||||||
@@ -246,10 +246,10 @@ export function myRequest(url, data = {}, method = 'GET', port = 9100, headers =
|
|||||||
}
|
}
|
||||||
// 显示具体的错误信息
|
// 显示具体的错误信息
|
||||||
const errorMsg = msg || '请求出现异常,请联系工作人员'
|
const errorMsg = msg || '请求出现异常,请联系工作人员'
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: errorMsg,
|
// title: errorMsg,
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
const err = new Error(errorMsg)
|
const err = new Error(errorMsg)
|
||||||
err.error = resData
|
err.error = resData
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user