fix(MyFavoritesPage): 替换跳转链接为暂无数据提示
使用 vant 的 showToast 替代直接跳转百度,提升用户体验
Showing
1 changed file
with
4 additions
and
1 deletions
| ... | @@ -57,6 +57,7 @@ import ActivityCard from '@/components/ui/ActivityCard.vue'; | ... | @@ -57,6 +57,7 @@ import ActivityCard from '@/components/ui/ActivityCard.vue'; |
| 57 | import { courses as mockCourses, activities as mockActivities } from '@/utils/mockData'; | 57 | import { courses as mockCourses, activities as mockActivities } from '@/utils/mockData'; |
| 58 | import { useTitle } from '@vueuse/core'; | 58 | import { useTitle } from '@vueuse/core'; |
| 59 | import AppLayout from "@/components/layout/AppLayout.vue"; | 59 | import AppLayout from "@/components/layout/AppLayout.vue"; |
| 60 | +import { showToast } from 'vant'; | ||
| 60 | 61 | ||
| 61 | // 导入接口 | 62 | // 导入接口 |
| 62 | import { getGroupFavoriteListAPI } from '@/api/favorite'; | 63 | import { getGroupFavoriteListAPI } from '@/api/favorite'; |
| ... | @@ -117,7 +118,9 @@ const onCoursesLoad = async () => { | ... | @@ -117,7 +118,9 @@ const onCoursesLoad = async () => { |
| 117 | // 切换标签页 | 118 | // 切换标签页 |
| 118 | const onClickTab = ({ name, title }) => { | 119 | const onClickTab = ({ name, title }) => { |
| 119 | if (name === 'activities') { | 120 | if (name === 'activities') { |
| 120 | - location.href = 'http://www.baidu.com' | 121 | + // location.href = 'http://www.baidu.com' |
| 122 | + // 提示暂无数据 | ||
| 123 | + showToast('暂无收藏活动') | ||
| 121 | } | 124 | } |
| 122 | }; | 125 | }; |
| 123 | </script> | 126 | </script> | ... | ... |
-
Please register or login to post a comment