fix(BottomNav): 更新活动页面路径并修改兑换页面链接
将活动页面路径从'/pages/Activities/index'更新为'/pages/ActivitiesCover/index' 修改兑换页面链接为带参数的固定值,并添加注释说明 调整isActive逻辑以支持路径包含判断
Showing
1 changed file
with
7 additions
and
5 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-08-27 17:44:10 | 2 | * @Date: 2025-08-27 17:44:10 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-09-09 11:08:37 | 4 | + * @LastEditTime: 2025-09-15 13:27:04 |
| 5 | * @FilePath: /map-demo/src/components/BottomNav.vue | 5 | * @FilePath: /map-demo/src/components/BottomNav.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -42,8 +42,10 @@ const isMiniProgramWebView = computed(() => { | ... | @@ -42,8 +42,10 @@ const isMiniProgramWebView = computed(() => { |
| 42 | 42 | ||
| 43 | const navItems = shallowRef([ | 43 | const navItems = shallowRef([ |
| 44 | { path: '/pages/Dashboard/index', icon: homeIcon, activeIcon: homeIconActive, label: '首页' }, | 44 | { path: '/pages/Dashboard/index', icon: homeIcon, activeIcon: homeIconActive, label: '首页' }, |
| 45 | - { path: '/pages/Activities/index', icon: activitiesIcon, activeIcon: activitiesIconActive, label: '活动' }, | 45 | + { path: '/pages/ActivitiesCover/index', icon: activitiesIcon, activeIcon: activitiesIconActive, label: '活动' }, |
| 46 | - { path: '/pages/RewardCategories/index', icon: rewardsIcon, activeIcon: rewardsIconActive, label: '兑换' }, | 46 | + // { path: '/pages/RewardCategories/index', icon: rewardsIcon, activeIcon: rewardsIconActive, label: '兑换' }, |
| 47 | + // TAG: 暂时写死以后可能会改变 | ||
| 48 | + { path: '/pages/Rewards/index?id=health&category=health', icon: rewardsIcon, activeIcon: rewardsIconActive, label: '兑换' }, | ||
| 47 | { path: '/pages/Profile/index', icon: meIcon, activeIcon: meIconActive, label: '我的' }, | 49 | { path: '/pages/Profile/index', icon: meIcon, activeIcon: meIconActive, label: '我的' }, |
| 48 | ]); | 50 | ]); |
| 49 | 51 | ||
| ... | @@ -51,11 +53,11 @@ const currentPage = computed(() => { | ... | @@ -51,11 +53,11 @@ const currentPage = computed(() => { |
| 51 | // const pages = Taro.getCurrentPages(); | 53 | // const pages = Taro.getCurrentPages(); |
| 52 | // return pages.length > 0 ? '/' + pages[pages.length - 1].route : ''; | 54 | // return pages.length > 0 ? '/' + pages[pages.length - 1].route : ''; |
| 53 | // 默认选中活动页面 | 55 | // 默认选中活动页面 |
| 54 | - return '/pages/Activities/index'; | 56 | + return '/pages/ActivitiesCover/index'; |
| 55 | }); | 57 | }); |
| 56 | 58 | ||
| 57 | const isActive = (path) => { | 59 | const isActive = (path) => { |
| 58 | - return currentPage.value === path; | 60 | + return path.includes(currentPage.value); |
| 59 | }; | 61 | }; |
| 60 | 62 | ||
| 61 | const navigate = (path) => { | 63 | const navigate = (path) => { | ... | ... |
-
Please register or login to post a comment