Commit Graph
45 Commits
Author SHA1 Message Date
kate522 039fa6d863 feat(after-sale): 处理记录时间线改为「节点 + 状态 + 时间」同一行
原实现把状态与时间竖排在节点右侧的 88px 固定列里,状态文字一长就折行、
时间被挤到第三行,和右侧备注也对不齐。改为节点独占一列,状态与时间包在
head 里紧随其后,处理备注另起一行:

- [节点][处理状态][时间] 一行,状态色仍按工单状态走 --as-accent
- 竖线改挂到条目的 ::before(原来是 aside 的),top 从 12px 调到 14px,
  与加了 4px 上边距的节点底部对齐,绳子依旧穿过每个节且末项不收口
- head 用 flex + baseline + gap:8px,状态过长时时间自然换行而不重叠
- 售后详细弹窗与订单详情弹窗共用同一套标记,两侧同步改

验证:tests/widget-system/ 462 项、tests/admin/ 76 项通过;用 node 分别抽取
两个 JS 里的时间线构造函数跑样例载荷,确认输出为
[节点][状态][时间] + 另起一行的备注;重建 public.css / public.min.css,
diff 仅限时间线规则。未做浏览器视觉验收。
2026-10-09 18:01:16 +08:00
kate522 26ce9a5904 feat(after-sale): 售后处理记录改为每次提交留痕并新增时间线
工单行内新增 handling_log 列,用户申请、用户撤销与后台每次改状态都落一条
「状态 + 备注 + 来源 + 时间」,按时间正序存放、上限 50 条(对齐
MetaAssetService::MAX_RECORDS)。set_status 因此变成读-改-写,补上
GET_LOCK/RELEASE_LOCK 包裹,并在锁内重读工单快照——锁外取快照仍会被并发
追加覆盖。

三处界面由「只显示最后一条」改为回放整条处理链路:

- 后台订单明细「售后记录」按工单渲染头部(状态/金额/申请时间)+ 原因 +
  完整处理记录
- 售后面板手风琴「处理备注」单独占整行并置于「申请说明」上方,删掉已无
  意义的「审核时间」
- 前台售后详细弹窗与订单详情弹窗的售后记录改为时间线:左列绳结状态条
  (节点 + 状态 + 时间),右列处理备注;样式只在 modal-runtime.css 定义
  一份,两个弹窗共用

清理随之失效的死代码:工单的 admin_note / reviewed_at / completed_at,以及
全仓库无写入方的 gateway_request_id / gateway_refund_id / gateway_result;
连带删掉 gatewayResultText()、uninstall 里从未存在过的 aksrt_after_sale
表项,并把两处后台页面重复的状态标签数组收成 after_sale_status_labels()、
重复的 .aksrt-as-log 样式收成 after_sale_log_css()。

顺带修复 88669f69 重构退款流水线时误删 refund_amount()、却仍在 create()
里调用的问题——此前任何用户提交售后都会直接 fatal。

验证:tests/widget-system/ 462 项、tests/admin/ 76 项通过;新增
after-sale-log-harness.php 驱动真实 AfterSaleService,覆盖首条日志、空备注
也留痕、撤销记录、50 条上限与畸形行规范化;两个后台页面经 dev harness
渲染校验「处理备注」宽行位于「申请说明」之前;未做浏览器视觉验收。
2026-10-09 13:59:50 +08:00
kate522 d69e1d33c3 fix(orders): 修复再次申请售后被 has_application 分流回售后详细的问题并对齐底部按钮观感 2026-10-07 09:43:22 +08:00
kate522 8023e2e472 feat(after-sale): 支持撤销售后工单并接入人机验证 2026-10-07 09:20:59 +08:00
kate522 918ca371be chore(repo): 行尾规范化,恢复索引 LF 契约
远端 9 个文件以 CRLF 入库,违反 .gitattributes「索引一律 LF」声明,
在 autocrlf=true 的工作区产生永久假脏并阻塞合并。仅行尾变化,无内容改动。
2026-10-07 09:13:42 +08:00
kate522 c801ff5047 feat(payment): 订单详情底部改用主题按钮样式;记录卡片加查看详细与原因/申请理由 2026-10-06 23:50:30 +00:00
kate522 915311dcb6 feat(payment): 订单详情弹窗统一为 modal-mini + 蓝色炫彩标题区 2026-10-06 18:27:23 +00:00
kate522 2db2414270 style(payment): 订单详情弹窗售后记录改为卡片式 UI 2026-10-06 18:08:04 +00:00
kate522 93579cbc9f fix(payment): 售后弹窗改为按钮载荷同步弹出,修复首次点击无反馈
原实现是「点击 → 先请求 /orders/{n} → 再弹窗」,与项目里所有可用弹窗
(含举报链路 report.js)不同构:举报弹窗把数据放在按钮 data-* 属性里同步
弹出。前置请求会让首次点击在请求返回前毫无反应,体感就是"得二次点击"。

