bug修复

This commit is contained in:
冯辉
2025-10-24 18:49:03 +08:00
parent 476e44f400
commit c71ad5f98c
4 changed files with 105 additions and 72 deletions

View File

@@ -883,6 +883,7 @@ function getJobRecommend(type = 'add') {
sessionId: useUserStore().seesionId,
...pageState.search,
...conditionSearch.value,
isPublish: 1,
};
let comd = { recommend: true, jobCategory: '', tip: '确认你的兴趣,为您推荐更多合适的岗位' };
$api.createRequest('/app/job/recommend', params).then((resData) => {

View File

@@ -105,7 +105,7 @@
class="input"
placeholder="请输入招聘人数"
type="number"
v-model="formData.recruitCount"
v-model="formData.vacancies"
/>
</view>
<view class="form-group">
@@ -233,7 +233,7 @@ const formData = reactive({
companyName: '',
minSalary: '',
maxSalary: '',
recruitCount: '', // 对应接口字段 idCardPictureBackUrl
vacancies: '', // 招聘人数
description: '', // 对应接口字段 description
jobRequirements: '',
jobCategory: '', // 新增:岗位分类
@@ -494,7 +494,7 @@ const publishJob = async () => {
experience: formData.experience,
jobLocation: formData.jobLocation,
jobLocationAreaCode: formData.jobLocationAreaCode,
idCardPictureBackUrl: formData.recruitCount, // 招聘人数
vacancies: formData.vacancies, // 招聘人数
latitude: formData.latitude,
longitude: formData.longitude,
description: formData.description,
@@ -553,7 +553,7 @@ const validateForm = () => {
{ field: 'experience', message: '请选择工作经验' },
{ field: 'jobLocation', message: '请选择工作地点' },
{ field: 'jobLocationAreaCode', message: '请选择工作区县' },
{ field: 'recruitCount', message: '请输入招聘人数' },
{ field: 'vacancies', message: '请输入招聘人数' },
{ field: 'description', message: '请输入岗位描述' },
{ field: 'jobCategory', message: '请选择岗位分类' }
];

View File

@@ -2,7 +2,7 @@
<AppLayout back-gorund-color="#F4F4F4">
<!-- 编辑头像 -->
<view class="avatar-section btn-feel" @click="editAvatar">
<view class="avatar-label">编辑头像</view>
<view class="avatar-label">编辑信息</view>
<view class="avatar-container">
<image class="company-avatar" :src="companyInfo.avatar || '/static/imgs/avatar.jpg'"></image>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
@@ -51,35 +51,24 @@
</view>
</view>
<view class="info-item btn-feel" @click="editInfo('contact1')">
<view class="info-label">企业联系人名称</view>
<view class="info-content">
<text class="info-value">{{ companyInfo.contact1Name || '暂无联系人' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
<!-- 企业联系人列表 -->
<view v-for="(contact, index) in companyInfo.companyContactList" :key="contact.id || index" class="contact-group">
<view class="contact-group-title">企业联系人{{ index + 1 }}</view>
<view class="info-item btn-feel" @click="editContact(index, 'name')">
<view class="info-label">联系人姓名</view>
<view class="info-content">
<text class="info-value">{{ contact.contactPerson || '暂无联系人' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
</view>
</view>
</view>
<view class="info-item btn-feel" @click="editInfo('contact1Phone')">
<view class="info-label">企业联系电话</view>
<view class="info-content">
<text class="info-value">{{ companyInfo.contact1Phone || '暂无联系电话' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
</view>
</view>
<view class="info-item btn-feel" @click="editInfo('contact2')">
<view class="info-label">企业联系人名称</view>
<view class="info-content">
<text class="info-value">{{ companyInfo.contact2Name || '暂无联系人' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
</view>
</view>
<view class="info-item btn-feel" @click="editInfo('contact2Phone')">
<view class="info-label">企业联系人电话</view>
<view class="info-content">
<text class="info-value">{{ companyInfo.contact2Phone || '暂无联系电话' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
<view class="info-item btn-feel" @click="editContact(index, 'phone')">
<view class="info-label">联系电话</view>
<view class="info-content">
<text class="info-value">{{ contact.contactPersonPhone || '暂无联系电话' }}</text>
<uni-icons color="#A2A2A2" type="right" size="16"></uni-icons>
</view>
</view>
</view>
</view>
@@ -97,27 +86,24 @@ const { $api, navTo } = inject('globalFunction');
const companyInfo = reactive({
name: '',
avatar: '/static/imgs/avatar.jpg',
completeness: '100%',
completeness: '65%',
socialCode: '',
location: '',
description: '',
legalPerson: '',
contact1Name: '',
contact1Phone: '',
contact2Name: '',
contact2Phone: '',
companyContactList: [], // 企业联系人列表
isVerified: false // 实名状态
});
function editAvatar() {
// 编辑头像逻辑
uni.chooseImage({
count: 1,
success: (res) => {
// 上传头像
uploadAvatar(res.tempFilePaths[0]);
}
});
// uni.chooseImage({
// count: 1,
// success: (res) => {
// // 上传头像
// uploadAvatar(res.tempFilePaths[0]);
// }
// });
}
function uploadAvatar(filePath) {
@@ -146,11 +132,7 @@ function editInfo(type) {
code: '/pages/mine/edit-company-code',
location: '/pages/mine/edit-company-location',
description: '/pages/mine/edit-company-description',
legalPerson: '/pages/mine/edit-legal-person',
contact1: '/pages/mine/edit-contact1',
contact1Phone: '/pages/mine/edit-contact1-phone',
contact2: '/pages/mine/edit-contact2',
contact2Phone: '/pages/mine/edit-contact2-phone'
legalPerson: '/pages/mine/edit-legal-person'
};
if (editPages[type]) {
@@ -158,6 +140,27 @@ function editInfo(type) {
}
}
function editContact(contactIndex, field) {
// 编辑联系人信息
const contact = companyInfo.companyContactList[contactIndex];
if (!contact) return;
// 跳转到联系人编辑页面,传递联系人索引和字段类型
const editPages = {
name: '/pages/mine/edit-contact-name',
phone: '/pages/mine/edit-contact-phone'
};
if (editPages[field]) {
// 传递联系人索引和联系人ID
const params = {
contactIndex: contactIndex,
contactId: contact.id
};
navTo(editPages[field], params);
}
}
onShow(() => {
// 获取企业信息
getCompanyInfo();
@@ -180,16 +183,8 @@ function getCompanyInfo() {
companyInfo.description = company.description || '';
companyInfo.legalPerson = company.legalPerson || '';
// 联系人信息
if (company.companyContactList && company.companyContactList.length > 0) {
const contacts = company.companyContactList;
companyInfo.contact1Name = contacts[0]?.contactPerson || '';
companyInfo.contact1Phone = contacts[0]?.contactPersonPhone || '';
if (contacts.length > 1) {
companyInfo.contact2Name = contacts[1]?.contactPerson || '';
companyInfo.contact2Phone = contacts[1]?.contactPersonPhone || '';
}
}
// 联系人信息 - 直接使用companyContactList数组
companyInfo.companyContactList = company.companyContactList || [];
// 判断是否实名legalIdCard字段有值则表示已实名
companyInfo.isVerified = !!(company.legalIdCard && company.legalIdCard.trim());
@@ -289,4 +284,16 @@ function goBack() {
transform: scale(0.98);
}
}
.contact-group {
border-top: 20rpx solid #F4F4F4;
.contact-group-title {
padding: 20rpx 30rpx 10rpx;
font-size: 24rpx;
color: #999999;
background: #F8F8F8;
border-bottom: 1rpx solid #F5F5F5;
}
}
</style>