diff --git a/assets/css/routes/user-center/credits.css b/assets/css/routes/user-center/credits.css index e8b3ce12..8a6ce139 100644 --- a/assets/css/routes/user-center/credits.css +++ b/assets/css/routes/user-center/credits.css @@ -30,8 +30,7 @@ .uc-assets-row--dual > .uc-assets-col { display: contents; } -.uc-assets-row--dual > .uc-assets-col:first-child > .uc-asset-card, -.uc-assets-row--dual > .uc-assets-col:first-child > .uc-card-pass { +.uc-assets-row--dual > .uc-assets-col:first-child > .uc-asset-card { grid-column: 1; } .uc-assets-row--dual > .uc-assets-col:last-child > .uc-asset-card, diff --git a/assets/js/credits.js b/assets/js/credits.js index 9e3b5406..cebda6c0 100644 --- a/assets/js/credits.js +++ b/assets/js/credits.js @@ -271,6 +271,20 @@ var roots = document.querySelectorAll('[data-aksrt-card-pass]'); if (!roots || !roots.length) return; + var modal = document.querySelector('[data-aksrt-card-pass-modal]'); + if (modal) { + modal.querySelectorAll('[data-aksrt-card-pass-close]').forEach(function (btn) { + if (btn.dataset.aksrtCardPassCloseBound === '1') return; + btn.dataset.aksrtCardPassCloseBound = '1'; + btn.addEventListener('click', function () { closeModal(modal); }); + }); + } + document.querySelectorAll('[data-aksrt-card-pass-open]').forEach(function (btn) { + if (btn.dataset.aksrtCardPassOpenBound === '1') return; + btn.dataset.aksrtCardPassOpenBound = '1'; + btn.addEventListener('click', function () { openModal(modal); }); + }); + Array.prototype.forEach.call(roots, function (root) { var tip = root.querySelector('[data-aksrt-card-tip]'); var busy = false; diff --git a/inc/helpers/user-center-renderers/credits-wallet.php b/inc/helpers/user-center-renderers/credits-wallet.php index 95eb7e51..cfb76696 100644 --- a/inc/helpers/user-center-renderers/credits-wallet.php +++ b/inc/helpers/user-center-renderers/credits-wallet.php @@ -92,30 +92,41 @@ $mark = (string) ($charge_view['currency_mark'] ?? '元'); - -