Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-12-03 15:07:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
80c49a6b30bf207944eb8ff1687755fbbfd61526
80c49a6b
1 parent
ad4f8c78
feat(课程页): 为课程横幅添加点击跳转功能
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
src/views/courses/CoursesPage.vue
src/views/courses/CoursesPage.vue
View file @
80c49a6
...
...
@@ -19,6 +19,7 @@
v-for="(banner, index) in bannerList"
:key="index"
class="relative"
@click="handleBannerClick(banner)"
>
<img
:src="banner.banner || 'https://cdn.ipadbiz.cn/mlaj/images/featured-course.jpg'"
...
...
@@ -124,6 +125,15 @@ const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
const handleBannerClick = (banner) => {
if (!banner.post_link) return;
if (banner.post_link.startsWith('http')) {
window.location.href = banner.post_link;
} else {
$router.push(banner.post_link);
}
};
// Current time for the countdown timer
const todayDate = new Date();
const formattedTime = featuredCourse.liveTime.split(":");
...
...
Please
register
or
login
to post a comment