- 按钮 data-aksrt-after-sale-apply / -detail 携带订单与售后状态载荷
  (PHP 模板与 order-center.js 的 actionHtml 同构生成),点击当拍即开
  对应弹窗:申请表单 / 超时效提示 / 售后详细,零前置请求
- 「再次申请售后」同样使用已渲染载荷,不再重新拉取订单
- 提交与图片上传仍走 REST,服务端校验不变;列表刷新后载荷随之更新
- jsdom 多脚本环境实测:三种入口均在点击同一拍弹出且 fetch 计数为 0
2026-10-06 23:29:59 +08:00
kate522 1a9a2762f3 feat(payment): 新增「售后策略」配置与前台售后弹窗链路
- 后台「支付&付费 → 售后策略」:售后功能开关、申请时效、超时效提示(HTML)、
  预置原因、申请售后说明、所需材料、申请说明占位文案、可上传图片开关;
  PHP schema 与 SPA schema 1:1 对齐,group 字段支持拖拽排序
- PaymentRuntime 新增售后设置解析(缺键回退 schema 默认、HTML 走 kses、
  中文原因稳定 slug)与 after_sale_expired 时效判定(支付时间起算)
- 售后工单支持举证图片(order_aftersale.images 列,最多 3 张,
  复用评论图片上传校验)与上传路由;订单视图模型输出 after_sale 按钮状态
- 前台申请 / 超时效提示 / 售后详细三个独立弹窗(modal-mini + 蓝色炫彩头),
  订单详情弹窗不再内嵌售后表单并清理相关死代码
- 新增 after-sale-policy 契约测试与运行时 harness,527 项契约测试通过
2026-10-06 22:21:47 +08:00
kate522 7b55cfb190 feat(payment): rebuild order details and asset records 2026-10-05 16:42:25 +08:00
kate522 833f94bf3a feat(orders): 规范化前台订单详情弹窗
弹窗外壳由 modal-runtime 挂载在 body 下,并不位于 .aksrt-orders-page 之内,
而原有 .aksrt-order-detail__* 规则引用的 --orders-ink / --orders-line 等别名
只定义在页面容器上。变量在该作用域无法解析,整条声明被判为无效值丢弃,于是
边框、分隔线与次要文字色全部没有生效——弹窗此前「没做完」的根因就在这里。

- renderDetail() 重构为状态横幅 + 商品信息 + 交易信息 + 操作栏四段
- 状态配色改由单个 --hero-accent 变量驱动,按状态切换琥珀 / 绿 / 品牌色 /
  中性灰;--hero-text 再与墨色混合,避免强调色直接用作正文导致对比度不足
- 交易信息补上支付方式;流水号增加复制按钮(clipboard API + textarea 回退,
  带 is-copied 反馈)
- 待支付订单在详情内显示实时倒计时;updateCountdowns() 经新增的
  countdownScopes() 一并扫描弹窗内容,原先只扫页面根节点
- 补充此前完全缺失的 refresh-state 与 skeleton 样式
- 金额口径按状态区分应付款 / 实付款 / 订单金额;卡密核销回退出的原始渠道 key
  归一显示为「卡密核销」
- 弹窗外壳挂 aksrt-order-detail-modal 类以限定样式作用域,宽度调至 480px

关键点是所需 token 在弹窗外壳上重新声明,而不是继续依赖页面级别名——后者会
因 portal 作用域再次失效。移动端沿用 bottom sheet,操作按钮等分宽度。

