Compare commits

16 Commits

Author SHA1 Message Date
sh
2de7ea4ac9 修改端口 2025-12-12 13:34:50 +08:00
sh
e14be76ac8 修改161:11111改为161:80 2025-12-12 13:32:55 +08:00
xuchao
949caf5589 技能培训添加自动播放上次播放进度功能、首页招聘会入口更改 2025-12-12 12:00:49 +08:00
xuchao
844ff8c582 fix:培训视频播放时长接口调用异常导致重复添加同一组数据bug 2025-12-10 18:45:43 +08:00
francis_fh
f5bd523985 Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2025-12-09 17:53:46 +08:00
francis_fh
be47e94196 H5端显示三列岗位列表 2025-12-09 17:53:45 +08:00
hanguangpu01
99aea9e243 feat(careerfair): 优化招聘会页面加载逻辑
- 异步加载招聘会数据
- 移除调试代码
- 简化登录状态检查逻辑
- 优化 exhibitors 页面跳转条件判断
- 移除冗余的登录提示信息
2025-12-09 17:48:07 +08:00
francis_fh
aa4b185aa2 优化展示 2025-12-09 16:24:41 +08:00
francis_fh
92c6488d18 字典映射修改 2025-12-09 16:23:32 +08:00
francis_fh
f1c8d0457b 111 2025-12-09 16:16:21 +08:00
francis_fh
5378031a58 设置密码 2025-12-08 21:54:30 +08:00
francis_fh
d2f61bcc45 岗位对比修改 2025-12-08 21:38:38 +08:00
francis_fh
d79d79f750 111 2025-12-08 21:31:18 +08:00
francis_fh
40127060b8 Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service 2025-12-08 21:20:34 +08:00
francis_fh
16d1e50c85 bug修复 2025-12-08 21:20:33 +08:00
hanguangpu01
6006f5cd28 feat(auth): 实现第三方登录集成
- 在 careerfair.vue 中新增 thirdLogin 方法处理单点登录逻辑
- 修改 goDetail 方法,在跳转前执行第三方登录验证
- 在 packageB/train/index.vue 中增加 onLoad 钩子调用 thirdLogin
- 修改 jumps 方法,确保页面跳转前完成登录验证
- 在 request.js 中注释掉全局错误提示,避免重复提示
- 优化 videoDetail.vue 中的 getHeart 方法,移除冗余跳转逻辑
- 在 videoList.vue 中新增 playVideo 前的登录校验
- 统一多个页面中的 thirdLogin 实现,确保登录态一致性
2025-12-08 21:17:05 +08:00
15 changed files with 530 additions and 170 deletions

View File

@@ -114,15 +114,15 @@ const generateTabbarList = () => {
// 求职者用户(包括未登录状态):显示招聘会
// H5端隐藏招聘会
// #ifndef H5
baseItems.splice(1, 0, {
id: 1,
text: '招聘会',
path: '/pages/careerfair/careerfair',
iconPath: '/static/tabbar/post.png',
selectedIconPath: '/static/tabbar/posted.png',
centerItem: false,
badge: readMsg.badges[1]?.count || 0,
});
// baseItems.splice(1, 0, {
// id: 1,
// text: '招聘会',
// path: '/pages/careerfair/careerfair',
// iconPath: '/static/tabbar/post.png',
// selectedIconPath: '/static/tabbar/posted.png',
// centerItem: false,
// badge: readMsg.badges[1]?.count || 0,
// });
// #endif
}

View File

