<template>
	<div class="partake">
		<jm-box :navList='navList' @navListC='navListC'>
			
		</jm-box>
	</div>
</template>

<script>

import { getArticList,getList } from '@/request/api.js'
import jmBox from '@/components/box.vue'
	export default {
		components: {
			jmBox,
		},
		mounted() {
			this.init()
		},
		data() {
			return {
				navChoose: this.$route.params.navChoose || this.$route.query.navChoose || 0,
				navList: {
					title: '我要参与',
					url: 'partake',
					list: this.$store.state.partakeList || []
				}
			}
		},
		methods: {
			init() {
				this.getList()
			},
			getList() {
				getList({},18).then(({data}) => {
					this.navList.list = data
					this.$store.commit('setPartakeList',data)
				})
			},
			navListC(index) {
				this.navChoose = index
			}
		}
	}
</script>

<style>
	.center {
		padding: 10px 20px;
	}
</style>
