From 49a435043b0b1a289a24606e35253365d7ab3956 Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期一, 25 八月 2025 17:51:57 +0800 Subject: [PATCH] 首页、及教学出版样式修改 --- src/views/classManage/classHome.vue | 39 +++++++++++++++++++++++++++++++-------- 1 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/views/classManage/classHome.vue b/src/views/classManage/classHome.vue index 9a0dfad..11842b1 100644 --- a/src/views/classManage/classHome.vue +++ b/src/views/classManage/classHome.vue @@ -26,8 +26,8 @@ </div> <div class="infoBox"> <div class="main">{{ currentClass?.bookName }}</div> - <div class="job">浣滆�咃細{{ classInfo?.author ?? '-' }}</div> - <div class="job">ISBN锛歿{ classInfo?.isbn ?? '-' }}</div> + <div class="job">浣滆�咃細{{ currentClass?.author ?? '-' }}</div> + <div class="job">ISBN锛歿{ currentClass?.isbn ?? '-' }}</div> </div> </div> <div class="line"></div> @@ -283,10 +283,13 @@ .getCourseClass({ ClassIdOrRefCode: String(classInfo.id), }) - .then((res: any) => { + .then(async (res: any) => { if (res) { + const detail = await getBookDetail(res.linkProductDto.product.id) res.bookName = res.linkProductDto.product.name - res.bookIcon = getPublicImage(res.linkProductDto.product.icon, 100) + res.bookIcon = detail.icon ?? defaultImg + res.author = detail.author + res.isbn = detail.isbn res.classTime = moment(res.beginDate).format('YYYY.MM.DD') + '--' + @@ -507,9 +510,30 @@ console.log(e) }) } +// 鑾峰彇鏁欐潗璇︽儏 +const getBookDetail = async (id: string) => { + const query = { + path: '*', + queryType: '*', + productId: id, + coverSize: { + height: 300, + width: 210, + }, + fields: { + author: [], + isbn: [], + }, + } + const res = await MG.store.getProductDetail(query) + return res.datas ?? null +} </script> <style lang="less" scoped> +.main { + color: #019e58; +} .nullBox { width: 100%; display: flex; @@ -532,6 +556,7 @@ height: 190px; margin-top: 30px; border-radius: 10px; + border: 1px solid #019e58; .title { width: 80px; text-align: center; @@ -626,8 +651,6 @@ .titleBox { display: flex; align-items: center; - margin: 10px 0; - font-size: 16px; .title { width: 100%; display: flex; @@ -665,7 +688,6 @@ .titleBox { display: flex; align-items: center; - margin: 10px 0; .border { width: 4px; height: 23px; @@ -676,7 +698,7 @@ } .notBox { width: 100%; - height: 100px; + height: 120px; display: flex; align-items: center; justify-content: center; @@ -747,6 +769,7 @@ width: 100%; height: calc(100% - 63px); padding: 5px 25px; + box-sizing: border-box; overflow: auto; .noticeItem { display: flex; -- Gitblit v1.9.1