❤ fix(topup): prevent nil-pointer in Epay callback; reset page on search

Add early return when Epay client is missing in controller/topup.go to avoid panic
Introduce handleKeywordChange in TopupHistoryModal.jsx to reset page to 1 when keyword updates
Wire input onChange to new handler; minor UX improvement to avoid empty results on pagination mismatch
This commit is contained in:
Apple\Apple
2025-10-07 14:13:14 +08:00
parent e74d8b9985
commit 33aeaf7b4d
2 changed files with 7 additions and 2 deletions

View File

@@ -102,6 +102,11 @@ const TopupHistoryModal = ({ visible, onCancel, t }) => {
setPage(1);
};
const handleKeywordChange = (value) => {
setKeyword(value);
setPage(1);
};
// 管理员补单
const handleAdminComplete = async (tradeNo) => {
try {
@@ -231,7 +236,7 @@ const TopupHistoryModal = ({ visible, onCancel, t }) => {
prefix={<IconSearch />}
placeholder={t('订单号')}
value={keyword}
onChange={setKeyword}
onChange={handleKeywordChange}
showClear
/>
</div>