<template>
	<view class="content">
		<view class="" style="height: 1rpx;"></view>
		<empty v-if="loaded === true && list.length === 0"></empty>
		<view class="action-wrap" v-for="item in list">
			<image src="" mode=""></image>
		</view>
		<uni-load-more :status="loadingType"></uni-load-more>
	</view>
</template>

<script>
	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
	import empty from '@/components/empty';
	export default {
		components: {
			uniLoadMore,
			empty
		},
		data() {
			return {
				page: 1,
				limit: 10,
				loadingType: 'more',
				loaded: false,
				list: []
			}
		},
		onLoad(opt) {
	
		},
		onShow() {

		},
		onReachBottom() {

		},
		onReady() {
			
		},
		methods: {
			getList() {
				let that = this
				if(that.loadingType == 'loading' || that.loadingType == 'noMore') {
					return
				}
				getActionList({
					page: that.page,
					limit: that.limit
				}).then(res => {
					let list = res.data.list
					that.list = that.list.concat(list)
					that.page++
					if(list.length == that.limit) {
						that.loadingType = 'more'
					}else {
						that.loadingType = 'noMore'
					}
					that.loaded = true
				})
			}
		}
	}
</script>

<style lang="scss">
	.action-wrap {
		width: 704rpx;
		height: 330rpx;
		margin:20rpx auto;
		image {
			
			width: 704rpx;
			height: 330rpx;
			border-radius: 20rpx;
		}
	}
</style>