验证:node --test tests/**/*.test.cjs 362/364 通过(2 项失败为改动前既存,
见上一笔提交说明);phpunit 44 项 / 103 断言全部通过;Chromium 实拍 1080px
浅色与暗色两套主题逐项核对;样式类定义 21 个与引用 21 个完全对应,无遗留
死样式;order-center.js 经 node --check 语法校验通过。
2026-09-18 22:14:46 +08:00
kate522 aad83072a8 refactor(pay): 统一流水号,移除订单/流水/提现三类号码前缀
订单号、资金流水号、提现单号此前各自带前缀配置,同一笔业务在不同界面会
呈现多个号码口径,对账与客诉排查都要先做一次前缀换算。现收敛为单一流水号
分配器,不再按业务类型区分号码形态。

- 删除 payment_order_prefix / payment_flow_prefix /
  payment_withdrawal_prefix 三项配置项及其生成、校验链路
- BusinessNumber::allocate() 成为唯一入口,输出 {YmdHis}{6 位随机},
  共 20 位无前缀,满足 VARCHAR(32) 与网关 out_trade_no ≤ 32 的限制
- 订单、资金流水、提现、卡密渠道交易号四处生成点全部改走该分配器
- 后台支付中心表头「订单号 / 提现单号」统一为「流水号」
- 前台用户中心与订单卡片文案同步统一;前台订单详情合并为单行流水号,
  账本流水号不再下发到前台,避免同一单据出现两个对外号码
- 同步更新 financial-flow / pay-card / card-pass-order-numbers 契约测试
  与 BusinessNumberTest 断言

按用户要求不做双路逻辑与数据迁移,直接替换为统一方案,历史行不做转换。

验证:node --test tests/**/*.test.cjs 362/364 通过,新增 37 项契约;失败的
2 项在改动前的干净 HEAD 基线上同样失败(基线 327 项 / 失败 2 项),分别命中
遗留的 fa fa- 标记与 FA 版本号断言,与本次改动无关。phpunit 44 项 / 103
断言全部通过;php -l 全部改动的 PHP 文件通过。
2026-09-18 22:14:27 +08:00
kate522 7308f055c7 fix(frontend): keep asset and homepage filters in DOM 2026-09-03 19:21:24 +08:00
kate522 5fd7c212ed fix(runtime): 按参考主题硬切换为 loader/main/auto_fun 单一 DOM 生命周期
- 删除 AksrtFrontend registry/rehydrate 双路架构及 build/public.js 拼包入口,
  前台唯一初始路径为 PHP 本地栈(jQuery 1.9.1 → Bootstrap 3.4.1)
  → loader_js(_win/aksrtData 唯一注入)→ tbquire(['main']) → runtime/main.min.js
- window.auto_fun = debounce(z_auto_fun, 100) 为唯一重扫入口;所有模块改为
  执行一次 + off/on('auto_fun.aksrt-*') 命名空间重扫,data/class 标记幂等
- 局部更新协议统一:HTML 注入 → post_ajax.ed → auto_fun();
  远程 modal → loaded.bs.modal → auto_fun();JSON 成功 → zib_ajax.success
- 灯箱恢复 Miniimgbox/imgbox 唯一 owner(imgbox-container、a[data-imgbox]、
  imgbox_data),删除 AksrtLightbox/data-aksrt-lightbox 第二实现及 CSS/overlay,
  _win.imgbox* 重新接上 post-display 设置
- 死代码清理:runtime 下 11 组被自有实现替代的旧模块副本、无消费 vendored 库、
  顶层 grade.min.js、revenue.js、无调用方的 aksrt_get_win_runtime_config(),
  以及 loader 中 16 条死 mapping
- PHP 入队改为本地栈 + loader_js,routed/widget/submit 依赖统一换绑;
  用户卡片发布按钮恢复 nav_user_newposts_btn 设置门控
- 测试对齐:新增 frontend-lifecycle-contract,重写 navigation/lazyload/toast/
  auth-source/comment/page-display/post-visual 等断言为目标架构契约

