|
@@ -1,6 +1,6 @@
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { user } from '@/.cool'
|
|
import { user } from '@/.cool'
|
|
|
-import { ref, onMounted, computed } from 'vue'
|
|
|
|
|
|
|
+import { ref, onMounted, computed } from 'vue'
|
|
|
import { fetchSubjectAppInfo } from '@/services/subject/info'
|
|
import { fetchSubjectAppInfo } from '@/services/subject/info'
|
|
|
import type { SubjectCatalogResult } from '@/services/subject/catalog'
|
|
import type { SubjectCatalogResult } from '@/services/subject/catalog'
|
|
|
import type { SubjectCourseResult } from '@/services/subject/course'
|
|
import type { SubjectCourseResult } from '@/services/subject/course'
|
|
@@ -20,7 +20,7 @@ const record = ref<any>()
|
|
|
const courseList = ref<SubjectCourseResult[]>()
|
|
const courseList = ref<SubjectCourseResult[]>()
|
|
|
async function getDataList() {
|
|
async function getDataList() {
|
|
|
const id = dict.getValueByLabelMapByType('index_subject_id')['数学']
|
|
const id = dict.getValueByLabelMapByType('index_subject_id')['数学']
|
|
|
- const res = await fetchSubjectAppInfo({ id,delFlag: false, })
|
|
|
|
|
|
|
+ const res = await fetchSubjectAppInfo({ id, delFlag: false, })
|
|
|
record.value = res
|
|
record.value = res
|
|
|
dataList.value = res.catalogList || []
|
|
dataList.value = res.catalogList || []
|
|
|
catalog.value = res?.catalogList?.[0]
|
|
catalog.value = res?.catalogList?.[0]
|
|
@@ -86,7 +86,8 @@ const userInfo = computed(() => user.info.value?.userInfo)
|
|
|
<Loading v-show="isLoading" />
|
|
<Loading v-show="isLoading" />
|
|
|
<cl-page v-show="!isLoading">
|
|
<cl-page v-show="!isLoading">
|
|
|
<Back />
|
|
<Back />
|
|
|
- <image mode="aspectFill" src="https://oss.xiaoxiongcode.com/static/home/math-bg.png" alt="" class="w-full h-full object-cover" />
|
|
|
|
|
|
|
+ <image mode="aspectFill" src="https://oss.xiaoxiongcode.com/static/home/math-bg.png" alt=""
|
|
|
|
|
+ class="w-full h-full object-cover" />
|
|
|
<!-- 精灵图动画 -->
|
|
<!-- 精灵图动画 -->
|
|
|
<cl-image src="https://oss.xiaoxiongcode.com/static/home/3.gif" mode="heightFix"
|
|
<cl-image src="https://oss.xiaoxiongcode.com/static/home/3.gif" mode="heightFix"
|
|
|
class="!absolute bottom-0 left-0 !w-[44vh] !h-[55vh] z-[1]" />
|
|
class="!absolute bottom-0 left-0 !w-[44vh] !h-[55vh] z-[1]" />
|
|
@@ -101,22 +102,25 @@ const userInfo = computed(() => user.info.value?.userInfo)
|
|
|
<cl-icon name="arrow-left-right-line" color="primary"></cl-icon>
|
|
<cl-icon name="arrow-left-right-line" color="primary"></cl-icon>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="boxs">
|
|
<view class="boxs">
|
|
|
- <scroll-view class="scroll-view_H" direction="horizontal" :show-scrollbar="false" ref="cardsScrollView" @scroll="debouncedOnScroll">
|
|
|
|
|
- <view class="scroll-view-item_H bg-[white]" v-for="course in courseList || []" :class="`category-${course.catalogId}`" :key="course.id"
|
|
|
|
|
- @tap="handleDetail(course)">
|
|
|
|
|
- <cl-image :src="course?.ossIconPath" mode="heightFix"
|
|
|
|
|
|
|
+ <scroll-view class="scroll-view_H" direction="horizontal" :show-scrollbar="false" ref="cardsScrollView"
|
|
|
|
|
+ @scroll="debouncedOnScroll">
|
|
|
|
|
+ <view class="scroll-view-item_H bg-[white]" v-for="course in courseList || []"
|
|
|
|
|
+ :class="`category-${course.catalogId}`" :key="course.id" @tap="handleDetail(course)">
|
|
|
|
|
+ <cl-image :src="course?.ossIconPath" mode="heightFix"
|
|
|
class="!w-full !h-[26vh] mb-[2px] rounded-xl"></cl-image>
|
|
class="!w-full !h-[26vh] mb-[2px] rounded-xl"></cl-image>
|
|
|
- <cl-text ellipsis :pt="{
|
|
|
|
|
|
|
+ <cl-text ellipsis :pt="{
|
|
|
className: '!text-[4vh] !font-bold'
|
|
className: '!text-[4vh] !font-bold'
|
|
|
}">{{
|
|
}">{{
|
|
|
- course.sortNum }}、{{
|
|
|
|
|
|
|
+ course.sortNum }}、{{
|
|
|
course.mainTitle }}</cl-text>
|
|
course.mainTitle }}</cl-text>
|
|
|
- <text class="text-[3vh] text-[#666]">{{
|
|
|
|
|
- course.assistantTitle }}</text>
|
|
|
|
|
|
|
+ <cl-text ellipsis color="#666" :pt="{
|
|
|
|
|
+ className: '!text-[3vh]'
|
|
|
|
|
+ }">{{
|
|
|
|
|
+ course.assistantTitle }}</cl-text>
|
|
|
<!-- <view>
|
|
<!-- <view>
|
|
|
<Progress :progress="30" />
|
|
<Progress :progress="30" />
|
|
|
</view> -->
|
|
</view> -->
|
|
|
- <Lock v-if="userInfo?.memberLevel === 'default'" :record="course" type="vip"/>
|
|
|
|
|
|
|
+ <Lock v-if="userInfo?.memberLevel === 'default'" :record="course" type="vip" />
|
|
|
</view>
|
|
</view>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
</view>
|
|
</view>
|