索引滚动

This commit is contained in:
2024-06-26 16:29:21 +08:00
parent 1bd13fdbd8
commit f1212a42d7
3 changed files with 525 additions and 226 deletions

View File

@@ -33,29 +33,23 @@
</view>
</template> -->
<view class="contentBox commonPageContentBox" :style="`height:auto !important`">
<view
class="contentBox commonPageContentBox"
:style="`height:auto !important`"
>
<!-- <scroll-view class="scroll-view_H statusList" scroll-x="true" scroll-left="0"> -->
<!-- <view class="statusList flexbox" >
<text :class="[currentStatusIndex == index ? 'cur' : '']" @click="setOneCateIndex(item, index)"
v-for="(item, index) in statusList" :key="item.type">{{ item.title }}</text>
</view> -->
<common-sticky
label="title"
itemStyle="width:33%;padding-left: 15px; padding-right: 15px; height: 68rpx;"
:list="cateList"
:currentCateIndex="currentCateIndex"
@handleselectCate="handleselectCate"
></common-sticky>
<scroll-view
scroll-y
class="scroll"
:style="`height:calc(100vh - ${(110 + statusBarHeight) * 2}rpx)`"
:scroll-into-view="viewid"
scroll-with-animation
@scroll="scrollEvt"
>
<u-sticky>
<common-sticky
label="title"
itemStyle="width:33%;padding-left: 15px; padding-right: 15px; height: 68rpx;"
:list="cateList"
:currentCateIndex="currentCateIndex"
@handleselectCate="handleselectCate"
></common-sticky>
<u-alert
style="width: 100%; z-index: 10"
type="warning"
@@ -66,31 +60,40 @@
v-if="vip.type != 0 && currentCateIndex != 2"
>
</u-alert>
<template v-if="currentCateIndex == 1">
<u-index-list :index-list="indexList" activeColor="#60CABF" :uIndexStyle="{
height:'auto',
padding:'20rpx'
}">
<view v-for="(item, index) in itemArr">
<!-- #ifdef APP-NVUE -->
<u-index-anchor :text="indexList[index]" :bgColor="#AFDECC"></u-index-anchor>
</u-sticky>
<template v-if="currentCateIndex == 1">
<u-index-list
:index-list="indexList"
activeColor="#60CABF"
:uIndexStyle="{
height: 'auto',
padding: '20rpx',
}"
>
<view v-for="(item, index) in itemArr">
<!-- #ifdef APP-NVUE -->
<u-index-anchor
:text="indexList[index]"
:bgColor="#AFDECC"
></u-index-anchor>
<!-- #endif -->
<u-index-item>
<!-- #ifndef APP-NVUE -->
<u-index-anchor :text="indexList[index]"></u-index-anchor>
<!-- #endif -->
<u-index-item>
<!-- #ifndef APP-NVUE -->
<u-index-anchor :text="indexList[index]"></u-index-anchor>
<!-- #endif -->
<curriculm-list
<curriculm-list
:currentCateIndex="currentCateIndex"
@refresh="getCourseDescriptionData()"
:dataList="item"
:userInfo="userInfo"
>
</curriculm-list>
</u-index-item>
</view>
</u-index-list>
</u-index-item>
</view>
</u-index-list>
<!-- <view
<!-- <view
v-for="(v, index) in allDataList"
:key="index"
class="right-item"
@@ -115,17 +118,28 @@
</curriculm-list>
</view>
</view> -->
</template>
<template v-else>
<curriculm-list
:currentCateIndex="currentCateIndex"
@refresh="getCourseDescriptionData()"
:dataList="allDataList"
:userInfo="userInfo"
>
</curriculm-list>
</template>
</scroll-view>
</template>
<template v-else>
<curriculm-list
:currentCateIndex="currentCateIndex"
@refresh="getCourseDescriptionData()"
:dataList="allDataList"
:userInfo="userInfo"
>
</curriculm-list>
</template>
<!-- <scroll-view
scroll-y
class="scroll"
:style="`height:calc(100vh - ${(110 + statusBarHeight) * 2}rpx)`"
:scroll-into-view="viewid"
scroll-with-animation
@scroll="scrollEvt"
>
</scroll-view> -->
<!-- <view
class="u-page__item"
@@ -610,9 +624,9 @@ export default {
});
},
getCourseDescriptionData() {
this.allDataList=[]
this.indexList=[]
this.itemArr=[]
this.allDataList = [];
this.indexList = [];
this.itemArr = [];
var data = {};
if (this.currentCateIndex == 0) {
// data.userId = this.userInfo.id;