123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- //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 {
-
- 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:[],
- status:"1",
- isend:false,
- pageIndex:1,
- recordsTotal:0,
- }, {
- status:"2",
- name: '最热',
- list:[],
- isend:false,
- pageIndex:1,
- recordsTotal:0,
- }],
- 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(){
- API.resumeStatus().then((response) => {
-
- if("未创建"!=response.data){
-
- }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
- })
- })
- },
- change(index) {
- this.current = index;
- var obj=this.list[this.current];
-
- if(obj.list.length==0){
- this.getList()
- }
- },
- getList(){
- uni.showLoading({
- title:"加载中",mask:true,
- })
- var obj=this.list[this.current];
- var data={
- type:obj.status,
- pageSize:5
- };
-
- API.getRecruitmentList(data).then((response) => {
-
- uni.hideLoading()
- var list=response.data.data;
- obj.list=list;
- obj.isend=(response.data.totalPage>1)
-
- if(!this.isReady){
- this.isReady=true;
- //this.islogin=this.carhelp.getToken();
-
- this.getBanner()
- this.getScreenList();
- this.getResumeStatus();
- }
-
-
- }).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);
- },
-
- ckPopup(item){
- //this.querypopup=item;
- this.showpopup=false;
- this.gotoUrl('pages/job/query/query?key='+item.id+'&name='+item.name);
- }
-
- },onReady(){
-
- this.getList();
-
-
- },onShow(){
- if(this.isReady){
-
- }
- },
- }
|