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-06-13 13:54:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dfca5ee3c6eae94fb789c50a1dcf914759f1d1b1
dfca5ee3
1 parent
d2a57235
feat(学习记录页): 添加点击跳转课程详情功能
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
src/views/profile/LearningRecordsPage.vue
src/views/profile/LearningRecordsPage.vue
View file @
dfca5ee
...
...
@@ -13,7 +13,7 @@
:key="record.id"
class="p-4 rounded-xl"
>
<div class="flex items-start">
<div class="flex items-start"
@click="handleClick(record)"
>
<div
class="w-20 h-20 rounded-lg overflow-hidden flex-shrink-0 mr-3"
>
...
...
@@ -107,7 +107,7 @@
<script setup>
import { ref } from 'vue';
import { useRoute } from 'vue-router';
import { useRoute
, useRouter
} from 'vue-router';
import { useTitle } from '@vueuse/core';
import FrostedGlass from '@/components/ui/FrostedGlass.vue';
import { formatDate } from '@/utils/tools';
...
...
@@ -116,6 +116,8 @@ import { formatDate } from '@/utils/tools';
import { getStudyRecordListAPI } from "@/api/record";
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
const records = ref([]);
...
...
@@ -154,4 +156,9 @@ const handleImageError = (e) => {
e.target.onerror = null;
e.target.src = '/assets/images/course-placeholder.jpg';
};
// 跳转到课程详情页
const handleClick = (record) => {
$router.push(`/studyCourse/${record.id}`);
};
</script>
...
...
Please
register
or
login
to post a comment