Vue安装并使用axios

1、安装:npm i axios

2、使用:

                axios.get('http://localhost:8080/students').then(
                    response => {
                        console.log('请求成功了',response.data)
                    },
                    error => {
                        console.log('请求失败了',error.message)
                    }
                )
posted @ 2022-03-18 16:59  我,很昕蔚  阅读(250)  评论(0编辑  收藏  举报