lex 1 vuosi sitten
vanhempi
commit
6bab5ef507

+ 6 - 5
src/views/co-ai/baseIndex.module.less

@@ -182,17 +182,16 @@
     position: relative;
     position: relative;
     margin-bottom: 15px;
     margin-bottom: 15px;
     width: 100%;
     width: 100%;
-    height: 170px;
+    // height: 144px;
     background-color: #edeff2;
     background-color: #edeff2;
     box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4);
     box-shadow: 0 5px 14px rgba(0, 0, 0, 0.4);
 
 
     img {
     img {
       width: 100%;
       width: 100%;
-      // height: 100%;
-      height: calc(100% * 161 / 128);
-      // position: absolute;
+      aspect-ratio: 53 / 75;
     }
     }
 
 
+
     &::before {
     &::before {
       content: '';
       content: '';
       position: absolute;
       position: absolute;
@@ -214,6 +213,8 @@
       background-color: #e7e7e7;
       background-color: #e7e7e7;
       z-index: 2;
       z-index: 2;
     }
     }
+
+
   }
   }
 
 
   .name {
   .name {
@@ -269,7 +270,7 @@
   line-height: 1;
   line-height: 1;
   // height: calc(100% * 161 / 128 - 20px);
   // height: calc(100% * 161 / 128 - 20px);
   background-color: #edeff2;
   background-color: #edeff2;
-  background-image: url('./image/icon_default.svg');
+  background-image: url('../courseware-list/image/icon_default.svg');
   background-repeat: no-repeat;
   background-repeat: no-repeat;
   background-position: center center;
   background-position: center center;
 
 

+ 4 - 1
src/views/co-ai/baseIndex.tsx

@@ -8,7 +8,7 @@ import {
 } from 'vue';
 } from 'vue';
 import styles from './baseIndex.module.less';
 import styles from './baseIndex.module.less';
 import icon_back from './image/icon_back.svg';
 import icon_back from './image/icon_back.svg';
-import { Button, Space, Tab, Tabs, showConfirmDialog } from 'vant';
+import { Button, Space, Tab, Tabs, showConfirmDialog, Image } from 'vant';
 import {
 import {
   api_lessonCoursewareFavoriteRemove,
   api_lessonCoursewareFavoriteRemove,
   api_lessonCoursewareFavoriteSave
   api_lessonCoursewareFavoriteSave
@@ -24,6 +24,7 @@ import { api_musicSheetCategoriesPage, api_musicTagTree } from './api';
 import queryString from 'query-string';
 import queryString from 'query-string';
 import { useRect } from '@vant/use';
 import { useRect } from '@vant/use';
 import { nextTick } from 'process';
 import { nextTick } from 'process';
+import iconDefaultCo from './image/icon-default-co.png';
 
 
 export default defineComponent({
 export default defineComponent({
   name: 'baseIndex-list',
   name: 'baseIndex-list',
@@ -255,11 +256,13 @@ export default defineComponent({
                           class={[styles.cover, item.load ? styles.loaded : '']}
                           class={[styles.cover, item.load ? styles.loaded : '']}
                           objectFit="cover"
                           objectFit="cover"
                           src={item.coverImg}
                           src={item.coverImg}
+                          fallbackSrc={iconDefaultCo}
                           onLoad={() => {
                           onLoad={() => {
                             item.load = true;
                             item.load = true;
                           }}
                           }}
                           onError={() => {
                           onError={() => {
                             item.load = true;
                             item.load = true;
+                            item.error = true;
                           }}
                           }}
                         />
                         />
                       </div>
                       </div>

BIN
src/views/co-ai/image/icon-default-co.png


+ 1 - 1
src/views/courseware-list/index.module.less

@@ -409,4 +409,4 @@
       color: #fff;
       color: #fff;
     }
     }
   }
   }
-}
+}