Merge branch 'light_v2'

This commit is contained in:
张成
2025-09-08 13:23:46 +08:00
12 changed files with 330 additions and 101 deletions

View File

@@ -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} />
}