Commit Graph

5 Commits (d8c45fbb87bfbdc1e445a21cb9ba3c10eb54f24e)

Author SHA1 Message Date
Council d8c45fbb87 feat(B1): ticket/verify + list + detail admin views 2026-04-25 10:35:34 +08:00
Council 29f4c61110 feat(Task1): seat_number display + CODE128 barcode rendering
- WalletService: add seat_number field (parseSeatNumber helper)
- ticket_card.html: seat_info → seat_number in all 3 locations
  (card template + viewTicket modal + showTicketDetail modal)
- ticket_card.html: add barcode canvas in both modals
- ticket_card.html: JsBarcode() calls after renderQrCode (3 locations)
- ticket_wallet.html: load JsBarcode.all.min.js before ticket_card.js
2026-04-24 23:58:09 +08:00
Council d85eb8e19d fix(Task2): 修复 onOrderPaid seat_info 为空的 ThinkPHP Query 懒加载 bug
根本原因:\think\facade\Db::name('order_detail')->select() 返回懒加载的 Query 对象,
每次 foreach 迭代都重新执行 SELECT,返回全新的 Collection。
第一 foreach 解析 spec 并写入 _parsed_* 到 Collection A,
第二 foreach 迭代的是 Collection B(全新干净数据),
导致 _parsed_seat_info 永远为空,票数据丢失。

修复:加 ->toArray() 强制物化一次,两个 foreach 操作同一份数组。

同时补票:order 10 (票26,27)、order 12 (票28)、order 13 (票25)。
2026-04-24 22:09:08 +08:00
Council 8b15283376 feat(phase4.3): 完成 C端票夹
新增文件:
- api/Ticket.php: C端票夹API控制器(list/detail/refreshQr)
- service/WalletService.php: 票夹核心服务
- view/goods/ticket_card.html: 票卡片共享组件
- view/goods/ticket_wallet.html: 票夹列表页

修改文件:
- Hook.php: 注册订单详情页注入钩子(plugins_service_order_detail_page_info)
- install.sql: 添加 qr_issued_at 字段

数据库变更:
- ALTER TABLE vr_tickets ADD qr_issued_at INT UNSIGNED
2026-04-23 13:44:48 +08:00
Council 2452fde466 refactor(vr_ticket): full plugin restructure - Admin.php root pattern + Hook.php
Phase 2 completion - complete backend management rebuild:

Plugin architecture change (旧 → 新):
- 删: admin/controller/ 子目录多控制器 → 留: admin/Admin.php 单控制器
- 删: admin/view/ → 留: view/{module}/
- 删: EventListener.php, app.php, plugin.json → 留: Hook.php, config.json

New files:
- Hook.php: 插件钩子入口(侧边栏菜单 + 订单支付处理)
- config.json: 插件配置(is_enable 等)
- install.sql / uninstall.sql: 安装卸载脚本
- view/venue/list.html, save.html: 场馆管理视图(AmazeUI)
- view/admin/setup.html: 插件设置页

Modified files:
- service/AuditService.php, BaseService.php, SeatSkuService.php, TicketService.php
- admin/Admin.php: 全新 Admin.php 根目录控制器

ShopXO core changes:
- app/index/controller/Goods.php: ticket 类型商品详情页路由
- app/service/AdminPowerService.php: 权限系统适配
- config/shopxo.php: 配置

AmazeUI frontend migration:
- All views migrated from LayUI to AmazeUI
- Vue 3 editor for venue/seat configuration
- CDN: unpkg.com → cdn.staticfile.net

Fixes included:
- Infinite loading (missing footer include)
- Vue3 textarea interpolation bug
- Template path resolution (../../../plugins/...)
- Hook return fields (id/url/is_show)
- DB field names verified from source
2026-04-17 00:46:00 +08:00