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:
qiubaishen
2026-11-18 10:22:02 +08:00
parent 737c353d84
commit db3dba1e96
157 changed files with 29960 additions and 1197 deletions
+3 -22
View File
@@ -35,7 +35,6 @@ export const useAnalyticsData = (active = true) => {
const [financeTrend, setFinanceTrend] = useState([]);
const [channelConsumption, setChannelConsumption] = useState([]);
const [userRanking, setUserRanking] = useState([]);
const [topupChannel, setTopupChannel] = useState([]);
const [dailyStats, setDailyStats] = useState([]);
const [userTopupRanking, setUserTopupRanking] = useState([]);
const [period, setPeriod] = useState('today'); // today, week, month, quarter, custom
@@ -173,23 +172,8 @@ export const useAnalyticsData = (active = true) => {
[buildQueryParams],
);
// 获取充值渠道分布
const fetchTopupChannel = useCallback(
async (currentPeriod, currentDateRange) => {
try {
const queryParams = buildQueryParams(currentPeriod, currentDateRange);
const res = await API.get(
`/api/analytics/topup-channel?${queryParams}`,
);
if (res.data.success) {
setTopupChannel(res.data.data || []);
}
} catch (error) {
console.error('获取充值渠道分布失败:', error);
}
},
[buildQueryParams],
);
// 充值渠道分布面板已于 2026-11 从运营看板撤下(位置让给「企业用量分析」)。
// 组件 TopupChannelChart 与后端 /api/analytics/topup-channel 都保留,这里只是不再拉取。
// 获取每日统计
const fetchDailyStats = useCallback(
@@ -229,7 +213,7 @@ export const useAnalyticsData = (active = true) => {
// 刷新所有数据。
// 概览不参与全页 loading:它只影响顶部 6 张卡片(卡片自己有骨架屏),
// 却是耗时最长的一个请求,纳入遮罩会让下面的图表白白陪等。
// 返回的 Promise 仍然等齐全部 8 个请求,刷新按钮据此显示完整进度。
// 返回的 Promise 仍然等齐全部 7 个请求,刷新按钮据此显示完整进度。
const refreshAll = useCallback(
async (currentPeriod, currentDateRange, force = false) => {
const overviewTask = fetchOverview(force);
@@ -240,7 +224,6 @@ export const useAnalyticsData = (active = true) => {
fetchFinanceTrend(currentPeriod, currentDateRange),
fetchChannelConsumption(currentPeriod, currentDateRange),
fetchUserRanking(currentPeriod, currentDateRange),
fetchTopupChannel(currentPeriod, currentDateRange),
fetchDailyStats(currentPeriod, currentDateRange),
fetchUserTopupRanking(currentPeriod, currentDateRange),
]);
@@ -255,7 +238,6 @@ export const useAnalyticsData = (active = true) => {
fetchFinanceTrend,
fetchChannelConsumption,
fetchUserRanking,
fetchTopupChannel,
fetchDailyStats,
fetchUserTopupRanking,
],
@@ -303,7 +285,6 @@ export const useAnalyticsData = (active = true) => {
financeTrend,
channelConsumption,
userRanking,
topupChannel,
dailyStats,
userTopupRanking,
period,