//import * as WxJsApi from '@/utils/wxJsApi.js' import * as API from '@/apis/job/job.js' import CompanyInfo from '@/components/job/companyInfo.vue' import RecruitmentItem from '@/components/job/RecruitmentItem.vue' import ResumeAuth from '@/components/job/ResumeAuth.vue' export default { data() { return { auth:false, showcompany:false, info:{}, companyId:"", company:{ id:"", logo:"" }, list:[], isReady:false, src: '/static/img/head/png', isDeliver:false, isCollect:false, } }, props:{ isHr: { require: false, default: false, }, }, components: { CompanyInfo,RecruitmentItem,ResumeAuth }, onReachBottom() { if(this.showcompany){ this.$refs.refCompanyInfo.myLoadmore() } }, onLoad(op){ this.id=op.id; }, methods: { deliverBtn(){ var person=this.carhelp.getPersonInfo(); var bl=["1","2"].indexOf(person.isAuthentication)>-1 var _this=this; if(person&&!bl){ uni.showModal({ showCancel:true, content:"实名制后才能投递简历", confirmText:"前往实名制", success(res) { if(res.confirm){ _this.auth=true; } } }) return } if(this.isDeliver){ uni.showToast({ title:"已投递,请勿重复投递" }) return } uni.showLoading({ title: '加载中' }) API.deliverResume(this.id).then((res)=>{ uni.hideLoading() this.isDeliver=true; }).catch(error => { uni.showToast({ title:error }) }) }, collectBtn(){ uni.showLoading({ title: '加载中' }) this.isCollect=!this.isCollect API.collectResume(this.id,this.isCollect?1:0).then((res)=>{ uni.hideLoading() }).catch(error => { uni.showToast({ title:error }) }) }, spiltItem(text){ if(text){ return text.split(",") }else{ return [] } }, getRelevantList(){ API.getRelevantList(this.id).then((res)=>{ this.list=res.data.data; uni.hideLoading() }).catch(error => { uni.showToast({ title:error }) }) }, setId(id){ this.id=id; this.getInfo(); }, getInfo(){ uni.showLoading({ title: '加载中' }) API.getRecruitmentDetails(this.id).then((res)=>{ document.body.scrollTop = 0; document.documentElement.scrollTop = 0; this.info=res.data.recruitment; this.company={ id:this.info.companyId, name:this.info.companyName, scaleName:this.info.companyScaleN, logo:this.info.companyLogo, address:this.info.address, industryName:this.info.companyIndustryN }; this.isDeliver=res.data.deliveryStatus; this.isCollect=res.data.collectionStatus; this.companyId=this.info.companyId; // this.showcompany=false; if(this.isHr){ uni.hideLoading() }else{ this.getRelevantList(); } }).catch(error => { uni.showToast({ title:error }) }) }, },onReady(){ this.getInfo(); this.isReady=true; },onShow(){ if(this.isReady){ } }, }