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/index.vue | 35 +++++++++++++++++++++++++++++++---- 1 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/views/classManage/index.vue b/src/views/classManage/index.vue index cdc925a..71e6c84 100644 --- a/src/views/classManage/index.vue +++ b/src/views/classManage/index.vue @@ -52,7 +52,6 @@ import { ref, watch, provide, onMounted, inject } from 'vue' import { useRoute, useRouter, onBeforeRouteUpdate } from 'vue-router' import { menu } from './config' -import { getPublicImage } from '@/assets/js/middleGround/tool.js' import defaultImg from '@/assets/images/default-book-img.png' const router: any = useRouter() @@ -90,9 +89,29 @@ path.value = to.path }) -onMounted(() => { +// 鑾峰彇鏁欐潗璇︽儏 +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 +} + +onMounted(async () => { classInfo.value = JSON.parse(route.query.classInfo) - classIcon.value = classInfo.value.icon ? getPublicImage(classInfo.value.icon, 200) : defaultImg + const detail = await getBookDetail(classInfo.value.bookId) + classIcon.value = detail.icon ?? defaultImg menu.forEach((item) => { if ('/' + item.path === path.value) { label.value = item.label @@ -165,9 +184,16 @@ display: flex; flex-direction: column; background-color: #fff; + .mainbg { + background: #019e58; + color: #fff; + } .layoutContentBox { flex: 1; height: auto; + } + .main { + color: #019e58; } .classContentBox { padding: 10px 40px; @@ -194,7 +220,7 @@ margin-bottom: 10px; display: flex; .iconBox { - width: 90px; + width: 100px; height: 120px; img { width: 100%; @@ -208,6 +234,7 @@ .main { font-size: 16px; line-height: 20px; + color: #019e58; } .job { // padding:10px; -- Gitblit v1.9.1