shaogen1995 hace 3 meses
padre
commit
230b9d76d4
Se han modificado 2 ficheros con 5 adiciones y 5 borrados
  1. 2 2
      src/components/ZupFile/index.tsx
  2. 3 3
      src/utils/http.ts

+ 2 - 2
src/components/ZupFile/index.tsx

@@ -6,7 +6,7 @@ import styles from './index.module.scss'
 import { B1Xtype } from '@/pages/B_enterTibet/B1collect/data'
 import { baseURL, envFlag } from '@/utils/http'
 import { fileTypeRes } from '@/store/action/layout'
-import { getTokenFu } from '@/utils/storage'
+// import { getTokenFu } from '@/utils/storage'
 import { API_C2dels } from '@/store/action/C2files'
 import MyPopconfirm from '../MyPopconfirm'
 import { DeleteOutlined } from '@ant-design/icons'
@@ -62,7 +62,7 @@ function ZupFile({ tableList, moduleId, isShow, closeFu, succFu }: Props) {
           MessageFu.error(`${info.file.name} 上传失败;${response.msg}`)
         }
         if (response.code === 5001 || response.code === 5002) {
-          MessageFu.warning('登录失效!')
+          MessageFu.warning('登录超时!')
           loginOutFu()
           return false
         }

+ 3 - 3
src/utils/http.ts

@@ -79,9 +79,9 @@ http.interceptors.response.use(
       removeTokenInfo()
       loginOutFu()
       clearTimeout(timeId)
-      timeId = window.setTimeout(() => {
-        MessageFu.warning('登录失效!')
-      }, 200)
+      // timeId = window.setTimeout(() => {
+      //   MessageFu.warning('登录失效!')
+      // }, 200)
     } else if (response.data.code === 0) {
       // MessageFu.success(response.data.msg);
     } else if (![3014, 3101, 3510].includes(response.data.code)) {