@@ -139,13 +139,15 @@ const validateRole = () => {
const getPhoneNumber = (e) => {
console.log('获取手机号:', e);
console.log('userType.value', userType.value)
// 验证角色是否已选择
if (!validateRole()) {
return;
}
if (e.detail.errMsg === 'getPhoneNumber:ok') {
if (userType.value === null) {
$api.msg('请先选择您的角色');
return true;
}
uni.login({
provider: 'weixin',
success: (loginRes) => {

View File

@@ -7,10 +7,10 @@ export default {
// LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶
// imgBaseUrl:'http://10.110.145.145/images', //图片基础url
// trainVideoImgUrl:'http://10.110.145.145:9100/file/file/minio',
LCBaseUrl:'http://222.80.110.161:11111/prod-api',//内网端口
LCBaseUrlInner:'http://222.80.110.161:11111/prod-psout-api',//招聘、培训、帮扶
imgBaseUrl:'http://222.80.110.161:11111/images', //图片基础url
trainVideoImgUrl:'http://222.80.110.161:11111/prod-api/file/file/minio',
LCBaseUrl:'http://222.80.110.161:80/prod-api',//内网端口
LCBaseUrlInner:'http://222.80.110.161:80/prod-psout-api',//招聘、培训、帮扶
imgBaseUrl:'http://222.80.110.161:80/images', //图片基础url
trainVideoImgUrl:'http://222.80.110.161:80/prod-api/file/file/minio',
// sseAI+
// StreamBaseURl: 'http://39.98.44.136:8000',
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',

View File

@@ -33,9 +33,19 @@ export function useColumnCount(onChange = () => {}) {
let count = 2
if (width >= 1000) {
// #ifdef H5
count = 3 // H5端最多显示3列
// #endif
// #ifndef H5
count = 5
// #endif
} else if (width >= 750) {
// #ifdef H5
count = 3 // H5端最多显示3列
// #endif
// #ifndef H5
count = 4
// #endif
} else if (width >= 500) {
count = 3
} else {

View File

@@ -5,8 +5,8 @@
<view class="table-row table-header">
<view class="table-cell fixed-column"></view>
<view v-for="(job, index) in jobs" :key="index" class="table-cell job-title-cell">
<text>{{ job.jobTitle }}</text>
<text class="company">{{ job.company }}</text>
<text>{{ job?.jobTitle || '' }}</text>
<text class="company">{{ job?.company || '' }}</text>
</view>
</view>
@@ -17,6 +17,7 @@
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
<view>
<Salary-Expectation
v-if="job"
:max-salary="job.maxSalary"
:min-salary="job.minSalary"
:is-month="true"
@@ -30,7 +31,7 @@
<text>公司名称</text>
</view>
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
<view>{{ job.companyName }}</view>
<view>{{ job?.companyName || '' }}</view>
</view>
</view>
@@ -39,7 +40,7 @@
<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><dict-Label dictType="education" :value="job?.education"></dict-Label></view>
</view>
</view>
@@ -48,7 +49,7 @@
<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><dict-Label dictType="experience" :value="job?.experience"></dict-Label></view>
</view>
</view>
@@ -57,7 +58,7 @@
<text>工作地点</text>
</view>
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
<view>{{ job.jobLocation }}</view>
<view>{{ job?.jobLocation || '' }}</view>
</view>
</view>
@@ -66,7 +67,7 @@
<text>来源</text>
</view>
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
<view>{{ job.dataSource }}</view>
<view>{{ job?.dataSource || '' }}</view>
</view>
</view>
@@ -75,7 +76,7 @@
<text>职位描述</text>
</view>
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
<view>{{ job.description }}</view>
<view>{{ job?.description || '' }}</view>
</view>
</view>
<view class="table-row">
@@ -85,9 +86,9 @@
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
<view>
<dict-tree-Label
v-if="jobInfo.company && jobInfo.company.industry"
v-if="job.company && job.company.industry"
dictType="industry"
:value="jobInfo.company.industry"
:value="job.company.industry"
></dict-tree-Label>
</view>
</view>
@@ -98,7 +99,7 @@
</view>
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
<view>
<dict-Label dictType="scale" :value="jobInfo.company?.scale"></dict-Label>
<dict-Label dictType="scale" :value="job.company?.scale"></dict-Label>
</view>
</view>
</view>
@@ -108,7 +109,7 @@
</view>
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
<view>
{{ job.isHot ? '是' : '否' }}
{{ job?.isHot ? '是' : '否' }}
</view>
</view>
</view>
@@ -125,7 +126,7 @@ const jobs = ref([]);
onLoad(() => {
let compareData = uni.getStorageSync('compare');
jobs.value = compareData;
jobs.value = Array.isArray(compareData) ? compareData : [];
});
</script>

View File

@@ -17,6 +17,19 @@
<view class="input-titile">姓名</view>
<input class="input-con" v-model="fromValue.name" placeholder="请输入您的姓名" />
</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="sex-titile">性别</view>
<view class="sext-ri">
@@ -160,6 +173,7 @@ const state = reactive({
});
const fromValue = reactive({
name: '',
ytjPassword: '', // 新增密码字段
sex: 0,
birthDate: '',
education: '',
@@ -167,6 +181,9 @@ const fromValue = reactive({
idCard: '',
phone: ''
});
// 输入校验相关
const passwordError = ref('');
// 移除重复的onLoad定义已在上方实现
// 在onLoad中初始化数据确保页面加载时就能获取技能信息
@@ -240,6 +257,7 @@ function initLoad() {
const currentUserInfo = userInfo.value && Object.keys(userInfo.value).length > 0 ? userInfo.value : cachedUserInfo;
fromValue.name = currentUserInfo.name || '';
fromValue.ytjPassword = ''; // 密码输入框默认为空,不加载已有密码
fromValue.sex = currentUserInfo.sex !== undefined ? Number(currentUserInfo.sex) : 0;
fromValue.phone = currentUserInfo.phone || '';
fromValue.birthDate = currentUserInfo.birthDate || '';
@@ -356,6 +374,12 @@ const confirm = () => {
return $api.msg('请输入正确手机号');
}
// 密码校验
validatePassword();
if (fromValue.ytjPassword && passwordError.value) {
return $api.msg(passwordError.value);
}
// 构建appSkillsList数据结构 - 使用新的技能数据结构包含id字段
const appSkillsList = state.skills
.filter(skill => skill.name && skill.name.trim() !== '')
@@ -613,6 +637,54 @@ const changeSex = (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 = () => {
openSelectPopup({
title: '政治面貌',
@@ -770,6 +842,19 @@ function getDatePickerIndexes(dateStr) {
height: 80rpx;
border-bottom: 2rpx solid #EBEBEB
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
position: absolute;
right: 20rpx;

View File

@@ -171,7 +171,7 @@
</view>
</view>
</view>
<view class="content-card" v-else>
<!-- <view class="content-card" v-if="false">
<view class="card-title">
<view class="title">申请人列表</view>
</view>
@@ -214,7 +214,7 @@
</view>
</view>
</view>
</view>
</view> -->
</view>
<view style="height: 34px"></view>
<template #footer>
@@ -525,6 +525,11 @@ function previewImage(url, index) {
current: index
});
}
// 查看简历
function viewResume(userId) {
navTo(`/packageA/pages/myResume/myResume?userId=${userId}`);
}
</script>
<style lang="stylus" scoped>

View File

@@ -58,9 +58,58 @@ const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction
import useUserStore from '@/stores/useUserStore';
import useDictStore from '@/stores/useDictStore';
function jumps(url){
onLoad(() => {
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>
<style lang="stylus" scoped>

View File

@@ -9,10 +9,20 @@
<view class="video-detail-container">
<!-- 视频播放组件 -->
<view class="video-wrapper">
<video v-if="videoInfo && videoInfo.cover" id="myVideo" :src="videoInfo.currentUrl" :poster="trainVideoImgUrl+ videoInfo.cover" @seeked="onSeeked"
preload="metadata"
enable-danmu controls style="width: 100%;" @pause="onPause" @timeupdate="onTimeupdate" @ended="onEnded"></video>
<video
v-if="videoInfo && videoInfo.cover && isVideoReady"
id="myVideo"
:src="videoInfo.currentUrl"
:poster="trainVideoImgUrl+ videoInfo.cover"
:initial-time="initialTime"
:autoplay="shouldAutoPlay"
enable-danmu
controls
style="width: 100%;"
@pause="onPause"
@timeupdate="onTimeupdate"
@ended="onEnded">
</video>
</view>
</view>
<view class="video-info" :style="getItemBackgroundStyle('video-bj2.png')">
@@ -134,7 +144,7 @@
</template>
<script setup>
import { inject, reactive,ref, onMounted, onUnmounted, nextTick } from 'vue';
import { inject, reactive,ref, onMounted, onUnmounted, nextTick ,watch} from 'vue';
import { onLoad,onHide,onUnload } from '@dcloudio/uni-app';
const { $api, navTo, navBack } = inject('globalFunction');
import config from "@/config.js"
@@ -148,10 +158,13 @@ const trainVideoImgUrl=config.trainVideoImgUrl
const categories=ref([])
const levalLabels=ref([])
const latestTime = ref(0)
const initialTime = ref(0)
const totalTime=ref(0)
const baseUrl = config.imgBaseUrl
const pageEnterTime = ref(0)
const currentChapter = ref(0)
const isVideoReady = ref(false)
const shouldAutoPlay = ref(false)
const getItemBackgroundStyle = (imageName) => ({
backgroundImage: `url(${baseUrl}/train/${imageName})`,
backgroundSize: '100% 100%', // 覆盖整个容器
@@ -168,18 +181,38 @@ const params = reactive({
videoId: '',
userId: ''
})
// 监听 initialTime 变化,确保设置完成后再渲染
watch(initialTime, (newVal) => {
if (newVal >= 0 && videoInfo.value && videoInfo.value.cover) {
// 延迟渲染,确保初始时间设置生效
nextTick(() => {
isVideoReady.value = true
shouldAutoPlay.value = newVal > 0
})
}
})
// 监听 videoInfo 变化
watch([videoInfo, initialTime], ([newVideoInfo, newInitialTime]) => {
if (newVideoInfo && newVideoInfo.cover && newInitialTime >= 0) {
nextTick(() => {
isVideoReady.value = true
shouldAutoPlay.value = newInitialTime > 0
})
}
}, { deep: true })
onLoad((options) => {
getHeart()
pageEnterTime.value = Date.now() // 记录毫秒时间戳
videoId.value=options.id
getDictionary()
});
onHide(() => {
updateVideoInfo() // 用缓存值,不要调 getCurrentTime
reportPageDuration()
})
// onHide(() => {
// updateVideoInfo() // 用缓存值,不要调 getCurrentTime
// reportPageDuration()
// })
onUnload(() => {
updateVideoInfo()
//updateVideoInfo()
saveCurrentChapterProgress()
reportPageDuration()
})
function getData() {
@@ -197,17 +230,22 @@ function getData() {
videoInfo.value.currentUrl=trainVideoImgUrl+videoInfo.value.trainClassList[0].url
videoInfo.value.percentage=((videoInfo.value.process/(videoInfo.value.hour*60))*100).toFixed(2)
videoInfo.value.uploadTime=videoInfo.value.uploadTime.split(' ')[0]
if(videoInfo.value.process !=null){
queryModelUserPlay(videoInfo.value.trainClassList[0].classId)
} else {
// 如果没有历史进度,直接准备渲染
initialTime.value = 0
}
updateVideoInfo()
});
}
function getHeart() {
const raw = uni.getStorageSync("Padmin-Token");
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) => {
if (resData.code == 200) {
getUserInfo();
} else {
navTo('/packageB/login')
}
});
}
@@ -246,16 +284,18 @@ function getLevelLabelByValue(value) {
}
function onPause(e){
updateVideoInfo()
saveCurrentChapterProgress()
}
function onEnded(e){
updateVideoInfo()
saveCurrentChapterProgress()
}
function onTimeupdate(e){
latestTime.value = e.detail.currentTime
}
function onSeeked(){
updateVideoInfo()
}
// function onSeeked(){
// updateVideoInfo()
// }
// 更新播放时长
function updateVideoInfo(){
totalTime.value=0
@@ -277,7 +317,10 @@ function updateVideoInfo(){
'Authorization':uni.getStorageSync('Padmin-Token'),
'Content-Type': "application/x-www-form-urlencoded"
}
if(videoInfo.value.isCollect===null && videoInfo.value.process ===null){
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, header).then((resData) => {
if (resData.code == 200) {
if(videoInfo.value.isCollect===null && videoInfo.value.process ===null && paramsData.process ==0 ){
$api.myRequest('/train/public/videoUser/add', paramsData,'post',9100,header).then((resData) => {
console.log("视频播放时长更新成功")
});
@@ -287,6 +330,8 @@ function updateVideoInfo(){
});
}
}
})
}
// 计算并上报停留时长
function reportPageDuration() {
const duration = Date.now() - pageEnterTime.value // 毫秒
@@ -309,8 +354,58 @@ function reportPageDuration() {
}
}
function chapterChange(video,index){
saveCurrentChapterProgress()
currentChapter.value=index
videoInfo.value.currentUrl=trainVideoImgUrl+video.url
isVideoReady.value = false
shouldAutoPlay.value = false
queryModelUserPlay(video.classId)
}
const updateUserPlayClassHousr = (classId,hour) => {
let paramsData={
userId:userId.value,
classId:classId,
hour:hour,
dqHour:latestTime.value
}
let header={
'Authorization':uni.getStorageSync('Padmin-Token'),
'Content-Type': "application/x-www-form-urlencoded"
}
$api.myRequest('/train/public/videoUser/updateUserPlayClassHousr', paramsData,'post',9100,header).then((resData) => {
if(resData.code == 200){
console.log("学习时长更新成功")
}
});
}
const queryModelUserPlay = (classId) => {
let queryParams = {
classId: classId,
userId: userId.value,
};
let header = {
Authorization: uni.getStorageSync("Padmin-Token"),
"Content-Type": "application/x-www-form-urlencoded",
};
$api.myRequest("/train/public/videoUser/modelUserPlay", queryParams, "post", 9100, header).then((resData) => {
if(resData.code == 200){
initialTime.value=Number(resData?.data?.dqHour ?? 0)
}else {
initialTime.value = 0
}
}).catch(() => {
initialTime.value = 0
});
}
// 保存当前章节进度
function saveCurrentChapterProgress() {
if (videoInfo.value.trainClassList && videoInfo.value.trainClassList.length > 0) {
const currentVideo = videoInfo.value.trainClassList[currentChapter.value];
if (currentVideo) {
updateUserPlayClassHousr(currentVideo.classId, currentVideo.hour);
}
}
}
onUnmounted(() => {

View File

@@ -80,7 +80,8 @@ const getItemBackgroundStyle = (imageName) => ({
});
const trainVideoImgUrl=config.trainVideoImgUrl
onLoad(() => {
onLoad(async () => {
await thirdLogin()
getDataList('refresh');
});
@@ -135,9 +136,54 @@ function getDataList(type = 'add') {
// 播放视频
function playVideo(video) {
async function playVideo(video) {
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>
<style lang="stylus" scoped>

View File

@@ -132,7 +132,7 @@
});
const baseUrl = config.imgBaseUrl;
onLoad(() => {
onLoad(async () => {
// const today = new Date();
// const year = today.getFullYear();
// const month = String(today.getMonth() + 1).padStart(2, '0');
@@ -149,7 +149,51 @@
onShow(() => {
// 更新自定义tabbar选中状态
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(() => {
// 监听退出登录事件,显示微信登录弹窗
@@ -168,7 +212,8 @@
// 可以在这里添加登录成功后的处理逻辑
};
function goDetail(jobFairId){
async function goDetail(jobFairId){
if(await thirdLogin()){
if(state.current != 3){
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
}else{
@@ -182,6 +227,7 @@
}
}
}
}
function toSelectDate() {
navTo("/packageA/pages/selectDate/selectDate", {
@@ -257,7 +303,6 @@
getUser();
} else {
isLogin.value = false;
$api.msg('请先登录')
getFair("refresh");
}
});

View File

@@ -25,9 +25,7 @@
<view class="company-info">
<view class="company-name">{{ companyInfo.name || '企业名称' }}</view>
<view class="company-details">
<text class="industry">{{ companyInfo.industry || '互联网' }}</text>
<text class="separator">·</text>
<text class="size">{{ companyInfo.scale || '100-999人' }}</text>
<text class="size">企业规模: {{ getDictLabel('scale', companyInfo.scale) || '暂无规模数据' }}</text>
</view>
</view>
@@ -156,6 +154,12 @@
</view>
<view class="service-title">薪酬信息</view>
</view>
<view class="service-item press-button" @click="handleJobFairClick">
<view class="service-icon service-icon-1">
<uni-icons type="shop" size="32" color="#FFFFFF"></uni-icons>
</view>
<view class="service-title">招聘会</view>
</view>
</view>
<!-- #endif -->
</view>
@@ -516,7 +520,7 @@ const shouldShowCompanyContent = computed(() => {
});
import useDictStore from '@/stores/useDictStore';
const { getTransformChildren, oneDictData } = useDictStore();
const { getTransformChildren, oneDictData, dictLabel: getDictLabel, industryLabel } = useDictStore();
import useLocationStore from '@/stores/useLocationStore';
import selectFilter from '@/components/selectFilter/selectFilter.vue';
import { useRecommedIndexedDBStore, jobRecommender } from '@/stores/useRecommedIndexedDBStore.js';
@@ -762,6 +766,9 @@ const handleLiveClick = () => {
const handleSalaryInfoClick = () => {
navTo('/pages/service/salary-info');
};
const handleJobFairClick = () => {
navTo('/pages/careerfair/careerfair');
};
const handleH5SalaryClick = () => {
const salaryUrl = "https://www.mohrss.gov.cn/SYrlzyhshbzb/laodongguanxi_/fwyd/202506/t20250627_544623.html";
window.location.assign(salaryUrl);

View File

@@ -216,6 +216,14 @@
v-model="contact.name"
/>
</view>
<view class="form-group">
<view class="label">职位</view>
<input
class="input"
placeholder="请输入职位"
v-model="contact.position"
/>
</view>
<view class="form-group">
<view class="label">联系电话</view>
<input
@@ -280,6 +288,7 @@ const formData = reactive({
contacts: [
{
name: '',
position: '',
phone: ''
}
]
@@ -504,6 +513,7 @@ const addContact = () => {
if (formData.contacts.length < 3) {
formData.contacts.push({
name: '',
position: '',
phone: ''
});
}
@@ -653,7 +663,11 @@ const publishJob = async () => {
jobCategory: formData.jobCategory,
companyId: formData.companyId,
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
};

View File

@@ -193,7 +193,8 @@ const handleLogin = async () => {
title: '登录成功',
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({
// url: '/pages/index/index'

View File

@@ -246,10 +246,10 @@ export function myRequest(url, data = {}, method = 'GET', port = 9100, headers =
}
// 显示具体的错误信息
const errorMsg = msg || '请求出现异常,请联系工作人员'
uni.showToast({
title: errorMsg,
icon: 'none'
})
// uni.showToast({
// title: errorMsg,
// icon: 'none'
// })
const err = new Error(errorMsg)
err.error = resData
reject(err)