封装请求模块,便于统⼀处理请求功能,安装 Axios npm i axios 初始化 axios,观察接⼝⽂档,将基地址 http://edufront.lagou.com 设置给 baseURL 即可 //utils/request.js import axios from ‘axios’ const request = axios.create({ baseURL: http://edufront.lagou.com }) export default request