企业注册根据信用代码回显企业信息

This commit is contained in:
FengHui
2026-02-04 11:11:09 +08:00
parent 2a5d15b770
commit 70ef370b1d
3 changed files with 84 additions and 33 deletions

View File

@@ -120,7 +120,8 @@ const generateTabbarList = () => {
// #endif
}
if (userType === 0) {
baseItems.splice(2, 0, {
// 企业用户将招聘会添加到第1个位置AI图标保持在中间
baseItems.splice(1, 0, {
id: 5,
text: '招聘会',
path: '/pages/careerfair/careerfair',
@@ -129,6 +130,14 @@ const generateTabbarList = () => {
centerItem: false,
badge: 0,
});
// 调整AI图标的位置到中间索引2
const aiItem = baseItems.find(item => item.id === 2);
if (aiItem) {
// 移除AI图标
baseItems.splice(baseItems.indexOf(aiItem), 1);
// 将AI图标插入到中间位置
baseItems.splice(2, 0, aiItem);
}
}
return baseItems;
};
@@ -194,12 +203,12 @@ const switchTab = (item, index) => {
// 判断企业信息字段company是否为null或undefined
if (!currentUserInfo.company || currentUserInfo.company === null) {
// 企业信息为空,跳转到企业信息补全页面
uni.navigateTo({
uni.redirectTo({
url: '/packageA/pages/complete-info/company-info',
});
} else {
// 企业信息完整,跳转到发布岗位页面
uni.navigateTo({
uni.redirectTo({
url: '/packageA/pages/job/publishJob',
});
}
@@ -228,7 +237,7 @@ const switchTab = (item, index) => {
}
// 跳转到对应的页面
uni.navigateTo({
uni.redirectTo({
url: targetPath,
});
@@ -237,26 +246,10 @@ const switchTab = (item, index) => {
}
}
// 判断是否为 tabBar 页面
const tabBarPages = [
'/pages/index/index',
'/pages/careerfair/careerfair',
'/pages/chat/chat',
'/pages/msglog/msglog',
'/pages/mine/mine'
];
if (tabBarPages.includes(item.path)) {
// TabBar 页面使用 redirectTo 避免页面栈溢出
uni.redirectTo({
url: item.path,
});
} else {
// 非 TabBar 页面使用 navigateTo
uni.navigateTo({
url: item.path,
});
}
// 所有页面都使用 redirectTo 避免页面栈溢出
uni.redirectTo({
url: item.path,
});
currentItem.value = item.id;
};