<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/my-applied-card.vue"
import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
export default {
	mixins:[MescrollMixin],
	components:{
		card
	},
	data() {
		return {
			upOption: {
				empty: {
					isSmall:true,
					use: true, // 是否显示空布局
					icon: "http://139.9.103.171:1888/miniofile/xlyq/party-empty.png", // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
				}
			},
		};
	},
	onLoad() {
		
	},
	onShow() {
		this.$util.reload(this.mescroll)
	},
	methods:{
		upCallback(mescroll){
			let params={
				enrollStatus:1,
				memberId:this.vuex_party_person.id
			}
			try{
				this.$api.party.checkIsEnroll(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>
