<template>
	<view>
		<uni-mall-list :dataList="dataList" :defaultHeadList="defaultHeadList" @change="handleChange" type="preview">
		</uni-mall-list>
	</view>
</template>

<script>
	import {
		getPartList
	} from '@/request/api/my.js'
	import uniMallList from '../components/uni-mall-list/uni-mall-list.vue';
	export default {
		components: {
			uniMallList
		},
		data() {
			return {
				defaultHeadList: {},
				dataList: []
			};
		},
		onLoad() {
			this.defaultHeadList = {
				name: this.$store.getters.organization.name,
				id: new Date().getTime()
			}
			this.init();
		},
		methods: {
			async init() {
				let partData = await getPartList(this.$store.getters.organization.id, this.$store.getters.project.id);
				if (partData.state) this.dataList = partData.data;
			},
			handleChange(item) {
				if (item.type === 'user') {

				}
			}
		}
	};
</script>

<style></style>