<template>
	<view class="after-sale">
		<ArticleList :articleList="policyList"></ArticleList>
	</view>
</template>
<script>
import ArticleList from '@/components/mine/article-list/index'
export default {
	data() {
		return {
			page: 1,
			policyList: []
		}
	},
	components: {
		ArticleList
	},
	onLoad() {
		this.getPolicyList();
	},
	onPullDownRefresh() {
        this.getPolicyList();
    },
	methods: {
		getPolicyList () {
			this.$u.api.getUseHelpList({
			    page: this.page,
			    tid: 2 // 1:使用帮助列表 2: 售后政策列表
			}).then((res)=>{
				uni.stopPullDownRefresh();
				if (res.errCode == 0) {
					this.policyList = res.data.helpList;
				}
			})
		}
	},
}
</script>
<style lang="scss" scoped>
.after-sale {
	min-height: calc(100vh - var(--window-top));
	background-color: #ECECEC;
}
</style>