mirror of
https://github.com/zuiidea/antd-admin
synced 2026-11-04 00:53:57 +00:00
fix login jump to /enundefined
This commit is contained in:
+6
-6
@@ -49,12 +49,12 @@
|
||||
"cross-env": "^5.2.0",
|
||||
"eslint": "^5.15.0",
|
||||
"eslint-config-react-app": "^4.0.0",
|
||||
"eslint-plugin-flowtype": "^3.4.0",
|
||||
"eslint-plugin-import": "^2.17.0",
|
||||
"eslint-plugin-flowtype": "^3.11.0",
|
||||
"eslint-plugin-import": "^2.18.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.1",
|
||||
"eslint-plugin-react": "^7.13.0",
|
||||
"eslint-plugin-react": "^7.14.0",
|
||||
"eslint-plugin-react-hooks": "^1.6.0",
|
||||
"husky": "^2.3.0",
|
||||
"husky": "^2.7.0",
|
||||
"less-vars-to-js": "^1.3.0",
|
||||
"lint-staged": "^8.1.0",
|
||||
"mockjs": "^1.0.1-beta3",
|
||||
@@ -63,8 +63,8 @@
|
||||
"stylelint": "^10.0.0",
|
||||
"stylelint-config-prettier": "^5.2.0",
|
||||
"stylelint-config-standard": "^18.3.0",
|
||||
"umi": "^2.8.1",
|
||||
"umi-plugin-react": "^1.9.1"
|
||||
"umi": "^2.8.7",
|
||||
"umi-plugin-react": "^1.9.6"
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.js": [
|
||||
|
||||
@@ -16,7 +16,7 @@ export default {
|
||||
const { from } = locationQuery
|
||||
yield put({ type: 'app/query' })
|
||||
if (!pathMatchRegexp('/login', from)) {
|
||||
if (from === '/') router.push('/dashboard')
|
||||
if (['', '/'].includes(from)) router.push('/dashboard')
|
||||
else router.push(from)
|
||||
} else {
|
||||
router.push('/dashboard')
|
||||
|
||||
Reference in New Issue
Block a user