From 62f335270fe5137ac6a56125fef6f291ed453f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 5 Dec 2025 13:56:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9B=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/analytics/study.vue | 59 ++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/src/pages/analytics/study.vue b/src/pages/analytics/study.vue index 42a3cf6f..64a62a9a 100644 --- a/src/pages/analytics/study.vue +++ b/src/pages/analytics/study.vue @@ -107,36 +107,36 @@ - + - + {{item.title}} {{item.content}} - + - + {{item.title}} {{item.content}} - + - + {{suggestObj.content}} - + - + 暂无数据 @@ -225,26 +225,45 @@ } } const loading = ref(false) + const loading1 = ref(false) + const loading2 = ref(false) + const loading3 = ref(false) + const loading4 = ref(false) const getInfoNow = async (params) => { loading.value = true - try { - let _res1 = await queryStudyStatistics(params) + loading2.value = true + loading1.value = true + loading3.value = true + queryStudyStatistics(params).then(_res1 => { statisticsObj.value = { ..._res1.body } - let _res2 = await queryDimesionInfo(params) + loading.value = false + }).catch(() => { + loading.value = false + }) + queryDimesionInfo(params).then(_res2 => { dimesionList.value = [..._res2.body] - let _res3 = await queryHabitInfo(params) + loading1.value = false + }).catch(() => { + loading1.value = false + }) + queryHabitInfo(params).then(_res3 => { studyList.value = [..._res3.body] - let _res4 = await querySuggestInfo(params) + loading2.value = false + }).catch(() => { + loading2.value = false + }) + querySuggestInfo(params).then(_res4 => { if (_res4.body && _res4.body.length > 0) { suggestObj.value = { ..._res4.body[0] } } - } catch {} finally { - loading.value = false - } + loading3.value = false + }).catch(() => { + loading3.value = false + }) } // 跳转 课程详情 const toCourseDetail = item => { @@ -263,9 +282,12 @@ } const getCrsListNow = () => { + loading4.value = true queryRecmdCrsInfo().then(res => { - console.log(res) courseList.value = res.body || [] + loading4.value = false + }).catch(() => { + loading4.value = false }) } onMounted(() => { @@ -377,8 +399,9 @@ backdrop-filter: blur(10rpx); z-index: 1; - &.loading-box-cont{ + &.loading-box-cont { background: #ddeafa; + &::before { content: ''; display: block;