hookehuyr

refactor: 将默认值“空数据”替换为“N/A”

统一将默认值“空数据”替换为“N/A”,提高代码一致性和可读性
......@@ -17,10 +17,10 @@
<div class="flex-1 p-3 flex flex-col justify-between">
<div>
<h3 class="font-medium text-sm mb-1 line-clamp-2">{{ course.title }}</h3>
<div class="text-gray-500 text-xs">{{ course.subtitle || '空数据' }}</div>
<div class="text-gray-500 text-xs">{{ course.subtitle || 'N/A' }}</div>
</div>
<div class="flex justify-between items-end mt-1">
<div class="text-orange-500 font-semibold">¥{{ course.price || '空数据' }}</div>
<div class="text-orange-500 font-semibold">¥{{ course.price || 'N/A' }}</div>
<div class="text-gray-400 text-xs">
{{ course.subscribers || '没字段' }}人订阅
</div>
......
......@@ -10,13 +10,13 @@
<h1 class="text-2xl text-white font-bold mb-1">{{ course?.title }}</h1>
<h2 class="text-lg text-white/90">{{ course?.subtitle || '没有字段' }}</h2>
<div class="mt-4 flex justify-between items-center">
<div class="text-orange-300 font-bold text-2xl">¥{{ course?.price || '空数据' }}</div>
<div class="text-orange-300 font-bold text-2xl">¥{{ course?.price || 'N/A' }}</div>
<div class="bg-orange-500/30 text-orange-100 text-xs px-3 py-1 rounded-full">
限时优惠
</div>
</div>
<div class="flex justify-between text-xs text-white/80 mt-3">
<div>已更新{{ course?.count || '空数据' }}期</div>
<div>已更新{{ course?.count || 'N/A' }}期</div>
<div>{{ course?.subscribers || '没有字段' }}人订阅</div>
</div>
<div v-if="course?.expireDate" class="text-xs text-white/80 mt-1">
......@@ -73,14 +73,14 @@
<li>随堂练习,巩固知识</li>
<li>及时反馈,调整教学</li>
</ul> -->
<div v-html="course?.feature || '空数据'"></div>
<div v-html="course?.feature || 'N/A'"></div>
</div>
<div v-if="activeTab === '课程大纲'">
<div class="space-y-4">
<div v-for="(item, index) in displayedSchedule" :key="index" class="border-l-2 border-green-500 pl-3">
<h4 class="font-medium text-gray-800">{{ item.title }}</h4>
<p class="text-sm text-gray-600 mt-1">{{ item.duration }}分钟 · {{ item.schedule_time || '空数据' }}个小节</p>
<p class="text-sm text-gray-600 mt-1">{{ item.duration }}分钟 · {{ item.schedule_time || 'N/A' }}个小节</p>
</div>
<div v-if="course?.schedule?.length > 4" class="flex justify-center mt-4">
<button @click="toggleSchedule" class="p-2 rounded-full hover:bg-green-50 text-green-600 hover:text-green-700 transition-all duration-300">
......@@ -92,13 +92,13 @@
<div v-if="activeTab === '课程亮点'">
<div class="space-y-3 text-gray-700">
<div v-html="course?.highlights || '空数据'"></div>
<div v-html="course?.highlights || 'N/A'"></div>
</div>
</div>
<div v-if="activeTab === '学习目标'">
<div class="space-y-3 text-gray-700">
<div v-html="course?.learning_goal || '空数据'"></div>
<div v-html="course?.learning_goal || 'N/A'"></div>
</div>
</div>
</div>
......