首页卡片开发

This commit is contained in:
冯辉
2025-10-24 16:54:52 +08:00
parent 92ee5c5311
commit 2d6370b796
22 changed files with 896 additions and 205 deletions

View File

@@ -144,7 +144,7 @@ onMounted(() => {
});
const changeItem = (item) => {
// 判断是否为 tabBar 页面
// 判断是否为 TabBar 页面
const tabBarPages = [
'/pages/index/index',
'/pages/careerfair/careerfair',
@@ -154,12 +154,12 @@ const changeItem = (item) => {
];
if (tabBarPages.includes(item.path)) {
// tabBar 页面使用 switchTab
uni.switchTab({
// TabBar 页面使用 redirectTo 避免页面栈溢出
uni.redirectTo({
url: item.path,
});
} else {
// 非 tabBar 页面使用 navigateTo
// 非 TabBar 页面使用 navigateTo
uni.navigateTo({
url: item.path,
});