merge: 同步 origin/ui-optimization(d224d5b6),保留 weiyuan 功能与 Semi 迁移

- 冲突以 weiyuan 功能(小程序登录、i18n 文案)为准,并保留远端 lint 重构与依赖收敛
- 删除 weiyuan 已移除、远端仅做 lint 修正的 3 个图片相关文件
- 适配远端零警告 ESLint:Monitoring/Subscription 改用 useEffectEvent,EditChannelModal 注明 t 依赖
- effect-events 单测补充 react-i18next mock
- 对合并后仍不符合 Prettier 的文件做纯格式化
This commit is contained in:
qiubaishen
2026-11-10 14:59:34 +08:00
211 changed files with 29252 additions and 12724 deletions
+9 -4
View File
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { useEffectEvent } from '../../hooks/common/useEffectEvent';
import React, { useState, useEffect, useMemo } from 'react';
import { Button as AntButton, Empty as AntEmpty, Tag as AntTag } from 'antd';
import {
@@ -76,9 +77,13 @@ const HistoryPanel = ({ t, refreshTrigger }) => {
}
};
useEffect(() => {
const onScopeChange = useEffectEvent(() => {
loadTopups(page, pageSize);
}, [page, pageSize, keyword, refreshTrigger]);
});
useEffect(
() => onScopeChange(),
[onScopeChange, page, pageSize, keyword, refreshTrigger],
);
// 管理员补单
const handleAdminComplete = async (tradeNo) => {
@@ -120,7 +125,7 @@ const HistoryPanel = ({ t, refreshTrigger }) => {
};
// 表格列定义
const columns = useMemo(() => {
const columns = (() => {
const baseColumns = [
{
title: t('订单号'),
@@ -191,7 +196,7 @@ const HistoryPanel = ({ t, refreshTrigger }) => {
}
return baseColumns;
}, [t, userIsAdmin]);
})();
return (
<div className='rc-history'>
+7 -4
View File
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { useEffectEvent } from '../../hooks/common/useEffectEvent';
import React, { useState, useEffect, useContext } from 'react';
import {
Card,
@@ -55,16 +56,18 @@ const RechargeV2 = () => {
const [wechatOrderData, setWechatOrderData] = useState(null);
// 加载支付配置
useEffect(() => {
const onMount = useEffectEvent(() => {
loadPaymentConfig();
}, []);
});
useEffect(() => onMount(), [onMount]);
// 当选择档位时自动计算
useEffect(() => {
const onScopeChange2 = useEffectEvent(() => {
if (selectedAmountOption) {
calculateAmount();
}
}, [selectedAmountOption]);
});
useEffect(() => onScopeChange2(), [onScopeChange2, selectedAmountOption]);
const loadPaymentConfig = async () => {
try {
+7 -4
View File
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { useEffectEvent } from '../../hooks/common/useEffectEvent';
import React, { useEffect, useState, useContext } from 'react';
import { useLocation } from 'react-router-dom';
import { Segmented, Tabs } from 'antd';
@@ -708,13 +709,15 @@ const Recharge = ({ embedded = false }) => {
// 页面加载时始终刷新用户余额,确保显示最新数据
// (用户可能在其他页面消费或在其他设备充值,localStorage缓存的余额可能过期)
useEffect(() => {
const onMount = useEffectEvent(() => {
getUserQuota();
}, []);
});
useEffect(() => onMount(), [onMount]);
useEffect(() => {
const onMount2 = useEffectEvent(() => {
getTopupInfo();
}, []);
});
useEffect(() => onMount2(), [onMount2]);
useEffect(() => {
const result = getPayPalReturnState(window.location.search);