<template> <view> <jobSelect ref="jobSelect" :listData="listData" @confirem="confiremJob"></jobSelect> </view> </template> <script> import jobSelect from '../../../components/yunmiao-jobSelect/yunmiao-jobSelect.vue'; import { getIndustry } from '../../../Utils/Api.js'; let app = getApp(); export default { components: { jobSelect }, data() { return { //行业数据 listData: [], } }, onLoad() { this.getIndustry(); }, methods: { //行业查询 getIndustry() { getIndustry().then(res => { if (res.return_code == '000000') { this.listData = res.return_data; } }) }, //选择分类 confiremJob(e) { app.globalData.businessid = e.id; app.globalData.businessname = e.name; uni.navigateBack({}) }, } } </script> <style> </style>