验证:node --test widget-system+navigation 223 通过 0 失败;
构建脚本重建 main/imgbox min 与 CSS bundles;改动 PHP php -l、JS node --check
全部通过;git diff --check 干净;credits 重入 harness 通过。
2026-09-03 12:44:31 +08:00
kate522 1f4a39d8f8 feat(runtime): 全站前端脚本统一接入 AksrtFrontend 全局 DOM 生命周期
- rehydrate.js 新增 boot()/aksrt:ready 事件,支持 boot 后晚注册立即以 init 触发
- aksrt-runtime.js 初始加载改走 AksrtFrontend.boot,tooltip/倒计时注册为组件
- 约 30 个前端脚本(首页、评论、支付、路由、页面叶子、widgets)
  从直接 DOMContentLoaded 迁移为 AksrtFrontend.register,并加幂等标记
- section-navs 依赖改为 aksrt-runtime,保证注册时序
- 清理死代码:删除孤儿 loader.js/main.js 及 runtime/page-navs 遗留副本
- loader.js 移除已迁移模块的 tbquire 路径映射,main.js 相应瘦身
- build-public-assets.mjs 增加 runtime/main.min.js 自动压缩步骤
- 新增 4 个契约测试(homepage-dom/rehydrate-runtime/global-dom-init/
  public-bundle-parity),3 个既有 harness 适配注册表初始化方式
2026-09-02 21:48:56 +08:00
kate522 4a4009133c 进行了一些小优化 2026-08-25 16:33:36 +08:00
kate522 07c4e969c3 新增全局流水号 2026-08-25 05:33:01 +08:00
kate522 6674bded6a 进行了一些小优化 2026-08-24 17:40:35 +08:00
kate522 85a124b886 修复支付状态问题 2026-08-24 17:21:06 +08:00
kate522 5cae5b5c93 积分与余额账务系统硬切重构 2026-08-24 15:59:11 +08:00
kate522 86692ff3f9 用户功能设置收口与废弃后台链路清理 2026-08-23 22:09:12 +08:00
kate522 a0b84977a2 feat(navigation): hard-switch to Zibll navigation and Font Awesome 5 2026-08-18 20:46:21 +08:00
kate522 86614c4905 refactor(frontend): replace toast system with zibll notyf 2026-08-18 02:38:43 +08:00
kate522 435ee1daa7 feat(frontend): replace lazy loading with zibll lazysizes 2026-08-18 01:33:38 +08:00
kate522 c621c4322d fix(orders): avoid automatic detail refresh reload 2026-08-12 17:02:29 +08:00
kate522 651c5f28f8 fix(orders): load user center assets before panel navigation 2026-08-12 16:48:40 +08:00
kate522andClaude Fable 5 aa865e24e1 fix(modal): close rollout and async lifecycle gaps
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 02:31:41 +08:00
kate522andClaude Fable 5 5375ad6429 perf(modal): unify cancellable frontend modal flows
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 02:04:55 +08:00
kate522andClaude Fable 5 34150f3358 refactor(modal): remove legacy compatibility paths
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 00:06:37 +08:00
kate522andClaude Fable 5 d79b063bf9 feat(modal): add cancellable shared runtime
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-04 23:24:37 +08:00
kate522andClaude Fable 5 113a6bcab0 feat(modal): add rollout telemetry foundation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-04 21:23:04 +08:00
kate522 26d307056e feat(orders): redesign user order center 2026-08-03 12:54:58 +08:00
kate522 1d2505356e feat: remove shop feature (Phase 2)
Delete all shop domain classes, controllers, schema builders, templates,
JS/CSS, admin SPA pages, and shop-only payment classes (Shipping,
AfterSale, Discount). Remove shop-only DB table definitions (product_variant,
after_sale, order_shipping, card_key) from migrator and add their DROP
to uninstall.php. Clean up shared files:

- Remove aksrt_product CPT + taxonomies from Setup.php
- Remove shop rewrite rules/query vars/template redirect from SetupPart2.php
- Remove shop widget areas from SetupPart1.php
- Remove shop enqueues from ScriptsPart1b.php
- Remove sepakerator-aksrt-shop from SetupPart2.php
- Remove get_shop_settings facade (delete ForumShop.php, clean DomainGroups.php)
- Remove ORDER_PRODUCT_SHOP constant from DomainModel.php
- Remove Shop::class fallback branches from UserOrders.php, OrderCenterRest.php
- Remove shipping/after-sale branches from OrderRepositoryAdmin.php, PayMenus.php, PayOrders.php
- Remove shop product widgets from widgets-register.php
- Remove cart page from template-registry.php, routing.php, ScriptsPart2.php
- Remove cart UI from sidebar-nav.php, profile-orders.php, sidebar-orders.php
- Clean up order-center.js (remove rebuy/cartUrl/receipt/after-sale handlers)
- Remove aksrt_get_cart_page_url/product_page/product_edit from transactions.php
- Clean up aksrt_product_cat references in Coupon.php, PayCoupons.php

