<template>
    <div class="page">
        <van-list class="list" v-model:loading="loading" :finished="finished" finished-text="" @load="getData">
            <template v-for="(item, index) in list" :key="index">
                <news-small v-model:info="list[index]"></news-small>
            </template>

            <van-empty :image="require('@assets/kong_black.png')" v-if="empty" description="没有任何藏品哦~" />
        </van-list>
    </div>
</template>

<script>
import list from '../../mixins/list';
import NewsSmall from '../../components/product/NewsSmall.vue';
import { mapState } from 'vuex';

export default {
    mixins: [list],
    data() {
        return {
            list: [],
            url: '/news/all'
        };
    },
    components: { NewsSmall },
    computed: {
        ...mapState(['companyId'])
    },
    methods: {
        beforeData() {
            return {
                query: {
                    onShelf: true,
                    del: false,
                    companyId: this.companyId
                    // display: true
                }
            };
        }
    }
};
</script>

<style lang="less" scoped>
.page {
    background-color: #272b2e;
}
.list {
    padding: 8px 0;
}
</style>
