index.js
833 Bytes
import pageInit from "../../../minixs/pageInit.js";
import {recruit} from "../../../../assets/img/data/serviceSecond.js";
export default {
name: 'recruit',
template: '',
mixins:[pageInit],
components: {},
props: [],
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
let recruitHot = Vue.ref(); // 热门招位 数据
recruitHot.value = recruit().hot;
let recruitLeft = Vue.ref(); // 职位招聘 数据
// 监听路由的传值 展示不同职位的数据
Vue.watch(
() => proxy.$route,
(val) => {
recruitLeft.value = recruit()[val.params.job];
},
{immediate:true}
)
return {
recruitLeft,
recruitHot,
}
}
}