<template>
	<select-template ref="select" title="请选择行业" slo="" :list="skillLevel" @submit="goAdd"></select-template>
</template>

<script>
	import {
		getTrade
	} from '@/api/resume.js'
	import selectTemplate from './selectTemplate.vue'

	export default {
		components: {
			selectTemplate
		},
		data() {
			return {
				id: "",
				skillLevel: [],
			}
		},
		// 在test.vue页面接受参数
		onLoad: function({
			id
		}) {
			this.id = id
		},
		onShow: function() {
			this.getData()
		},
		mounted() {
			this.$refs.select.setActiveId(this.tradeId)
		},
		methods: {
			getData: function() {
				getTrade().then(res => {
					this.skillLevel = res.data.data
				})
			},
			goAdd(res) {
				uni.$emit('setInd', res)
				uni.navigateBack()
			}
		}
	}
</script>

<style>
</style>
