vue系统平台之间的对接--实践篇

大项目实际应用可能分几个子项目进行开发,比如HR平台,主项目需要调用子项目的准员工的身份信息

create(){

     const query=this.$route.query

    this.bacthNo=query.bacth;

  if(!this.bacthNo){

       this.$message.error('无效的报告')

   }else{

      

  this.getBasicInfo(); 

 this.getStart()

 this.dealApis();

  }


  this.getBasicInfo(); 

this.getStart();

this.dealApis();

}

methods:{

getStart(bacthNo='2323'){

    const url=URL.start;

    this.$axios.post(url,{"batchNo":batchNo}).then((res)=>{const result=res.data.data;  this.apisAndNos=result;}).catch((err)=>{})

}, 

dealApis(){

       this.apisAndNos={

                EduDegree:{

                         id:5001

                },

               Blacklist:{

                   id:5001

              }  ,

            .............

     } ;

    for(var key in this.apisAndNos){

        if(this.apiAndNos.hasOwnProperty(key)){

            const  showFlag=`show${key}`;

            const  api=`get${key}`;

           this[showFlag]=true;

           const fun =this[api];

          fun();//有的话,执行API

         }

     }

  },

  getBasicInfo(taskId=10001){

    const url=URL.candidateBasicInfo;

  this.$axios.post(url,{"taskId":taskId}).then((res)=>{}).catch((error)=>{})

  },

  getEduDegree(taskId=10001){

    const url=URL.eduDegreeinfo;

  this.$axios.post(url,{"taskId":taskId}).then((res)=>{}).catch((error)=>{})

  },

  getBlacklist(taskId=13){

    const url=URL.candidateBasicInfo;

  this.$axios.post(url,{"taskId":taskId}).then((res)=>{}).catch((error)=>{})

  },

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值