fix login with wrong path

This commit is contained in:
Baorong Li
2018-09-22 18:31:20 +08:00
parent a6bf4286dc
commit d0c2713f20
+2 -1
View File
@@ -14,7 +14,8 @@ export default {
const { from } = locationQuery
yield put({ type: 'app/query' })
if (!pathMatchRegexp('/login', from)) {
router.push(from)
if (from === '/') router.push('/dashboard')
else router.push(from)
} else {
router.push('/dashboard')
}