提交图

77 次代码提交

作者 SHA1 备注 提交日期
xcbyy
c58449ddae fix(subscribe): 模板ID按微信字符集规范化,根治「看起来一样却比对不上/40037」
- 新增 normalizeTemplateId:仅保留 [A-Za-z0-9_-],剔除零宽空格(U+200B)等 trim() 无法清除的不可见字符
- 模板比对、真实下发(notifyBySubscribe)、测试推送、下发小程序的模板ID统一走规范化
- 后台保存 message_template_rules 时落库前规范化,避免脏值再次进入
- 回归 87 套件/638 用例全绿;冒烟 5/5 验证:脏值落库被清洗、下发值无不可见字符
2026-10-19 11:18:12 +08:00
xcbyy
eb592dc1b9 fix(admin): 模板ID匹配改由后端裁决并 trim,修复"ID明明一致却报不属于该小程序"的误报
- 拉取模板列表接口在后端统一 trim 后比对,返回 mismatched 结论(含两侧空白差异场景)
- 后台改为直接展示后端结论,避免前端字符串比对误报
- 回归 87 套件/637 用例全绿
2026-10-19 11:06:47 +08:00
xcbyy
b77827522f fix(config): 占位凭证清理改为一次性(标记位保护),避免误清管理员填写的真实 AppID
- 历史占位 appId/appSecret 的清理由"每次启动执行"改为"仅首启执行一次",写入 wechat_pay_placeholder_cleaned 标记
- 此后即使管理员填写的 AppID 恰好等于旧占位值(本账真实 AppID),重启也不会被再次清空
- 「拉取小程序模板列表」缺凭证时错误提示改为可操作指引(指明填写位置)
- 回归 87 套件/636 用例全绿;冒烟 5/5 验证 Phase A 首启清理、Phase B 重启保留
2026-10-19 11:00:23 +08:00
xcbyy
01823a1db4 security: 移除硬编码微信小程序 appId/appSecret,改为只读配置+缺失即失败
- 后端不再兜底内置 appId/appSecret,缺失时 jscode2session/手机号/支付/内容审核等接口明确拒绝(fail-closed)
- 建表种子改为空值;启动自愈由「写入占位值」改为「清空历史占位值」,杜绝误用非本小程序 appId(40037 根因)
- 后台/引导文案去除具体 AppID;文档补充 WX_APP_ID/WX_APP_SECRET 说明
- 新增回归护栏 wechat-appid-config-hardening.spec.ts(87 套件/636 用例全绿);HTTP 冒烟 4/4 验证缺失即失败
2026-10-19 10:33:31 +08:00
xcbyy
584e526bca feat(subscribe): 新增拉取小程序真实模板列表诊断(定位40037)
- 新增 GET /api/admin/message/templates:调用 wxaapi/newtmpl/gettemplate 返回当前 appId(脱敏) 下真实模板列表,并标出后台已填但不在列表中的ID

- 测试推送 diagnostics 增加 appIdMasked,便于核对 appId

- 后台新增「拉取小程序模板列表(核对ID)」按钮与不匹配高亮提示

- 文档补充 40037 排查步骤;回归 86 套件/632 用例全绿
2026-10-19 10:26:10 +08:00
xcbyy
cacc478d71 fix(subscribe): 订阅消息未下发原因可见 + 小程序真实授权
- 后台测试推送:未就绪返回 mode=SIMULATED 明确原因 + 配置自检(模板ID/openid/appId/appSecret/总开关),不再把模拟显示为成功

- 占位符 tmpl_xxx 视为未配置(测试推送与订阅模板接口均过滤),微信错误码中文化(43101/47003/40037/40001 等)

- 小程序「平台消息与通知」点击时真实调用 wx.requestSubscribeMessage 并回显授权状态,标签不再恒为已开启

- 管理端拦截器错误提示改用 message;文档补订阅消息排查顺序;新增回归护栏(86 套件/631 用例全绿)
2026-10-19 10:02:57 +08:00
xcbyy
0aed11cb01 security: CORS 收敛为白名单 + 基础安全响应头 + 隐藏技术栈
- CORS 默认仅同源可用,跨域需显式配置 CORS_ORIGINS(非生产默认放行 localhost:5173)

