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 20:02:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
401a018ce8d7894c3015cbfe78a6ad5bc9f77246
401a018c
1 parent
12381e45
fix: 修复课程不存在时的跳转逻辑并添加匿名用户显示
当课程不存在时添加跳转回上一页的逻辑 在评论和评分页面为没有名字的用户显示'匿名用户'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
src/views/courses/CourseReviewsPage.vue
src/views/profile/StudyCoursePage.vue
src/views/study/StudyDetailPage.vue
src/views/courses/CourseReviewsPage.vue
View file @
401a018
<!--
* @Date: 2025-03-21 11:33:26
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-
04-22 10:21:10
* @LastEditTime: 2025-
12-03 20:00:05
* @FilePath: /mlaj/src/views/courses/CourseReviewsPage.vue
* @Description: 文件描述
-->
...
...
@@ -23,7 +23,7 @@
<div class="flex justify-between items-center mb-2">
<div class="flex items-center flex-1 min-w-0 mr-2">
<div class="flex-grow">
<span class="font-medium text-sm block">{{ review.name }}</span>
<span class="font-medium text-sm block">{{ review.name
|| '匿名用户'
}}</span>
</div>
</div>
<van-rate v-model="review.score" readonly :size="20" color="#ffd21e" void-icon="star" void-color="#eee" />
...
...
src/views/profile/StudyCoursePage.vue
View file @
401a018
...
...
@@ -379,6 +379,11 @@ onMounted(async () => {
default_list.value = task_list.value;
showTaskList.value = true;
}
else {
// 课程不存在,跳转到课程主页面
showToast('课程不存在')
router.go(-1);
}
/**
* 初始化时计算topWrapperHeight
*/
...
...
src/views/study/StudyDetailPage.vue
View file @
401a018
...
...
@@ -130,7 +130,7 @@
class="w-10 h-10 rounded-full flex-shrink-0" style="margin-right: 0.5rem;" />
<div class="flex-1 ml-3">
<div class="flex justify-between items-center mb-1">
<span class="font-medium text-gray-900">{{ comment.name }}</span>
<span class="font-medium text-gray-900">{{ comment.name
|| '匿名用户'
}}</span>
<div class="flex items-center space-x-1">
<span class="text-sm text-gray-500">{{ comment.like_count }}</span>
<van-icon :name="comment.is_like ? 'like' : 'like-o'"
...
...
@@ -163,7 +163,7 @@
style="margin-right: 0.5rem;" />
<div class="flex-1 ml-3">
<div class="flex justify-between items-center mb-1">
<span class="font-medium text-gray-900">{{ comment.name }}</span>
<span class="font-medium text-gray-900">{{ comment.name
|| '匿名用户'
}}</span>
<div class="flex items-center space-x-1">
<span class="text-sm text-gray-500">{{ comment.like_count
}}</span>
...
...
Please
register
or
login
to post a comment