|
@@ -6,8 +6,8 @@
|
|
|
swiperWidth="750"></u-tabs-swiper>
|
|
|
</view>
|
|
|
<swiper class="check-list" :current="swiperCurrent" @transition="transition" @change="swiperChange" @animationfinish="animationfinish">
|
|
|
- <swiper-item class="swiper-item" style="height: 100%;width: 100%;overflow: hidden;" v-for="(tabs, indexs) in tabList" :key="indexs">
|
|
|
- <scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
|
|
|
+ <swiper-item style="height: 100%;width: 100%;overflow: hidden;" v-for="(tabs, indexs) in tabList" :key="indexs">
|
|
|
+ <scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom" v-if="swiperCurrent==indexs">
|
|
|
<view
|
|
|
class="check-order-list"
|
|
|
v-for="(item,index) in list"
|
|
@@ -23,7 +23,7 @@
|
|
|
<u-icon size="30" color="#fff" name="eye-fill"></u-icon>
|
|
|
{{item.viewNum}}
|
|
|
</view>
|
|
|
- <u-image :src="item.imageSet[0]" height="200px" width="100%"></u-image>
|
|
|
+ <u-image :src="item.images" height="200px" width="100%"></u-image>
|
|
|
</view>
|
|
|
<view class="ellipsis-two">{{item.titile}}</view>
|
|
|
</view>
|
|
@@ -55,7 +55,7 @@
|
|
|
swiperCurrent: 0,
|
|
|
// 查询条件
|
|
|
pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 5,
|
|
|
list: [],
|
|
|
total: 0,
|
|
|
videoObj:null
|
|
@@ -91,12 +91,14 @@
|
|
|
},
|
|
|
// tabs通知swiper切换
|
|
|
tabsChange(index) {
|
|
|
+ this.list = []
|
|
|
+ this.status = "loading"
|
|
|
this.swiperCurrent = index;
|
|
|
},
|
|
|
swiperChange(event){
|
|
|
- console.log(event.detail)
|
|
|
this.list = []
|
|
|
this.status = "loading"
|
|
|
+ this.swiperCurrent = event.detail.current;
|
|
|
},
|
|
|
// swiper-item左右移动,通知tabs的滑块跟随移动
|
|
|
transition(e) {
|
|
@@ -116,7 +118,6 @@
|
|
|
},
|
|
|
// scroll-view到底部加载更多
|
|
|
onreachBottom() {
|
|
|
- console.log(this.list.length, this.total)
|
|
|
if(this.list.length < this.total){
|
|
|
this.pageNo += 1
|
|
|
this.getRow()
|
|
@@ -137,16 +138,21 @@
|
|
|
params.category = this.tabList ? this.tabList[this.swiperCurrent].code : ''
|
|
|
this.status = "loading"
|
|
|
getVideoList(params).then(res => {
|
|
|
- if (res.code == 200 || res.status == 204 || res.status == 200) {
|
|
|
+ if (res.status == 200) {
|
|
|
const list = res.data.list || []
|
|
|
+ const ret = []
|
|
|
list.map(item => {
|
|
|
- item.showVideo = false
|
|
|
+ ret.push({
|
|
|
+ id: item.id,
|
|
|
+ showVideo: false,
|
|
|
+ contentType: item.contentType,
|
|
|
+ titile: item.titile,
|
|
|
+ viewNum: item.viewNum,
|
|
|
+ images: item.images,
|
|
|
+ content: item.content
|
|
|
+ })
|
|
|
})
|
|
|
- if(_this.pageNo>1){
|
|
|
- _this.list = _this.list.concat(list)
|
|
|
- }else{
|
|
|
- _this.list = list
|
|
|
- }
|
|
|
+ _this.list = _this.list.concat(ret)
|
|
|
_this.total = res.data.count || 0
|
|
|
} else {
|
|
|
_this.list = []
|
|
@@ -188,7 +194,7 @@
|
|
|
flex-direction: column;
|
|
|
.tab-body{
|
|
|
.check-list{
|
|
|
- height: calc(100vh - 126px);
|
|
|
+ height: calc(100vh - 42px);
|
|
|
}
|
|
|
.check-order-list{
|
|
|
background: #ffffff;
|