github地址:https://github.com/axios/axios

安装:npm install axios --save  

导入:

import axios from 'axios';

使用:

    methods:{
      //获取网络数据
      reqData(){
        axios.get('http://127.0.0.1:8080').then((response)=>{
          console.log(response);
        }).catch((error)=>{
          console.log(error);

        })

 


posted on 2020-05-04 20:40  大话人生  阅读(151)  评论(0)    收藏  举报