haoxuan
2023-11-21 e43528753b71b00d6a751f449e1becaabf2968de
src/utils/request.js
@@ -1,8 +1,11 @@
import axios from "axios";
import util from "@/libs/util.js";
import { Message,MessageBox } from "element-ui";
import {FilterMessage} from "@/utils/filterMessage";
// import router from '@/router'
const m= new FilterMessage(3000)
let Axios = axios.create({
  responseType: "json",
@@ -38,12 +41,16 @@
      return res.data ? res.data : {};
    } else {
      if(!res.config.loadingFlag){
        Message({
          // message: res.data.msg==res.data.data?res.data.data:res.data.msg+','+res.data.data,
          message: res.data.msg,
          type: 'error',
          duration: 3 * 1000
        })
        if (!m.has(res.data.msg)){
          m.add(res.data.msg)
          Message({
            // message: res.data.msg==res.data.data?res.data.data:res.data.msg+','+res.data.data,
            message: res.data.msg,
            type: 'error',
            duration: 3 * 1000
          })
        }
        // MessageBox.confirm( res.data.msg+"?", "提示", {
        //   confirmButtonText: "确定",
        //   cancelButtonText: "取消",