hookehuyr

fix(teacher): 修复学生页面点评状态的可选链判断

......@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2025-06-19 17:12:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-10-28 11:10:00
* @LastEditTime: 2025-10-28 11:13:52
* @FilePath: /mlaj/src/views/teacher/studentPage.vue
* @Description: 学生详情页面
-->
......@@ -259,13 +259,13 @@
<div class="flex items-center cursor-pointer" @click="openCommentPopup(post)">
<van-icon
name="comment-o"
:color="post.is_feedback ? '#10b981' : '#999'"
:color="post?.is_feedback ? '#10b981' : '#999'"
size="19"
class="mr-1"
style="margin-top: 0.2rem;"
/>
<span class="text-sm" :class="post.is_feedback ? 'text-green-600' : 'text-gray-500'">
{{ post.is_feedback ? '已点评' : '待点评' }}
<span class="text-sm" :class="post?.is_feedback ? 'text-green-600' : 'text-gray-500'">
{{ post?.is_feedback ? '已点评' : '待点评' }}
</span>
</div>
</div>
......@@ -301,7 +301,7 @@
<!-- 评分 -->
<div class="mb-4">
<div class="text-sm text-gray-600 mb-2">评分</div>
<van-rate v-model="commentForm.score" :size="24" color="#ffd21e" void-color="#eee" :readonly="currentCommentPost.is_feedback" />
<van-rate v-model="commentForm.score" :size="24" color="#ffd21e" void-color="#eee" :readonly="currentCommentPost?.is_feedback" />
</div>
<!-- 点评内容 -->
......@@ -316,12 +316,12 @@
show-word-limit
:border="false"
class="bg-gray-50 rounded-lg"
:readonly="currentCommentPost.is_feedback"
:readonly="currentCommentPost?.is_feedback"
/>
</div>
<!-- 操作按钮 -->
<div v-if="!currentCommentPost.is_feedback" class="flex gap-3">
<div v-if="!currentCommentPost?.is_feedback" class="flex gap-3">
<van-button
block
type="default"
......