Browse Source

🎈 perf: 优化了部分细节

Pchen. 10 months ago
parent
commit
a9849e5c1e
2 changed files with 26 additions and 25 deletions
  1. 6 5
      src/pages/qxs/getBookList.vue
  2. 20 20
      src/router/index.js

+ 6 - 5
src/pages/qxs/getBookList.vue

@@ -12,7 +12,7 @@
                             </template>
                         </a-input>
                         <template #extra>
-                            <div>默认账号:ctbu+学号,如ctbu2024412000</div>
+                            <div>默认账号:手机号/身份证号/ctbu+学号</div>
                         </template>
                     </a-form-item>
                     <a-form-item field="password" label="密码">
@@ -48,15 +48,16 @@
             <a-table :data="data" stripe hoverable :pagination="false" column-resizable class="table" :loading="loading"
                 :columns="columns">
                 <template #imgUrl="{ record }">
+                    <a-image width="50" height="50" fit="contain" v-if="record.imgUrl" :src="record.imgUrl" />
                     <a-avatar shape="square" :size="50" :style="{ backgroundColor: 'rgba(0,0,0,0.25)' }"
-                        v-if="!bookInfo[record.isbn]?.img">
+                        v-else-if="!bookInfo[record.isbn]?.img">
                         <icon-book />
                     </a-avatar>
                     <a-image width="50" height="50" fit="contain" v-else :src="bookInfo[record.isbn]?.img" />
                 </template>
                 <template #textbookPrice="{ record }">
-                    <span class="oldPrice"><del>¥{{ record.textbookPrice }}</del></span> ¥{{
-                        record.textbookDiscountedPrice }}
+                    <span class="oldPrice" v-if="record.textbookPrice"><del>¥{{ record.textbookPrice }}</del></span> ¥{{
+                        record.textbookDiscountedPrice ?? record.totalDiscountedPrice }}
                 </template>
                 <template #crouseName="{ record }">
                     {{ record.crouseName }}({{ record.courseType }})
@@ -66,7 +67,7 @@
                 </template>
             </a-table>
             <div class="total">
-                共找到 {{ data.length }} 本书籍,封面图片及介绍来自第三方,仅供参考
+                共找到 {{ data.length }} 本书籍
             </div>
         </a-card>
     </div>

+ 20 - 20
src/router/index.js

@@ -146,6 +146,25 @@ const routes = [
             }
         ]
     },
+    {
+        path: "/qxs",
+        name: "qxs",
+        component: DEFAULT_LAYOUT,
+        meta: {
+            title: '趣选书',
+            icon: 'icon-book'
+        },
+        children: [
+            {
+                path: 'getBookList',
+                name: 'qxs.getBookList',
+                component: () => import('../pages/qxs/getBookList.vue'),
+                meta: {
+                    title: '书单查询'
+                }
+            }
+        ]
+    },
     {
         path: "/service",
         name: 'service',
@@ -183,25 +202,6 @@ const routes = [
             }
         ]
     },
-    {
-        path: "/qxs",
-        name: "qxs",
-        component: DEFAULT_LAYOUT,
-        meta: {
-            title: '趣选书',
-            icon: 'icon-book'
-        },
-        children: [
-            {
-                path: 'getBookList',
-                name: 'qxs.getBookList',
-                component: () => import('../pages/qxs/getBookList.vue'),
-                meta: {
-                    title: '书单查询'
-                }
-            }
-        ]
-    },
     {
         path: "/download",
         name: "download",
@@ -397,7 +397,7 @@ const router = VueRouter.createRouter({
     routes: routes
 })
 
-const allow = ['/', '/login', '/qxs/getBookList', '/htmlView/view']
+const allow = ['/', '/login', '/qxs/getBookList', '/htmlView/view', '/download/down']
 
 router.beforeEach(async (to, from, next) => {
     if (!allow.includes(to.path)) {