feat(pay): 统一收银台四种模式(站内二维码/当前页跳转/表单提交/JSAPI)

- PaymentOrchestrator 统一返回 mode + code_url/payment_url/form_html/jsapi_params
- 支付宝:当面付二维码 / 电脑网站支付 / H5;微信:Native / H5 / JSAPI(WechatOpenid 静默授权)
- 易支付:PC mapi 二维码,移动端自动提交表单
- 删除旧键 alipay_payment_type / wechat_payment_type / epay_device 与 redirect/qr_content 字段
- 新增 pay-cashier.js,移除 window.open,订单状态接口改为 /pay/order/{n}
- 拆分 credits.js(affiliate / withdraw-history)至 1000 行以内

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-10-29 14:01:28 +08:00
1 parent b340b77d5a
commit 1df2822f01
28 files changed
+1255 -836

No files matched your search

+13 -5
View File
@@ -577,7 +577,9 @@
tags: ["vip", "orders"],
onPending: function (data) {
waitingPayment = true;
if (data.payment_url) window.open(data.payment_url, "_blank");
if (window.AksrtPayCashier) {
window.AksrtPayCashier.handle(data, { onClose: cancelActivePurchase });
}
notyf(data.message || "请完成支付,支付成功后将自动刷新。", "info", 5, activePurchaseToastId);
activePurchaseToastId = "aksrt-vip-payment-toast";
notyf("等待支付结果…", "load", "", activePurchaseToastId);
@@ -831,16 +833,22 @@
vipPay(trigger);
}
document.addEventListener("aksrt:modal:close", function (event) {
var detail = event && event.detail ? event.detail : {};
var options = detail.session && detail.session.options ? detail.session.options : {};
if (options.kind !== "vip" || !activePurchase) return;
function cancelActivePurchase() {
if (!activePurchase) return;
if (typeof activePurchase.abort === "function") activePurchase.abort();
activePurchase = null;
if (activePurchaseToastId) {
notyf("已取消会员购买", "warning", 3, activePurchaseToastId);
activePurchaseToastId = "";
}
}
// VIP 弹窗被收银二维码弹窗替换(reason=replace)时保持轮询;用户主动关闭才取消。
document.addEventListener("aksrt:modal:close", function (event) {
var detail = event && event.detail ? event.detail : {};
var options = detail.session && detail.session.options ? detail.session.options : {};
if (options.kind !== "vip" || detail.reason === "replace") return;
cancelActivePurchase();
});
// 积分兑换入口(data-aksrt-vip-points-open)文档级委托:一处绑定同时覆盖