Преглед на файлове

Merge branch 'dev' of http://192.168.1.41:3000/lanjianrong/financial_audit_console into dev

outaozhen преди 2 години
родител
ревизия
ae0326a502
променени са 3 файла, в които са добавени 3 реда и са изтрити 4 реда
  1. 1 1
      package.json
  2. 2 2
      src/app.tsx
  3. 0 1
      src/components/RightContent/AvatarDropdown.tsx

+ 1 - 1
package.json

@@ -67,9 +67,9 @@
     "@unocss/cli": "^0.39.3",
     "babel-plugin-import": "^1.13.5",
     "cross-env": "^7.0.0",
-    "eslint": "^8.17.0",
     "husky": "^8.0.0",
     "lint-staged": "^10.0.0",
+    "eslint": "^8.17.0",
     "prettier": "^2.6.1",
     "stylelint": "^14.9.0",
     "typescript": "^4.7.3",

+ 2 - 2
src/app.tsx

@@ -55,7 +55,7 @@ const errorHandler = (error: any, opts: any) => {
   const errorInfo = error.info
   if (errorInfo) {
     const { errorMessage = '请求失败', errorCode } = errorInfo
-    if (errorCode.includes(response.code) && window.location.pathname !== consts.loginPath) {
+    if (consts.TOKEN_INVALID_CODE.includes(errorCode) && window.location.pathname !== consts.loginPath) {
       notification.error({
         message: '用户信息过期',
         description: '请重新登录'
@@ -69,7 +69,7 @@ const errorHandler = (error: any, opts: any) => {
       return
     }
     notification.error({
-      message: title,
+      message: '请求失败',
       description: errorMessage
     })
   } else if (error.response) {

+ 0 - 1
src/components/RightContent/AvatarDropdown.tsx

@@ -2,7 +2,6 @@ import React, { useCallback } from 'react'
 import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons'
 import { Menu, Spin } from 'antd'
 import { createSearchParams, history, useModel } from '@umijs/max'
-import { stringify } from 'querystring'
 import HeaderDropdown from '../HeaderDropdown'
 import styles from './index.less'
 // import { outLogin } from '@/services/ant-design-pro/api';