hookehuyr

fix(BottomNav): 更新活动页面路径并修改兑换页面链接

将活动页面路径从'/pages/Activities/index'更新为'/pages/ActivitiesCover/index'
修改兑换页面链接为带参数的固定值,并添加注释说明
调整isActive逻辑以支持路径包含判断
<!--
* @Date: 2025-08-27 17:44:10
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-09 11:08:37
* @LastEditTime: 2025-09-15 13:27:04
* @FilePath: /map-demo/src/components/BottomNav.vue
* @Description: 文件描述
-->
......@@ -42,8 +42,10 @@ const isMiniProgramWebView = computed(() => {
const navItems = shallowRef([
{ path: '/pages/Dashboard/index', icon: homeIcon, activeIcon: homeIconActive, label: '首页' },
{ path: '/pages/Activities/index', icon: activitiesIcon, activeIcon: activitiesIconActive, label: '活动' },
{ path: '/pages/RewardCategories/index', icon: rewardsIcon, activeIcon: rewardsIconActive, label: '兑换' },
{ path: '/pages/ActivitiesCover/index', icon: activitiesIcon, activeIcon: activitiesIconActive, label: '活动' },
// { path: '/pages/RewardCategories/index', icon: rewardsIcon, activeIcon: rewardsIconActive, label: '兑换' },
// TAG: 暂时写死以后可能会改变
{ path: '/pages/Rewards/index?id=health&category=health', icon: rewardsIcon, activeIcon: rewardsIconActive, label: '兑换' },
{ path: '/pages/Profile/index', icon: meIcon, activeIcon: meIconActive, label: '我的' },
]);
......@@ -51,11 +53,11 @@ const currentPage = computed(() => {
// const pages = Taro.getCurrentPages();
// return pages.length > 0 ? '/' + pages[pages.length - 1].route : '';
// 默认选中活动页面
return '/pages/Activities/index';
return '/pages/ActivitiesCover/index';
});
const isActive = (path) => {
return currentPage.value === path;
return path.includes(currentPage.value);
};
const navigate = (path) => {
......