async-await 异步请求

async aa(){
      var that=this
      console.log('100')
          await axios({
                        method: 'get',
                        url: this.$store.state.url+'/ads',
                        headers: {Authorization:"Bearer "+that.$store.state.token}
                      }).then(function(data){
                        console.log(data);
                      });
          console.log('200')
      }

  

posted @ 2017-08-15 09:57  fm060  阅读(174)  评论(0)    收藏  举报