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

<script>
import { getArticList } from '../request/api.js'

import jmBox from '@/components/box.vue'
	export default {
		components: {
			jmBox,
		},
		data() {
			return {
				data: this.$route.params.data,
				navChoose: this.$route.params.navChoose || this.$route.query.navChoose || 0,
				navList: {
					name: '',
					list: []
				}
			}
		},
		mounted() {
			this.init()
		},
		methods: {
			init() {
				const data = this.$route.params.data
				console.log(this.data)
				this.navList.name = data.intr
				this.getList(data.id)
			},
			getList(id) {
				getArticList({},id).then(({data}) => {
					console.log(data);
					this.navList.list = data
				})
			},
			navListC(index) {
				this.navChoose = index
			}
		}
	}
</script>

<style>
</style>
