whj 1 viikko sitten
vanhempi
commit
f8b4dcbd66
2 muutettua tiedostoa jossa 8 lisäystä ja 6 poistoa
  1. 3 3
      pages/card/index.uvue
  2. 5 3
      pages/catalog/index.uvue

+ 3 - 3
pages/card/index.uvue

@@ -5,7 +5,7 @@ import { ref, onMounted, nextTick } from 'vue'
 import { type SubjectKnowledgeCardResult, getSubjectKnowledgeCard } from '@/services/subject/card'
 import { fetchSubjectConfigInfo } from '@/services/subject/info'
 import type { SubjectCatalogResult } from '@/services/subject/catalog'
-// import uni from "@dcloudio/vite-plugin-uni";
+import { config } from '@/config'
 
 const activeCategory = ref<string>()
 const activeTab = ref<string>('knowledge')
@@ -72,7 +72,7 @@ onMounted(async () => {
       <scroll-view direction="vertical" :show-scrollbar="false" class="sidebar">
         <view v-for="category in categories" :key="category.id" class="sidebar-item"
           :class="{ active: activeCategory === category.id }" @tap="handleSelect(category.id as string)">
-          <cl-image :src="category?.fileList?.[0]?.url" mode="heightFix" class="!h-[28px]"></cl-image>
+          <cl-image :src="config.baseUrl + category?.fileList?.[0]?.url" mode="heightFix" class="!h-[28px]"></cl-image>
           <text class="sidebar-text">{{ category.name }}</text>
         </view>
       </scroll-view>
@@ -89,7 +89,7 @@ onMounted(async () => {
           @scroll="onScroll">
           <view class="grid grid-cols-5 gap-4">
             <view class="card" v-for="card in cards" :key="card.id" :data-category="card.catalogId" ref="categoryRefs">
-              <image v-if="card.userCardId" :src="card.iconPath" class="w-full h-full" />
+              <image v-if="card.userCardId" :src="config.baseUrl + card.iconPath" class="w-full h-full" />
               <image v-else src="https://oss.xiaoxiongcode.com/static/home/21.png" class="w-full h-full" />
               <view class="card-title">{{ card.cardName }}</view>
             </view>

+ 5 - 3
pages/catalog/index.uvue

@@ -11,14 +11,14 @@
     </view>
     <!-- 顶部右侧光标签 -->
     <view class="light-tag" @tap="visible = true">
-      <image class="light-icon" :src="catalog?.fileList?.[0]?.url"></image>
+      <image class="light-icon" :src="config.baseUrl + catalog?.fileList?.[0]?.url"></image>
       <text class="light-text">{{ catalog?.name }}</text>
       <cl-icon name="arrow-left-right-line" color="primary"></cl-icon>
     </view>
     <view class="boxs">
       <scroll-view class="scroll-view_H" direction="horizontal" :show-scrollbar="false">
         <view class="scroll-view-item_H bg-[white]" v-for="course in catalog?.courseList || []" :key="course.id">
-          <cl-image :src="course?.fileList?.[0]?.url" mode="heightFix"
+          <cl-image :src="config.baseUrl + course?.fileList?.[0]?.url" mode="heightFix"
             class="!w-full !h-[26vh] mb-[2px] rounded-xl"></cl-image>
           <text class="text-[16px] font-bold">{{
             course.mainTitle }}</text>
@@ -54,7 +54,7 @@
             className: '!p-2'
           }" @tap="handleSelect(item)">
             <view class="select-item" :class="{ selected: item.id === catalog?.id }">
-              <image :src="item?.fileList?.[0]?.url" class="w-[30rpx] h-[30rpx] mb-[2px]"></image>
+              <image :src="config.baseUrl + item?.fileList?.[0]?.url" class="w-[30rpx] h-[30rpx] mb-[2px]"></image>
               <text>{{ item.name }}</text>
             </view>
           </cl-col>
@@ -71,6 +71,7 @@ import type { SubjectCatalogResult } from '@/services/subject/catalog'
 import Progress from './components/progress.uvue'
 import Back from '@/components/back.uvue'
 import Loading from '@/components/loading.uvue'
+import { config } from '@/config'
 
 const isLoading = ref(true)
 
@@ -100,6 +101,7 @@ function handleSelect(item: SubjectCatalogResult) {
 
 .scroll-view_H {
   width: 100%;
+  height: 100%;
   flex-direction: row;
 }