<template>
	<view>
		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
			<card :list="list"></card>
		</mescroll-body>
	</view>
</template>

<script>
	// import card from "./comps/card.vue"
	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
	export default {
		mixins: [MescrollMixin], // 使用mixin
		// components:{
		// 	card
		// },
		data() {
			return {
				
			}
		},
		methods: {
			upCallback(mescroll){
				let params={
					
				}
				try{
					this.$api.enterprise.page(params).then(res=>{
						let data=res.data.records
						let total=res.data.total
						mescroll.endBySize(data.length,total);
						if(mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
						this.list=this.list.concat(data); //追加新数据
					})
				}catch(e){
					this.mescroll.endErr()
				}
			}
		}
	}
</script>

<style lang="scss">

</style>