- 新增安全响应头:X-Content-Type-Options / X-Frame-Options / Referrer-Policy / X-XSS-Protection / Permissions-Policy;生产附加 HSTS

- 关闭 X-Powered-By,设置 trust proxy

- 文档补充 CORS_ORIGINS;新增回归护栏 cors-security-headers.spec.ts(85 套件/627 用例全绿)
2026-10-19 09:31:44 +08:00
xcbyy
cbf77a7252 perf(db): 高频查询补索引 + 大列表加合理上限(避免全表下发)
- 启动建表后幂等补索引:orders/finance_records/users/reports/companions/payment_intents/payment_refunds 等高频查询列

- 管理端订单/财务流水/用户列表 LIMIT 500,友圈/评价列表 LIMIT 200,防止无界查询

- expert_services 懒建表后补 expert_id 索引

- 新增回归护栏 list-pagination-index.spec.ts(84 套件/625 用例全绿)
2026-10-19 09:28:02 +08:00
xcbyy
d665cd6976 feat(order): 订单超时自动流转改为后台定时任务
- 新增 startOrderTimeoutScheduler:默认每 60s 扫描(ORDER_TIMEOUT_SCAN_MS 可配,DISABLE_ORDER_TIMEOUT_SCAN=1 可禁用),带防重入与 unref

- 启动时自动开启;移除订单查询接口里的被动扫描,避免每次请求触发

- 文档补充定时扫描环境变量;新增回归护栏 order-timeout-scheduler.spec.ts(83 套件/622 用例全绿)
2026-10-19 09:22:52 +08:00
xcbyy
85e00e296f fix(companion): 去除合成虚拟大神的假评分/价格/服务(改为诚实档案)
- getCompanionById 对非真实大神档案不再虚构 rating/orderCount/price/voice/服务包,状态为休息中、审核未申请,并返回 isCompanion=false

- 小程序大神详情页对非大神档案隐藏服务与预约入口,显示'该用户尚未认证为大神';移除页面假默认值

- 新增回归护栏 companion-profile-honesty.spec.ts(82 套件/619 用例全绿)
2026-10-19 09:19:15 +08:00
xcbyy
f1f8952e97 chore(admin): 清理后台静态演示数据(我的团队/最新动态/通知中心返回空)
- /api/user/my-team/list 不再返回硬编码团队成员,改为空数组

- /api/user/latest-activity 不再返回硬编码动态,改为空数组

- /api/message/list 不再返回硬编码站内消息,改为空数组

- 新增回归护栏 admin-demo-data-cleanup.spec.ts(81 套件/617 用例全绿)
2026-10-19 09:08:21 +08:00
xcbyy
029c6189a7 feat(mini): 下单/提现/报名前补订阅消息授权(提升微信服务通知到达率)
- 新增 common/subscribe.js:页面预加载模板ID + 点击动作中同步请求授权(避免 await 丢失手势上下文)

- 下单支付前请求订单状态/核销码模板;提现前请求到账模板;组局报名确认后请求报名模板

- 自动过滤 tmpl_ 占位模板;授权失败不阻塞业务

- 新增回归护栏 subscribe-authorization.spec.ts(80 套件/615 用例全绿)
2026-10-19 09:01:36 +08:00
xcbyy
1ff4da290a feat(data): 新增历史数据归属订正脚本(默认 dry-run,--apply 写库)
- companions.user_id:按昵称唯一匹配用户回填(避免重复占用)

- finance_records.user_id:按充值/提现/订单/对手方规则回填,无法唯一确定则保留不填

- 默认仅预览,幂等可重复执行;新增 npm 脚本 backfill:ownership 与回归护栏

