yangys
2025-09-10 057ce688e9fe904c1a74b2505531d5afc7acf43e
src/axios.js
@@ -113,7 +113,6 @@
    const message = res.data.msg || res.data.error_description || '系统错误';
    //如果在白名单里则自行catch逻辑处理
    if (statusWhiteList.includes(status)) return Promise.reject(res);
    // 如果是401并且没有重试过,尝试刷新token
    if (status === 401 && !config._retry) {
      config._retry = true;
@@ -203,11 +202,16 @@
    }
    // 如果请求为非200则默认统一处理
    if (status !== 200) {
    if (status !== 200 && status == 400) {
      ElMessage({
        message: message,
        type: 'error',
        center:true,
        showClose:true,
        duration:0,
      });
      //this.$alert(message,{confirmButtonText:'关闭'});
      return Promise.reject(new Error(message));
    }
    return res;