获取axios返回值:
const res = this.axios.get('http://127.0.0.1:8181/book/findAll')
console.log(res) // Promise {<pending>}
const resq = await this.axios.get('http://127.0.0.1:8181/book/findAll')
console.log(resq) // {data:,status,statusText: ~~~~~}
console.log(resq.data) // {(num) [{},{}]}
console.log(resq.status) // 200
const { data: resData } = await this.axios.get('http://127.0.0.1:8181/book/findAll')
console.log(resData) // {(num) [{},{}]}
const { data: resData1, status: st } = await this.axios.get('http://127.0.0.1:8181/book/findAll')
console.log(resData1) // {(num) [{},{}]}
console.log(st) // 200
this.axios.get('http://localhost:8181/book/findAll').then(function (resp1) {
console.log(resp1.data) // {(num) [{},{}]}
})