12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <view>
- <view class="cl-one">
- <video-list flag="4" :list="list"></video-list>
- </view>
- </view>
- </template>
- <script>
- import videoList from '@/pages/index/components/wordlist.vue';
- export default {
- components: {
- videoList
- },
- data() {
- return {
- list: [],
- status:'loadmore',
- page:1,
- pagenum:10,
-
- };
- },
- onPullDownRefresh() {
- this.page=1;
- this.list=[];
- this.getInfoList();
- setTimeout(res => {
- uni.stopPullDownRefresh();
- }, 1000);
- },
-
- onReachBottom() {
- if (this.status == 'nomore') return;
- this.status = 'loadmore';
- this.page = ++this.page;
- this.getInfoList();
- },
- onLoad(options) {
- this.video_id=options.video_id;
- this.getInfoList();
- },
- methods: {
- getInfoList() {
- let url = 'new_cate/getVideoFiles';
- this.$api
- .request(url, {
- video_id:this.video_id,
- page: this.page,
- limit: this.pagenum
- })
- .then(data => {
- if (data.code == '200') {
- this.list = this.list.concat(data.data);
- if (data.data.length < this.pagnum) {
- this.status = 'nomore';
- }
- } else {
- this.$api.toast(data.msg);
- }
- });
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- .cl-one{
- background-color: #fff;
- padding: 0 30rpx;
- }
- </style>
|