From 9cad6a832c786989be620573b09badccfe7e3b51 Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期一, 25 八月 2025 15:11:37 +0800
Subject: [PATCH] 首页头部,样式调整

---
 src/views/classManage/index.vue |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/src/views/classManage/index.vue b/src/views/classManage/index.vue
index 8495815..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'
 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 ?? 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
@@ -173,6 +192,9 @@
     flex: 1;
     height: auto;
   }
+  .main {
+    color: #019e58;
+  }
   .classContentBox {
     padding: 10px 40px;
     display: flex;
@@ -198,7 +220,7 @@
         margin-bottom: 10px;
         display: flex;
         .iconBox {
-          width: 90px;
+          width: 100px;
           height: 120px;
           img {
             width: 100%;
@@ -212,6 +234,7 @@
           .main {
             font-size: 16px;
             line-height: 20px;
+            color: #019e58;
           }
           .job {
             // padding:10px;

--
Gitblit v1.9.1