|
|
@@ -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>
|