Merge branch 'dev'
This commit is contained in:
@@ -47,6 +47,9 @@ const AdminWorkerPlatformPage = lazy(() => import('@/pages/admin/AdminWorkerPlat
|
||||
const ClaimPage = lazy(() => import('@/pages/claim/ClaimPage'))
|
||||
const H5ClaimEntryPage = lazy(() => import('@/pages/claim/H5ClaimEntryPage'))
|
||||
const CollectPage = lazy(() => import('@/pages/collect/CollectPage'))
|
||||
const CollectMaterialLinkEntryPage = lazy(
|
||||
() => import('@/pages/collect/CollectMaterialLinkEntryPage'),
|
||||
)
|
||||
const CollectMaterialLinkPage = lazy(() => import('@/pages/collect/CollectMaterialLinkPage'))
|
||||
const NotFoundPage = lazy(() => import('@/pages/NotFoundPage'))
|
||||
const RedeemPage = lazy(() => import('@/pages/redeem/RedeemPage'))
|
||||
@@ -125,8 +128,8 @@ export default function App() {
|
||||
return <RedeemApplication />
|
||||
}
|
||||
|
||||
// 一次性补资料链接(`/supplement/<token>`):路径式公开页,先于站点判断,
|
||||
// 保证在后台域名和打手端域名下都能打开。
|
||||
// 补资料页(`/supplement`):路径式公开页,先于站点判断,
|
||||
// 保证在后台域名和打手端域名下都能打开。带订单号直接进补资料页,不带订单号进输入页。
|
||||
if (isCollectMaterialLinkPath(window.location.pathname)) {
|
||||
return <CollectMaterialLinkApplication />
|
||||
}
|
||||
@@ -237,9 +240,13 @@ function ClaimApplication() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 一次性补资料链接(`/supplement/<token>`)的独立路由树。
|
||||
* 补资料页(`/supplement`)的独立路由树。
|
||||
*
|
||||
* 路径式公开页,不带 hash;页面只读取 token,不依赖后台会话。
|
||||
* - `/supplement`:输入平台订单号;
|
||||
* - `/supplement/<订单号>`:直接打开对应订单的补资料页;
|
||||
* - 其余子路径:交给补资料页展示「订单号无效」。
|
||||
*
|
||||
* 路径式公开页,不带 hash;不依赖后台会话。
|
||||
*/
|
||||
function CollectMaterialLinkApplication() {
|
||||
useClearStrayHash()
|
||||
@@ -248,7 +255,8 @@ function CollectMaterialLinkApplication() {
|
||||
<BrowserRouter>
|
||||
<Suspense fallback={<RouteLoading />}>
|
||||
<Routes>
|
||||
<Route path="/supplement/:token" element={<CollectMaterialLinkPage />} />
|
||||
<Route path="/supplement" element={<CollectMaterialLinkEntryPage />} />
|
||||
<Route path="/supplement/:code" element={<CollectMaterialLinkPage />} />
|
||||
<Route path="*" element={<CollectMaterialLinkPage />} />
|
||||
</Routes>
|
||||
</Suspense>
|
||||
|
||||
Reference in New Issue
Block a user