首页卡片开发
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user