Compare commits
53 Commits
90f1e9186d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
844ff8c582 | ||
|
|
f5bd523985 | ||
|
|
be47e94196 | ||
|
|
99aea9e243 | ||
|
|
aa4b185aa2 | ||
|
|
92c6488d18 | ||
|
|
f1c8d0457b | ||
|
|
5378031a58 | ||
|
|
d2f61bcc45 | ||
|
|
d79d79f750 | ||
|
|
40127060b8 | ||
|
|
16d1e50c85 | ||
|
|
6006f5cd28 | ||
|
|
d78382ba08 | ||
|
|
a74cdcc850 | ||
| d89b566ad3 | |||
| 3c66e16e49 | |||
| ccbb5008bd | |||
|
|
bc48d7fff0 | ||
|
|
6baacfcf20 | ||
| e290340b8c | |||
|
|
c4f7d6d998 | ||
|
|
fa7749da9d | ||
|
|
b2016378fb | ||
|
|
a812c7b1d6 | ||
|
|
85a6066494 | ||
|
|
ad69929666 | ||
|
|
75a8edad10 | ||
|
|
27b2b721d3 | ||
|
|
0fbba1d868 | ||
|
|
ed077fd93c | ||
|
|
d76b8b664e | ||
| 2880e674a2 | |||
| f20efdaa0a | |||
| 2268e4fad5 | |||
| 16ebe3078b | |||
|
|
770239b4da | ||
|
|
d564281671 | ||
| 592ea8dd24 | |||
| cf7d228e0f | |||
| ec9f49b569 | |||
|
|
f8b9d3730b | ||
| 255f275552 | |||
|
|
f7e20aa6a0 | ||
|
|
9c8e182706 | ||
| f83a5d88ba | |||
| 8293cb8bf6 | |||
| a31ea56a70 | |||
|
|
7ae6d8f340 | ||
|
|
714b06100a | ||
|
|
dea4726e50 | ||
| 690c0fd6db | |||
|
|
7f00dc69a8 |
@@ -13,6 +13,16 @@ export function getJobSkillDetail(params) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获取技能权重
|
||||
export function getJobSkillWeight(params) {
|
||||
return request({
|
||||
url: '/jobSkillDet/getJobSkillWeight',
|
||||
method: 'get',
|
||||
params,
|
||||
baseUrlType: 'zytp'
|
||||
})
|
||||
}
|
||||
|
||||
// 暂未使用 - 如果需要在 CareerPath.vue 中点击路径职位查看详细技能信息时使用
|
||||
// 使用场景:获取职业路径中某个职位的详细技能信息(包含技能分数、类型等)
|
||||
// export function getJobPathSkill(data) {
|
||||
|
||||
@@ -8,8 +8,7 @@ import request from '@/utilsRc/request'
|
||||
// 获取用户信息(职业规划推荐用)
|
||||
export function appUserInfo() {
|
||||
return request({
|
||||
url: '/app/user/appUserInfo',
|
||||
method: 'get',
|
||||
baseUrlType: 'user' // 使用用户接口专用baseUrl
|
||||
fullUrl: 'http://222.80.110.161:11111/api/ks/app/user/appUserInfo',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -50,7 +50,8 @@ const prePage = () => {
|
||||
return prePage.$vm;
|
||||
}
|
||||
|
||||
export const urls ='http://10.110.145.145/images/train/'
|
||||
// export const urls ='http://10.110.145.145/images/train/'
|
||||
export const urls ='http://222.80.110.161:11111/images/train/'
|
||||
|
||||
/**
|
||||
* 页面跳转封装,支持 query 参数传递和返回回调
|
||||
@@ -60,34 +61,74 @@ export const urls ='http://10.110.145.145/images/train/'
|
||||
* @param {object} options.query - 携带参数
|
||||
* @param {function} options.onBack - 页面返回时的回调(目标页调用 uni.navigateBack 时传递数据)
|
||||
*/
|
||||
export const navTo = function(url, {
|
||||
needLogin = false,
|
||||
query = {},
|
||||
onBack = null
|
||||
} = {}) {
|
||||
const userStore = useUserStore();
|
||||
|
||||
if (needLogin && !userStore.hasLogin) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/complete-info/complete-info'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const queryStr = Object.entries(query)
|
||||
.map(([key, val]) => `${key}=${encodeURIComponent(val)}`)
|
||||
.join('&');
|
||||
const finalUrl = queryStr ? `${url}?${queryStr}` : url;
|
||||
|
||||
if (onBack) {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
currentPage.__onBackCallback__ = onBack;
|
||||
}
|
||||
|
||||
uni.navigateTo({
|
||||
url: finalUrl
|
||||
});
|
||||
export const navTo = function(url, {
|
||||
needLogin = false,
|
||||
query = {},
|
||||
onBack = null
|
||||
} = {}) {
|
||||
const userStore = useUserStore();
|
||||
|
||||
if (needLogin && !userStore.hasLogin) {
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length >= 10) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/complete-info/complete-info',
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/complete-info/complete-info',
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
uni.redirectTo({
|
||||
url: '/pages/complete-info/complete-info',
|
||||
fail: (err2) => {
|
||||
console.error('redirectTo也失败:', err2);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const queryStr = Object.entries(query)
|
||||
.map(([key, val]) => `${key}=${encodeURIComponent(val)}`)
|
||||
.join('&');
|
||||
const finalUrl = queryStr ? `${url}?${queryStr}` : url;
|
||||
|
||||
if (onBack) {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
currentPage.__onBackCallback__ = onBack;
|
||||
}
|
||||
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length >= 10) {
|
||||
// 页面栈已满,使用redirectTo替代
|
||||
uni.redirectTo({
|
||||
url: finalUrl,
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: finalUrl,
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
// 失败后尝试redirectTo
|
||||
uni.redirectTo({
|
||||
url: finalUrl,
|
||||
fail: (err2) => {
|
||||
console.error('redirectTo也失败:', err2);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const navBack = function({
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</view>
|
||||
<view class="job-info">
|
||||
<view class="job-name">{{ item.jobTitle }}</view>
|
||||
<view class="salary">{{ item.salaryRange }}元/月</view>
|
||||
<view class="salary">{{ item.minSalary }} - {{ item.maxSalary }}元/月</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
14
config.js
14
config.js
@@ -3,10 +3,14 @@ export default {
|
||||
baseUrl: 'http://222.80.110.161:11111/api/ks', // 测试
|
||||
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试
|
||||
|
||||
LCBaseUrl:'http://10.110.145.145:9100',//招聘、培训、帮扶
|
||||
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://10.110.145.145:9100',//内网端口
|
||||
// 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',
|
||||
// sseAI+
|
||||
// StreamBaseURl: 'http://39.98.44.136:8000',
|
||||
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',
|
||||
@@ -21,7 +25,7 @@ export default {
|
||||
// 只使用本地缓寸的数据
|
||||
OnlyUseCachedDB: true,
|
||||
// 使用模拟定位
|
||||
UsingSimulatedPositioning: true,
|
||||
UsingSimulatedPositioning: false,
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
// 应用名称
|
||||
|
||||
@@ -19,37 +19,47 @@ export function useColumnCount(onChange = () => {}) {
|
||||
// columnCount.value = count < 2 ? 2 : count
|
||||
// }
|
||||
// }
|
||||
const calcColumn = () => {
|
||||
// 使用新的API替代已废弃的getSystemInfoSync
|
||||
let width
|
||||
// #ifdef MP-WEIXIN
|
||||
const mpSystemInfo = uni.getWindowInfo()
|
||||
width = mpSystemInfo.windowWidth
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
const otherSystemInfo = uni.getSystemInfoSync()
|
||||
width = otherSystemInfo.windowWidth
|
||||
// #endif
|
||||
|
||||
let count = 2
|
||||
if (width >= 1000) {
|
||||
count = 5
|
||||
} else if (width >= 750) {
|
||||
count = 4
|
||||
} else if (width >= 500) {
|
||||
count = 3
|
||||
} else {
|
||||
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
|
||||
const calcColumn = () => {
|
||||
// 使用新的API替代已废弃的getSystemInfoSync
|
||||
let width
|
||||
// #ifdef MP-WEIXIN
|
||||
const mpSystemInfo = uni.getWindowInfo()
|
||||
width = mpSystemInfo.windowWidth
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
const otherSystemInfo = uni.getSystemInfoSync()
|
||||
width = otherSystemInfo.windowWidth
|
||||
// #endif
|
||||
|
||||
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 {
|
||||
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(() => {
|
||||
|
||||
@@ -2,82 +2,83 @@
|
||||
<view class="job-comparison-container">
|
||||
<scroll-view class="horizontal-scroll" scroll-x="true">
|
||||
<view class="comparison-table">
|
||||
<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>
|
||||
</view>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<text>薪资</text>
|
||||
</view>
|
||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||
<view>
|
||||
<Salary-Expectation
|
||||
:max-salary="job.maxSalary"
|
||||
:min-salary="job.minSalary"
|
||||
:is-month="true"
|
||||
></Salary-Expectation>
|
||||
</view>
|
||||
<view class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<text>薪资</text>
|
||||
</view>
|
||||
<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"
|
||||
></Salary-Expectation>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<text>公司名称</text>
|
||||
</view>
|
||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||
<view>{{ job.companyName }}</view>
|
||||
</view>
|
||||
<view class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<text>公司名称</text>
|
||||
</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-cell fixed-column detail-label">
|
||||
<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 class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<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 class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<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 class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<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 class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<text>工作地点</text>
|
||||
</view>
|
||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||
<view>{{ job.jobLocation }}</view>
|
||||
</view>
|
||||
<view class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<text>工作地点</text>
|
||||
</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-cell fixed-column detail-label">
|
||||
<text>来源</text>
|
||||
</view>
|
||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||
<view>{{ job.dataSource }}</view>
|
||||
</view>
|
||||
<view class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<text>来源</text>
|
||||
</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-cell fixed-column detail-label">
|
||||
<text>职位描述</text>
|
||||
</view>
|
||||
<view v-for="(job, index) in jobs" :key="index" class="table-cell detail-content">
|
||||
<view>{{ job.description }}</view>
|
||||
</view>
|
||||
<view class="table-row">
|
||||
<view class="table-cell fixed-column detail-label">
|
||||
<text>职位描述</text>
|
||||
</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-cell fixed-column detail-label">
|
||||
<text>工业</text>
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -81,10 +81,16 @@ const fromValue = reactive({
|
||||
area: '',
|
||||
jobTitleId: [],
|
||||
});
|
||||
onLoad(async () => {
|
||||
const needSkill = ref(false);
|
||||
|
||||
onLoad(async (options) => {
|
||||
// 初始化字典数据
|
||||
await getDictData();
|
||||
initLoad();
|
||||
// 检查是否需要继续跳转到技能页面
|
||||
if (options && options.needSkill === 'true') {
|
||||
needSkill.value = true;
|
||||
}
|
||||
});
|
||||
const confirm = () => {
|
||||
if (!fromValue.jobTitleId) {
|
||||
@@ -94,7 +100,12 @@ const confirm = () => {
|
||||
$api.msg('完成');
|
||||
state.disbleDate = true;
|
||||
getUserResume().then(() => {
|
||||
navBack();
|
||||
// 如果需要继续跳转到技能页面,则跳转到个人信息页面(携带 needSkill 标记,便于返回两级)
|
||||
if (needSkill.value) {
|
||||
navTo('/packageA/pages/personalInfo/personalInfo?needSkill=true');
|
||||
} else {
|
||||
navBack();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -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">
|
||||
@@ -150,6 +163,8 @@ const openSelectPopup = (config) => {
|
||||
};
|
||||
|
||||
const percent = ref('0%');
|
||||
// 当从“先职位后技能”链路进入时,提交后需直接返回职业规划页
|
||||
const needGoBackTwoStep = ref(false);
|
||||
const state = reactive({
|
||||
educationText: '',
|
||||
politicalAffiliationText: '',
|
||||
@@ -158,6 +173,7 @@ const state = reactive({
|
||||
});
|
||||
const fromValue = reactive({
|
||||
name: '',
|
||||
ytjPassword: '', // 新增密码字段
|
||||
sex: 0,
|
||||
birthDate: '',
|
||||
education: '',
|
||||
@@ -165,10 +181,16 @@ const fromValue = reactive({
|
||||
idCard: '',
|
||||
phone: ''
|
||||
});
|
||||
|
||||
// 输入校验相关
|
||||
const passwordError = ref('');
|
||||
// 移除重复的onLoad定义,已在上方实现
|
||||
|
||||
// 在onLoad中初始化数据,确保页面加载时就能获取技能信息
|
||||
onLoad(() => {
|
||||
onLoad((options = {}) => {
|
||||
if (options.needSkill === 'true') {
|
||||
needGoBackTwoStep.value = true;
|
||||
}
|
||||
// 初始化页面数据
|
||||
initLoad();
|
||||
});
|
||||
@@ -235,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 || '';
|
||||
@@ -351,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() !== '')
|
||||
@@ -369,7 +398,12 @@ const confirm = () => {
|
||||
$api.createRequest('/app/user/resume', params, 'post').then((resData) => {
|
||||
$api.msg('完成');
|
||||
getUserResume().then(() => {
|
||||
navBack();
|
||||
// 如果从“缺职位+技能”链路进入,回退两层直接返回职业规划页
|
||||
if (needGoBackTwoStep.value) {
|
||||
navBack({ delta: 2 });
|
||||
} else {
|
||||
navBack();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -394,11 +428,31 @@ function addSkill() {
|
||||
|
||||
// 删除技能
|
||||
function removeSkill(index) {
|
||||
state.skills.splice(index, 1);
|
||||
const skill = state.skills[index];
|
||||
|
||||
// 更新完成度
|
||||
const result = getFormCompletionPercent(fromValue);
|
||||
percent.value = result;
|
||||
// 如果有技能id,调用删除接口
|
||||
if (skill && skill.id) {
|
||||
$api.createRequest(`/app/appskill/${skill.id}`, {}, 'DELETE').then(() => {
|
||||
// 接口调用成功,从本地数组中移除
|
||||
state.skills.splice(index, 1);
|
||||
|
||||
// 更新完成度
|
||||
const result = getFormCompletionPercent(fromValue);
|
||||
percent.value = result;
|
||||
|
||||
$api.msg('删除成功');
|
||||
}).catch((err) => {
|
||||
console.error('删除技能失败:', err);
|
||||
$api.msg('删除失败,请重试');
|
||||
});
|
||||
} else {
|
||||
// 没有id的技能(新增的),直接从本地数组中移除
|
||||
state.skills.splice(index, 1);
|
||||
|
||||
// 更新完成度
|
||||
const result = getFormCompletionPercent(fromValue);
|
||||
percent.value = result;
|
||||
}
|
||||
}
|
||||
|
||||
// 获取技能等级文本
|
||||
@@ -583,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: '政治面貌',
|
||||
@@ -740,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;
|
||||
|
||||
@@ -68,6 +68,39 @@
|
||||
{{ jobInfo.description }}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 职位图片 -->
|
||||
<view class="content-card" v-if="jobInfo.filesList && jobInfo.filesList.length > 0">
|
||||
<view class="card-title">
|
||||
<text class="title">职位图片</text>
|
||||
</view>
|
||||
<view class="job-images">
|
||||
<view class="image-item" v-for="(file, index) in jobInfo.filesList" :key="file.id">
|
||||
<image :src="file.fileUrl" mode="aspectFit" @click="previewImage(file.fileUrl, index)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 联系人信息 -->
|
||||
<view class="content-card" v-if="jobInfo.jobContactList && jobInfo.jobContactList.length > 0">
|
||||
<view class="card-title">
|
||||
<text class="title">联系人信息</text>
|
||||
</view>
|
||||
<view class="contact-list">
|
||||
<view class="contact-item" v-for="(contact, index) in jobInfo.jobContactList" :key="index">
|
||||
<view class="contact-info">
|
||||
<view class="contact-label">联系人:</view>
|
||||
<view class="contact-value">{{ contact.contactPerson }}</view>
|
||||
</view>
|
||||
<view class="contact-info">
|
||||
<view class="contact-label">职位:</view>
|
||||
<view class="contact-value">{{ contact.position }}</view>
|
||||
</view>
|
||||
<view class="contact-info">
|
||||
<view class="contact-label">电话:</view>
|
||||
<view class="contact-value">{{ contact.contactPersonPhone }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 公司信息 -->
|
||||
<view class="content-card">
|
||||
<view class="card-title">
|
||||
@@ -138,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>
|
||||
@@ -181,7 +214,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view style="height: 34px"></view>
|
||||
<template #footer>
|
||||
@@ -482,6 +515,21 @@ function formatPublishTime(dateString) {
|
||||
return `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
|
||||
}
|
||||
}
|
||||
|
||||
// 预览图片
|
||||
function previewImage(url, index) {
|
||||
// 获取所有图片的URL列表
|
||||
const allImageUrls = jobInfo.value.filesList.map(file => file.fileUrl);
|
||||
uni.previewImage({
|
||||
urls: allImageUrls,
|
||||
current: index
|
||||
});
|
||||
}
|
||||
|
||||
// 查看简历
|
||||
function viewResume(userId) {
|
||||
navTo(`/packageA/pages/myResume/myResume?userId=${userId}`);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@@ -583,6 +631,55 @@ for i in 0..100
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 职位图片样式
|
||||
.job-images{
|
||||
margin-top: 30rpx
|
||||
display: flex
|
||||
flex-wrap: wrap
|
||||
gap: 20rpx
|
||||
.image-item{
|
||||
width: calc(50% - 10rpx)
|
||||
height: 300rpx
|
||||
border-radius: 12rpx
|
||||
overflow: hidden
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1)
|
||||
image{
|
||||
width: 100%
|
||||
height: 100%
|
||||
object-fit: cover
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 联系人信息样式
|
||||
.contact-list{
|
||||
margin-top: 30rpx
|
||||
.contact-item{
|
||||
padding: 20rpx
|
||||
background-color: #f8f9fa
|
||||
border-radius: 12rpx
|
||||
.contact-info{
|
||||
display: flex
|
||||
align-items: center
|
||||
margin-bottom: 15rpx
|
||||
&:last-child{
|
||||
margin-bottom: 0
|
||||
}
|
||||
.contact-label{
|
||||
font-weight: 500
|
||||
font-size: 28rpx
|
||||
color: #333333
|
||||
width: 120rpx
|
||||
}
|
||||
.contact-value{
|
||||
font-weight: 400
|
||||
font-size: 28rpx
|
||||
color: #495265
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ai
|
||||
.ai-explain{
|
||||
margin-top: 28rpx
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<AppLayout title="" :use-scroll-view="false">
|
||||
<view class="wrap">
|
||||
<view class="login_index">
|
||||
<!-- <view class="login_index">
|
||||
<input class="input" placeholder="请输入账号" placeholder-class="inputplace" v-model="form.username" />
|
||||
<view class="login_yzm">
|
||||
<input class="input" type="password" placeholder="请输入密码" placeholder-class="inputplace"
|
||||
@@ -13,7 +13,7 @@
|
||||
</view>
|
||||
|
||||
<button class="com-btn" @click="register">登 录</button>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
@@ -43,8 +43,8 @@
|
||||
const flag=ref('hlw')
|
||||
|
||||
const form = reactive({
|
||||
username: 'langchaojituan',
|
||||
password: 'Aa123456?',
|
||||
username: '913700004941904564',
|
||||
password: '913700004941904564',
|
||||
rememberMe: false,
|
||||
code: '',
|
||||
uuid: ''
|
||||
@@ -57,7 +57,43 @@
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
getCodeImg()
|
||||
// getCodeImg()
|
||||
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: ""
|
||||
}
|
||||
}
|
||||
$api.myRequest('/auth/login2/ks',form,'post',10100).then((res) => {
|
||||
if (res.code=='200') {
|
||||
uni.setStorageSync('Padmin-Token', res.data.access_token)
|
||||
uni.navigateBack({
|
||||
delta:2
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '登录失败,请重试'
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
function register() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view class="tab-container">
|
||||
<image src="/packageB/static/images/train/bj.jpg" mode=""></image>
|
||||
<view>
|
||||
<view class="btns" @click="jumps('/packageB/train/video/videoList')">
|
||||
<!-- <view class="btns" @click="jumps('/packageB/train/video/videoList')">
|
||||
<image src="/packageB/static/images/train/spxx-k.png" mode=""></image>
|
||||
<view>
|
||||
<text>培训视频</text>
|
||||
@@ -12,7 +12,7 @@
|
||||
<image src="/packageB/static/images/train/arrow.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="btns" @click="jumps('/packageB/train/practice/startPracticing')">
|
||||
<image src="/packageB/static/images/train/zxxl-k.png" mode=""></image>
|
||||
<view>
|
||||
@@ -35,7 +35,7 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="btns" @click="jumps('/packageB/train/wrongAnswer/mistakeNotebook')">
|
||||
<!-- <view class="btns" @click="jumps('/packageB/train/wrongAnswer/mistakeNotebook')">
|
||||
<image src="/packageB/static/images/train/ctb-k.png" mode=""></image>
|
||||
<view>
|
||||
<text>错题本 </text>
|
||||
@@ -45,7 +45,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- </AppLayout> -->
|
||||
@@ -58,8 +58,57 @@ const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
|
||||
function jumps(url){
|
||||
navTo(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>
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
<view class="video-detail-container">
|
||||
<!-- 视频播放组件 -->
|
||||
<view class="video-wrapper">
|
||||
<video id="myVideo" :src="videoInfo.currentUrl" :poster="trainVideoImgUrl+ videoInfo.cover" @seeked="onSeeked"
|
||||
<video v-if="videoInfo && videoInfo.cover" id="myVideo" :src="videoInfo.currentUrl" :poster="trainVideoImgUrl+ videoInfo.cover" @seeked="onSeeked"
|
||||
:initial-time="initialTime"
|
||||
preload="metadata"
|
||||
enable-danmu controls style="width: 100%;" @pause="onPause" @timeupdate="onTimeupdate" @ended="onEnded"></video>
|
||||
</view>
|
||||
</view>
|
||||
@@ -146,6 +148,7 @@ 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)
|
||||
@@ -172,12 +175,12 @@ onLoad((options) => {
|
||||
videoId.value=options.id
|
||||
getDictionary()
|
||||
});
|
||||
onHide(() => {
|
||||
updateVideoInfo() // 用缓存值,不要调 getCurrentTime
|
||||
reportPageDuration()
|
||||
})
|
||||
// onHide(() => {
|
||||
// updateVideoInfo() // 用缓存值,不要调 getCurrentTime
|
||||
// reportPageDuration()
|
||||
// })
|
||||
onUnload(() => {
|
||||
updateVideoInfo()
|
||||
// updateVideoInfo()
|
||||
reportPageDuration()
|
||||
})
|
||||
function getData() {
|
||||
@@ -195,17 +198,20 @@ 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){
|
||||
latestTime.value=videoInfo.value.process
|
||||
initialTime.value=videoInfo.value.process
|
||||
}
|
||||
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')
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -275,15 +281,20 @@ 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('/train/public/videoUser/add', paramsData,'post',9100,header).then((resData) => {
|
||||
console.log("视频播放时长更新成功")
|
||||
});
|
||||
}else{
|
||||
$api.myRequest('/train/public/videoUser/update', paramsData,'post',9100,header).then((resData) => {
|
||||
console.log("视频播放时长更新成功")
|
||||
});
|
||||
}
|
||||
|
||||
$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("视频播放时长更新成功")
|
||||
});
|
||||
}else{
|
||||
$api.myRequest('/train/public/videoUser/update', paramsData,'post',9100,header).then((resData) => {
|
||||
console.log("视频播放时长更新成功")
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 计算并上报停留时长
|
||||
function reportPageDuration() {
|
||||
|
||||
@@ -80,7 +80,8 @@ const getItemBackgroundStyle = (imageName) => ({
|
||||
});
|
||||
const trainVideoImgUrl=config.trainVideoImgUrl
|
||||
|
||||
onLoad(() => {
|
||||
onLoad(async () => {
|
||||
await thirdLogin()
|
||||
getDataList('refresh');
|
||||
});
|
||||
|
||||
@@ -135,8 +136,53 @@ function getDataList(type = 'add') {
|
||||
|
||||
|
||||
// 播放视频
|
||||
function playVideo(video) {
|
||||
navTo(`/packageB/train/video/videoDetail?id=${video.videoId}`);
|
||||
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>
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ import request from '@/packageCa/utilCa/request.js'
|
||||
const api = {}
|
||||
|
||||
//根据openId,获取token,并判断用户是否已绑定账号
|
||||
api.queryKaShiToken = (userId,name) => request.globalRequest(`/Home/QueryKaShiToken?userId=${userId}&name=${name}&schoolId=2371`,'GET', {})
|
||||
api.queryKaShiToken = (idCard,name) => request.globalRequest(`/Home/QueryKaShiToken?userIdNO=${idCard}&name=${name}&schoolId=2371`,'GET', {})
|
||||
// 获取ai面试路径
|
||||
api.queryAIUrl = (userId,name) => request.globalRequest(`/Home/QueryAIUrl?userId=${userId}&name=${name}&schoolId=2371`,'GET', {})
|
||||
api.queryAIUrl = (idCard,name) => request.globalRequest(`/Home/QueryAIUrl?userIdNO=${idCard}&name=${name}&schoolId=2371`,'GET', {})
|
||||
|
||||
// 获取个人档案
|
||||
api.queryStudentProfile = () => request.globalRequest(`/StudentResource/QueryStudentProfile`,'GET', {})
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<text class="icon icon-search"></text>
|
||||
<input type="search" v-model="kw" placeholder="请输入职业名称" @input="inputKeywrok"/>
|
||||
<view class="list-wrap" v-show="kw != ''">
|
||||
<navigator class="link" :url="'/packageCa/job/details?id='+item.Id" v-for="(item, index) in jobDataList" :key="index">{{item.Name}}</navigator>
|
||||
<navigator class="link" :url="'/packageCa/job/details?id='+item.EnCodeId" v-for="(item, index) in jobDataList" :key="index">{{item.Name}}</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="title-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" v-if="taskId ==0" @click="goback"></view>
|
||||
<text v-if="testTitle != ''">{{testTitle}}</text>
|
||||
</view>
|
||||
<view class="title-wrap" style="padding-top: 40rpx;">
|
||||
<view class="progress-block">
|
||||
<view class="row">
|
||||
<view class="title-index">
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="title-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>职业兴趣测评</text>
|
||||
</view>
|
||||
<view class="title-wrap" style="padding-top: 40rpx;">
|
||||
<view class="progress-block">
|
||||
<view class="row">
|
||||
<view class="title-index">
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="title-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback()"></view>
|
||||
<text>人格测评</text>
|
||||
</view>
|
||||
<view class="title-wrap" style="padding-top: 40rpx;">
|
||||
<view class="progress-block">
|
||||
<view class="row">
|
||||
<view class="title-index">
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<template>
|
||||
<view class="test-list-wrap" style="display:block;">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>生涯测评</text>
|
||||
</view>
|
||||
<view class="content" style="overflow:hidden;">
|
||||
<view class="content" style="overflow:hidden; padding-top: 40rpx;" >
|
||||
<view class="p-item" >
|
||||
<view class="item" v-for="(item,index) in dataList" :key="index">
|
||||
<view class="h2">{{item.Name}}</view>
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="title-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>工作价值观测评</text>
|
||||
</view>
|
||||
<view class="title-wrap" style="padding-top: 40rpx;">
|
||||
<view class="progress-block">
|
||||
<view class="row">
|
||||
<view class="title-index">
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<template>
|
||||
<view class="index-wrap">
|
||||
<view class="yanshi-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>素质测评</text>
|
||||
</view>
|
||||
<view class="section">
|
||||
<view class="head-title">测评中心</view>
|
||||
<view class="nav-block">
|
||||
@@ -55,20 +51,16 @@
|
||||
return {
|
||||
barHeight: wx.getWindowInfo().statusBarHeight,
|
||||
user: null,//用户信息
|
||||
userId: 0,
|
||||
name: ""
|
||||
name: "",
|
||||
idCard: ""
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.userId = e.userId;
|
||||
this.idCard = e.idCard;
|
||||
this.name = e.name;
|
||||
this.queryKaShiToken();
|
||||
},
|
||||
methods: {
|
||||
// 返回
|
||||
goback() {
|
||||
uni.navigateBack(-1);
|
||||
},
|
||||
// 演示入
|
||||
navDetail(index){
|
||||
switch (index){
|
||||
@@ -114,10 +106,10 @@
|
||||
|
||||
// 登录获取用户信息
|
||||
async queryKaShiToken() {
|
||||
const res = await api.queryKaShiToken(this.userId,this.name)
|
||||
const res = await api.queryKaShiToken(this.idCard,this.name)
|
||||
if(res.Result == 1){
|
||||
let params = {
|
||||
token:res.Data.token,
|
||||
token:res.Data.token,
|
||||
user: res.Data.userInfo
|
||||
};
|
||||
uni.setStorageSync('CAuserInfo',params);
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="interest-report-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>我的报告</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<contrastBox @updateValue="handleChildValueChange" :testType="testType" :userId="userId" :recordId="recordId" @compareParameters="opCompareParameters"></contrastBox>
|
||||
<view class="section-block">
|
||||
@@ -75,8 +71,8 @@
|
||||
import contrastBox from "@/packageCa/testReport/components/contrastBox.vue"
|
||||
import api from "@/packageCa/apiCa/testManage.js";
|
||||
import theme from '@/uni_modules/lime-echart/static/walden.json';
|
||||
const echarts = require('../../utilCa/echarts.min.js');
|
||||
// import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
|
||||
const echarts = require('../utilCa/echarts.min.js');
|
||||
import * as echarts1 from '../utilCa/echarts.min';
|
||||
// // 注册主题
|
||||
// echarts.registerTheme('theme', theme);
|
||||
export default {
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="interest-report-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>我的报告</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<contrastBox :testType="testType" :userId="userId" :recordId="recordId" @compareParameters="opCompareParameters"></contrastBox>
|
||||
<view class="section-block">
|
||||
@@ -245,7 +241,7 @@
|
||||
import contrastBox from "@/packageCa/testReport/components/contrastBox.vue"
|
||||
import api from "@/packageCa/apiCa/testManage.js";
|
||||
import theme from '@/uni_modules/lime-echart/static/walden.json';
|
||||
const echarts = require('../../utilCa/echarts.min.js');
|
||||
const echarts = require('../utilCa/echarts.min.js');
|
||||
// import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
|
||||
// // 注册主题
|
||||
// echarts.registerTheme('theme', theme);
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="interest-report-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>我的报告</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<contrastBox :testType="testType" :userId="userId" :recordId="recordId" @compareParameters="opCompareParameters"></contrastBox>
|
||||
<view class="section-block">
|
||||
@@ -115,7 +111,7 @@
|
||||
import api from "@/packageCa/apiCa/testManage.js"
|
||||
import wayData from "./multipleAbilityData.json";
|
||||
import theme from '@/uni_modules/lime-echart/static/walden.json';
|
||||
const echarts = require('../../utilCa/echarts.min.js');
|
||||
const echarts = require('../utilCa/echarts.min.js');
|
||||
// import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
|
||||
// // 注册主题
|
||||
// echarts.registerTheme('theme', theme);
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="interest-report-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>我的报告</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<contrastBox :testType="testType" :userId="userId" :recordId="recordId" @compareParameters="opCompareParameters"></contrastBox>
|
||||
<view class="section-block">
|
||||
@@ -402,7 +398,7 @@
|
||||
import opts from "./chartOpts.js"
|
||||
import api from "@/packageCa/apiCa/testManage.js";
|
||||
import theme from '@/uni_modules/lime-echart/static/walden.json';
|
||||
const echarts = require('../../utilCa/echarts.min.js');
|
||||
const echarts = require('../utilCa/echarts.min.js');
|
||||
// import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
|
||||
// // 注册主题
|
||||
// echarts.registerTheme('theme', theme);
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="interest-report-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>我的报告</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<contrastBox :testType="testType" :userId="userId" :recordId="recordId" @compareParameters="opCompareParameters"></contrastBox>
|
||||
<view class="section-block">
|
||||
@@ -43,8 +39,7 @@
|
||||
import contrastBox from "@/packageCa/testReport/components/contrastBox.vue"
|
||||
import api from "@/packageCa/apiCa/testManage.js";
|
||||
import theme from '@/uni_modules/lime-echart/static/walden.json';
|
||||
const echarts = require('../../utilCa/echarts.min.js');
|
||||
// import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
|
||||
const echarts = require('../utilCa/echarts.min.js');
|
||||
// // 注册主题
|
||||
// echarts.registerTheme('theme', theme);
|
||||
export default {
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
<template>
|
||||
<view class="index-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goBack"></view>
|
||||
<text>生涯罗盘</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title">
|
||||
生涯罗盘
|
||||
</view>
|
||||
<view class="section">
|
||||
<view class="table">
|
||||
<view class="table" v-if="compassList.length > 0">
|
||||
<view class="tr">
|
||||
<view class="th">
|
||||
</view>
|
||||
@@ -44,6 +40,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty" v-else>
|
||||
<view class="icon"></view>
|
||||
<view class="txt">暂无推荐职业,请先进行兴趣测评</view>
|
||||
<view class="nav-btn" @click="navTest">
|
||||
去测评
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="title">
|
||||
我的职业
|
||||
@@ -119,9 +122,12 @@
|
||||
this.getGXCareerPlanList();
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateBack(-1);
|
||||
},
|
||||
// 去测评
|
||||
navTest(){
|
||||
uni.navigateTo({
|
||||
url: `/packageCa/pagesTest/testList`
|
||||
})
|
||||
},
|
||||
//选中职业添加
|
||||
async checkedJob(ITEM){
|
||||
uni.showLoading({
|
||||
@@ -225,6 +231,36 @@
|
||||
background-size: 38rpx 38rpx;
|
||||
}
|
||||
}
|
||||
.empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-top: 60rpx;
|
||||
padding-bottom: 100rpx;
|
||||
.icon {
|
||||
width: 240rpx;
|
||||
height: 240rpx;
|
||||
background: url("#{$image-oss-url}/empty.png") no-repeat;
|
||||
background-size: 100%;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.txt {
|
||||
font-size: 28rpx;
|
||||
color: #A4B3E5;
|
||||
}
|
||||
.nav-btn {
|
||||
width: 335rpx;
|
||||
height: 80rpx;
|
||||
margin: 40rpx auto 0;
|
||||
background-color: #1989fa;
|
||||
border-radius: 40rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
}
|
||||
.index-wrap {
|
||||
.content {
|
||||
padding: 0 20rpx;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="index-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goBack"></view>
|
||||
<text>学习计划制定</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="title-h1">PDCA 循环法</view>
|
||||
<view class="banner"></view>
|
||||
@@ -150,9 +146,6 @@
|
||||
this.queryPlanList();
|
||||
},
|
||||
methods: {
|
||||
goBack(){
|
||||
uni.navigateBack(-1);
|
||||
},
|
||||
// 切换目标标签
|
||||
changeTarget(ITEM){
|
||||
if(ITEM.EncodeId == this.checkedTargetCode){
|
||||
@@ -309,20 +302,21 @@
|
||||
padding: 40rpx 30rpx 0;
|
||||
margin-top: 40rpx;
|
||||
.target-tabbar {
|
||||
margin-bottom: 50rpx;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.item {
|
||||
position: relative;
|
||||
width: 155rpx;
|
||||
width: 150rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
text-align: center;
|
||||
border-radius: 34rpx;
|
||||
border: solid 2rpx #eeeeee;
|
||||
font-size: 28rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
&.on {
|
||||
color: #1989fa;
|
||||
border-color: #1989fa;
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
<template>
|
||||
<view class="document">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goback"></view>
|
||||
<text>生涯档案</text>
|
||||
</view>
|
||||
|
||||
<!-- <view class="section" style="margin-top:60rpx;">
|
||||
<view class="head">
|
||||
<view class="left-txt">
|
||||
@@ -33,7 +28,7 @@
|
||||
<navigator url="/packageCa/job/index" class="btn">添加意向职业</navigator>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="section" style="margin-top:60rpx;">
|
||||
<view class="section" >
|
||||
<view class="head">
|
||||
<view class="left-txt">
|
||||
<view class="icon icon-4"></view>
|
||||
@@ -308,9 +303,6 @@ import api1 from "@/packageCa/apiCa/studentProfile.js"
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
goback(){
|
||||
uni.navigateBack(-1);
|
||||
},
|
||||
// 获取个人档案
|
||||
async queryStudentProfile() {
|
||||
uni.showLoading({
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="index-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goBack"></view>
|
||||
<text>职业路径</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="section">
|
||||
<view class="title-h1">
|
||||
@@ -22,9 +18,6 @@
|
||||
<view class="th">
|
||||
我的意向
|
||||
</view>
|
||||
<view class="th">
|
||||
专业匹配
|
||||
</view>
|
||||
</view>
|
||||
<view class="tr" v-for="(item,index) in jobList" @click="checkedJob(item)" :key="index">
|
||||
<view class="td">
|
||||
@@ -39,9 +32,9 @@
|
||||
<view class="td">
|
||||
<view class="is-has" v-if="item.IsIntention"></view>
|
||||
</view>
|
||||
<view class="td">
|
||||
<!-- <view class="td">
|
||||
<view class="is-has" v-if="item.IsSpecialtyMatch"></view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty" v-else>
|
||||
@@ -210,7 +203,7 @@
|
||||
// 去测评
|
||||
navTest(){
|
||||
uni.navigateTo({
|
||||
url: `/pagesTest/interestTestCollect/interestTestTitle`
|
||||
url: `/packageCa/pagesTest/interestTestTitle`
|
||||
})
|
||||
},
|
||||
//选中职业
|
||||
@@ -224,9 +217,6 @@
|
||||
icon:"none"
|
||||
});
|
||||
},
|
||||
goBack(){
|
||||
uni.navigateBack(-1);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -315,7 +305,7 @@
|
||||
.tr {
|
||||
display: -webkit-box;
|
||||
.th {
|
||||
width: 145rpx;
|
||||
width: 170rpx;
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
@@ -334,7 +324,7 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 145rpx;
|
||||
width: 170rpx;
|
||||
min-height: 72rpx;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<view class="index-wrap">
|
||||
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
|
||||
<view class="go-back" @click="goBack"></view>
|
||||
<text>smart目标制定</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="banner-wrap"></view>
|
||||
<view class="desc">
|
||||
@@ -87,7 +83,7 @@
|
||||
<view class="form-wrap" >
|
||||
<view class="form-item">
|
||||
<view class="label">
|
||||
目标描述
|
||||
<text>*</text>目标描述
|
||||
</view>
|
||||
<view class="input-wrap">
|
||||
<textarea v-model="targetForm.TargetDesc"
|
||||
@@ -96,7 +92,7 @@
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="label">
|
||||
目标类型
|
||||
<text>*</text>目标类型
|
||||
</view>
|
||||
<view class="check-wrap">
|
||||
<view class="checked-item" @click="targetForm.TargetType = 1">
|
||||
@@ -216,9 +212,6 @@
|
||||
url:"/packageCa/userCenter/learningPlan"
|
||||
})
|
||||
},
|
||||
goBack(){
|
||||
uni.navigateBack(-1);
|
||||
},
|
||||
// 添加目标
|
||||
addTarget(){
|
||||
this.targetForm = {
|
||||
@@ -235,6 +228,20 @@
|
||||
},
|
||||
// 保存目标
|
||||
async saveTarget(){
|
||||
if(this.targetForm.TargetDesc == ""){
|
||||
uni.showToast({
|
||||
title: "请输入目标描述",
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if(this.targetForm.TargetType == ""){
|
||||
uni.showToast({
|
||||
title: "请选择目标类型",
|
||||
icon: "none"
|
||||
})
|
||||
return;
|
||||
}
|
||||
const res = await api.saveSmartTarget(this.targetForm);
|
||||
if (res.Result == 1) {
|
||||
uni.showToast({
|
||||
@@ -396,7 +403,6 @@
|
||||
|
||||
.index-wrap {
|
||||
.content {
|
||||
padding-top: 60rpx;
|
||||
padding-bottom: 60rpx;
|
||||
|
||||
.banner-wrap {
|
||||
@@ -573,6 +579,9 @@
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 30rpx;
|
||||
text {
|
||||
color: #ff0000;
|
||||
}
|
||||
}
|
||||
.check-wrap {
|
||||
display: flex;
|
||||
|
||||
@@ -2,9 +2,9 @@ let baseUrl = ""
|
||||
// #ifdef MP-WEIXIN
|
||||
// 编译项目,因为使用插件lime-echart,echart文件过大,需要非压缩代码方式编译,不然会很慢,发布的时候才压缩代码方式编译
|
||||
if (wx.getAccountInfoSync().miniProgram.envVersion === 'develop') {
|
||||
baseUrl = 'https://localhost:7026' // 开发环境
|
||||
baseUrl = 'http://222.80.110.161:11111/career' // 开发环境
|
||||
} else {
|
||||
baseUrl = 'https://yanxueapi.51xuanxiao.com' // 生产环境
|
||||
baseUrl = 'http://222.80.110.161:11111/career' // 生产环境
|
||||
}
|
||||
// #endif
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
// 公共图片基地址
|
||||
const BASE_IMAGE_URL = 'https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh';
|
||||
|
||||
/**
|
||||
* 图片地址拼接方法
|
||||
* @param {string} path - 图片路径(相对于基地址的路径)
|
||||
* @param {string} [process] - OSS图片处理参数,例如:'image/resize,m_fixed,w_348/quality,q_80'
|
||||
* @returns {string} 完整的图片URL
|
||||
*/
|
||||
export function ossImageUrl(path, process) {
|
||||
|
||||
// 如果有处理参数,拼接处理参数
|
||||
if (process) {
|
||||
return `${BASE_IMAGE_URL}/${path}?x-oss-process=${process}`;
|
||||
}
|
||||
|
||||
// 没有处理参数时,直接返回原始路径
|
||||
return `${BASE_IMAGE_URL}/${path}`;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@ request.globalRequest = (url, method, data, power, type) => {
|
||||
// 1 == 不通过access_token校验的接口
|
||||
// 2 == 文件下载接口列表
|
||||
const userInfo = uni.getStorageSync('CAuserInfo')
|
||||
headers['Token'] = userInfo.token
|
||||
console.log("ca用户",userInfo);
|
||||
if(userInfo != ""){
|
||||
headers['Token'] = userInfo.token
|
||||
}
|
||||
return uni.request({
|
||||
timeout: 60000,
|
||||
url: baseUrl + url,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Date: 2025-10-16 15:15:47
|
||||
* @LastEditors: lip
|
||||
* @LastEditTime: 2025-11-19 18:22:34
|
||||
* @LastEditors: shirlwang
|
||||
* @LastEditTime: 2025-12-08 16:10:47
|
||||
-->
|
||||
<template>
|
||||
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->
|
||||
@@ -66,7 +66,7 @@
|
||||
<view class="title-item active"><view>政策专区</view></view>
|
||||
<view @click="toPolicyList">{{'查看更多 >'}}</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in policyList" :key="index" class="job-list" @click="toPolicyDetail">
|
||||
<view v-for="(item, index) in policyList" :key="index" class="job-list" @click="toPolicyDetail(item)">
|
||||
<view class="sign">推荐</view>
|
||||
<view class="title">
|
||||
<image src="../../../packageRc/static/zcLeft.png"/>
|
||||
@@ -100,7 +100,7 @@ function getPolicy() {
|
||||
function toPolicyList() {
|
||||
navTo(`/packageRc/pages/policy/policyList`)
|
||||
}
|
||||
function toPolicyDetail() {
|
||||
function toPolicyDetail(item) {
|
||||
navTo(`/packageRc/pages/policy/policyDetail?id=${item.id}`)
|
||||
}
|
||||
let activeTab = ref(1)
|
||||
|
||||
@@ -78,7 +78,8 @@
|
||||
<view>
|
||||
<view v-for="(job,index) in perlist" :key="index"
|
||||
class="swipe_action_item">
|
||||
<view class="job-list__item" :style="{ paddingBottom: job.auditStatus == 1 ? '0' : '32rpx' }" @tap="toPage(`/packageRc/pages/community/personEdit?id=${job.id}&type=edit`)">
|
||||
<view class="job-list__item" :style="{ paddingBottom: job.auditStatus == 1 ? '0' : '32rpx' }">
|
||||
<!-- @tap="toPage(`/packageRc/pages/community/personEdit?id=${job.id}&type=edit`)" -->
|
||||
<view class="job-list__item-top">
|
||||
<img src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/malepng.png" v-if="job.gender == 0" class="gender-img" alt="" />
|
||||
<img src="https://rc.jinan.gov.cn/qcwjyH5/static/images/person/femalepng.png" v-else class="gender-img" alt="" />
|
||||
@@ -126,7 +127,7 @@
|
||||
<view v-show="$store.getters.roles.includes('shequn')" class="btn" style="color: #f56c6c;"
|
||||
@click.native.stop="handleReturn(job)">退回</view>
|
||||
<view class="btn" @click.native.stop="toPage(
|
||||
`/packageRc/pages/community/serviceDetails?id=${job.id}&userId=${job.userId}`
|
||||
`/packageRc/pages/daiban/daibandetail?id=${job.id}&userId=${job.userId}`
|
||||
)">服务</view>
|
||||
<view
|
||||
v-if=" job.personType == 3"
|
||||
@@ -434,9 +435,9 @@ export default {
|
||||
this.$refs.show.open()
|
||||
},
|
||||
toPage(url) {
|
||||
uni.navigateTo(
|
||||
uni.navigateTo({
|
||||
url
|
||||
)
|
||||
})
|
||||
},
|
||||
cancelSortPicker() {
|
||||
this.showSortPicker = false
|
||||
|
||||
26
pages.json
26
pages.json
@@ -83,7 +83,7 @@
|
||||
{
|
||||
"path": "pages/search/search",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
"navigationBarTitleText": "搜索职位"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -138,12 +138,18 @@
|
||||
"navigationBarTitleText": "简历示例"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/service/salary-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "薪酬信息"
|
||||
}
|
||||
}
|
||||
{
|
||||
"path": "pages/service/salary-info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "薪酬信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/service/guidance",
|
||||
"style": {
|
||||
"navigationBarTitleText": "服务指导"
|
||||
}
|
||||
}
|
||||
],
|
||||
"subpackages": [
|
||||
{
|
||||
@@ -497,7 +503,7 @@
|
||||
{
|
||||
"path": "search/search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "生涯规划"
|
||||
"navigationBarTitleText": "素质测评"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -563,13 +569,13 @@
|
||||
{
|
||||
"path": "pagesTest/testList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "生涯测评"
|
||||
"navigationBarTitleText": "职业测评"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pagesTest/customTestTitle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "自定义测评"
|
||||
"navigationBarTitleText": "能力测评"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
<view class="header-btnLf button-click" @click="seemsg(3)" :class="{ active: state.current === 3 }">
|
||||
我参与的
|
||||
</view>
|
||||
<view class="header-btnLf button-click" @click="navTo('/packageB/login')">
|
||||
<!-- <view class="header-btnLf button-click" @click="navTo('/packageB/login')">
|
||||
登录
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="header-input btn-feel">
|
||||
<uni-icons class="iconsearch" color="#666666" type="search" size="18"
|
||||
@@ -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,19 +212,21 @@
|
||||
// 可以在这里添加登录成功后的处理逻辑
|
||||
};
|
||||
|
||||
function goDetail(jobFairId){
|
||||
if(state.current != 3){
|
||||
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
|
||||
}else{
|
||||
console.log(userInfo.value, 'userInfo');
|
||||
if(userInfo.value){
|
||||
if(userInfo.value.userType=='ent'){
|
||||
navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId)
|
||||
}else{
|
||||
navTo('/packageB/jobFair/detailPerson?jobFairId=' + jobFairId)
|
||||
async function goDetail(jobFairId){
|
||||
if(await thirdLogin()){
|
||||
if(state.current != 3){
|
||||
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
|
||||
}else{
|
||||
console.log(userInfo.value, 'userInfo');
|
||||
if(userInfo.value){
|
||||
if(userInfo.value.userType=='ent'){
|
||||
navTo('/packageB/jobFair/detailCom?jobFairId=' + jobFairId)
|
||||
}else{
|
||||
navTo('/packageB/jobFair/detailPerson?jobFairId=' + jobFairId)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function toSelectDate() {
|
||||
@@ -257,7 +303,6 @@
|
||||
getUser();
|
||||
} else {
|
||||
isLogin.value = false;
|
||||
$api.msg('请先登录')
|
||||
getFair("refresh");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -95,12 +93,7 @@
|
||||
</view>
|
||||
<view class="service-title">服务指导</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="handleServiceClick('public-recruitment')">
|
||||
<view class="service-icon service-icon-2">
|
||||
<IconfontIcon name="zhengfulou" :size="48" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="service-title">事业单位招录</view>
|
||||
</view>
|
||||
|
||||
<view class="service-item press-button" @click="handleServiceClick('resume-creation')">
|
||||
<view class="service-icon service-icon-3">
|
||||
<IconfontIcon name="jianli" :size="48" color="#FFFFFF" />
|
||||
@@ -111,37 +104,37 @@
|
||||
<view class="service-icon service-icon-4">
|
||||
<IconfontIcon name="zhengce" :size="48" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="service-title">劳动政策指引</view>
|
||||
<view class="service-title">政策指引</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="handleServiceClick('skill-training')">
|
||||
<view class="service-icon service-icon-5">
|
||||
<IconfontIcon name="jinengpeixun" :size="48" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="service-title">技能培训信息</view>
|
||||
<view class="service-title">技能培训</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="handleServiceClick('skill-evaluation')">
|
||||
<view class="service-icon service-icon-6">
|
||||
<IconfontIcon name="jinengpingjia" :size="48" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="service-title">技能评价指引</view>
|
||||
<view class="service-title">技能评价</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="handleServiceClick('question-bank')">
|
||||
<!-- <view class="service-item press-button" @click="handleServiceClick('question-bank')">
|
||||
<view class="service-icon service-icon-7">
|
||||
<IconfontIcon name="suzhicepingtiku" :size="48" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="service-title">题库和考试</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="handleServiceClick('quality-assessment')">
|
||||
</view> -->
|
||||
<view class="service-item press-button" @click="goCa()">
|
||||
<view class="service-icon service-icon-8">
|
||||
<IconfontIcon name="suzhicepingtiku" :size="48" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="service-title">素质测评</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="handleServiceClick('ai-interview')">
|
||||
<view class="service-item press-button" @click="goCaAI()">
|
||||
<view class="service-icon service-icon-9">
|
||||
<IconfontIcon name="ai" :size="68" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="service-title">AI智能面试</view>
|
||||
<view class="service-title">虚拟面试</view>
|
||||
</view>
|
||||
<view class="service-item press-button" style="justify-content:normal" @click="goRc()">
|
||||
<view class="service-icon service-icon-9">
|
||||
@@ -521,7 +514,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';
|
||||
@@ -861,12 +854,13 @@ function navToService(serviceType) {
|
||||
'service-guidance': '/pages/service/guidance',
|
||||
'public-recruitment': '/pages/service/public-recruitment',
|
||||
'resume-creation': '/pages/resume-guide/resume-guide',
|
||||
'labor-policy': '/pages/service/labor-policy',
|
||||
'skill-training': '/pages/service/skill-training',
|
||||
'labor-policy': '/packageRc/pages/policy/policyList',
|
||||
'skill-training': '/packageB/train/video/videoList',
|
||||
'skill-evaluation': '/packageB/train/index',
|
||||
// 'skill-evaluation': '/pages/service/skill-evaluation',
|
||||
'question-bank': '/pages/service/question-bank',
|
||||
'quality-assessment': '/pages/service/quality-assessment',
|
||||
'ai-interview': '/pages/chat/chat',
|
||||
// 'quality-assessment': '/packageCa/search/search',
|
||||
// 'ai-interview': '/pages/chat/chat',
|
||||
'job-search': '/pages/search/search',
|
||||
'career-planning': '/pages/service/career-planning',
|
||||
'salary-query': '/pages/service/salary-query',
|
||||
@@ -874,9 +868,11 @@ function navToService(serviceType) {
|
||||
'interview-tips': '/pages/service/interview-tips',
|
||||
'employment-news': '/pages/service/employment-news',
|
||||
'more-services': '/pages/service/more-services',
|
||||
'skill-evaluation': '/packageB/train/index'
|
||||
};
|
||||
|
||||
if((serviceType=='skill-training'||serviceType=='skill-evaluation')&&!uni.getStorageSync('userInfo').idCard){
|
||||
$api.msg('请先完善信息');
|
||||
return
|
||||
}
|
||||
const route = serviceRoutes[serviceType];
|
||||
if (route) {
|
||||
navTo(route);
|
||||
@@ -1067,13 +1063,30 @@ import storeRc from '@/utilsRc/store/index.js';
|
||||
function goRc(){
|
||||
if (checkLogin()) {
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
console.log(uni.getStorageSync('userInfo'), "uni.getStorageSync('userInfo')");
|
||||
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
||||
// console.log(res, "'res");
|
||||
navTo('/packageRc/pages/index/index');
|
||||
});
|
||||
}
|
||||
}
|
||||
// 跳转到素质测评
|
||||
function goCa(){
|
||||
if (checkLogin()) {
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
||||
navTo(`/packageCa/search/search?name=${userInfo.name}&idCard=${userInfo.idCard}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
// 跳转到AI面试
|
||||
function goCaAI(){
|
||||
if (checkLogin()) {
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
||||
navTo(`/packageCa/search/AIAudition?name=${userInfo.name}&idCard=${userInfo.idCard}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
defineExpose({ loadData });
|
||||
|
||||
@@ -111,15 +111,13 @@
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<view class="label">工作地点</view>
|
||||
<view class="location-input-container">
|
||||
<input
|
||||
class="input location-input"
|
||||
placeholder="请输入具体工作地址"
|
||||
v-model="formData.jobLocation"
|
||||
/>
|
||||
<view class="location-icon-btn" @click="chooseLocation">
|
||||
<uni-icons type="location" size="20" color="#333"></uni-icons>
|
||||
</view>
|
||||
<input
|
||||
class="input"
|
||||
placeholder="请输入具体工作地址"
|
||||
v-model="formData.jobLocation"
|
||||
/>
|
||||
<view class="location-text-btn" @click="chooseLocation">
|
||||
<text class="location-btn-text">获取定位</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
@@ -136,7 +134,38 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 岗位描述区块 -->
|
||||
<!-- 图片上传区块 -->
|
||||
<view class="form-block">
|
||||
<view class="section-title">岗位图片</view>
|
||||
<view class="form-group">
|
||||
<view class="upload-container">
|
||||
<view
|
||||
class="upload-item upload-btn"
|
||||
v-if="formData.images.length < 3"
|
||||
@click="chooseImage"
|
||||
>
|
||||
<view class="upload-icon">+</view>
|
||||
<view class="upload-text">上传图片</view>
|
||||
</view>
|
||||
<view
|
||||
class="upload-item preview-item"
|
||||
v-for="(image, index) in formData.images"
|
||||
:key="index"
|
||||
>
|
||||
<image
|
||||
:src="image.filePath"
|
||||
class="preview-img"
|
||||
@click="previewImage(index)"
|
||||
></image>
|
||||
<view class="delete-img-btn" @click="deleteImage(index)">
|
||||
<view class="delete-icon">×</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 岗位描述区块 -->
|
||||
<view class="form-block">
|
||||
<view class="section-title">岗位描述</view>
|
||||
<view class="form-group">
|
||||
@@ -187,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
|
||||
@@ -224,6 +261,7 @@ import { ref, reactive, onMounted, onUnmounted } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { createRequest } from '@/utils/request';
|
||||
import config from '@/config.js';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import UniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue';
|
||||
@@ -246,9 +284,11 @@ const formData = reactive({
|
||||
jobLocationAreaCode: '', // 新增:工作地点区县字典代码
|
||||
education: '', // 新增:学历要求字典值
|
||||
experience: '', // 新增:工作经验字典值
|
||||
images: [], // 新增:岗位图片
|
||||
contacts: [
|
||||
{
|
||||
name: '',
|
||||
position: '',
|
||||
phone: ''
|
||||
}
|
||||
]
|
||||
@@ -473,6 +513,7 @@ const addContact = () => {
|
||||
if (formData.contacts.length < 3) {
|
||||
formData.contacts.push({
|
||||
name: '',
|
||||
position: '',
|
||||
phone: ''
|
||||
});
|
||||
}
|
||||
@@ -492,6 +533,101 @@ const goToCompanySearch = () => {
|
||||
});
|
||||
};
|
||||
|
||||
// 图片选择
|
||||
const chooseImage = () => {
|
||||
uni.chooseImage({
|
||||
count: 3 - formData.images.length, // 最多可选择的图片数量
|
||||
success: async (res) => {
|
||||
uni.showLoading({
|
||||
title: '上传中...'
|
||||
});
|
||||
|
||||
try {
|
||||
for (const tempFilePath of res.tempFilePaths) {
|
||||
const uploadResult = await uploadImage(tempFilePath);
|
||||
formData.images.push(uploadResult);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('上传失败:', error);
|
||||
uni.showToast({
|
||||
title: '上传失败,请重试',
|
||||
icon: 'none'
|
||||
});
|
||||
} finally {
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('选择图片失败:', err);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 图片上传
|
||||
const uploadImage = (tempFilePath) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let Authorization = '';
|
||||
if (useUserStore().token) {
|
||||
Authorization = `${useUserStore().token}`;
|
||||
}
|
||||
|
||||
uni.uploadFile({
|
||||
url: config.baseUrl + '/app/file/uploadFile',
|
||||
filePath: tempFilePath,
|
||||
name: 'file',
|
||||
header: {
|
||||
'Authorization': encodeURIComponent(Authorization)
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
if (uploadFileRes.statusCode === 200) {
|
||||
try {
|
||||
const result = JSON.parse(uploadFileRes.data);
|
||||
if (result.code === 200) {
|
||||
resolve(result);
|
||||
} else {
|
||||
reject(new Error(result.msg || '上传失败'));
|
||||
}
|
||||
} catch (e) {
|
||||
reject(new Error('解析上传结果失败'));
|
||||
}
|
||||
} else {
|
||||
reject(new Error('网络请求失败'));
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// 删除图片
|
||||
const deleteImage = async (index) => {
|
||||
const image = formData.images[index];
|
||||
if (image.id) {
|
||||
try {
|
||||
await createRequest(`/app/file/${image.id}`, {}, 'DELETE', true);
|
||||
} catch (error) {
|
||||
console.error('删除图片失败:', error);
|
||||
uni.showToast({
|
||||
title: '删除图片失败',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
formData.images.splice(index, 1);
|
||||
};
|
||||
|
||||
// 预览图片
|
||||
const previewImage = (index) => {
|
||||
const urls = formData.images.map(image => image.filePath);
|
||||
uni.previewImage({
|
||||
current: index,
|
||||
urls: urls
|
||||
});
|
||||
};
|
||||
|
||||
// 处理企业选择
|
||||
const handleCompanySelected = (company) => {
|
||||
formData.companyName = company.name;
|
||||
@@ -527,7 +663,12 @@ 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
|
||||
};
|
||||
|
||||
// 调试信息:打印companyId
|
||||
@@ -594,6 +735,15 @@ const validateForm = () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 验证定位信息
|
||||
if (!formData.latitude || !formData.longitude) {
|
||||
uni.showToast({
|
||||
title: '请点击"获取定位"按钮获取工作地点位置',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// 薪资验证
|
||||
const minSalary = parseFloat(formData.minSalary);
|
||||
const maxSalary = parseFloat(formData.maxSalary);
|
||||
@@ -792,36 +942,28 @@ const validateForm = () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 工作地点输入容器样式
|
||||
.location-input-container {
|
||||
// 工作地点文字按钮样式
|
||||
.location-text-btn {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
background: #256BFA;
|
||||
border: none;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
justify-content: center;
|
||||
margin-top: 20rpx;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
.location-input {
|
||||
flex: 1;
|
||||
padding-right: 100rpx;
|
||||
.location-btn-text {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.location-icon-btn {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 44%;
|
||||
transform: translateY(-50%);
|
||||
width: 80rpx;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f0f0f0;
|
||||
border: none;
|
||||
border-radius: 12rpx;
|
||||
transition: all 0.3s ease;
|
||||
z-index: 99;
|
||||
|
||||
&:active {
|
||||
transform: translateY(-50%) scale(0.95);
|
||||
}
|
||||
&:active {
|
||||
background: #1a5cd9;
|
||||
transform: scale(0.98);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1035,6 +1177,85 @@ const validateForm = () => {
|
||||
}
|
||||
/* #endif */
|
||||
|
||||
/* 图片上传样式 */
|
||||
.upload-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.upload-item {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 12rpx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.upload-btn {
|
||||
background-color: #f5f5f5;
|
||||
border: 2rpx dashed #ddd;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:active {
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
font-size: 60rpx;
|
||||
color: #999;
|
||||
margin-bottom: 10rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.upload-text {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.preview-item {
|
||||
overflow: hidden;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.preview-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.delete-img-btn {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 10rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:active {
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
.delete-icon {
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* #ifdef MP-WEIXIN */
|
||||
.publish-job-page {
|
||||
position: fixed;
|
||||
|
||||
@@ -75,29 +75,11 @@
|
||||
<view class="loading-spinner" v-else></view>
|
||||
</view>
|
||||
</button>
|
||||
|
||||
<!-- 其他登录方式 -->
|
||||
<view class="other-login">
|
||||
<view class="divider">
|
||||
<view class="divider-line"></view>
|
||||
<view class="divider-text">其他登录方式</view>
|
||||
<view class="divider-line"></view>
|
||||
</view>
|
||||
|
||||
<view class="login-options">
|
||||
<view class="login-option" @click="goToIdCardLogin">
|
||||
<view class="option-icon">
|
||||
<uni-icons type="idcard" size="36" color="#4778EC"></uni-icons>
|
||||
</view>
|
||||
<view class="option-text">社保卡登录</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部信息 -->
|
||||
<view class="footer">
|
||||
<view class="footer-text">© 2024 社保就业服务平台</view>
|
||||
<view class="footer-text">新疆喀什智慧就业平台</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -211,11 +193,12 @@ const handleLogin = async () => {
|
||||
title: '登录成功',
|
||||
icon: 'success'
|
||||
})
|
||||
|
||||
// 跳转到首页
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
// 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'
|
||||
// })
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '登录失败',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom">
|
||||
<view class="nearby-container">
|
||||
<view class="two-head">
|
||||
<view
|
||||
class="head-item"
|
||||
@@ -11,66 +11,68 @@
|
||||
{{ item.commercialAreaName }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="nearby-list">
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
全部
|
||||
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom" lower-threshold="50">
|
||||
<view class="nearby-list">
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
>
|
||||
{{ item.text }}
|
||||
</scroll-view>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
>
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="one-cards">
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
<view class="one-cards">
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 筛选 -->
|
||||
<select-filter ref="selectFilterModel"></select-filter>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -273,9 +275,20 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
<style lang="stylus" scoped>
|
||||
.tabchecked
|
||||
color: #4778EC !important
|
||||
.nearby-scroll
|
||||
|
||||
.nearby-container
|
||||
// 确保容器占据整个可用视口高度,包括安全区域
|
||||
height: calc(100vh - var(--window-top));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
.two-head
|
||||
|
||||
.nearby-scroll
|
||||
// 使用flex布局让scroll-view自适应高度,占据剩余空间
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
.two-head
|
||||
margin: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap
|
||||
@@ -303,7 +316,6 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
.nearby-list
|
||||
border-top: 2rpx solid #EBEBEB;
|
||||
height: 100%
|
||||
.one-cards{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom">
|
||||
<view class="nearby-map" @touchmove.stop.prevent>
|
||||
<view class="nearby-container">
|
||||
<!-- 地图区域 - 可折叠 -->
|
||||
<view
|
||||
class="nearby-map"
|
||||
@touchmove.stop.prevent
|
||||
:class="{ 'map-collapsed': isMapCollapsed }"
|
||||
>
|
||||
<map
|
||||
style="width: 100%; height: 400px"
|
||||
:latitude="latitudeVal"
|
||||
@@ -22,71 +27,79 @@
|
||||
</view>
|
||||
</view>
|
||||
</transition>
|
||||
<!-- <view class="select-list" v-show="!rangeShow">
|
||||
<view class="list-item" v-for="(item, index) in range">{{ item }}km</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="nearby-list">
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<!-- 筛选条件 - 固定显示 -->
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
{{ item.text }}
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="one-cards">
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
>
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 列表滚动区域 -->
|
||||
<scroll-view
|
||||
:scroll-y="true"
|
||||
class="nearby-scroll"
|
||||
@scrolltolower="scrollBottom"
|
||||
lower-threshold="50"
|
||||
ref="scrollViewRef"
|
||||
@scroll="handleScroll"
|
||||
>
|
||||
<view class="nearby-list">
|
||||
<view class="one-cards">
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 筛选 -->
|
||||
<select-filter ref="selectFilterModel"></select-filter>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -107,6 +120,8 @@ const range = ref([1, 2, 4, 6, 8, 10]);
|
||||
const rangeShow = ref(false);
|
||||
|
||||
const selectFilterModel = ref(null);
|
||||
const scrollViewRef = ref(null);
|
||||
const isMapCollapsed = ref(false);
|
||||
const tMap = ref();
|
||||
const progress = ref();
|
||||
const mapCovers = ref([]);
|
||||
@@ -264,6 +279,13 @@ function progressChange(value) {
|
||||
debounceAjax('refresh');
|
||||
}
|
||||
|
||||
// 处理滚动事件,实现地图折叠
|
||||
function handleScroll(e) {
|
||||
const scrollTop = e.detail.scrollTop;
|
||||
// 当滚动超过100rpx时,折叠地图
|
||||
isMapCollapsed.value = scrollTop > 100;
|
||||
}
|
||||
|
||||
let debounceAjax = debounce(getJobList, 500);
|
||||
function getJobList(type = 'add') {
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
@@ -363,78 +385,97 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
}
|
||||
}
|
||||
}
|
||||
.nearby-scroll
|
||||
.nearby-container
|
||||
// 确保容器占据整个可用视口高度,包括安全区域
|
||||
height: calc(100vh - var(--window-top));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
.nearby-map
|
||||
height: 767rpx;
|
||||
background: #e8e8e8;
|
||||
overflow: hidden
|
||||
|
||||
.nearby-map
|
||||
height: 767rpx;
|
||||
background: #e8e8e8;
|
||||
overflow: hidden
|
||||
transition: height 0.3s ease;
|
||||
|
||||
&.map-collapsed {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.nearby-scroll
|
||||
// 使用flex布局让scroll-view自适应高度,占据剩余空间
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
transition: flex 0.3s ease;
|
||||
.nearby-list
|
||||
.one-cards{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
background: #f4f4f4
|
||||
height: 100%
|
||||
}
|
||||
.nav-filter
|
||||
padding: 16rpx 28rpx 0 28rpx
|
||||
.filter-top
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
.tab-scroll
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
.jobs-left
|
||||
display: flex
|
||||
flex-wrap: nowrap
|
||||
.job
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 32rpx;
|
||||
white-space: nowrap
|
||||
.active
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
.jobs-add
|
||||
|
||||
// 筛选条件样式 - 顶级选择器
|
||||
.nav-filter
|
||||
padding: 16rpx 28rpx 0 28rpx
|
||||
background: #ffffff
|
||||
.filter-top
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
.tab-scroll
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
.jobs-left
|
||||
display: flex
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: nowrap
|
||||
.job
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 32rpx;
|
||||
white-space: nowrap
|
||||
.active
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
.jobs-add
|
||||
display: flex
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
line-height: 38rpx;
|
||||
.filter-bottom
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 24rpx 0
|
||||
.btm-left
|
||||
display: flex
|
||||
.filterbtm
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
line-height: 38rpx;
|
||||
.filter-bottom
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 24rpx 0
|
||||
.btm-left
|
||||
display: flex
|
||||
.filterbtm
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 40rpx
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #256BFA;
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
margin-right: 40rpx
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
color: #256BFA;
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom">
|
||||
<view class="nearby-container">
|
||||
<view class="three-head" @touchmove.stop.prevent>
|
||||
<view class="one-picker">
|
||||
<view class="oneleft button-click" @click="openFilterSubway">
|
||||
@@ -48,66 +48,69 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="nearby-list">
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<!-- 筛选项移到scroll-view外面 -->
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
{{ item.text }}
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="one-cards">
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
>
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom" lower-threshold="50">
|
||||
<view class="nearby-list">
|
||||
<view class="one-cards">
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 筛选 -->
|
||||
<select-filter ref="selectFilterModel"></select-filter>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -358,9 +361,18 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
transform: rotate(180deg)
|
||||
.tabchecked
|
||||
color: #4778EC !important;
|
||||
|
||||
.nearby-container
|
||||
// 确保容器占据整个可用高度
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.nearby-scroll
|
||||
overflow: hidden;
|
||||
.three-head
|
||||
// 为scroll-view设置明确高度,减去nav-filter的高度
|
||||
height: calc(100vh - var(--window-top) - var(--status-bar-height) - 63rpx - 200rpx - 120rpx);
|
||||
|
||||
.three-head
|
||||
margin: 24rpx 0 0 0;
|
||||
padding: 26rpx 0 0 0;
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
@@ -482,71 +494,72 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
z-index: 1;
|
||||
.nearby-list
|
||||
border-top: 2rpx solid #EBEBEB;
|
||||
.one-cards{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
background: #f4f4f4
|
||||
}
|
||||
.nav-filter
|
||||
padding: 16rpx 28rpx 0 28rpx
|
||||
.filter-top
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
.tab-scroll
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
.jobs-left
|
||||
display: flex
|
||||
flex-wrap: nowrap
|
||||
.job
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 32rpx;
|
||||
white-space: nowrap
|
||||
.active
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
.jobs-add
|
||||
.nav-filter
|
||||
border-top: 2rpx solid #EBEBEB;
|
||||
padding: 16rpx 28rpx 0 28rpx;
|
||||
margin-top: 125rpx;
|
||||
.filter-top
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
.tab-scroll
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
.jobs-left
|
||||
display: flex
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: nowrap
|
||||
.job
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 32rpx;
|
||||
white-space: nowrap
|
||||
.active
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
.jobs-add
|
||||
display: flex
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
line-height: 38rpx;
|
||||
.filter-bottom
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 24rpx 0
|
||||
.btm-left
|
||||
display: flex
|
||||
.filterbtm
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
line-height: 38rpx;
|
||||
.filter-bottom
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 24rpx 0
|
||||
.btm-left
|
||||
display: flex
|
||||
.filterbtm
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 40rpx
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #256BFA;
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
margin-right: 40rpx
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
color: #256BFA;
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom">
|
||||
<view class="two-head">
|
||||
<view class="nearby-container">
|
||||
<!-- 区县选择区域 - 可折叠 -->
|
||||
<view
|
||||
class="two-head"
|
||||
:class="{ 'area-collapsed': isAreaCollapsed }"
|
||||
>
|
||||
<view
|
||||
class="head-item"
|
||||
:class="{ active: item.value === fromValue.area }"
|
||||
@@ -18,66 +22,72 @@
|
||||
不限区域
|
||||
</view>
|
||||
</view>
|
||||
<view class="nearby-list">
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<!-- 筛选条件 - 固定显示 -->
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
{{ item.text }}
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="one-cards">
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
>
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 列表滚动区域 -->
|
||||
<scroll-view
|
||||
:scroll-y="true"
|
||||
class="nearby-scroll"
|
||||
@scrolltolower="scrollBottom"
|
||||
lower-threshold="50"
|
||||
ref="scrollViewRef"
|
||||
@scroll="handleScroll"
|
||||
>
|
||||
<view class="nearby-list">
|
||||
<view class="one-cards">
|
||||
<renderJobs v-if="list.length" :list="list"></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 筛选 -->
|
||||
<select-filter ref="selectFilterModel"></select-filter>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -103,6 +113,8 @@ const state = reactive({
|
||||
const isLoaded = ref(false);
|
||||
const showFilter = ref(false);
|
||||
const selectFilterModel = ref();
|
||||
const scrollViewRef = ref(null);
|
||||
const isAreaCollapsed = ref(false);
|
||||
const fromValue = reactive({
|
||||
area: 0,
|
||||
});
|
||||
@@ -192,8 +204,20 @@ function scrollBottom() {
|
||||
// }
|
||||
function changeArea(area, item) {
|
||||
fromValue.area = area;
|
||||
// 切换区县时列表置顶
|
||||
if (scrollViewRef.value) {
|
||||
scrollViewRef.value.scrollTop = 0;
|
||||
}
|
||||
getJobList('refresh');
|
||||
}
|
||||
|
||||
// 处理滚动事件,实现区县选择区域折叠
|
||||
function handleScroll(e) {
|
||||
const scrollTop = e.detail.scrollTop;
|
||||
// 当滚动超过100rpx时,折叠区县选择区域
|
||||
isAreaCollapsed.value = scrollTop > 100;
|
||||
console.log('scrollTop:', scrollTop, 'collapsed:', isAreaCollapsed.value);
|
||||
}
|
||||
function getJobList(type = 'add') {
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
@@ -254,13 +278,32 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
<style lang="stylus" scoped>
|
||||
.tabchecked
|
||||
color: #4778EC !important
|
||||
.nearby-scroll
|
||||
|
||||
.nearby-container
|
||||
// 确保容器占据整个可用视口高度,包括安全区域
|
||||
height: calc(100vh - var(--window-top));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
.two-head
|
||||
|
||||
.nearby-scroll
|
||||
// 使用flex布局让scroll-view自适应高度,占据剩余空间
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
.two-head
|
||||
margin: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap
|
||||
// grid-template-columns: repeat(4, 1fr);
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&.area-collapsed {
|
||||
height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
// grid-column-gap: 10rpx;
|
||||
// grid-row-gap: 24rpx;
|
||||
|
||||
@@ -291,64 +334,67 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
background: #f4f4f4
|
||||
}
|
||||
.nav-filter
|
||||
padding: 16rpx 28rpx 0 28rpx
|
||||
.filter-top
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
.tab-scroll
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
.jobs-left
|
||||
display: flex
|
||||
flex-wrap: nowrap
|
||||
.job
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 32rpx;
|
||||
white-space: nowrap
|
||||
.active
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
.jobs-add
|
||||
|
||||
// 筛选条件样式 - 顶级选择器
|
||||
.nav-filter
|
||||
padding: 16rpx 28rpx 0 28rpx
|
||||
background: #ffffff
|
||||
.filter-top
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
.tab-scroll
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
.jobs-left
|
||||
display: flex
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: nowrap
|
||||
.job
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 32rpx;
|
||||
white-space: nowrap
|
||||
.active
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
.jobs-add
|
||||
display: flex
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
line-height: 38rpx;
|
||||
.filter-bottom
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 24rpx 0
|
||||
.btm-left
|
||||
display: flex
|
||||
.filterbtm
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
line-height: 38rpx;
|
||||
.filter-bottom
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 24rpx 0
|
||||
.btm-left
|
||||
display: flex
|
||||
.filterbtm
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 40rpx
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #256BFA;
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
margin-right: 40rpx
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
color: #256BFA;
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
</style>
|
||||
|
||||
@@ -132,4 +132,5 @@ image {
|
||||
.swiper-item
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
</style>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<view class="container safe-area-top">
|
||||
<view>
|
||||
<!-- 自定义头部搜索框 -->
|
||||
<view class="custom-header">
|
||||
<view class="top">
|
||||
<image class="btnback button-click" src="@/static/icon/back.png" @click="navBack"></image>
|
||||
<!-- <image class="btnback button-click" src="@/static/icon/back.png" @click="navBack"></image> -->
|
||||
<view class="search-box">
|
||||
<uni-icons
|
||||
class="iconsearch"
|
||||
color="#666666"
|
||||
type="search"
|
||||
size="18"
|
||||
@confirm="searchCollection"
|
||||
></uni-icons>
|
||||
<input
|
||||
class="inputed"
|
||||
@@ -200,61 +200,16 @@ function dataToImg(data) {
|
||||
display: flex
|
||||
flex-direction: column
|
||||
background: #F4f4f4
|
||||
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
|
||||
.view-top{
|
||||
display: flex;
|
||||
justify-content: space-around
|
||||
background: #FFFFFF;
|
||||
.top-item{
|
||||
padding: 6rpx 0 18rpx 0
|
||||
}
|
||||
.active{
|
||||
color: #256BFA;
|
||||
font-weight: 500;
|
||||
position: relative;
|
||||
}
|
||||
.active::after{
|
||||
position: absolute;
|
||||
content: ''
|
||||
left: calc(50% - 12rpx)
|
||||
bottom: 10rpx
|
||||
width: 24rpx
|
||||
height: 6rpx
|
||||
background: #256BFA
|
||||
}
|
||||
}
|
||||
.main-content{
|
||||
background: #FFFFFF
|
||||
height: 100%
|
||||
.content-top{
|
||||
padding: 28rpx
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
align-items: center
|
||||
.top-left{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
}
|
||||
.content-history{
|
||||
padding: 0 28rpx;
|
||||
display: flex
|
||||
flex-wrap: wrap
|
||||
.history-tag{
|
||||
margin-right: 40rpx
|
||||
margin-bottom: 20rpx
|
||||
white-space: nowrap
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
background: #F5F5F5;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
width: fit-content;
|
||||
padding: 12rpx 20rpx
|
||||
}
|
||||
}
|
||||
height: 100vh;
|
||||
.custom-header {
|
||||
background-color: #fff;
|
||||
padding:0;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
.top {
|
||||
display: flex;
|
||||
@@ -262,8 +217,6 @@ function dataToImg(data) {
|
||||
justify-content: space-between
|
||||
background-color: #fff;
|
||||
padding: 20rpx 20rpx;
|
||||
position: sticky;
|
||||
top: 0
|
||||
.btnback{
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
@@ -304,6 +257,45 @@ function dataToImg(data) {
|
||||
color: #256BFA;
|
||||
}
|
||||
}
|
||||
.main-content{
|
||||
background: #FFFFFF
|
||||
height: 100%
|
||||
margin-top: 140rpx;
|
||||
.content-top{
|
||||
padding: 28rpx
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
align-items: center
|
||||
.top-left{
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
}
|
||||
.content-history{
|
||||
padding: 0 28rpx;
|
||||
display: flex
|
||||
flex-wrap: wrap
|
||||
.history-tag{
|
||||
margin-right: 40rpx
|
||||
margin-bottom: 20rpx
|
||||
white-space: nowrap
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
background: #F5F5F5;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
width: fit-content;
|
||||
padding: 12rpx 20rpx
|
||||
}
|
||||
}
|
||||
}
|
||||
.Detailscroll-view{
|
||||
flex: 1
|
||||
overflow: hidden
|
||||
margin-top: 140rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.slot-item
|
||||
|
||||
@@ -49,10 +49,8 @@
|
||||
/>
|
||||
<SkillDevelopment
|
||||
v-else
|
||||
:current-job-skills="recommendSkillsData.currentJobSkills"
|
||||
:recommended-jobs="recommendSkillsData.recommendedJobs"
|
||||
:path-data="pathSkillsData.pathData"
|
||||
:target-career="pathSkillsData.targetCareer"
|
||||
:current-job-name="currentJobName"
|
||||
@path-data-updated="handlePathDataUpdated"
|
||||
/>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -66,8 +64,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, inject, nextTick, onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { getJobSkillDetail } from '@/apiRc/jobSkill.js';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { appUserInfo } from '@/apiRc/user/user.js';
|
||||
import RemindPopup from './components/RemindPopup.vue';
|
||||
import PageHeader from './components/PageHeader.vue';
|
||||
@@ -146,6 +143,11 @@ function openRemindPopup() {
|
||||
|
||||
// 检查用户是否完善了个人信息(调用接口获取)
|
||||
let hasCheckedRemindInfo = false;
|
||||
// 保存缺失信息的标识
|
||||
const missingInfo = ref({
|
||||
hasJobInfo: false,
|
||||
hasSkills: false
|
||||
});
|
||||
|
||||
async function getRemindInfo() {
|
||||
if (hasCheckedRemindInfo) {
|
||||
@@ -158,53 +160,72 @@ async function getRemindInfo() {
|
||||
const response = await appUserInfo();
|
||||
const userInfo = response?.data || {};
|
||||
|
||||
// 优先从接口数据中获取 idCard
|
||||
// 检查 idCard(身份证)- 必须项
|
||||
let idCard = userInfo?.resume?.idCard ?? userInfo?.idCard ?? null;
|
||||
|
||||
// 如果接口返回的数据中没有 idCard,则从缓存中读取
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
if (!idCard || idCard === null || idCard === '') {
|
||||
idCard = cachedUserInfo?.resume?.idCard ?? cachedUserInfo?.idCard ?? null;
|
||||
}
|
||||
|
||||
// 优先从接口数据中获取职位信息
|
||||
currentJobId.value = userInfo?.jobId ??
|
||||
userInfo?.currentJobId ??
|
||||
userInfo?.resume?.jobId ??
|
||||
userInfo?.resume?.currentJobId ??
|
||||
null;
|
||||
currentJobName.value = userInfo?.jobName ??
|
||||
userInfo?.currentJobName ??
|
||||
userInfo?.resume?.jobName ??
|
||||
userInfo?.resume?.currentJobName ??
|
||||
'';
|
||||
|
||||
// 如果接口数据中没有职位信息,从缓存中读取
|
||||
if (!currentJobId.value && !currentJobName.value) {
|
||||
currentJobId.value = cachedUserInfo?.jobId ??
|
||||
cachedUserInfo?.currentJobId ??
|
||||
cachedUserInfo?.resume?.jobId ??
|
||||
cachedUserInfo?.resume?.currentJobId ??
|
||||
null;
|
||||
currentJobName.value = cachedUserInfo?.jobName ??
|
||||
cachedUserInfo?.currentJobName ??
|
||||
cachedUserInfo?.resume?.jobName ??
|
||||
cachedUserInfo?.resume?.currentJobName ??
|
||||
'';
|
||||
}
|
||||
|
||||
// 如果还是没有职位信息,使用默认值
|
||||
if (!currentJobName.value) {
|
||||
currentJobName.value = '市场专员';
|
||||
}
|
||||
|
||||
// 判断 idCard 是否存在(包括空字符串、undefined、null 的情况)
|
||||
const hasIdCard = idCard !== null && idCard !== undefined && idCard !== '';
|
||||
|
||||
if (!hasIdCard) {
|
||||
remindList.value = ['请完善个人信息'];
|
||||
// 检查职位信息:优先从 jobTitles 数组获取
|
||||
const jobTitles = Array.isArray(userInfo?.jobTitles) ? userInfo.jobTitles : [];
|
||||
const hasJobTitle = jobTitles.length > 0;
|
||||
|
||||
// 如果 jobTitles 为空,尝试从其他字段获取
|
||||
let jobName = '';
|
||||
if (!hasJobTitle) {
|
||||
jobName = userInfo?.jobName ??
|
||||
userInfo?.currentJobName ??
|
||||
userInfo?.resume?.jobName ??
|
||||
userInfo?.resume?.currentJobName ??
|
||||
'';
|
||||
}
|
||||
const hasJobInfo = hasJobTitle || (jobName && jobName.trim() !== '');
|
||||
|
||||
// 检查技能标签:从 appSkillsList 获取
|
||||
const appSkillsList = Array.isArray(userInfo?.appSkillsList) ? userInfo.appSkillsList : [];
|
||||
// 检查是否有有效的技能(name 或 nameStr 不为空)
|
||||
const hasSkills = appSkillsList.some(skill => {
|
||||
const skillName = skill?.name || skill?.nameStr;
|
||||
return skillName && skillName.trim() !== '';
|
||||
});
|
||||
|
||||
// 保存缺失信息标识(只保存职位信息和技能标签,身份证信息跳转到个人信息页面)
|
||||
missingInfo.value.hasJobInfo = hasJobInfo;
|
||||
missingInfo.value.hasSkills = hasSkills;
|
||||
|
||||
// 判断信息是否完整(idCard、职位信息、技能标签都必须有)
|
||||
const isComplete = hasIdCard && hasJobInfo && hasSkills;
|
||||
|
||||
if (!isComplete) {
|
||||
// 收集缺失的信息提示
|
||||
const missingItems = [];
|
||||
if (!hasIdCard) {
|
||||
missingItems.push('身份证信息');
|
||||
}
|
||||
if (!hasJobInfo) {
|
||||
missingItems.push('职位信息');
|
||||
}
|
||||
if (!hasSkills) {
|
||||
missingItems.push('技能标签');
|
||||
}
|
||||
remindList.value = [`请完善${missingItems.join('、')}`];
|
||||
} else {
|
||||
remindList.value = ['暂无待完善信息'];
|
||||
// 信息完整,设置职位信息
|
||||
if (hasJobTitle) {
|
||||
currentJobName.value = jobTitles[0];
|
||||
} else {
|
||||
currentJobName.value = jobName;
|
||||
currentJobId.value = userInfo?.jobId ??
|
||||
userInfo?.currentJobId ??
|
||||
userInfo?.resume?.jobId ??
|
||||
userInfo?.resume?.currentJobId ??
|
||||
null;
|
||||
}
|
||||
// 信息完整,直接显示页面内容
|
||||
showContent.value = true;
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -213,28 +234,66 @@ async function getRemindInfo() {
|
||||
} catch (error) {
|
||||
// 接口调用失败时,使用缓存作为降级方案
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
|
||||
// 检查 idCard
|
||||
const idCard = cachedUserInfo?.resume?.idCard ?? cachedUserInfo?.idCard ?? null;
|
||||
const hasIdCard = idCard !== null && idCard !== undefined && idCard !== '';
|
||||
|
||||
// 从缓存中获取职位信息
|
||||
currentJobId.value = cachedUserInfo?.jobId ??
|
||||
cachedUserInfo?.currentJobId ??
|
||||
cachedUserInfo?.resume?.jobId ??
|
||||
cachedUserInfo?.resume?.currentJobId ??
|
||||
null;
|
||||
currentJobName.value = cachedUserInfo?.jobName ??
|
||||
cachedUserInfo?.currentJobName ??
|
||||
cachedUserInfo?.resume?.jobName ??
|
||||
cachedUserInfo?.resume?.currentJobName ??
|
||||
'';
|
||||
// 如果缓存中没有职位信息,使用默认值
|
||||
if (!currentJobName.value) {
|
||||
currentJobName.value = '市场专员';
|
||||
// 检查职位信息
|
||||
const cachedJobTitles = Array.isArray(cachedUserInfo?.jobTitles) ? cachedUserInfo.jobTitles : [];
|
||||
const hasJobTitle = cachedJobTitles.length > 0;
|
||||
let jobName = '';
|
||||
if (!hasJobTitle) {
|
||||
jobName = cachedUserInfo?.jobName ??
|
||||
cachedUserInfo?.currentJobName ??
|
||||
cachedUserInfo?.resume?.jobName ??
|
||||
cachedUserInfo?.resume?.currentJobName ??
|
||||
'';
|
||||
}
|
||||
const hasJobInfo = hasJobTitle || (jobName && jobName.trim() !== '');
|
||||
|
||||
if (!idCard || idCard === null || idCard === '') {
|
||||
remindList.value = ['请完善个人信息'];
|
||||
// 检查技能标签
|
||||
const cachedAppSkillsList = Array.isArray(cachedUserInfo?.appSkillsList) ? cachedUserInfo.appSkillsList : [];
|
||||
const hasSkills = cachedAppSkillsList.some(skill => {
|
||||
const skillName = skill?.name || skill?.nameStr;
|
||||
return skillName && skillName.trim() !== '';
|
||||
});
|
||||
|
||||
// 保存缺失信息标识
|
||||
missingInfo.value.hasJobInfo = hasJobInfo;
|
||||
missingInfo.value.hasSkills = hasSkills;
|
||||
|
||||
// 判断信息是否完整(idCard、职位信息、技能标签都必须有)
|
||||
const isComplete = hasIdCard && hasJobInfo && hasSkills;
|
||||
|
||||
if (!isComplete) {
|
||||
// 收集缺失的信息提示
|
||||
const missingItems = [];
|
||||
if (!hasIdCard) {
|
||||
missingItems.push('身份证信息');
|
||||
}
|
||||
if (!hasJobInfo) {
|
||||
missingItems.push('职位信息');
|
||||
}
|
||||
if (!hasSkills) {
|
||||
missingItems.push('技能标签');
|
||||
}
|
||||
remindList.value = [`请完善${missingItems.join('、')}`];
|
||||
} else {
|
||||
remindList.value = ['暂无待完善信息'];
|
||||
// 信息完整,设置职位信息
|
||||
if (hasJobTitle) {
|
||||
currentJobName.value = cachedJobTitles[0];
|
||||
} else {
|
||||
currentJobName.value = jobName;
|
||||
currentJobId.value = cachedUserInfo?.jobId ??
|
||||
cachedUserInfo?.currentJobId ??
|
||||
cachedUserInfo?.resume?.jobId ??
|
||||
cachedUserInfo?.resume?.currentJobId ??
|
||||
null;
|
||||
}
|
||||
// 信息完整,直接显示页面内容
|
||||
showContent.value = true;
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -253,44 +312,25 @@ function handleCancel() {
|
||||
async function handleConfirm() {
|
||||
remindPopup.value?.close();
|
||||
|
||||
// 直接从缓存中读取 idCard(因为接口返回的数据中没有 idCard)
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
let idCard = cachedUserInfo?.resume?.idCard ?? cachedUserInfo?.idCard ?? null;
|
||||
const { hasJobInfo, hasSkills } = missingInfo.value;
|
||||
|
||||
// 如果缓存中也没有,尝试从接口获取(虽然接口通常也没有)
|
||||
if (!idCard || idCard === null || idCard === '') {
|
||||
try {
|
||||
const response = await appUserInfo();
|
||||
const userInfo = response?.data || {};
|
||||
idCard = userInfo?.resume?.idCard ?? userInfo?.idCard ?? null;
|
||||
} catch (error) {
|
||||
// 接口调用失败,继续使用缓存数据
|
||||
}
|
||||
// 如果同时缺少职位信息和技能标签:先跳转到职位信息页面,并传递参数表示完成后需要继续跳转到技能页面
|
||||
if (!hasJobInfo && !hasSkills) {
|
||||
// 跳转到职位信息页面,传递参数表示完成后需要继续跳转到技能页面
|
||||
navTo('/packageA/pages/jobExpect/jobExpect?needSkill=true');
|
||||
}
|
||||
// 如果只缺少技能标签:直接跳转到技能页面(个人信息页面的技能部分)
|
||||
else if (!hasSkills) {
|
||||
navTo('/packageA/pages/personalInfo/personalInfo');
|
||||
}
|
||||
// 如果只缺少职位信息:直接跳转到职位信息页面
|
||||
else if (!hasJobInfo) {
|
||||
navTo('/packageA/pages/jobExpect/jobExpect');
|
||||
}
|
||||
|
||||
// 如果 idCard 为空,才跳转到完善信息页面
|
||||
if (!idCard || idCard === null || idCard === '') {
|
||||
navTo('/pages/complete-info/complete-info');
|
||||
return;
|
||||
// 如果只缺少身份证信息:跳转到个人信息页面
|
||||
else {
|
||||
navTo('/packageA/pages/personalInfo/personalInfo');
|
||||
}
|
||||
|
||||
// 如果 idCard 存在,说明已经完善了信息,直接显示页面内容
|
||||
// 从缓存中更新职位信息
|
||||
currentJobId.value = cachedUserInfo?.jobId ??
|
||||
cachedUserInfo?.currentJobId ??
|
||||
cachedUserInfo?.resume?.jobId ??
|
||||
cachedUserInfo?.resume?.currentJobId ??
|
||||
null;
|
||||
currentJobName.value = cachedUserInfo?.jobName ??
|
||||
cachedUserInfo?.currentJobName ??
|
||||
cachedUserInfo?.resume?.jobName ??
|
||||
cachedUserInfo?.resume?.currentJobName ??
|
||||
'';
|
||||
if (!currentJobName.value) {
|
||||
currentJobName.value = '市场专员';
|
||||
}
|
||||
|
||||
showContent.value = true;
|
||||
}
|
||||
|
||||
// 切换tab
|
||||
@@ -300,19 +340,28 @@ function switchTab(index) {
|
||||
if (index === 0 && !currentJobId.value) {
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
|
||||
// 优先从缓存中的 jobTitles 数组获取职位信息(取第一个)
|
||||
const cachedJobTitles = Array.isArray(cachedUserInfo?.jobTitles) ? cachedUserInfo.jobTitles : [];
|
||||
let newJobName = '';
|
||||
|
||||
if (cachedJobTitles.length > 0) {
|
||||
newJobName = cachedJobTitles[0];
|
||||
} else {
|
||||
// 如果缓存中没有 jobTitles,从其他字段获取
|
||||
newJobName = currentJobName.value ||
|
||||
(cachedUserInfo?.jobName ??
|
||||
cachedUserInfo?.currentJobName ??
|
||||
cachedUserInfo?.resume?.jobName ??
|
||||
cachedUserInfo?.resume?.currentJobName ??
|
||||
'市场专员');
|
||||
}
|
||||
|
||||
const newJobId = cachedUserInfo?.jobId ??
|
||||
cachedUserInfo?.currentJobId ??
|
||||
cachedUserInfo?.resume?.jobId ??
|
||||
cachedUserInfo?.resume?.currentJobId ??
|
||||
null;
|
||||
|
||||
const newJobName = currentJobName.value ||
|
||||
(cachedUserInfo?.jobName ??
|
||||
cachedUserInfo?.currentJobName ??
|
||||
cachedUserInfo?.resume?.jobName ??
|
||||
cachedUserInfo?.resume?.currentJobName ??
|
||||
'市场专员');
|
||||
|
||||
currentJobId.value = newJobId;
|
||||
currentJobName.value = newJobName;
|
||||
}
|
||||
@@ -383,23 +432,23 @@ async function handleJobCardClick(job) {
|
||||
mask: true
|
||||
});
|
||||
|
||||
const fallbackSkills = Array.isArray(job?.rawSkills) ? job.rawSkills : [];
|
||||
const params = {};
|
||||
if (job?.jobId) {
|
||||
params.jobId = job.jobId;
|
||||
}
|
||||
if (job?.title) {
|
||||
params.jobName = job.title;
|
||||
} else if (job?.jobName) {
|
||||
params.jobName = job.jobName;
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await getJobSkillDetail(params);
|
||||
const skillList = Array.isArray(response?.data) ? response.data : [];
|
||||
// 从 appUserInfo 接口获取技能数据
|
||||
const response = await appUserInfo();
|
||||
const userInfo = response?.data || {};
|
||||
const appSkillsList = Array.isArray(userInfo?.appSkillsList) ? userInfo.appSkillsList : [];
|
||||
|
||||
// 将 appSkillsList 转换为 splitSkillListByScore 需要的格式
|
||||
const skillList = appSkillsList.map(item => ({
|
||||
skillName: item?.name || item?.nameStr || '',
|
||||
skillScore: item?.levels || item?.levelStr || 0
|
||||
})).filter(item => item.skillName);
|
||||
|
||||
const { possessed, improvement } = splitSkillListByScore(skillList);
|
||||
|
||||
if (possessed.length === 0 && improvement.length === 0) {
|
||||
// 如果 appUserInfo 中没有技能数据,尝试使用推荐职位数据中的技能信息
|
||||
const fallbackSkills = Array.isArray(job?.rawSkills) ? job.rawSkills : [];
|
||||
if (fallbackSkills.length === 0) {
|
||||
uni.showToast({
|
||||
title: '暂无技能数据',
|
||||
@@ -416,6 +465,8 @@ async function handleJobCardClick(job) {
|
||||
}
|
||||
skillDetailPopup.value?.open();
|
||||
} catch (error) {
|
||||
// 接口调用失败,尝试使用推荐职位数据中的技能信息
|
||||
const fallbackSkills = Array.isArray(job?.rawSkills) ? job.rawSkills : [];
|
||||
if (fallbackSkills.length > 0) {
|
||||
const fallbackSplit = splitSkillListByScore(fallbackSkills);
|
||||
selectedJobPossessedSkills.value = fallbackSplit.possessed;
|
||||
@@ -462,6 +513,14 @@ onLoad(() => {
|
||||
getRemindInfo();
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
// 返回本页后,如果之前因为信息缺失未展示内容,则重新检查
|
||||
if (!showContent.value) {
|
||||
hasCheckedRemindInfo = false;
|
||||
getRemindInfo();
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
if (remindList.value.length > 0 && !showContent.value) {
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
{{ skill }}
|
||||
</view>
|
||||
<text v-if="!skillTags.length && !isLoadingSkillTags" class="empty-text">暂无技能数据</text>
|
||||
<text v-if="isLoadingSkillTags" class="empty-text">加载中...</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -35,7 +36,6 @@
|
||||
:key="index"
|
||||
@click="handleJobCardClick(job)"
|
||||
>
|
||||
<button class="search-btn" @click.stop="handleJobSearch(job)">职位搜索</button>
|
||||
<view class="job-header">
|
||||
<text class="job-title">{{ job.title }}</text>
|
||||
</view>
|
||||
@@ -55,7 +55,7 @@
|
||||
<script setup>
|
||||
import { ref, computed, watch, onMounted } from 'vue';
|
||||
import { recommendJob } from '@/apiRc/jobRecommend.js';
|
||||
import { getJobSkillDetail } from '@/apiRc/jobSkill.js';
|
||||
import { appUserInfo } from '@/apiRc/user/user.js';
|
||||
|
||||
const props = defineProps({
|
||||
currentJobId: {
|
||||
@@ -79,7 +79,14 @@ const isLoadingRecommend = ref(false);
|
||||
// 计算属性
|
||||
const currentJobDisplay = computed(() => props.currentJobName || '市场专员');
|
||||
|
||||
// 从技能列表中提取技能名称用于显示
|
||||
// 从 appSkillsList 中提取技能名称
|
||||
function extractSkillsFromAppSkillsList(appSkillsList = []) {
|
||||
return (Array.isArray(appSkillsList) ? appSkillsList : [])
|
||||
.map(item => item?.name || item?.nameStr || '')
|
||||
.filter(name => !!name && name.trim().length > 0);
|
||||
}
|
||||
|
||||
// 从技能列表中提取技能名称用于显示(用于推荐职位数据)
|
||||
function extractSkillNames(skillList = []) {
|
||||
return (Array.isArray(skillList) ? skillList : [])
|
||||
.map(item => item?.skillName || '')
|
||||
@@ -88,38 +95,15 @@ function extractSkillNames(skillList = []) {
|
||||
|
||||
// 获取当前职位的技能标签
|
||||
async function fetchCurrentJobSkills() {
|
||||
// 如果没有职位名称,从缓存中获取技能标签
|
||||
if (!props.currentJobName || props.currentJobName === '市场专员') {
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
const cachedSkills = cachedUserInfo?.resume?.skillList ??
|
||||
cachedUserInfo?.skillList ??
|
||||
cachedUserInfo?.appSkillsList ??
|
||||
[];
|
||||
|
||||
// 如果缓存中有技能数据,使用缓存的数据
|
||||
if (Array.isArray(cachedSkills) && cachedSkills.length > 0) {
|
||||
skillTags.value = extractSkillNames(cachedSkills);
|
||||
} else {
|
||||
skillTags.value = [];
|
||||
}
|
||||
|
||||
// 通知父组件技能数据已更新
|
||||
emit('skills-updated', {
|
||||
currentJobSkills: skillTags.value,
|
||||
recommendedJobs: recommendedJobs.value
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 优先调用接口获取技能数据
|
||||
isLoadingSkillTags.value = true;
|
||||
try {
|
||||
const response = await getJobSkillDetail({
|
||||
jobName: props.currentJobName
|
||||
});
|
||||
// 优先从 appUserInfo 接口获取技能标签
|
||||
const response = await appUserInfo();
|
||||
const userInfo = response?.data || {};
|
||||
|
||||
const skillList = Array.isArray(response?.data) ? response.data : [];
|
||||
const apiSkills = extractSkillNames(skillList);
|
||||
// 从 appSkillsList 中提取技能名称
|
||||
const appSkillsList = Array.isArray(userInfo?.appSkillsList) ? userInfo.appSkillsList : [];
|
||||
const apiSkills = extractSkillsFromAppSkillsList(appSkillsList);
|
||||
|
||||
// 如果接口返回了技能数据,使用接口数据
|
||||
if (apiSkills.length > 0) {
|
||||
@@ -127,13 +111,11 @@ async function fetchCurrentJobSkills() {
|
||||
} else {
|
||||
// 如果接口没有返回技能数据,从缓存中读取
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
const cachedSkills = cachedUserInfo?.resume?.skillList ??
|
||||
cachedUserInfo?.skillList ??
|
||||
cachedUserInfo?.appSkillsList ??
|
||||
[];
|
||||
const cachedAppSkills = Array.isArray(cachedUserInfo?.appSkillsList) ? cachedUserInfo.appSkillsList : [];
|
||||
const cachedSkills = extractSkillsFromAppSkillsList(cachedAppSkills);
|
||||
|
||||
if (Array.isArray(cachedSkills) && cachedSkills.length > 0) {
|
||||
skillTags.value = extractSkillNames(cachedSkills);
|
||||
if (cachedSkills.length > 0) {
|
||||
skillTags.value = cachedSkills;
|
||||
} else {
|
||||
skillTags.value = [];
|
||||
}
|
||||
@@ -145,15 +127,13 @@ async function fetchCurrentJobSkills() {
|
||||
recommendedJobs: recommendedJobs.value
|
||||
});
|
||||
} catch (error) {
|
||||
// 接口调用失败时,从缓存中读取
|
||||
// appUserInfo 接口调用失败时,从缓存中读取
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
const cachedSkills = cachedUserInfo?.resume?.skillList ??
|
||||
cachedUserInfo?.skillList ??
|
||||
cachedUserInfo?.appSkillsList ??
|
||||
[];
|
||||
const cachedAppSkills = Array.isArray(cachedUserInfo?.appSkillsList) ? cachedUserInfo.appSkillsList : [];
|
||||
const cachedSkills = extractSkillsFromAppSkillsList(cachedAppSkills);
|
||||
|
||||
if (Array.isArray(cachedSkills) && cachedSkills.length > 0) {
|
||||
skillTags.value = extractSkillNames(cachedSkills);
|
||||
if (cachedSkills.length > 0) {
|
||||
skillTags.value = cachedSkills;
|
||||
} else {
|
||||
skillTags.value = [];
|
||||
}
|
||||
@@ -221,17 +201,15 @@ onMounted(() => {
|
||||
watch(
|
||||
() => [props.currentJobId, props.currentJobName],
|
||||
() => {
|
||||
fetchCurrentJobSkills();
|
||||
fetchRecommendedJobs();
|
||||
if (props.currentJobName) {
|
||||
fetchCurrentJobSkills();
|
||||
fetchRecommendedJobs();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
// 事件处理
|
||||
function handleJobSearch(job) {
|
||||
// TODO: 实现职位搜索跳转
|
||||
}
|
||||
|
||||
function handleJobCardClick(job) {
|
||||
emit('job-card-click', job);
|
||||
}
|
||||
@@ -315,24 +293,8 @@ function handleJobCardClick(job) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
position: absolute;
|
||||
top: 16rpx;
|
||||
right: 16rpx;
|
||||
background-color: #FFDAB9;
|
||||
color: #FF6347;
|
||||
font-size: 20rpx;
|
||||
padding: 6rpx 14rpx;
|
||||
border-radius: 6rpx;
|
||||
border: 1rpx solid #FFA07A;
|
||||
white-space: nowrap;
|
||||
z-index: 10;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.job-header {
|
||||
margin-bottom: 16rpx;
|
||||
padding-right: 100rpx;
|
||||
}
|
||||
|
||||
.job-title {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="page-header">
|
||||
<view class="page-header" :style="{ paddingTop: statusBarHeight > 0 ? `calc(40rpx + ${statusBarHeight * 2}rpx)` : '40rpx' }">
|
||||
<view class="header-top">
|
||||
<view class="title-section">
|
||||
<text class="main-title">职业规划推荐指导平台</text>
|
||||
@@ -54,7 +54,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps, defineEmits } from 'vue';
|
||||
import { defineProps, defineEmits, ref, onMounted } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
activeTab: {
|
||||
@@ -65,6 +65,18 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(['tab-change', 'search-click', 'menu-click', 'more-click']);
|
||||
|
||||
// 状态栏高度
|
||||
const statusBarHeight = ref(0);
|
||||
|
||||
onMounted(() => {
|
||||
try {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
statusBarHeight.value = systemInfo.statusBarHeight || 0;
|
||||
} catch (error) {
|
||||
statusBarHeight.value = 0;
|
||||
}
|
||||
});
|
||||
|
||||
function handleTabClick(index) {
|
||||
emit('tab-change', index);
|
||||
}
|
||||
@@ -86,6 +98,12 @@ function handleMoreClick() {
|
||||
.page-header {
|
||||
padding: 40rpx 28rpx 0;
|
||||
flex-shrink: 0;
|
||||
/* #ifdef MP-WEIXIN */
|
||||
padding-top: calc(40rpx + env(safe-area-inset-top));
|
||||
/* #endif */
|
||||
/* #ifdef H5 */
|
||||
padding-top: calc(40rpx + var(--status-bar-height, 0px));
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.header-top {
|
||||
|
||||
@@ -1,5 +1,52 @@
|
||||
<template>
|
||||
<view class="skill-development">
|
||||
<!-- 职业技能查询区域 -->
|
||||
<view class="query-section">
|
||||
<view class="section-title">
|
||||
<uni-icons type="search" size="18" color="#286BFA"></uni-icons>
|
||||
<text class="title-text">职业技能查询</text>
|
||||
</view>
|
||||
|
||||
<view class="input-group">
|
||||
<view class="input-item">
|
||||
<text class="input-label">当前职位</text>
|
||||
<input
|
||||
class="input-field"
|
||||
:value="currentPosition"
|
||||
placeholder="市场专员"
|
||||
placeholder-style="color: #999999"
|
||||
disabled
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="input-item">
|
||||
<text class="input-label">目标职业</text>
|
||||
<picker
|
||||
mode="selector"
|
||||
:range="targetCareerOptions"
|
||||
range-key="label"
|
||||
:value="selectedTargetIndex"
|
||||
@change="handleTargetChange"
|
||||
>
|
||||
<view class="picker-field">
|
||||
<text :class="selectedTargetIndex >= 0 ? 'picker-text' : 'picker-placeholder'">
|
||||
{{ selectedTargetIndex >= 0 ? targetCareerOptions[selectedTargetIndex].label : '请选择目标职业' }}
|
||||
</text>
|
||||
<uni-icons type="arrowdown" size="16" color="#999999"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button class="query-btn" @click="handleQuery">
|
||||
<text>查询技能发展路径</text>
|
||||
<uni-icons type="search" size="18" color="#FFFFFF"></uni-icons>
|
||||
</button>
|
||||
<view v-if="totalPathCount > 0" class="path-summary">
|
||||
系统已收录 {{ totalPathCount }} 条职业路径
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-section">
|
||||
<view class="section-title">
|
||||
<uni-icons type="person-filled" size="18" color="#000000"></uni-icons>
|
||||
@@ -11,17 +58,23 @@
|
||||
</view>
|
||||
|
||||
<view class="skill-list">
|
||||
<view v-if="isLoadingSkills" class="empty-text">加载中...</view>
|
||||
<view v-else-if="!hasQueried" class="empty-text">请先查询职业路径以获取技能发展数据</view>
|
||||
<view v-else-if="skillList.length === 0" class="empty-text">暂无数据</view>
|
||||
<view
|
||||
v-else
|
||||
class="skill-item"
|
||||
v-for="(skill, index) in skillList"
|
||||
:key="index"
|
||||
@click="handleSkillItemClick(skill)"
|
||||
>
|
||||
<view class="skill-header">
|
||||
<text class="skill-name">{{ skill.name }}</text>
|
||||
<text class="skill-weight">权重: {{ skill.weight }}</text>
|
||||
<view class="skill-info">
|
||||
<text class="skill-score">技能分数: {{ skill.score }}</text>
|
||||
<text class="skill-weight">权重: {{ skill.weight }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="skill-tags">
|
||||
<view class="skill-tags" v-if="skill.tags && skill.tags.length > 0">
|
||||
<view
|
||||
class="skill-tag"
|
||||
v-for="(tag, tagIndex) in skill.tags"
|
||||
@@ -33,151 +86,395 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 技能权重弹出层 -->
|
||||
<SkillWeightPopup
|
||||
ref="skillWeightPopup"
|
||||
:skill-name="selectedSkillName"
|
||||
:weight="selectedSkillWeight"
|
||||
:current-level="selectedSkillLevel"
|
||||
@close="handlePopupClose"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import SkillWeightPopup from './SkillWeightPopup.vue';
|
||||
import { ref, computed, watch, onMounted } from 'vue';
|
||||
import { getJobPathPage, getJobPathDetail, getJobPathNum } from '@/apiRc/jobPath.js';
|
||||
import { getJobSkillWeight } from '@/apiRc/jobSkill.js';
|
||||
|
||||
const props = defineProps({
|
||||
// 来自职业推荐 tab 的数据
|
||||
currentJobSkills: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
recommendedJobs: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
// 来自职业路径 tab 的数据
|
||||
pathData: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
start: { title: '', skills: [] },
|
||||
steps: [],
|
||||
end: { title: '', skills: [] }
|
||||
})
|
||||
},
|
||||
targetCareer: {
|
||||
// 当前职位名称
|
||||
currentJobName: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
});
|
||||
|
||||
// 综合技能列表(基于前两个 tab 的数据)
|
||||
const skillList = computed(() => {
|
||||
const skillMap = new Map();
|
||||
|
||||
// 1. 收集当前职位技能(已有技能,权重较低)
|
||||
props.currentJobSkills.forEach(skill => {
|
||||
if (skill && skill.trim()) {
|
||||
const existing = skillMap.get(skill) || { name: skill, weight: 0, tags: [], currentLevel: 0 };
|
||||
existing.weight = Math.max(existing.weight, 0.3); // 已有技能权重较低
|
||||
existing.tags.push('当前技能');
|
||||
skillMap.set(skill, existing);
|
||||
}
|
||||
});
|
||||
|
||||
// 2. 收集推荐职位的技能(需要发展的技能,权重较高)
|
||||
props.recommendedJobs.forEach(job => {
|
||||
if (Array.isArray(job.skills)) {
|
||||
job.skills.forEach(skill => {
|
||||
if (skill && skill.trim()) {
|
||||
const existing = skillMap.get(skill) || { name: skill, weight: 0, tags: [], currentLevel: 0 };
|
||||
existing.weight = Math.max(existing.weight, 0.7); // 推荐职位技能权重较高
|
||||
if (!existing.tags.includes('推荐技能')) {
|
||||
existing.tags.push('推荐技能');
|
||||
}
|
||||
skillMap.set(skill, existing);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 3. 收集职业路径中的技能(发展路径技能,权重最高)
|
||||
const pathSkills = [];
|
||||
if (props.pathData.start && Array.isArray(props.pathData.start.skills)) {
|
||||
pathSkills.push(...props.pathData.start.skills);
|
||||
const emit = defineEmits(['path-data-updated']);
|
||||
|
||||
// 当前职位(从父组件获取)
|
||||
const currentPosition = computed(() => props.currentJobName || '市场专员');
|
||||
|
||||
// 目标职业选项列表
|
||||
const targetCareerOptions = ref([]);
|
||||
const selectedTargetIndex = ref(-1);
|
||||
const selectedJobPathId = ref(null);
|
||||
|
||||
// 职业路径数量
|
||||
const totalPathCount = ref(0);
|
||||
|
||||
// 技能列表数据(从接口获取)
|
||||
const skillList = ref([]);
|
||||
const isLoadingSkills = ref(false);
|
||||
// 是否已经查询过(用于区分未查询和已查询但无数据)
|
||||
const hasQueried = ref(false);
|
||||
|
||||
function parseSkillList(skillString) {
|
||||
if (!skillString) {
|
||||
return [];
|
||||
}
|
||||
if (Array.isArray(props.pathData.steps)) {
|
||||
props.pathData.steps.forEach(step => {
|
||||
if (Array.isArray(step.skills)) {
|
||||
pathSkills.push(...step.skills);
|
||||
}
|
||||
return skillString
|
||||
.split(/[,,]/)
|
||||
.map(item => item.trim())
|
||||
.filter(item => item.length > 0);
|
||||
}
|
||||
|
||||
async function fetchTargetCareerOptions(keyword = '') {
|
||||
try {
|
||||
const response = await getJobPathPage({
|
||||
jobName: keyword,
|
||||
pageNo: 1,
|
||||
pageSize: 100
|
||||
});
|
||||
|
||||
const list = response?.data?.list || response?.list || [];
|
||||
|
||||
targetCareerOptions.value = list.map(item => ({
|
||||
label: item.endJob || item.startJob || '未知职位',
|
||||
value: item.id,
|
||||
startJob: item.startJob,
|
||||
endJob: item.endJob,
|
||||
jobOrder: item.jobOrder
|
||||
}));
|
||||
|
||||
if (targetCareerOptions.value.length === 0) {
|
||||
selectedTargetIndex.value = -1;
|
||||
selectedJobPathId.value = null;
|
||||
}
|
||||
} catch (error) {
|
||||
targetCareerOptions.value = [];
|
||||
selectedTargetIndex.value = -1;
|
||||
selectedJobPathId.value = null;
|
||||
uni.showToast({
|
||||
title: '职业路径列表获取失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
if (props.pathData.end && Array.isArray(props.pathData.end.skills)) {
|
||||
pathSkills.push(...props.pathData.end.skills);
|
||||
}
|
||||
|
||||
async function fetchPathCount() {
|
||||
try {
|
||||
const response = await getJobPathNum();
|
||||
totalPathCount.value = response?.data ?? 0;
|
||||
} catch (error) {
|
||||
totalPathCount.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
async function loadPathDetail(jobPathId) {
|
||||
if (!jobPathId || jobPathId === null || jobPathId === undefined || jobPathId === '') {
|
||||
uni.showToast({
|
||||
title: '职业路径ID无效',
|
||||
icon: 'none'
|
||||
});
|
||||
localPathData.value = {
|
||||
start: { title: '暂无数据', skills: [] },
|
||||
steps: [],
|
||||
end: { title: '暂无数据', skills: [] }
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
pathSkills.forEach(skill => {
|
||||
if (skill && skill.trim()) {
|
||||
const existing = skillMap.get(skill) || { name: skill, weight: 0, tags: [], currentLevel: 0 };
|
||||
existing.weight = Math.max(existing.weight, 0.9); // 路径技能权重最高
|
||||
if (!existing.tags.includes('路径技能')) {
|
||||
existing.tags.push('路径技能');
|
||||
}
|
||||
skillMap.set(skill, existing);
|
||||
try {
|
||||
const requestParams = {
|
||||
jobPathId: jobPathId
|
||||
};
|
||||
|
||||
const response = await getJobPathDetail(requestParams);
|
||||
|
||||
const details = Array.isArray(response?.data) ? response.data : [];
|
||||
|
||||
if (details.length === 0) {
|
||||
localPathData.value = {
|
||||
start: { title: '暂无数据', skills: [] },
|
||||
steps: [],
|
||||
end: { title: '暂无数据', skills: [] }
|
||||
};
|
||||
uni.showToast({
|
||||
title: '暂无职业路径数据',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const normalized = details.map(item => ({
|
||||
title: item?.name || '未命名职位',
|
||||
skills: parseSkillList(item?.skillNameList)
|
||||
}));
|
||||
|
||||
const start = normalized[0] || { title: '暂无数据', skills: [] };
|
||||
const end = normalized[normalized.length - 1] || { title: '暂无数据', skills: [] };
|
||||
const steps = normalized.slice(1, normalized.length - 1);
|
||||
|
||||
localPathData.value = {
|
||||
start,
|
||||
steps,
|
||||
end
|
||||
};
|
||||
|
||||
// 通知父组件路径数据已更新
|
||||
emit('path-data-updated', {
|
||||
pathData: localPathData.value,
|
||||
targetCareer: targetCareerOptions.value[selectedTargetIndex.value]?.label || ''
|
||||
});
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
title: '获取路径详情失败',
|
||||
icon: 'none'
|
||||
});
|
||||
localPathData.value = {
|
||||
start: { title: '暂无数据', skills: [] },
|
||||
steps: [],
|
||||
end: { title: '暂无数据', skills: [] }
|
||||
};
|
||||
emit('path-data-updated', {
|
||||
pathData: localPathData.value,
|
||||
targetCareer: ''
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function handleTargetChange(e) {
|
||||
const index = Number(e.detail.value);
|
||||
selectedTargetIndex.value = index;
|
||||
const option = targetCareerOptions.value[index];
|
||||
selectedJobPathId.value = option ? option.value : null;
|
||||
// 重新选择目标职业时,重置查询状态和技能列表
|
||||
hasQueried.value = false;
|
||||
skillList.value = [];
|
||||
}
|
||||
|
||||
async function handleQuery() {
|
||||
if (selectedTargetIndex.value < 0) {
|
||||
uni.showToast({
|
||||
title: '请选择目标职业',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const option = targetCareerOptions.value[selectedTargetIndex.value];
|
||||
if (!option) {
|
||||
uni.showToast({
|
||||
title: '目标职业数据异常',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取技能权重数据
|
||||
await fetchSkillWeight();
|
||||
}
|
||||
|
||||
// 获取技能权重数据
|
||||
async function fetchSkillWeight() {
|
||||
// 获取当前职位(使用界面上显示的值)
|
||||
const currentJob = currentPosition.value || props.currentJobName || '';
|
||||
|
||||
if (!currentJob) {
|
||||
skillList.value = [];
|
||||
uni.showToast({
|
||||
title: '当前职位信息缺失',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取目标职业(使用界面上选择的值)
|
||||
const targetCareer = selectedTargetIndex.value >= 0
|
||||
? targetCareerOptions.value[selectedTargetIndex.value]?.label
|
||||
: '';
|
||||
|
||||
if (!targetCareer) {
|
||||
skillList.value = [];
|
||||
uni.showToast({
|
||||
title: '请选择目标职业',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
isLoadingSkills.value = true;
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
});
|
||||
|
||||
// 转换为数组并按权重排序
|
||||
const result = Array.from(skillMap.values())
|
||||
.map(item => ({
|
||||
name: item.name,
|
||||
weight: item.weight.toFixed(2),
|
||||
tags: [...new Set(item.tags)], // 去重
|
||||
currentLevel: item.currentLevel || Math.floor(item.weight * 5) + 1 // 根据权重计算等级
|
||||
}))
|
||||
.sort((a, b) => parseFloat(b.weight) - parseFloat(a.weight)); // 按权重降序
|
||||
|
||||
return result;
|
||||
try {
|
||||
const response = await getJobSkillWeight({
|
||||
currentJobName: currentJob,
|
||||
targetJobName: targetCareer
|
||||
});
|
||||
|
||||
// 标记已经查询过
|
||||
hasQueried.value = true;
|
||||
|
||||
// 处理接口返回的数据
|
||||
const responseData = response?.data || response || [];
|
||||
const dataItem = Array.isArray(responseData) ? responseData[0] : responseData;
|
||||
|
||||
// 合并当前职位和目标职位的技能列表
|
||||
const currentSkills = Array.isArray(dataItem?.currentSkillDetList) ? dataItem.currentSkillDetList : [];
|
||||
const targetSkills = Array.isArray(dataItem?.targetSkillDetList) ? dataItem.targetSkillDetList : [];
|
||||
const allSkills = [...currentSkills, ...targetSkills];
|
||||
|
||||
// 转换为组件需要的格式
|
||||
skillList.value = allSkills.map(item => ({
|
||||
name: item?.skillName || item?.name || '',
|
||||
weight: item?.skillWeight || item?.weight || '0',
|
||||
score: item?.skillScore !== undefined && item?.skillScore !== null ? item.skillScore : 0,
|
||||
tags: item?.tags || [],
|
||||
currentLevel: item?.currentLevel || item?.level || 0
|
||||
})).filter(item => item.name).sort((a, b) => {
|
||||
// 按技能分数降序排序(skillScore)
|
||||
const scoreA = parseFloat(a.score) || 0;
|
||||
const scoreB = parseFloat(b.score) || 0;
|
||||
return scoreB - scoreA;
|
||||
});
|
||||
|
||||
if (skillList.value.length === 0) {
|
||||
uni.showToast({
|
||||
title: '暂无技能数据',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
// 查询失败也标记为已查询
|
||||
hasQueried.value = true;
|
||||
uni.showToast({
|
||||
title: '获取技能权重失败',
|
||||
icon: 'none'
|
||||
});
|
||||
skillList.value = [];
|
||||
} finally {
|
||||
isLoadingSkills.value = false;
|
||||
uni.hideLoading();
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await Promise.all([
|
||||
fetchTargetCareerOptions(),
|
||||
fetchPathCount()
|
||||
]);
|
||||
});
|
||||
|
||||
// 弹出层引用
|
||||
const skillWeightPopup = ref(null);
|
||||
|
||||
// 选中的技能信息
|
||||
const selectedSkillName = ref('');
|
||||
const selectedSkillWeight = ref('');
|
||||
const selectedSkillLevel = ref(0);
|
||||
|
||||
// 处理技能项点击
|
||||
function handleSkillItemClick(skill) {
|
||||
selectedSkillName.value = skill.name || '';
|
||||
selectedSkillWeight.value = skill.weight || '0';
|
||||
selectedSkillLevel.value = skill.currentLevel || 0;
|
||||
skillWeightPopup.value?.open();
|
||||
}
|
||||
|
||||
// 处理弹出层关闭
|
||||
function handlePopupClose() {
|
||||
// 可以在这里处理关闭后的逻辑
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.skill-development {
|
||||
padding: 10rpx 0 20rpx;
|
||||
padding: 10rpx 28rpx 20rpx;
|
||||
background-color: #EBF4FF;
|
||||
min-height:95%;
|
||||
}
|
||||
|
||||
.query-section {
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
|
||||
.section-title {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.content-section {
|
||||
background-color: #EBF4FF;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: visible;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.input-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.input-label {
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.input-field {
|
||||
background-color: #F5F5F5;
|
||||
border: 1rpx solid #E0E0E0;
|
||||
border-radius: 12rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.picker-field {
|
||||
background-color: #F5F5F5;
|
||||
border: 1rpx solid #E0E0E0;
|
||||
border-radius: 12rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.picker-text {
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.picker-placeholder {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.query-btn {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
background: linear-gradient(180deg, rgba(18, 125, 240, 1) 0%, rgba(59, 14, 123, 0.71) 100%);
|
||||
color: rgba(255, 255, 255, 1);
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
font-family: '阿里巴巴普惠体3.0-regular', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
border: 2rpx solid rgba(187, 187, 187, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12rpx;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.path-summary {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
@@ -185,7 +482,10 @@ function handlePopupClose() {
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
margin-bottom: 24rpx;
|
||||
margin-top: -20rpx;
|
||||
|
||||
.content-section & {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.title-text {
|
||||
@@ -253,6 +553,25 @@ function handlePopupClose() {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.skill-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
flex-shrink: 0;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
.skill-score {
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: rgba(49, 100, 239, 0.1);
|
||||
color: rgba(44, 101, 247, 1);
|
||||
text-align: center;
|
||||
padding: 6rpx 12rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.skill-weight {
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
@@ -262,8 +581,6 @@ function handlePopupClose() {
|
||||
text-align: center;
|
||||
padding: 6rpx 12rpx;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
.skill-tags {
|
||||
|
||||
456
pages/service/guidance.vue
Normal file
456
pages/service/guidance.vue
Normal file
@@ -0,0 +1,456 @@
|
||||
<template>
|
||||
<view class="service-guidance-container">
|
||||
<view class="guidance-header">
|
||||
<text class="header-title">服务指导</text>
|
||||
<text class="header-subtitle">如何使用喀什智慧就业平台</text>
|
||||
</view>
|
||||
|
||||
<scroll-view class="guidance-content" scroll-y="true">
|
||||
<!-- 欢迎介绍 -->
|
||||
<view class="guidance-section">
|
||||
<view class="section-title">
|
||||
<uni-icons type="info-filled" size="24" color="#256BFA"></uni-icons>
|
||||
<text class="title-text">欢迎使用</text>
|
||||
</view>
|
||||
<view class="section-content">
|
||||
<text class="content-text">喀什智慧就业平台是为您提供全方位就业服务的小程序,包括职位搜索、简历创建、职业规划等功能。</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 使用步骤 -->
|
||||
<view class="guidance-section">
|
||||
<view class="section-title">
|
||||
<uni-icons type="steps-filled" size="24" color="#256BFA"></uni-icons>
|
||||
<text class="title-text">使用步骤</text>
|
||||
</view>
|
||||
<view class="section-content">
|
||||
<view class="step-item">
|
||||
<view class="step-number">1</view>
|
||||
<view class="step-content">
|
||||
<text class="step-title">登录/注册</text>
|
||||
<text class="step-desc">首次使用请先完成登录或注册,完善个人信息以便获取更好的服务。</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="step-item">
|
||||
<view class="step-number">2</view>
|
||||
<view class="step-content">
|
||||
<text class="step-title">浏览首页</text>
|
||||
<text class="step-desc">首页展示了推荐职位、附近工作和各种服务功能,您可以根据需求选择。</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="step-item">
|
||||
<view class="step-number">3</view>
|
||||
<view class="step-content">
|
||||
<text class="step-title">搜索职位</text>
|
||||
<text class="step-desc">使用顶部搜索框输入职位名称、关键词等,快速找到您感兴趣的职位。</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="step-item">
|
||||
<view class="step-number">4</view>
|
||||
<view class="step-content">
|
||||
<text class="step-title">查看职位详情</text>
|
||||
<text class="step-desc">点击职位卡片查看详细信息,包括薪资待遇、工作地点、任职要求等。</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="step-item">
|
||||
<view class="step-number">5</view>
|
||||
<view class="step-content">
|
||||
<text class="step-title">投递简历</text>
|
||||
<text class="step-desc">如果您对某个职位感兴趣,可以直接投递简历,等待企业联系。</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="step-item">
|
||||
<view class="step-number">6</view>
|
||||
<view class="step-content">
|
||||
<text class="step-title">使用服务功能</text>
|
||||
<text class="step-desc">首页九宫格提供了多种服务,包括简历指导、劳动政策指引、技能培训等,您可以根据需要使用。</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 功能介绍 -->
|
||||
<view class="guidance-section">
|
||||
<view class="section-title">
|
||||
<uni-icons type="grid-filled" size="24" color="#256BFA"></uni-icons>
|
||||
<text class="title-text">主要功能</text>
|
||||
</view>
|
||||
<view class="section-content">
|
||||
<view class="feature-grid">
|
||||
<view class="feature-item">
|
||||
<view class="feature-icon">
|
||||
<uni-icons type="search" size="36" color="#256BFA"></uni-icons>
|
||||
</view>
|
||||
<text class="feature-title">职位搜索</text>
|
||||
<text class="feature-desc">智能匹配,精准推荐</text>
|
||||
</view>
|
||||
<view class="feature-item">
|
||||
<view class="feature-icon">
|
||||
<uni-icons type="person-filled" size="36" color="#256BFA"></uni-icons>
|
||||
</view>
|
||||
<text class="feature-title">简历管理</text>
|
||||
<text class="feature-desc">在线创建,一键投递</text>
|
||||
</view>
|
||||
<view class="feature-item">
|
||||
<view class="feature-icon">
|
||||
<uni-icons type="map-pin" size="36" color="#256BFA"></uni-icons>
|
||||
</view>
|
||||
<text class="feature-title">附近工作</text>
|
||||
<text class="feature-desc">基于位置,就近推荐</text>
|
||||
</view>
|
||||
<view class="feature-item">
|
||||
<view class="feature-icon">
|
||||
<uni-icons type="document" size="36" color="#256BFA"></uni-icons>
|
||||
</view>
|
||||
<text class="feature-title">简历指导</text>
|
||||
<text class="feature-desc">专业建议,优化简历</text>
|
||||
</view>
|
||||
<view class="feature-item">
|
||||
<view class="feature-icon">
|
||||
<uni-icons type="book-filled" size="36" color="#256BFA"></uni-icons>
|
||||
</view>
|
||||
<text class="feature-title">政策指引</text>
|
||||
<text class="feature-desc">最新政策,实时更新</text>
|
||||
</view>
|
||||
<view class="feature-item">
|
||||
<view class="feature-icon">
|
||||
<uni-icons type="videocam-filled" size="36" color="#256BFA"></uni-icons>
|
||||
</view>
|
||||
<text class="feature-title">技能培训</text>
|
||||
<text class="feature-desc">线上学习,提升技能</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 常见问题 -->
|
||||
<view class="guidance-section">
|
||||
<view class="section-title">
|
||||
<uni-icons type="help-filled" size="24" color="#256BFA"></uni-icons>
|
||||
<text class="title-text">常见问题</text>
|
||||
</view>
|
||||
<view class="section-content">
|
||||
<view class="faq-item">
|
||||
<view class="faq-question">
|
||||
<uni-icons type="right" size="18" color="#256BFA"></uni-icons>
|
||||
<text>如何修改个人信息?</text>
|
||||
</view>
|
||||
<view class="faq-answer">
|
||||
<text>在"我的"页面点击个人信息,进入编辑页面即可修改基本信息、求职意向等。</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="faq-item">
|
||||
<view class="faq-question">
|
||||
<uni-icons type="right" size="18" color="#256BFA"></uni-icons>
|
||||
<text>如何查看投递记录?</text>
|
||||
</view>
|
||||
<view class="faq-answer">
|
||||
<text>在"我的"页面点击"投递记录",即可查看所有已投递的职位和状态。</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="faq-item">
|
||||
<view class="faq-question">
|
||||
<uni-icons type="right" size="18" color="#256BFA"></uni-icons>
|
||||
<text>如何收藏职位?</text>
|
||||
</view>
|
||||
<view class="faq-answer">
|
||||
<text>在职位详情页面点击右上角的收藏按钮,即可将职位添加到收藏夹。</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="faq-item">
|
||||
<view class="faq-question">
|
||||
<uni-icons type="right" size="18" color="#256BFA"></uni-icons>
|
||||
<text>如何联系客服?</text>
|
||||
</view>
|
||||
<view class="faq-answer">
|
||||
<text>如果您在使用过程中遇到问题,可以在"我的"页面找到"联系客服"入口,或拨打客服热线。</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 温馨提示 -->
|
||||
<view class="guidance-section">
|
||||
<view class="section-title">
|
||||
<uni-icons type="warning-filled" size="24" color="#256BFA"></uni-icons>
|
||||
<text class="title-text">温馨提示</text>
|
||||
</view>
|
||||
<view class="section-content">
|
||||
<view class="tips-list">
|
||||
<view class="tip-item">
|
||||
<uni-icons type="circle" size="12" color="#256BFA" class="tip-icon"></uni-icons>
|
||||
<text class="tip-text">请确保填写的个人信息真实有效,这有助于企业更好地了解您。</text>
|
||||
</view>
|
||||
<view class="tip-item">
|
||||
<uni-icons type="circle" size="12" color="#256BFA" class="tip-icon"></uni-icons>
|
||||
<text class="tip-text">定期更新简历,保持简历内容的时效性。</text>
|
||||
</view>
|
||||
<view class="tip-item">
|
||||
<uni-icons type="circle" size="12" color="#256BFA" class="tip-icon"></uni-icons>
|
||||
<text class="tip-text">多关注"附近工作"和"推荐职位",不错过好机会。</text>
|
||||
</view>
|
||||
<view class="tip-item">
|
||||
<uni-icons type="circle" size="12" color="#256BFA" class="tip-icon"></uni-icons>
|
||||
<text class="tip-text">如有任何疑问,欢迎随时联系我们的客服团队。</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结尾鼓励 -->
|
||||
<view class="guidance-section end-section">
|
||||
<view class="encourage-content">
|
||||
<uni-icons type="thumbsup-filled" size="48" color="#256BFA"></uni-icons>
|
||||
<text class="encourage-text">祝您早日找到理想的工作!</text>
|
||||
<text class="encourage-subtext">喀什智慧就业平台与您同行</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
|
||||
onLoad(() => {
|
||||
// 页面加载时的逻辑
|
||||
console.log('服务指导页面加载');
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.service-guidance-container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #F5F7FA;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.guidance-header {
|
||||
padding: 32rpx 24rpx;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
display: block;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.header-subtitle {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.guidance-content {
|
||||
flex: 1;
|
||||
padding: 24rpx;
|
||||
overflow-y: scroll;
|
||||
box-sizing: border-box;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.guidance-section {
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
padding: 32rpx;
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
|
||||
.section-content {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 步骤样式 */
|
||||
.step-item {
|
||||
display: flex;
|
||||
margin-bottom: 32rpx;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.step-number {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #256BFA;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 20rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.step-content {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.step-title {
|
||||
display: block;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.step-desc {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 功能网格样式 */
|
||||
.feature-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 24rpx;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.feature-item {
|
||||
text-align: center;
|
||||
padding: 24rpx;
|
||||
background-color: #F8FAFC;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.feature-title {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.feature-desc {
|
||||
display: block;
|
||||
font-size: 20rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
/* 常见问题样式 */
|
||||
.faq-item {
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 24rpx;
|
||||
border-bottom: 1rpx solid #F0F0F0;
|
||||
}
|
||||
|
||||
.faq-item:last-child {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.faq-question {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.faq-question uni-icons {
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.faq-answer {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
line-height: 1.6;
|
||||
padding-left: 40rpx;
|
||||
}
|
||||
|
||||
/* 温馨提示样式 */
|
||||
.tips-list {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.tip-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 16rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.tip-icon {
|
||||
margin-right: 12rpx;
|
||||
margin-top: 8rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tip-text {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* 结尾鼓励样式 */
|
||||
.end-section {
|
||||
text-align: center;
|
||||
background: linear-gradient(135deg, #256BFA 0%, #6A8FFF 100%);
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.end-section .section-title {
|
||||
color: #FFFFFF;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.end-section .title-text {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.encourage-content {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.encourage-content uni-icons {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.encourage-text {
|
||||
display: block;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.encourage-subtext {
|
||||
display: block;
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
</style>
|
||||
@@ -24,8 +24,8 @@ const useLocationStore = defineStore("location", () => {
|
||||
timeout: 10000,
|
||||
success: function(res) {
|
||||
const resd = {
|
||||
longitude: 120.382665,
|
||||
latitude: 36.066938
|
||||
longitude: 75.993802,
|
||||
latitude: 39.468225
|
||||
}
|
||||
if (config.UsingSimulatedPositioning) { // 使用模拟定位
|
||||
longitudeVal.value = resd.longitude
|
||||
@@ -44,8 +44,8 @@ const useLocationStore = defineStore("location", () => {
|
||||
// latitudeVal.value = ''
|
||||
// reject(err)
|
||||
const resd = {
|
||||
longitude: 120.382665,
|
||||
latitude: 36.066938
|
||||
longitude: 75.993802,
|
||||
latitude: 39.468225
|
||||
}
|
||||
longitudeVal.value = resd.longitude
|
||||
latitudeVal.value = resd.latitude
|
||||
|
||||
@@ -72,9 +72,32 @@ export function navigateToLoginPage(options = {}) {
|
||||
? `?${new URLSearchParams(params).toString()}`
|
||||
: '';
|
||||
|
||||
uni.navigateTo({
|
||||
url: `${loginPage}${queryString}`
|
||||
});
|
||||
const finalUrl = `${loginPage}${queryString}`;
|
||||
const pages = getCurrentPages();
|
||||
|
||||
if (pages.length >= 10) {
|
||||
// 页面栈已满,使用redirectTo替代
|
||||
uni.redirectTo({
|
||||
url: finalUrl,
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: finalUrl,
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
// 失败后尝试redirectTo
|
||||
uni.redirectTo({
|
||||
url: finalUrl,
|
||||
fail: (err2) => {
|
||||
console.error('redirectTo也失败:', err2);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -215,21 +215,41 @@ export function myRequest(url, data = {}, method = 'GET', port = 9100, headers =
|
||||
resolve(resData.data)
|
||||
return
|
||||
}
|
||||
// 处理业务错误
|
||||
if (resData.data?.code === 401 || resData.data?.code === 402) {
|
||||
uni.navigateTo({
|
||||
url:'/packageB/login?flag=nw'
|
||||
})
|
||||
// navTo('/packageB/login?flag=nw');
|
||||
useUserStore().logOut()
|
||||
|
||||
// 处理业务错误
|
||||
if (resData.data?.code === 401 || resData.data?.code === 402) {
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length >= 10) {
|
||||
// 页面栈已满,使用redirectTo替代
|
||||
uni.redirectTo({
|
||||
url:'/packageB/login?flag=nw',
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url:'/packageB/login?flag=nw',
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
// 失败后尝试redirectTo
|
||||
uni.redirectTo({
|
||||
url:'/packageB/login?flag=nw',
|
||||
fail: (err2) => {
|
||||
console.error('redirectTo也失败:', err2);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
useUserStore().logOut()
|
||||
|
||||
}
|
||||
// 显示具体的错误信息
|
||||
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)
|
||||
|
||||
@@ -26,10 +26,13 @@ let exports = {
|
||||
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 已从根目录config.js引用,不再重复配置
|
||||
|
||||
// ========== 职业图谱专用baseUrl ==========
|
||||
zytpBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks_zytp/admin-api/zytp',
|
||||
zytpBaseUrl: 'http://222.80.110.161:11111/career-map/api/ks_zytp/admin-api/zytp',
|
||||
|
||||
// ========== 用户接口专用baseUrl(appUserInfo等接口使用) ==========
|
||||
// ========== 用户接口专用baseUrl(其他用户接口使用) ==========
|
||||
userBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 用户相关接口使用根目录config.js的baseUrl
|
||||
|
||||
// ========== appUserInfo接口专用baseUrl ==========
|
||||
appUserInfoBaseUrl: 'http://222.80.110.161:11111/api/ks', // appUserInfo接口专用,与其他接口路径不一致
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,23 +14,28 @@ let timeout = 10000
|
||||
const baseUrl = configRc.baseUrl
|
||||
const zytpBaseUrl = configRc.zytpBaseUrl || ''
|
||||
const userBaseUrl = configRc.userBaseUrl || ''
|
||||
const appUserInfoBaseUrl = configRc.appUserInfoBaseUrl || ''
|
||||
|
||||
const request = config => {
|
||||
// 是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
config.header = config.header || {}
|
||||
// 从存储中获取微信登录的 token
|
||||
const token = getToken()
|
||||
if (token && !isToken) {
|
||||
config.header['Authorization'] = 'Bearer ' + token
|
||||
}
|
||||
// get请求映射params参数
|
||||
const baseType = config.baseUrlType
|
||||
// 职业图谱相关接口不需要Authorization
|
||||
const isZytpApi = baseType === 'zytp'
|
||||
// 从存储中获取微信登录的 token
|
||||
const token = getToken()
|
||||
if (token && !isToken && !isZytpApi) {
|
||||
config.header['Authorization'] = 'Bearer ' + token
|
||||
}
|
||||
let requestBaseUrl = baseUrl
|
||||
if (baseType === 'zytp' && zytpBaseUrl) {
|
||||
requestBaseUrl = zytpBaseUrl
|
||||
} else if (baseType === 'user' && userBaseUrl) {
|
||||
requestBaseUrl = userBaseUrl
|
||||
} else if (baseType === 'appUserInfo' && appUserInfoBaseUrl) {
|
||||
requestBaseUrl = appUserInfoBaseUrl
|
||||
}
|
||||
let requestUrl = config.fullUrl ? config.fullUrl : (requestBaseUrl + (config.url || ''))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user