Ver Fonte

bug fix

zhangjie há 1 ano atrás
pai
commit
07293b053d

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

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

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

@@ -278,17 +278,11 @@ export default {
       const res = await uploadApi(formData, {
         md5: this.fileData.md5,
       }).catch((error) => {
+        const status = error.response?.status;
+        if ([403, 401, 405, 502].includes(status)) return;
         if (error.response?.data.desc) {
           this.errorMsgModalIsShow = true;
           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;