zhangjie 1 年之前
父节点
当前提交
07293b053d
共有 2 个文件被更改,包括 2 次插入9 次删除
  1. 0 1
      src/modules/question/api.js
  2. 2 8
      src/modules/question/components/QuestionImportDialog.vue

+ 0 - 1
src/modules/question/api.js

@@ -289,7 +289,6 @@ export function questionImportExcelFileUpload(data, headData) {
     data,
     data,
     {
     {
       headers: headData,
       headers: headData,
-      noToast: true,
     }
     }
   );
   );
 }
 }

+ 2 - 8
src/modules/question/components/QuestionImportDialog.vue

@@ -278,17 +278,11 @@ export default {
       const res = await uploadApi(formData, {
       const res = await uploadApi(formData, {
         md5: this.fileData.md5,
         md5: this.fileData.md5,
       }).catch((error) => {
       }).catch((error) => {
+        const status = error.response?.status;
+        if ([403, 401, 405, 502].includes(status)) return;
         if (error.response?.data.desc) {
         if (error.response?.data.desc) {
           this.errorMsgModalIsShow = true;
           this.errorMsgModalIsShow = true;
           this.excelErrorMsgs = error.response.data.desc.split("\n");
           this.excelErrorMsgs = error.response.data.desc.split("\n");
-          if (
-            this.excelErrorMsgs.some(
-              (item) =>
-                item.includes("no login") || item.includes("token is wrong")
-            )
-          ) {
-            this.excelErrorMsgs = ["登陆失效,请重新登录!"];
-          }
         }
         }
       });
       });
       this.loading = false;
       this.loading = false;