- 文档补充订正说明(79 套件/611 用例全绿)
2026-10-19 08:58:24 +08:00
xcbyy
c90b0bd44e fix(order): 抢单收紧为仅「待接单」可抢,抢单池同步过滤
- claimOrder 状态闸门改为严格只允许 待接单(含 CAS 条件 status='待接单'),杜绝抢已在履约/已服务/已核销的订单

- getOrdersPool 仅返回未认领的 待接单 订单

- 种子数据新增一笔待接单订单用于演示抢单

- 更新/新增回归护栏 claim-status-gate.spec.ts(78 套件/608 用例全绿)
2026-10-19 08:54:28 +08:00
xcbyy
8edffbefa2 feat(pay): 接入微信支付V3原路退款(按支付渠道分流 + 幂等 + 退款回调)
- 新增微信退款客户端 createRefund/queryRefundByOutRefundNo(/v3/refund/domestic/refunds)

- 新增退款桥接模块与 payment_refunds 幂等退款记录表

- 订单退款按渠道分流:微信支付原路退回微信;余额支付退回钱包余额;微信退款失败(502)不回退余额,防重复退款

- 覆盖拒单/买家取消/仲裁全额与部分/超时自动退款;新增 /api/pay/wechat/refund-notify 回调

- 后台新增退款回调地址配置;文档补充退款验收说明

- 新增回归护栏 wechat-refund.spec.ts(77 套件/605 用例全绿)
2026-10-19 08:47:08 +08:00
xcbyy
e719de59a2 feat(mini): 平台规范与服务协议页面化(页内切换,替代弹窗)
- 个人中心'平台规范与服务协议'点击直接进入 /pages/common/protocol(不再 showActionSheet 选择)

- 协议页新增页内切换:用户服务协议 / 隐私保护指引(含暖阳主题适配)

- 新增回归护栏 protocol-page.spec.ts(76 套件/601 用例全绿)
2026-10-17 18:04:33 +08:00
xcbyy
2599dce315 feat(security): 三端闭环加固 + 微信提现打款/订阅消息落地
后端: 身份与归属鉴权收口; 资金安全(结算闸门/支付防篡改/报名费真实扣款/赠金/结算唯一入账/提现打款); 数据泄露与隐私; 登录与密钥安全(默认密钥闸门/登录限流); 可观测性; 启动自检.

微信: 商家转账到零钱提现打款闭环(含回调/查单/失败退回佣金); 订阅消息真实下发闭环与后台模板字段对齐.

后台: 财务/微信支付配置读取失败锁定; 看板/待办/走势去假数据; 打款与测试推送文案修正.

小程序: 请求层错误透传与登录过期提示; 多页失败反馈与乐观回滚; 帮助中心FAQ页面化.