Shared payment/order/credits/content-pay stack fully retained.
2026-08-02 21:25:52 +08:00
kate522 ad40d9a7ca fix(orders): wire detail progress timeline and two-step cancel
Order progress was stuck on "订单创建" because timeline only read sparse
timestamp columns and status transitions didn't always stamp them.
Drive timeline from current status + related records, backfill lifecycle
timestamps on update_status, and replace window.confirm cancel with a
关闭订单 → 确认取消 button step in the detail modal.
2026-07-27 15:15:35 +08:00
kate522 eac58f07bf feat(orders): polish detail modal layout and visuals
Restructure the order detail modal into status-tinted hero, product
card, info list with copyable order number, multi-item lines, and a
newest-first timeline. Refresh spacing, dark mode, and footer buttons.
2026-07-27 13:54:34 +08:00
kate522 e6eee91eb3 fix(orders): drop secondary "我的余额/会员/积分" link from detail modal
The user center already has a dedicated tab for these; showing the
secondary shortcut inside the order detail modal is redundant noise.
The view-model field is kept for other consumers.
2026-07-27 13:40:23 +08:00
kate522 e47a3958fb feat(orders): redesign detail modal — hero pill, no duplicate close
- Remove bottom "关闭" button so the top-right ✕ is the single dismiss.
- Drop redundant 订单类型 row from modal body (already shown as card chip).
- Add hero strip with status pill + amount; unify dt/dd rows into a
  bordered card; tighten items list and add timeline rail.
- Refresh modal styling: rounded dialog, gradient header, hover-lift
  buttons, mobile-friendly rows.
2026-07-27 13:34:30 +08:00
kate522 a1e35a4499 feat(orders): order detail modal, list actions, use configured prefix
Wire admin payment_order_prefix into order number generation (with 32-char
cap for gateways), make 查看 open a full order-detail modal with
status-aware footer actions, keep type badge top-left only, and right-align
unpaid list actions with countdown on the left.
2026-07-27 12:39:21 +08:00
kate522 9277674da0 fix(orders): restore frontend pay REST and harden order-center client
Add AKSRT\Payment\OrderCenterRest so /shop/frontend/orders/{n}/pay|cancel
always register on rest_api_init; widen order_number route charset; make
order-center.js use credentials, encodeURIComponent, and clearer 404 errors.
2026-07-25 14:12:40 +08:00
kate522 1337664ed3 feat(ux): after-sale multi-step, ban appeal, message types, coupon wallet
Orders center gains after-sale tickets (return ship/cancel/timeline),
coupon wallet list, ban-appeal page, and expanded message center tabs.
2026-07-18 22:48:08 +08:00
kate522 e2587ca3a0 feat(ux): shared ajax-list/remote-modal + order review modal 1:1
Add zibll-parity AjaxList/RemoteModal engines and replace order-center
prompt() review flow with multi-dim star modal, multi-image upload,
auto-praise countdown, and REST review-modal endpoint.
2026-07-18 16:26:28 +08:00
kate522 f3db6c89cc feat(shop): complete storefront archive, seller edit, revenue
Wire product cat/tag archives to settings-driven sort and AJAX paging,
seller product options/video/params editing, revenue withdraw form and
order review submit — finishing remaining shop frontend gaps after buy-path.
2026-07-12 10:38:02 +08:00
kate522 50e3db85bb feat(shop): wire storefront buy path to server cart
Connect product options/add-cart, server cart checkout payloads,
favorite/rebuy/receipt REST, and order-center actions without
localStorage dual-read or hardcoded cart/orders URL hacks.
2026-07-12 09:15:45 +08:00
kate522 3247db7ed1 补充主题静态资源与归档模板 2026-07-03 23:15:11 +08:00