feat: 更新首页列表请求参数,添加加载指示器

ui: 调整课程详情页图标显示逻辑
This commit is contained in:
Timothy Yin 2024-09-21 18:24:21 +08:00
parent b62fe580af
commit 5cd49bfa4c
2 changed files with 6 additions and 3 deletions

View File

@ -27,7 +27,7 @@ onMounted(() => {
toast.loading({
msg: '加载中...'
})
BussApi.lessons().then(res => {
BussApi.lessons(1, 512).then(res => {
toast.close()
const groupData = res.data.sort((a: Lesson, b: Lesson) => {
return a.id - b.id

View File

@ -45,8 +45,11 @@ onMounted(() => {
<p class="text-xs text-white font-bold op-50" style="line-height: 1;">
创建于 {{ dayjs(lesson?.created_at).format('YYYY-MM-DD HH:mm:ss') }}
</p>
<wd-icon :name="lessonProgress === 100 ? 'check-circle' : 'hourglass'"
custom-class="absolute text-white top-2 right-2 op-35" size="64px" />
<div class="absolute text-white top-2 right-2 op-35 text-18">
<div v-if="lessonProgress === 100" class="i-tabler-circle-check"></div>
<div v-else-if="lessonProgress === 0" class="i-tabler-circle-dashed"></div>
<div v-else class="i-tabler-hourglass-empty"></div>
</div>
</div>
<div class="p-4">
<wd-steps :active="lessonStages?.step || 0" vertical>