Merge branch 'light_v2'
This commit is contained in:
@@ -32,17 +32,17 @@ export default function withAuth<P extends object>(WrappedComponent: React.Compo
|
||||
|
||||
if (!is_login) {
|
||||
const currentPage = getCurrentFullPath()
|
||||
Taro.redirectTo({
|
||||
url: `/pages/login/index/index${
|
||||
currentPage ? `?redirect=${encodeURIComponent(currentPage)}` : ''
|
||||
}`,
|
||||
})
|
||||
// Taro.redirectTo({
|
||||
// url: `/pages/login/index/index${
|
||||
// currentPage ? `?redirect=${encodeURIComponent(currentPage)}` : ''
|
||||
// }`,
|
||||
// })
|
||||
}
|
||||
}, [])
|
||||
|
||||
if (!authed) {
|
||||
return <View style={{ width: '100vh', height: '100vw', backgroundColor: 'white', position: 'fixed', top: 0, left: 0, zIndex: 999 }} /> // 空壳,避免 children 渲染出错
|
||||
}
|
||||
// if (!authed) {
|
||||
// return <View style={{ width: '100vh', height: '100vw', backgroundColor: 'white', position: 'fixed', top: 0, left: 0, zIndex: 999 }} /> // 空壳,避免 children 渲染出错
|
||||
// }
|
||||
|
||||
return <WrappedComponent {...props} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user