fix(pay): refund wallet on withdraw reject and show pending history

Close the freeze/refund loop when admin rejects a balance withdrawal,
block concurrent open applications, and surface processing state plus
server-rendered withdraw history on the wallet card.
This commit is contained in:
kate522 committed 2026-07-16 16:28:56 +08:00
1 parent d57fc6f934
commit 4da003663d
6 files changed
+514 -136

No files matched your search

+38
View File
@@ -928,3 +928,41 @@ body.uc-modal-open {
}
.uc-card-pass__tip.is-error { color: #b91c1c; }
/* Withdraw history + pending foot */
.uc-asset-card__foot {
margin-top: 8px;
padding-top: 8px;
border-top: 1px dashed var(--muted-border-color, rgba(0,0,0,.08));
}
.uc-asset-card__foot button {
background: none;
border: 0;
padding: 0;
cursor: pointer;
}
.uc-asset-card__head-action {
background: none;
border: 0;
cursor: pointer;
}
.uc-withdraw-history__item:last-child {
border-bottom: 0 !important;
}
/* Points tasks tab */
.uc-points-tasks .border-bottom,
.uc-points-date .border-bottom,
.uc-withdraw-history__item.border-bottom {
border-bottom: 1px solid var(--muted-border-color, rgba(0,0,0,.08));
}
.uc-points-tasks button,
.uc-points-date button {
background: none;
border: 0;
cursor: pointer;
padding: 0;
}
.focus-color { color: var(--focus-color, #f59e0b); }
+24 -2
View File
@@ -908,10 +908,17 @@
link.addEventListener('click', function (e) {
e.preventDefault();
var key = link.getAttribute('data-aksrt-asset-tab');
document.querySelectorAll('[data-aksrt-asset-tab]').forEach(function (a) {
document.querySelectorAll('.uc-asset-tabs__nav [data-aksrt-asset-tab]').forEach(function (a) {
var li = a.closest('li');
if (li) li.classList.toggle('active', a === link);
if (!li) return;
var aKey = a.getAttribute('data-aksrt-asset-tab');
var on = aKey === key || (key === 'points_date' && aKey === 'points_free');
li.classList.toggle('active', on);
});
var tabs = document.querySelector('.uc-asset-tabs');
if (tabs && typeof tabs.scrollIntoView === 'function') {
tabs.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
document.querySelectorAll('[data-aksrt-asset-pane]').forEach(function (pane) {
var on = pane.getAttribute('data-aksrt-asset-pane') === key;
pane.classList.toggle('is-active', on);
@@ -921,6 +928,20 @@
});
}
function initWithdrawHistory() {
var modal = document.querySelector('[data-aksrt-withdraw-history-modal]');
if (!modal) return;
function open() { modal.hidden = false; document.body.classList.add('uc-modal-open'); }
function close() { modal.hidden = true; document.body.classList.remove('uc-modal-open'); }
document.querySelectorAll('[data-aksrt-withdraw-history-open]').forEach(function (btn) {
btn.addEventListener('click', function (e) { e.preventDefault(); open(); });
});
modal.querySelectorAll('[data-aksrt-withdraw-history-close]').forEach(function (btn) {
btn.addEventListener('click', function (e) { e.preventDefault(); close(); });
});
}
function bootAssets() {
initSignin();
initInvite();
@@ -932,6 +953,7 @@
initExchange();
initPointsBuy();
initWithdraw();
initWithdrawHistory();
initAssetTabs();
}