Compare commits

..

2 Commits

Author SHA1 Message Date
冯辉
028e3202bd 修改疆外职位展示内容 2025-10-15 16:46:21 +08:00
冯辉
7307335487 删除用户ID参数 2025-10-13 17:29:57 +08:00
2 changed files with 7 additions and 14 deletions

View File

@@ -184,13 +184,6 @@
return;
}
console.log(userInfo.userId)
// 动态获取用户ID
const currentUserId = userInfo.userId;
if (!currentUserId) {
$api.msg('用户信息获取失败,请重新登录');
return;
}
// 调试:打印表单数据
console.log('表单数据:', formData);
console.log('结束时间:', formData.endDate);
@@ -200,11 +193,10 @@
const endDateValue = formData.endDate === '至今' ? currentDate : formData.endDate;
console.log('处理后的结束时间:', endDateValue);
// 准备请求参数
// 准备请求参数不包含userId让后端通过token获取
const params = {
companyName: formData.companyName.trim(),
position: formData.position.trim(),
userId: currentUserId, // 使用动态获取的用户ID
startDate: formData.startDate,
endDate: endDateValue, // 使用处理后的结束时间
description: formData.description.trim()
@@ -214,11 +206,11 @@
console.log('页面类型:', pageType.value);
let resData;
alert(editData.value.id)
// 根据页面类型调用不同的接口
if (pageType.value === 'edit' && editData.value?.id) {
// 编辑模式:调用更新接口
resData = await $api.createRequest(`/app/userworkexperiences/${editData.value.id}`, params, 'put');
resData = await $api.createRequest(`/app/userworkexperiences/edit`, {...params, id: editData.value.id}, 'put');
console.log('编辑接口响应:', resData);
} else {
// 添加模式:调用新增接口

View File

@@ -95,8 +95,8 @@
<dict-Label dictType="experience" :value="job.experience"></dict-Label>
</view>
</view>
<view class="falls-card-company">
<!-- {{ config.appInfo.areaName }} -->
<view class="falls-card-company" v-show="isShowJw !== 3">
{{ config.appInfo.areaName }}
<!-- {{ job.jobLocation }} -->
<dict-Label dictType="area" :value="job.jobLocationAreaCode"></dict-Label>
</view>
@@ -340,9 +340,10 @@ function choosePosition(index) {
getJobList('refresh');
}
}
const isShowJw = ref(0);
function handelHostestSearch(val) {
console.log(val.value);
isShowJw.value = val.value;
pageState.search.order = val.value;
pageState.search.jobType = val.value === 3 ? 1 : 0;
if (state.tabIndex === 'all') {