一.所花时间

6小时

二.代码量

400行

三.博客量

1篇

四.了解到的知识点

 学习了axios的使用

        axios({
            method:'post',
            url:'http://localhost:8080/article/add',
            data:article
        }).then(result=>{
            //成功的回调
            //result代表服务器相应的所有的数据,包含了响应头,响应体 result.data代表的是接口响应的核心数据
            console.log(result.data);
        }).catch(err=>{
            console.log(err);
        });

        //别名的方式发送请求
        axios.get('http://localhost:8080/article/getAll').then(result=>{
            //成功的回调
            //result代表服务器相应的所有的数据,包含了响应头,响应体 result.data代表的是接口响应的核心数据
            console.log(result.data);
        }).catch(err=>{
            console.log(err);
        });

 

posted on   leapss  阅读(9)  评论(0编辑  收藏  举报
努力加载评论中...

点击右上角即可分享
微信分享提示