|
|
@@ -9,7 +9,7 @@ import Back from '@/components/back.uvue'
|
|
|
import Loading from '@/components/loading.uvue'
|
|
|
import { config } from '@/config'
|
|
|
import { dict } from '@/.cool/store'
|
|
|
-import { router,debounce } from "@/.cool";
|
|
|
+import { router, debounce } from "@/.cool";
|
|
|
|
|
|
const isLoading = ref(true)
|
|
|
const visible = ref<boolean>(false)
|
|
|
@@ -60,7 +60,7 @@ async function handleSelect(val: SubjectCatalogResult) {
|
|
|
uni.createSelectorQuery().select(`.category-${val.id}`).boundingClientRect().exec(async (rect) => {
|
|
|
if (cardsScrollView.value && rect[0]) {
|
|
|
cardsScrollView.value.scrollTo({
|
|
|
- left:scrollLeft.value + rect[0].left - dict.getWindowHeight() / 2, // 减去顶部偏移
|
|
|
+ left: scrollLeft.value + rect[0].left - dict.getWindowHeight() / 2, // 减去顶部偏移
|
|
|
animated: true
|
|
|
})
|
|
|
}
|
|
|
@@ -82,14 +82,14 @@ async function handleSelect(val: SubjectCatalogResult) {
|
|
|
// })
|
|
|
// })
|
|
|
// }, 300)
|
|
|
-function debouncedOnScroll(e:any) {
|
|
|
+function debouncedOnScroll(e: any) {
|
|
|
console.log(e);
|
|
|
- scrollLeft.value = e.detail.scrollLeft
|
|
|
+ scrollLeft.value = e.detail.scrollLeft
|
|
|
dataList.value.forEach(async (category) => {
|
|
|
const selector = `.category-${category.id}`
|
|
|
await uni.createSelectorQuery().selectAll(selector).boundingClientRect().exec((rects) => {
|
|
|
for (const rect of rects[0]) {
|
|
|
- if (rect.left <= (dict.getWindowHeight() / 2)&&rect.left>0) {
|
|
|
+ if (rect.left <= (dict.getWindowHeight() / 2) && rect.left > 0) {
|
|
|
catalog.value = category
|
|
|
return
|
|
|
}
|
|
|
@@ -131,9 +131,10 @@ function debouncedOnScroll(e:any) {
|
|
|
course.assistantTitle }}</text>
|
|
|
<view>
|
|
|
<Progress :num="6" size="12px"
|
|
|
- :percentage="course.courseUserProgress ?course.courseUserProgress?.status == 1 ? 6 : course.courseUserProgress?.assistantProgress : 0" />
|
|
|
+ :percentage="course.courseUserProgress ? course.courseUserProgress?.status == 1 ? 6 : course.courseUserProgress?.assistantProgress : 0" />
|
|
|
</view>
|
|
|
- <Lock v-if="!course.trialPlay && !course.payFlag" :record="course" isPay />
|
|
|
+ <Lock v-if="!course.trialPlay && !course.payFlag || !course.platFormLock" :record="course" isPay
|
|
|
+ :platFormLock="course.platFormLock" />
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|