sync: 同步 monkey-ai@weiyuan(ddc5b9443) 的 web/ 到 ui-optimization
- 合入 weiyuan 新功能前端:分佣 V2 / 伙伴工作台、智能路由、企业资金与分析、官网设置与预约演示等, semi-ui 已全部迁移到 antd 6 / @/components/ui,不重新引入 Semi - 分佣二级菜单与页头去重、伙伴入口探测(企业伙伴走企业中心「企业分佣」)、超管侧栏入口恢复 - 适配层 DatePicker / TimePicker 统一 onChange(Date|Date[]|null, 文本) 契约;生产构建剔除调试日志 - 图片链接刷新:同任务请求复用、后台刷新不弹全局错误、离页停止批量请求 - 恢复 bun.lock(与 package-lock.json 共存);docs 规范与 CHANGELOG 更新 - 停止跟踪 .env.playwright.local(本地登录凭据,已加入 .gitignore)
This commit is contained in:
+45
-8
@@ -24,7 +24,7 @@ import {
|
||||
isMiniProgramWebView,
|
||||
} from './helpers/miniProgram';
|
||||
import Loading from './components/common/ui/Loading';
|
||||
import { AuthRedirect, PrivateRoute, AdminRoute } from './helpers';
|
||||
import { AuthRedirect, PrivateRoute, AdminRoute, RootRoute } from './helpers';
|
||||
import NotFound from './pages/NotFound';
|
||||
import Forbidden from './pages/Forbidden';
|
||||
import { StatusContext } from './context/Status';
|
||||
@@ -58,8 +58,7 @@ const Docs = lazy(() => import('./pages/Docs'));
|
||||
const LoginForm = lazy(() => import('./components/auth/LoginForm'));
|
||||
const OrgLogin = lazy(() => import('./pages/OrgLogin'));
|
||||
const PartnerPortal = lazy(() => import('./pages/PartnerPortal'));
|
||||
const PartnerConsole = lazy(() => import('./pages/PartnerPortal/Console'));
|
||||
const MyCommission = lazy(() => import('./pages/MyCommission'));
|
||||
const CommissionV2 = lazy(() => import('./pages/CommissionV2'));
|
||||
const OrgRegister = lazy(() => import('./pages/OrgRegister'));
|
||||
const RegisterForm = lazy(() => import('./components/auth/RegisterForm'));
|
||||
const PasswordResetForm = lazy(
|
||||
@@ -94,6 +93,7 @@ const PersonalSetting = lazy(
|
||||
);
|
||||
const Setup = lazy(() => import('./pages/Setup'));
|
||||
const Analytics = lazy(() => import('./pages/Analytics'));
|
||||
const SmartRouter = lazy(() => import('./pages/SmartRouter'));
|
||||
const Organization = lazy(() => import('./pages/Organization'));
|
||||
const AdminOrganizations = lazy(() => import('./pages/AdminOrganizations'));
|
||||
const AdminOrder = lazy(() => import('./pages/AdminOrder'));
|
||||
@@ -147,6 +147,22 @@ const PricingLegacyRedirect = () => {
|
||||
);
|
||||
};
|
||||
|
||||
// 密钥管理旧路径 /key-management → /user-center/key-management,同样保留 query/hash
|
||||
// (如创作台 ?from=creation_studio 埋点来源、旧书签与登录回跳带参)
|
||||
const KeyManagementLegacyRedirect = () => {
|
||||
const location = useLocation();
|
||||
return (
|
||||
<Navigate
|
||||
to={{
|
||||
pathname: '/user-center/key-management',
|
||||
search: location.search,
|
||||
hash: location.hash,
|
||||
}}
|
||||
replace
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
function App() {
|
||||
const location = useLocation();
|
||||
const [statusState] = useContext(StatusContext);
|
||||
@@ -312,6 +328,16 @@ function App() {
|
||||
</AdminRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path='/console/smart-router'
|
||||
element={
|
||||
<PrivateRoute>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<SmartRouter />
|
||||
</Suspense>
|
||||
</PrivateRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path='/console/analytics'
|
||||
element={
|
||||
@@ -327,7 +353,7 @@ function App() {
|
||||
element={
|
||||
<PrivateRoute>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<MyCommission />
|
||||
<CommissionV2 />
|
||||
</Suspense>
|
||||
</PrivateRoute>
|
||||
}
|
||||
@@ -336,12 +362,23 @@ function App() {
|
||||
path='/console/partner'
|
||||
element={
|
||||
<PrivateRoute>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<PartnerConsole />
|
||||
</Suspense>
|
||||
<Navigate to='/console/my-commission' replace />
|
||||
</PrivateRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path='/console/commission'
|
||||
element={
|
||||
/* 分佣管理为 Root 专属:侧边栏一直用 isRoot() 隐藏该入口,后端结算/销售/成本/
|
||||
伙伴管理各路由组也已全部 Root 收口。这里把路由守卫对齐,避免 role=10 直接
|
||||
输 URL 进到一个读得到、写按钮全 403 的半残页面。 */
|
||||
<RootRoute>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<CommissionV2 />
|
||||
</Suspense>
|
||||
</RootRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path='/console/experience-center-audit'
|
||||
element={
|
||||
@@ -726,7 +763,7 @@ function App() {
|
||||
{/* 密钥管理归入用户中心路径;旧地址保留为重定向(旧链接、登录回跳、书签) */}
|
||||
<Route
|
||||
path='/key-management'
|
||||
element={<Navigate to='/user-center/key-management' replace />}
|
||||
element={<KeyManagementLegacyRedirect />}
|
||||
/>
|
||||
<Route
|
||||
path='/user-center/key-management'
|
||||
|
||||
Reference in New Issue
Block a user