测试: 新增 40+ 回归护栏与真实 MySQL 冒烟(75 套件/599 用例全绿).
2026-10-17 18:00:09 +08:00
xcbyy
78117bb4e1 feat: security hardening, wechat pay v3 platform cert integration, companion certification revocation, and audit closed-loop 2026-10-16 17:38:17 +08:00
xcbyy
3bf38db8b6 feat(order): complete 7.1 order full lifecycle state transitions, 15m/30m/48h auto-timeouts, expert reject/apply-complete, and partial refund arbitration 2026-10-14 15:52:56 +08:00
xcbyy
a14f27d641 feat(spec-3): complete section 3.1/3.2/3.3 activity verify settlement, role_flags, and distribution_relations 2026-10-14 11:41:03 +08:00
xcbyy
51c19d6063 feat(closed-loop): complete end-to-end closed loops across miniapp, backend, and admin 2026-10-14 10:13:50 +08:00
xcbyy
010edc130f fix: 完善全系统业务闭环(大神入驻联动用户角色、服务评价人工下架监管、友圈搭子上车审核与抽屉) 2026-10-13 18:04:27 +08:00
xcbyy
173835dc4e fix(business-loop): complete arbitration balance refund, withdrawal rejection compensation, admin activity takedown, and companion violation alerts 2026-10-13 17:18:11 +08:00
xcbyy
9e2c19088b fix(report): optimize wechat toast length limit and add admin violation reports management center 2026-10-13 17:08:25 +08:00
xcbyy
56e672219e fix(modal): resolve premature modal closing caused by unsupported click.self in wechat miniprogram 2026-10-13 16:54:55 +08:00
xcbyy
d08acc052a feat(community): combine marquee scroll with detail modal for pinned notice 2026-10-13 16:35:35 +08:00
xcbyy
859b224d65 feat(expert): adapt expert detail page to dual-theme system with theme-warm support 2026-10-13 16:08:48 +08:00
xcbyy
1853e653fb fix(core): comprehensive fix for state loss across activity, ticket, workspace, favorites and community 2026-10-13 16:01:19 +08:00
xcbyy
497fb65359 fix(community): persist post liked status in MySQL and local storage to prevent state loss on page switch 2026-10-13 15:46:04 +08:00
xcbyy
3d895a1a0a fix(community): add missing heart and heartFilled icons to restore like button rendering 2026-10-13 15:37:07 +08:00
xcbyy
7a5e515b8b feat(user): replace distribution modal with dedicated promote page 2026-10-13 15:17:15 +08:00
xcbyy
831dd4a493 fix(order-list): ensure back button returns to user center instead of home page 2026-10-13 15:04:32 +08:00
xcbyy
63b18512f6 fix(order-list): add immersive custom navigation bar and return button with dual-theme adaptation 2026-10-13 15:00:12 +08:00
xcbyy
c3e7bd016b fix(user): fix missing FROM clause in getUserById SQL and add fallback for user 2006 2026-10-13 14:39:41 +08:00
xcbyy
3b0268ab10 feat(bill): convert bill records modal into dedicated independent page 2026-10-13 14:10:00 +08:00
xcbyy
736450973e feat(admin): complete post management, finance csv export, and wechat message template config 2026-10-13 11:11:40 +08:00
xcbyy
661d0d2589 feat(withdraw): convert withdraw records modal into dedicated independent page 2026-10-13 10:06:15 +08:00
xcbyy
cf11d5654b fix(withdraw): remove alipay/bank channels and enhance rules card text contrast in warm theme 2026-10-13 09:58:16 +08:00
xcbyy
26735530b4 fix(user): remove obsolete withdrawal modal and recompile mp-weixin to dedicated withdraw page 2026-10-13 09:44:13 +08:00
xcbyy
35a5a6670c fix(withdraw): resolve remote 404 route, db reason column patch and avatar tmp path fallback 2026-10-13 09:33:29 +08:00
xcbyy
1fb0cc4273 feat(withdraw): build dedicated withdrawal page with optimized layout and multichannel support 2026-10-13 09:19:34 +08:00
xcbyy
e867488d0d feat(expert): full closure of expert revenue trends, multichannel withdrawals, service manage, review reply and post manage 2026-10-13 09:13:06 +08:00
xcbyy
a004584109 fix(modal): restrict confirmText length to 4 chars and safeguard banner null access 2026-10-13 08:50:20 +08:00
xcbyy
6e78a7e4b7 feat(user): enable opening profile edit modal by clicking avatar or nickname 2026-10-13 08:44:36 +08:00
xcbyy
8d85ed54b2 feat(protocol): add dedicated full-text legal protocol page with smooth scroll view and link from login and user center 2026-10-13 08:35:47 +08:00
xcbyy
334b7a63b0 feat(auth): compact agreement layout to single-line and support flexible backend configuration for user agreement and privacy policy 2026-10-12 09:20:40 +08:00
xcbyy
f899829000 refactor(auth): simplify login page by removing redundant profile form and focusing on one-click auth 2026-10-12 09:02:27 +08:00
xcbyy
70623193a1 feat(auth): create dedicated official standard WeChat login page and remove popup modal 2026-10-10 17:48:35 +08:00
xcbyy
d7460f898d feat(expert): create dedicated expert apply page and navigate from user center 2026-10-10 16:57:48 +08:00
xcbyy
37b52c1efe feat(user): update login button label and integrate wechat native getPhoneNumber auth 2026-10-10 16:50:26 +08:00