feat(semi-auto): 客户链接按平台严格绑定,注入后统一由前端打开指定页

This commit is contained in:
2026-11-17 17:27:19 +08:00
parent 7bd5b8bade
commit 77e1c69a2b
13 changed files with 459 additions and 56 deletions
+12 -2
View File
@@ -169,12 +169,22 @@ function OrderServiceApplication() {
function CustomerFulfillmentApplication() {
useClearStrayHash()
// 非标准子路径也按首段路径绑定平台,避免 /c/.../extra 这类地址绕过严格绑定。
const prefix = window.location.pathname.split('/').filter(Boolean)[0]
const wildcardPlatform = prefix === 'c' ? 'huya' : prefix === 'd' ? 'weibo' : undefined
return (
<BrowserRouter>
<Suspense fallback={<RouteLoading />}>
<Routes>
<Route path="/c/:orderNo" element={<CustomerFulfillmentPage />} />
<Route path="*" element={<CustomerFulfillmentPage />} />
<Route path="/c/:orderNo" element={<CustomerFulfillmentPage expectedPlatform="huya" />} />
<Route
path="/d/:orderNo"
element={<CustomerFulfillmentPage expectedPlatform="weibo" />}
/>
<Route
path="*"
element={<CustomerFulfillmentPage expectedPlatform={wildcardPlatform} />}
/>
</Routes>
</Suspense>
</BrowserRouter>