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:
1 parent
d57fc6f934
commit
4da003663d
6 files changed
+514
-136
No files matched your search
+24
-2
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user