网络请求的时候的loading效果
utils/intercepter.js
/**
* Discription: 封装interceptor
* author: ydj
* Date: 2021-09-25 14:29:45
*/
import axios from 'axios'
import { message } from 'antd'
/**
* 生成基础axios对象,并对请求和响应做处理
* 前后端约定接口返回解构规范
* {
* code:200,
* data:"成功",
* message:""
* }
*/
// 创建实例
const service = axios.create({
baseURL: process.env.NODE_ENV === 'production' ? '/api' : '',
// 配置请求头
headers: {
// post: {
// 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
// }
'C