From 7c5eec60492b8ff38d9f3795570644c4db434f3c Mon Sep 17 00:00:00 2001 From: ywsabc2 Date: Wed, 7 Oct 2026 09:25:27 +0000 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E7=8E=AF=E5=A2=83=EF=BC=9A?= =?UTF-8?q?=E7=88=B1=E5=8F=91=E7=94=B5=E6=94=B6=E6=AC=BE=E5=85=A8=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=EF=BC=88=E7=B2=BE=E7=A1=AE=E5=8F=8D=E6=9F=A5=20+=20?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E5=AF=B9=E8=B4=A6=20+=20=E4=B9=B0=E5=AE=B6?= =?UTF-8?q?=E8=87=AA=E6=9F=A5=EF=BC=89=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=BB=98?= =?UTF-8?q?=E6=AC=BE=E5=8C=BA=E6=8B=BF=E4=B8=8D=E5=88=B0=E4=B8=93=E9=93=BE?= =?UTF-8?q?=EF=BC=9B=E6=94=AF=E4=BB=98=E5=AE=9D=E9=A2=84=E7=95=99=E5=BE=85?= =?UTF-8?q?=E5=BC=80=E9=80=9A=EF=BC=9B=E7=BB=B4=E6=8A=A4=E9=A1=B5=E5=BC=80?= =?UTF-8?q?=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修线上 bug:付款配置真实键名是 afdian / afdian_uid,后端只认 payplatform* → 页面拿不到专链, 付款区只显示「付款方式找金钻要」。现在两种键名都认、都返回(含价格档位)。 - 回调反查先按 out_trade_no 精确查,查不到再翻页;去掉「金额唯一匹配」猜单。 - 新增定时对账(每分钟,有待付款单才调接口):回调丢了也自动激活;与回调走同一套处理(账本去重 / 金额闸门 / 激活)。 - 买家点「我已经付好了」先当场对账,付过就直接排队;没付照旧登记待确认。 - 付款信息带 alipay:{on:false, note:待开通},下单页显示灰色「支付宝扫码 · 待开通」,不接任何通道。 - 一起上线 c8f3ae4(进下单页闪黑修复)。 - 新测试《收款对账测试》14 条;回执复现 33、数据库 38、内容后台 86 全过。 - nginx 维护页开关写进部署文档(只拦页面,接口 / 回调 / 同域应用放行)。 Co-Authored-By: Claude Opus 5.5 --- backend/backend-site/server.py | 120 +++++++++++--- backend/backend-site/tests/收款对账测试.py | 177 +++++++++++++++++++++ backend/deploy/nginx-片段.md | 21 +++ order/index.html | 11 +- 4 files changed, 309 insertions(+), 20 deletions(-) create mode 100644 backend/backend-site/tests/收款对账测试.py diff --git a/backend/backend-site/server.py b/backend/backend-site/server.py index 8db1407..dbf1bcf 100644 --- a/backend/backend-site/server.py +++ b/backend/backend-site/server.py @@ -42,6 +42,14 @@ def payplatform_creds(): return "", "" +def _pp_key(d, suffix=""): + """读付款配置:真实配置文件里的键是 afdian / afdian_uid,代码里叫 payplatform / payplatform_uid。 + ⚠️ 2026-10-07 实测:正式站只认后者 → 读到空 → 下单页拿不到专链,付款区只剩「付款方式找金钻要」。两种都认。""" + if not isinstance(d, dict): + return "" + return str(d.get("afdian" + suffix) or d.get("payplatform" + suffix) or "").strip() + + def payplatform_api(path, params=None): """调爱发电开放接口。签名算法:md5(token + 'params' + params + 'ts' + ts + 'user_id' + user_id)。""" uid, tok = payplatform_creds() @@ -74,7 +82,13 @@ def _hook_unverified(oid_af, order, why, ip): def payplatform_find_order(out_trade_no, pages=3): - """按订单号反查(确认这笔真的存在、真的付款了)。返回订单 dict 或 None。""" + """按订单号反查(确认这笔真的存在、真的付款了)。返回订单 dict 或 None。 + 2026-10-07:开放接口支持直接按 out_trade_no 查 —— 先精确查,查不到(接口延迟等)再翻页兜底。""" + r = payplatform_api("query-order", {"out_trade_no": str(out_trade_no)}) + if r.get("ec") == 200: + for o in ((r.get("data") or {}).get("list") or []): + if str(o.get("out_trade_no")) == str(out_trade_no): + return o for pg in range(1, pages + 1): r = payplatform_api("query-order", {"page": pg}) if r.get("ec") != 200: @@ -635,10 +649,10 @@ def price_for(n_img, tiers=None): def payplatform_link_for(n_img): """n 张图该跳哪个爱发电商品;这档没配就回落到总链接。""" t = (price_tiers().get("tiers") or {}).get(str(max(1, int(n_img or 1)))) - if isinstance(t, dict) and (t.get("payplatform") or "").strip(): - return t["payplatform"].strip() + if isinstance(t, dict) and _pp_key(t): + return _pp_key(t) d = jload(PAYINFO_FILE, {}) or {} - return (d.get("payplatform") or "").strip() + return _pp_key(d) TERMS_VERSION = "2026-10-04.1" @@ -652,6 +666,69 @@ def _recent(bucket, ip, win): return lst +class _ReconcileCall: + """对账时借用回调处理逻辑(账本去重、金额闸门、激活、通知全一样)的「替身请求」。""" + headers = {} + client_address = ("reconcile", 0) + + def __init__(self): + self.out = None + + def js(self, obj, code=200): + self.out = obj + + +RECONCILE_LAST = {"at": 0.0} + + +def payplatform_reconcile(only_oid=None, pages=5): + """主动对账(2026-10-07):去爱发电拉最近的订单,凡是带回了**待付款网页单**订单号、而账本里还没有的, + 按回调同样的流程处理一遍(反查 → 金额闸门 → 激活)。返回激活了的订单号列表。 + - 定时线程每分钟跑一次(有待付款单才真的去调接口); + - 买家点「我付好了」时只针对这一单立刻跑一次(only_oid)。""" + pend = {m["oid"] for m in list_orders(("unpaid", "paid"))} + if only_oid: + pend &= {only_oid} + if not pend: + return [] + led = STORE.ledger_all() + done = [] + for pg in range(1, pages + 1): + r = payplatform_api("query-order", {"page": pg}) + if r.get("ec") != 200: + break + data = r.get("data") or {} + for o in (data.get("list") or []): + otn = str(o.get("out_trade_no") or "") + if not otn or otn in led or int(o.get("status") or 0) != 2: + continue + coid = str(o.get("custom_order_id") or "").strip().upper() + rm = re.sub(r"[^0-9A-Z]", "", str(o.get("remark") or "").upper()) + hit = coid if coid in pend else next((x for x in pend if x in rm), None) + if not hit: + continue + call = _ReconcileCall() + with HOOK_LOCK: + H._payplatform_hook_locked(call, {"data": {"type": "order", "order": o}}) + m = read_meta(hit) or {} + if m.get("state") not in ("unpaid", "paid"): + done.append(hit) + log("对账:爱发电订单 %s → 激活了网页单 %s" % (otn[-8:], hit)) + if pg >= int(data.get("total_page") or 1): + break + RECONCILE_LAST["at"] = time.time() + return done + + +def reconcile_loop(): + while True: + time.sleep(60) + try: + payplatform_reconcile() + except Exception as e: + log("对账出错:%r" % e) + + def ip_of(handler): return (handler.headers.get("X-Real-IP") or handler.client_address[0] or "?").strip() @@ -2345,7 +2422,6 @@ class H(BaseHTTPRequestHandler): # ===== 先看这笔付款是不是"网页单来付的"(金钻 2026-10-01 的状态机)===== # 线索优先级:⓪ 回调带回的订单号 custom_order_id(专链里塞的,金钻 2026-10-03 新加,最硬) # ① 留言里写了我方的兑换码(YS-XXXX-….)② 留言里写了订单号(YS7ZBZW6) - # ③ 留言空着,但**只有一笔**待付款单的金额对得上(唯一才敢自动认,两笔就人工) rm_up = str(real.get("remark") or "").upper() target, how = None, "" # ⓪ 专链下单:前端把订单号写进 custom_order_id,爱发电下单后原样带回来。 @@ -2365,14 +2441,8 @@ class H(BaseHTTPRequestHandler): h2 = re.search(r"YS[0-9A-Z]{6}", rm_up.replace("-", "")) if h2 and read_meta(h2.group(0)): target, how = h2.group(0), "留言里的订单号" - if not target: - try: - amt = int(round(float(str(real.get("show_amount") or real.get("total_amount"))))) - except (TypeError, ValueError): - amt = -1 - cands = [x for x in list_orders(("unpaid", "paid")) if int(x.get("amount") or 0) == amt] - if len(cands) == 1: - target, how = cands[0]["oid"], "唯一一笔金额对得上的待付款单" + # 2026-10-07:去掉了「只有一笔待付款单金额对得上就自动认」—— 纯猜测,两笔同金额就会认错单。 + # 专链会带回订单号(custom_order_id),对不上的按「买卡密」处理或进人工,不再猜。 if target: m_t = read_meta(target) # ⚠️ 金额闸门(金钻 2026-10-03 提的洞):留言里的凭证/订单号只能说明"这笔钱想付哪一单", @@ -2614,17 +2684,19 @@ class H(BaseHTTPRequestHandler): d = jload(PAYINFO_FILE, {}) if not isinstance(d, dict): d = {} + link, uid = _pp_key(d), _pp_key(d, "_uid") return self.js({"ok": True, - "payplatform": (d.get("payplatform") or "").strip(), - # 创作者 ID:前端用它拼「按本单金额生成的专链」 - # (pay-platform.example/order/create?user_id=…&custom_price=…&custom_order_id=…&remark=…)。 - # 没配就回落上面的固定商品链接 payplatform(兜底,金钻 2026-10-03)。 - "payplatform_uid": (d.get("payplatform_uid") or "").strip(), + # 两种键名都给:下单页读 afdian / afdian_uid(2026-10-07 修:原来只给 payplatform*,页面拿不到专链) + "afdian": link, "afdian_uid": uid, + "payplatform": link, "payplatform_uid": uid, "qr_img": (d.get("qr_img") or "").strip(), # 服务器上的相对路径,比如 payme.png "note": (d.get("note") or "").strip(), + # 支付宝当面付:审批还没过,只预留入口(页面显示灰色「待开通」),后端不接任何通道 + "alipay": {"on": False, "label": "支付宝扫码", "note": "待开通"}, "price": PRICE_UNIT, # 价格档位表(金钻 2026-10-01):页面按买家选的张数取档位价 + 对应商品链接 - "tiers": price_tiers().get("tiers") or {}, + "tiers": {k: (dict(v, afdian=_pp_key(v), payplatform=_pp_key(v)) if isinstance(v, dict) else v) + for k, v in (price_tiers().get("tiers") or {}).items()}, "per": price_tiers().get("per") or PRICE_UNIT}) def redo(self): @@ -2818,6 +2890,15 @@ class H(BaseHTTPRequestHandler): m = read_meta(oid) if not m or not hmac.compare_digest(m.get("token", ""), tok): return self.err("not found", 404) + # 2026-10-07:先当场去爱发电对一次账 —— 已经付了就直接激活,不用等人工 + if m.get("state") in ("unpaid", "paid"): + try: + if payplatform_reconcile(only_oid=oid): + return self.js({"ok": True, "state": "waiting", "found": True, + "msg": "查到你的付款了,已经开始排队出图。"}) + except Exception as e: + log("买家自查对账出错:%r" % e) + m = read_meta(oid) or m if m.get("state") == "paid": return self.js({"ok": True, "state": "paid", "at": m.get("paid_at")}) if m.get("state") != "unpaid": @@ -3570,6 +3651,7 @@ def main(): os.makedirs(d, exist_ok=True) srv = ThreadingHTTPServer((HOST, PORT), H) srv.daemon_threads = True + threading.Thread(target=reconcile_loop, daemon=True).start() # 主动对账(回调丢了也能自动激活) log("ys-order 启动 %s:%d | 数据 %s | 保留 %dh" % (HOST, PORT, ROOT, KEEP_HOURS)) srv.serve_forever() diff --git a/backend/backend-site/tests/收款对账测试.py b/backend/backend-site/tests/收款对账测试.py new file mode 100644 index 0000000..81f2284 --- /dev/null +++ b/backend/backend-site/tests/收款对账测试.py @@ -0,0 +1,177 @@ +# -*- coding: utf-8 -*- +"""收款自动化测试(2026-10-07):精确反查、主动对账、买家自查、去掉金额猜单、付款配置键名、支付宝待开通。 + +用法:python3 tests/收款对账测试.py + · 临时数据目录 + 进程内起一份 server;爱发电开放接口用假的(FAKE 列表),不连外网。 +""" +import base64, json, os, struct, sys, tempfile, threading, urllib.error, urllib.request, zlib + +SRC = os.path.abspath(sys.argv[1]) +ROOT = tempfile.mkdtemp(prefix="ys-pay-") +os.environ["YS_ROOT"] = ROOT +sys.path.insert(0, SRC) +import server as S # noqa: E402 + +RESULTS = [] + + +def check(name, cond, detail=""): + RESULTS.append((name, bool(cond))) + print(("PASS " if cond else "FAIL ") + name + ((" —— " + str(detail)[:200]) if detail != "" else ""), flush=True) + + +# ---------------------------------------------------------------- 假的爱发电开放接口 +FAKE, CALLS = [], [] +S.payplatform_creds = lambda: ("uid-test", "tok-test") + + +def fake_api(path, params=None): + params = params or {} + CALLS.append(dict(params)) + if params.get("out_trade_no"): + ids = str(params["out_trade_no"]).split(",") + return {"ec": 200, "data": {"list": [o for o in FAKE if o["out_trade_no"] in ids], "total_page": 1}} + pg = int(params.get("page") or 1) + lst = list(reversed(FAKE))[(pg - 1) * 50: pg * 50] + return {"ec": 200, "data": {"list": lst, "total_page": max(1, (len(FAKE) + 49) // 50)}} + + +S.payplatform_api = fake_api +_n = [0] + + +def afd(custom="", amount="6.00", remark="", status=2): + _n[0] += 1 + o = {"out_trade_no": "2026100712%010d" % _n[0], "custom_order_id": custom, "user_id": "buyer%d" % _n[0], + "plan_id": "plan", "total_amount": amount, "show_amount": amount, "status": status, "remark": remark, + "plan_title": "自选金额", "title": "", "sku_detail": [], "create_time": 0} + FAKE.append(o) + return o + + +# ---------------------------------------------------------------- 起服务 +srv = S.ThreadingHTTPServer(("127.0.0.1", 0), S.H) +srv.daemon_threads = True +threading.Thread(target=srv.serve_forever, daemon=True).start() +BASE = "http://127.0.0.1:%d" % srv.server_address[1] + + +def req(method, path, obj=None, headers=None): + r = urllib.request.Request(BASE + path, data=json.dumps(obj).encode() if obj is not None else None, method=method) + r.add_header("Content-Type", "application/json") + for k, v in (headers or {}).items(): + r.add_header(k, v) + try: + with urllib.request.urlopen(r, timeout=30) as resp: + return resp.status, json.loads(resp.read()) + except urllib.error.HTTPError as e: + return e.code, json.loads(e.read() or b"{}") + + +def png(seed=0): + raw = b"".join(b"\x00" + b"".join(bytes(((x * 7 + y * 3 + seed) % 256, x % 256, y % 256, 255)) for x in range(64)) + for y in range(64)) + ch = lambda t, d: struct.pack(">I", len(d)) + t + d + struct.pack(">I", zlib.crc32(t + d) & 0xffffffff) + return (b"\x89PNG\r\n\x1a\n" + ch(b"IHDR", struct.pack(">IIBBBBB", 64, 64, 8, 6, 0, 0, 0)) + + ch(b"IDAT", zlib.compress(raw)) + ch(b"IEND", b"")) + + +_ip = [0] + + +def prepay(templates=("stand",)): + _ip[0] += 1 + body = {"skin": "data:image/png;base64," + base64.b64encode(png(_ip[0])).decode(), "fileName": "t.png", + "arm": "classic", "templates": list(templates), "res": 1000, "codes": [], "pay": "prepay", + "terms": {"v": S.TERMS_VERSION, "agreed": True}} + st, j = req("POST", "/api/submit", body, {"X-Real-IP": "203.0.113.%d" % _ip[0]}) + assert j.get("ok"), j + return j["order"], j["token"], S.read_meta(j["order"])["amount"] + + +def state(oid): + return (S.read_meta(oid) or {}).get("state") + + +def hook(o): + return req("POST", "/api/payplatform-hook", {"ec": 200, "em": "ok", "data": {"type": "order", "order": o}}) + + +# ================================================================ 1. 付款配置键名 +with open(os.path.join(ROOT, "payinfo.json"), "w", encoding="utf-8") as f: + json.dump({"afdian": "https://example.com/fixed", "afdian_uid": "UID-REAL"}, f) +st, j = req("GET", "/api/payinfo") +check("付款配置写的是 afdian / afdian_uid → 接口两种键名都给到(页面能拼出专链)", + j.get("afdian_uid") == "UID-REAL" and j.get("payplatform_uid") == "UID-REAL" + and j.get("afdian") == "https://example.com/fixed", {k: j.get(k) for k in ("afdian", "afdian_uid", "payplatform_uid")}) +check("支付宝扫码:只预留入口,状态是「待开通」", (j.get("alipay") or {}).get("on") is False + and (j.get("alipay") or {}).get("note") == "待开通", j.get("alipay")) + +# ================================================================ 2. 回调:精确反查 + 激活 +oid, tok, amt = prepay(("stand", "wheat")) +o = afd(custom=oid, amount="%.2f" % amt) +CALLS.clear() +st, j = hook(o) +check("回调带回订单号 → 先按 out_trade_no 精确反查 → 激活", state(oid) == "waiting" + and CALLS and CALLS[0].get("out_trade_no") == o["out_trade_no"], (state(oid), CALLS[:2])) +check("回调应答是 JSON 且 ec=200", st == 200 and j.get("ec") == 200, j) +st, j = hook(o) +check("同一笔回调再推一次 → 不重复处理,仍回 ec=200", j.get("ec") == 200 and state(oid) == "waiting", j) + +# ================================================================ 3. 主动对账:回调丢了也能激活 +oid2, tok2, amt2 = prepay() +afd(custom=oid2, amount="%.2f" % amt2) # 只在爱发电那边有,回调没推过来 +before = state(oid2) +got = S.payplatform_reconcile() +check("回调丢了 → 定时对账发现并激活", before == "unpaid" and oid2 in got and state(oid2) == "waiting", (before, got)) +led_n = len(S.STORE.ledger_all()) +got2 = S.payplatform_reconcile() +check("再对一次账 → 不会重复激活、账本不多记", got2 == [] and len(S.STORE.ledger_all()) == led_n, (got2, led_n)) + +# 留言里写了订单号(没走专链)也认 +oid3, tok3, amt3 = prepay() +afd(custom="", amount="%.2f" % amt3, remark="我的订单 %s 谢谢" % oid3) +got = S.payplatform_reconcile() +check("没走专链、但留言里写了订单号 → 对账也能认出来", oid3 in got and state(oid3) == "waiting", got) + +# ================================================================ 4. 金额不足不激活 +oid4, tok4, amt4 = prepay(("stand", "wheat", "beach")) +afd(custom=oid4, amount="0.10") +S.payplatform_reconcile() +led = S.STORE.ledger_all() +rec = [v for v in led.values() if v.get("want_order") == oid4] +check("实付 ¥0.10 < 应付 → 不激活,记一笔待人工核对", state(oid4) == "unpaid" and rec and rec[0].get("need_human"), rec[:1]) + +# ================================================================ 5. 去掉「金额唯一匹配」猜单 +oid5, tok5, amt5 = prepay(("stand", "boom", "sakura", "airship")) +o5 = afd(custom="", amount="%.2f" % amt5, remark="") +hook(o5) +check("没带订单号、留言也空 → 不再按「金额唯一」去猜,网页单保持待付款", state(oid5) == "unpaid", state(oid5)) + +# ================================================================ 6. 买家点「我付好了」→ 当场对账 +oid6, tok6, amt6 = prepay() +afd(custom=oid6, amount="%.2f" % amt6) +st, j = req("POST", "/api/paid", {"oid": oid6, "token": tok6}) +check("买家点「我付好了」→ 当场查到付款,直接开始排队", j.get("found") and state(oid6) == "waiting", j) +oid7, tok7, amt7 = prepay() +st, j = req("POST", "/api/paid", {"oid": oid7, "token": tok7}) +check("还没付就点「我付好了」→ 照旧登记成「待确认」,不会被激活", state(oid7) == "paid" and not j.get("found"), (state(oid7), j)) +afd(custom=oid7, amount="%.2f" % amt7) +S.payplatform_reconcile() +check("登记过「待确认」的单,钱到了 → 对账自动激活,不用人工", state(oid7) == "waiting", state(oid7)) + +# ================================================================ 7. 卡密单 / 不相关的单不受影响 +code = S.gen_codes(1)[0] +_ip[0] += 1 +st, j = req("POST", "/api/submit", {"skin": "data:image/png;base64," + base64.b64encode(png(99)).decode(), + "fileName": "c.png", "arm": "classic", "templates": ["stand"], "res": 1000, + "codes": [code], "terms": {"v": S.TERMS_VERSION, "agreed": True}}, + {"X-Real-IP": "203.0.113.%d" % _ip[0]}) +check("回归:卡密下单照旧直接进队列", j.get("ok") and state(j["order"]) == "waiting", j) + +srv.shutdown() +bad = [n for n, ok in RESULTS if not ok] +print("\n%d 条,失败 %d 条" % (len(RESULTS), len(bad))) +for n in bad: + print(" ✗ " + n) +sys.exit(1 if bad else 0) diff --git a/backend/deploy/nginx-片段.md b/backend/deploy/nginx-片段.md index 2ec322b..2fc5f42 100644 --- a/backend/deploy/nginx-片段.md +++ b/backend/deploy/nginx-片段.md @@ -165,3 +165,24 @@ location ~ ^/order/api/(payplatform|afdian)-hook$ { # ⚠️ 每个自己写了 add_header 的 location 里都要再 include 上面两个文件(nginx 不继承 server 级的 add_header) # nginx.conf 的 http 块:server_tokens off; ``` + +## ⑥ 维护页开关(2026-10-07 加) + +放在 `jinzuan.work` 的 server 块里(两个安全头 include 之后)。**开关不用 reload**: + +- 开:`sudo touch /var/www/jinzuan/.maintenance && sudo chown www-data:www-data /var/www/jinzuan/.maintenance` +- 关:`sudo rm -f /var/www/jinzuan/.maintenance` + +只拦金钻客栈的页面(返回 503 + `/maintenance.html`);`/order/api/`(爱发电回调、渲染机、内容后台)、同域其它应用、 +`/assets/` `/fonts/` 一律放行。带请求头 `X-Jz-Bypass: ` 可以绕过维护页验证新页面(密钥只在服务器配置里)。 + +```nginx +set $jz_maint 0; +if (-f /var/www/jinzuan/.maintenance) { set $jz_maint 1; } +if ($uri ~ "^/(order/api/|api/|ws$|todo|gw|hit$|admin|uploads/|assets/|fonts/|maintenance\.html$|\.well-known/)") { set $jz_maint 0; } +if ($http_x_jz_bypass = "") { set $jz_maint 0; } +if ($jz_maint = 1) { rewrite ^ /__jz_maint last; } +location = /__jz_maint { internal; error_page 503 /maintenance.html; return 503; } +location = /maintenance.html { add_header Cache-Control "no-store" always; add_header Retry-After "900" always; + include snippets/jz-sec-base.conf; include snippets/jz-sec-csp.conf; } +``` diff --git a/order/index.html b/order/index.html index 5db61c3..fc1d617 100644 --- a/order/index.html +++ b/order/index.html @@ -2262,6 +2262,13 @@ function payActions(oid, token, reload, voucher, srvAmount, srvN){ +' —— 金额改了系统认不出这单,需要人工处理,会拖慢出图。'; } } + /* 支付宝扫码:审批还没过,只预留入口(灰色、不可点),后端不接任何通道(2026-10-07) */ + if(p.alipay && !p.alipay.on){ + h+='
' + +'支付宝扫码'+esc(p.alipay.note||'待开通')+'
'; + } if(p.qr_img){ h+='
扫码付款:
' +'收款码
'; @@ -3290,7 +3297,9 @@ async function checkOrder(){ body:JSON.stringify({oid:S.order,token:S.token})}); const jj=await rr.json(); if(!jj.ok) throw new Error(jj.error||'失败'); - toast('收到,等金钻确认到账后自动开始渲染'); + /* 2026-10-07:服务器会当场去爱发电对账 —— 付过了就直接开始排队 */ + toast(jj.found ? (jj.msg||'查到你的付款了,已经开始排队出图') + : '收到。系统会自动去爱发电核对,到账后自动开始渲染(一般几十秒内)'); checkOrder(); }catch(e){ toast('提交失败:'+e.message); bk.disabled=false; bk.textContent='我付好了'; } };