163 lines
3.3 KiB
Vue
163 lines
3.3 KiB
Vue
<template>
|
|
<view>
|
|
<view class="flex" style="display:flex; flex-wrap:wrap; padding: 30upx 30upx 0px 30upx;">
|
|
<block v-for="(value,key) in listData" :key="key">
|
|
<view class="mb15" style="width:31%; border-radius:20rpx;margin-right: 14rpx;"
|
|
@click="detail(value.vid,value.mid)">
|
|
<!-- <view class="btn-mini" style="position: absolute; top: 20upx; right: 20upx; border-radius: 10upx;font-size: 18upx;width: 60upx; height: 36upx; z-index: 1;" :style="getBtnStyle">{{value.lxname}}</view> -->
|
|
<image class="integral-mall-goods" mode="aspectFill" :src="value.img"></image>
|
|
<view class="pr10 ft14 ftw400 text-over cl-main">{{value.vname}}</view>
|
|
<view class="pr10 ft12 ftw500 text-over cl-999">观看至 {{value.mid}} 集</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
<uni-load-more :status="status" :content-text="contentText" />
|
|
<view style="width: 100%; height: 30upx;"></view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
banners: [],
|
|
searchValue: '',
|
|
pages: {
|
|
currentPage: 1,
|
|
pageSize: 20,
|
|
isNextPage: true
|
|
},
|
|
tabs: [{
|
|
name: '全部'
|
|
},
|
|
{
|
|
name: '视频'
|
|
},
|
|
{
|
|
name: '音频'
|
|
},
|
|
{
|
|
name: '小说'
|
|
},
|
|
{
|
|
name: '壁纸'
|
|
},
|
|
],
|
|
selectIndex: 0,
|
|
scrollTop: 0,
|
|
type: '',
|
|
|
|
listData: [],
|
|
status: 'more',
|
|
contentText: {
|
|
contentdown: "上拉显示更多",
|
|
contentrefresh: "正在加载...",
|
|
contentnomore: "没有更多数据了"
|
|
},
|
|
|
|
}
|
|
},
|
|
onLoad(e) {
|
|
//console.log(111)
|
|
if (e.selectIndex) {
|
|
this.selectIndex = e.selectIndex * 1
|
|
}
|
|
this.status = 'more';
|
|
this.getList();
|
|
this.banners = uni.getStorageSync("config").banner
|
|
},
|
|
|
|
onReachBottom() {
|
|
this.status = 'more';
|
|
this.getList();
|
|
},
|
|
|
|
methods: {
|
|
detail(vid, mid) {
|
|
uni.navigateTo({
|
|
url: '/pagesA/player/detailPlayer?vid=' + vid + '&mid=' + mid
|
|
})
|
|
},
|
|
getList() {
|
|
let that = this;
|
|
if (that.pages.isNextPage) {
|
|
that.status = 'loading';
|
|
that.$httpRequest({
|
|
url: "/api/video/wdxh",
|
|
methods: "GET",
|
|
data: {
|
|
limit: that.pages.pageSize,
|
|
page: that.pages.currentPage
|
|
}
|
|
}).then(res => {
|
|
that.status = '';
|
|
if (that.pages.currentPage == 1) {
|
|
that.listData = res.rows;
|
|
} else if (res.rows.length > 0) {
|
|
that.listData = that.listData.concat(res.rows);
|
|
} else {
|
|
that.status = 'noMore';
|
|
that.pages.isNextPage = false;
|
|
}
|
|
that.pages.currentPage += 1;
|
|
}).catch(err => {
|
|
that.status = '';
|
|
console.log(err)
|
|
})
|
|
}
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
.integral-mall-goods {
|
|
width: 100%;
|
|
height: 280rpx;
|
|
background: #F2F2F2;
|
|
border-radius: 16upx;
|
|
}
|
|
|
|
.user-not-vip {
|
|
width: 100%;
|
|
height: 80rpx;
|
|
background: #FDF6EC;
|
|
border-radius: 40rpx;
|
|
border: 2rpx solid #EFC381;
|
|
text-align: center;
|
|
line-height: 76rpx;
|
|
font-size: 24rpx;
|
|
color: #000000;
|
|
font-weight: bold;
|
|
}
|
|
|
|
|
|
.tuan-product-l {
|
|
width: 320rpx;
|
|
height: 240rpx;
|
|
border-radius: 16rpx;
|
|
background: #F2F2F2;
|
|
}
|
|
|
|
.tuan-product-r {
|
|
width: calc(100% - 320rpx);
|
|
}
|
|
|
|
.search-result {
|
|
padding-top: 10px;
|
|
padding-bottom: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.search-result-text {
|
|
text-align: center;
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
|
|
.uni-mt-10 {
|
|
margin-top: 10px;
|
|
}
|
|
</style> |