From 815e83bac095cff627dab35fd30061e146bb58a4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 29 Jul 2026 10:29:59 +0800 Subject: [PATCH] fix(user-center): complete certification and order flows Fix modal scroll ownership and certification modal styling, store evidence as Media Library attachments, reconcile missed provider callbacks, validate currencies, and complete digital fulfillment only after durable entitlement delivery. --- .../users/components/VerifyReviewDrawer.vue | 6 +- assets/css/routes/orders.css | 15 + assets/css/routes/user-center/settings.css | 4 +- assets/js/routes/user-center.js | 12 +- .../user-center-renderers/profile-auth.php | 9 +- .../user-center-renderers/sidebar-orders.php | 18 +- src/AKSRT/Admin/Native/UsersMenus.php | 8 +- .../UserControllerVerifyIntegrations.php | 5 +- src/AKSRT/Content/PayOrders.php | 7 + src/AKSRT/Content/PayRest.php | 3 + src/AKSRT/Content/VipServicePurchase.php | 24 ++ src/AKSRT/Core/DomainModel.php | 1 + src/AKSRT/Credits/Balance.php | 6 +- src/AKSRT/Credits/BalanceServiceCharge.php | 58 +++- src/AKSRT/Credits/Credits.php | 6 +- src/AKSRT/Forum/PlateFollowPay.php | 11 + src/AKSRT/Forum/TopicPay.php | 11 + src/AKSRT/Payment/Gateway.php | 63 +++- src/AKSRT/Payment/Gateways/AlipayGateway.php | 2 + src/AKSRT/Payment/Gateways/EpayGateway.php | 2 + src/AKSRT/Payment/Gateways/PayPalGateway.php | 69 +++- src/AKSRT/Payment/Gateways/StripeGateway.php | 10 +- .../Payment/Gateways/WechatPayGateway.php | 2 + src/AKSRT/Payment/UserOrders.php | 7 +- src/AKSRT/Shop/Part3.php | 86 +++-- src/AKSRT/User/AuthApply.php | 316 +++++++++++++----- 26 files changed, 613 insertions(+), 148 deletions(-) diff --git a/assets/admin/src/pages/users/components/VerifyReviewDrawer.vue b/assets/admin/src/pages/users/components/VerifyReviewDrawer.vue index 236df1b4..cba1a0ea 100644 --- a/assets/admin/src/pages/users/components/VerifyReviewDrawer.vue +++ b/assets/admin/src/pages/users/components/VerifyReviewDrawer.vue @@ -22,9 +22,9 @@ {{ detail.request.application?.desc || '-' }} {{ detail.request.application?.msg || '-' }} -
- - 认证证明材料 +
diff --git a/assets/css/routes/orders.css b/assets/css/routes/orders.css index 32c43a60..a4388c26 100644 --- a/assets/css/routes/orders.css +++ b/assets/css/routes/orders.css @@ -522,8 +522,15 @@ } /* Order detail modal content */ +html.aksrt-modal-open { + overflow: hidden; +} + .aksrt-order-detail-dialog { + display: flex; + flex-direction: column; width: min(520px, 100%); + max-height: min(85vh, 760px); border-radius: 20px; overflow: hidden; background: var(--surface-1, #fff); @@ -557,8 +564,12 @@ } .aksrt-order-detail-dialog .aksrt-modal__body { + min-height: 0; padding: 8px 18px 16px; gap: 14px; + overflow-x: hidden; + overflow-y: auto; + overscroll-behavior: contain; } /* Hero: status + amount */ @@ -1413,6 +1424,10 @@ html.dark .aksrt-order-detail-dialog .aksrt-modal__footer { border: 1px solid color-mix(in srgb, var(--color-line, #e5e7eb) 70%, transparent); } +.aksrt-modal__dialog.aksrt-order-detail-dialog { + overflow: hidden; +} + .aksrt-modal__header { display: flex; align-items: center; diff --git a/assets/css/routes/user-center/settings.css b/assets/css/routes/user-center/settings.css index a28f3818..5a8dac9f 100644 --- a/assets/css/routes/user-center/settings.css +++ b/assets/css/routes/user-center/settings.css @@ -399,7 +399,7 @@ .uc-auth-card--verified .uc-auth-card__art { background: linear-gradient(150deg, #20a77d, #3287df); } .uc-auth-modal { z-index: 620; } -.uc-auth-modal .aksrt-modal__dialog { width: min(620px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 40px)); overflow: auto; } +.uc-auth-modal__dialog { width: min(620px, calc(100vw - 28px)); max-width: 620px; max-height: min(760px, calc(100vh - 40px)); overflow: auto; background: var(--surface-1, #fff); } .uc-auth-modal__header > div { display: flex; align-items: center; gap: 10px; } .uc-auth-modal__header > div > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--color-primary-soft); color: var(--color-primary); } .uc-auth-modal__body { padding: 22px; } @@ -433,5 +433,5 @@ .uc-auth-card__art { font-size: 34px; } .uc-auth-card__content { padding: 20px 17px; } .uc-auth-card__content h2 { font-size: 20px; } - .uc-auth-modal .aksrt-modal__dialog { position: fixed; inset: auto 0 0; width: 100%; max-height: 88vh; margin: 0; border-radius: 18px 18px 0 0; } + .uc-auth-modal__dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: 88vh; margin: 0; border-radius: 18px 18px 0 0; } } diff --git a/assets/js/routes/user-center.js b/assets/js/routes/user-center.js index 82478f7b..465f3c00 100644 --- a/assets/js/routes/user-center.js +++ b/assets/js/routes/user-center.js @@ -262,10 +262,16 @@ } if (message) message.textContent = ''; fetch(ajaxUrl, { method: 'POST', body: new FormData(form), credentials: 'same-origin' }) - .then(function(response) { return response.json(); }) .then(function(response) { - if (!response || response.error) throw new Error((response && response.msg) || '提交失败'); - showToast(response.msg || '提交成功'); + return response.json().then(function(payload) { + if (!response.ok || !payload || !payload.success) { + throw new Error((payload && payload.data && payload.data.message) || '提交失败'); + } + return payload.data || {}; + }); + }) + .then(function(data) { + showToast(data.message || '提交成功'); window.setTimeout(function() { window.location.assign(tabUrls.auth || '?tab=auth'); }, 500); }) .catch(function(error) { diff --git a/inc/helpers/user-center-renderers/profile-auth.php b/inc/helpers/user-center-renderers/profile-auth.php index 6b7733b4..4fc2ed82 100644 --- a/inc/helpers/user-center-renderers/profile-auth.php +++ b/inc/helpers/user-center-renderers/profile-auth.php @@ -17,6 +17,7 @@ $settings = class_exists(AuthApply::class) ? AuthApply::settings() : ['enabled' $status = $user_id > 0 && class_exists(AuthApply::class) ? AuthApply::get_status($user_id) : ''; $info = $user_id > 0 && class_exists(AuthApply::class) ? AuthApply::get_auth_info($user_id) : []; $apply = $user_id > 0 && class_exists(AuthApply::class) ? AuthApply::get_apply_payload($user_id) : []; +$evidence = class_exists(AuthApply::class) ? AuthApply::get_evidence_items($apply) : []; $type_labels = []; foreach ((array) ($settings['types'] ?? []) as $type) { $type_labels[(string) ($type['slug'] ?? '')] = (string) ($type['label'] ?? ''); @@ -64,8 +65,8 @@ $can_apply = !empty($settings['enabled']) && !empty($settings['allow_apply']) &&