vue兼容IE 自己写单页面async await

 mounted() {


     this.getCgInfo();

  },

  methods: {



    async  getCgInfo(){

var _self=this;

var tttemp=[];

 await this.axios.get('http://127.0.0.1:8080/mle/workSpacePersonnelLog/bigScreenStatistics')

        .then(function (response) {

            //将response获得的数据进行处理

            var data=response.data;

                       console.log(data)

           if(data.code==200){

            var datainfo=data.data;

           var  temparr=[]

         temparr[0]=datainfo.sum;

          temparr[1]=datainfo.enter;

           temparr[2]=datainfo.leave;

                    temparr[3]=4;

                    tttemp=temparr;

     _self.siteFlow=temparr;


       console.log("ttt")

           }else{


           }


        })

        .catch(function (error) {


        });

 console.log(tttemp)

 this.siteFlow=tttemp

   console.log("getinfo")


    this.drawthree();

    this.drawyibiaotwo();

    this.drawpieone();

    this.drawPieYuyue();

    this.drawPieSuishen();

    this.drawtwo();


    },

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容