Commit ec03fa4c by zhanghaozhe

修复未登录状态返回受限组件问题

parent 620df63e
...@@ -11,6 +11,12 @@ function Loading(props) { ...@@ -11,6 +11,12 @@ function Loading(props) {
useEffect(() => { useEffect(() => {
let {user, location, history} = props let {user, location, history} = props
if (history.action === 'POP') {
history.goBack();
return
}
if (!user.isFetching) { if (!user.isFetching) {
if (user.hasError) { if (user.hasError) {
history.push('/passport', {from: location}) history.push('/passport', {from: location})
......
...@@ -12,7 +12,7 @@ module.exports = function (app) { ...@@ -12,7 +12,7 @@ module.exports = function (app) {
pathRewrite: { pathRewrite: {
[`^${config[item]['development']}`]: '' [`^${config[item]['development']}`]: ''
}, },
// cookieDomainRewrite: 'localhost', cookieDomainRewrite: 'localhost',
...config[item]['proxy'] ...config[item]['proxy']
} }
)) ))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment