123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- //import * as WxJsApi from '@/utils/wxJsApi.js'
- import * as API from '@/apis/job/index.js'
- import * as API_common from '@/apis/common.js'
- import TabbarJob from '@/components/TabbarJob.vue'
- import RecruitmentItem from '@/components/job/RecruitmentItem.vue'
- import ResumeAuth from '@/components/job/ResumeAuth.vue'
- export default {
- data() {
- return {
- auth:false,
- islogin:false,
- showpopup:false,
- querypopup:"全部",
- popupList:["全部","一丘之貉1","一丘之貉2","一丘之貉3","一丘之貉4","一丘之貉5","一丘之貉6"
- ,"其他"],
-
- keyword: '遥看瀑布挂前川',
- bannerList: [{
- image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
- title: '昨夜星辰昨夜风,画楼西畔桂堂东'
- },
- {
- image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
- title: '身无彩凤双飞翼,心有灵犀一点通'
- },
- {
- image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
- title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
- }
- ],
- list: [{
- name: '最新',
- list:[{}],
-
- isend:false
- }, {
- name: '最热',
- list:[{},{},{},{}],
- isend:false
- }],
- current: 0,
- src: '/static/img/head/png',
- }
- },
- components: {
- TabbarJob,RecruitmentItem,ResumeAuth
- },
- onLoad(op){
- //this.id=op.id;
- },
- methods: {
- spiltItem(text){
- if(text){
- return text.split(",")
-
- }else{
- return []
- }
- },
- getResumeStatus(){
- var statusInit=this.carhelp.get("resume_status_init");
- if(statusInit&&statusInit!="未创建"){
- return;
- }
- API.resumeStatus().then((response) => {
- if("未创建"==response){
-
- }else{
- this.islogin=true
- }
-
- }).catch(error => {
- uni.showToast({
-
- title:error
- })
- })
- },
- getScreenList(){
-
- API_common.getScreenList().then((response) => {
-
- var list=response.data;
- this.popupList=list.map((item)=>{
- return item.name;
- })
- }).catch(error => {
- uni.showToast({
-
- title:error
- })
- })
- },
- getList(){
- for(var i in this.list){
-
- this.getRecruitmentList(i)
-
- }
- },
- getRecruitmentList(i){
- API.getRecruitmentList({
- type:parseInt(i)+1,pageSize:5
- }).then((response) => {
-
- var list=response.data.data;
- this.list[i].list=list;
- this.list[i].isend=(response.data.totalPage>1)
- }).catch(error => {
- uni.showToast({
-
- title:error
- })
- })
- },
- getBanner(){
- API_common.getBannerInfo({
- type:"job"
- }).then((response) => {
- var list=response.data;
- this.bannerList=list.map((item)=>{
- var obj={
- image:item.picUrl,
- title:item.name,
- url:item.linkUrl,
- }
- return obj
- })
- }).catch(error => {
- uni.showToast({
-
- title:error
- })
- })
- },
- ckBanner(i){
- var obj=this.bannerList[i];
- if(obj.url){
- if(obj.url.indexOf("http")==0){
- window.location.href=obj.url;
- }
- if(obj.url.indexOf("pages/")==0){
- this.gotoUrl(obj.url)
- }
- }
- //console.log(current);
- },
- changeTab(i){
- this.current=i
- //console.log(current);
- },
- ckPopup(item){
- //this.querypopup=item;
- this.showpopup=false;
- this.gotoUrl('pages/job/query/query?key='+item);
- }
-
- },onReady(){
- //this.islogin=this.carhelp.getToken();
- this.getBanner()
- this.getList();
- this.getScreenList();
- this.getResumeStatus();
- this.isReady=true;
- },onShow(){
- if(this.isReady){
-
- }
- },
- }
|