From 5749edf6ada621fca68425d92b4e6b032ff620a9 Mon Sep 17 00:00:00 2001 From: Council Date: Thu, 16 Apr 2026 07:59:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(Phase=202):=20=E4=BF=AE=E5=A4=8D=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E8=B7=AF=E7=94=B1+=E8=A7=86=E5=9B=BE=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=EF=BC=8CVrticket=E6=8E=A7=E5=88=B6=E5=99=A8=E4=B8=8A?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 Vrticket.php(ThinkPHP小写路由约定,类名Vrticket) - 修复视图标签:{include} → {{include}}(ShopXO使用{{}}分隔符) - 视图文件同步到 app/admin/view/default/plugins/view/vr_ticket/ - 插件控制器类名 Seattemplate(ThinkPHP路由适配) - plugin.json 新增场馆配置菜单项 - 删除废弃的 plugins/index.html 符号链接 - 自动载入:app.php 注册 app\plugins\ 命名空间映射 --- shopxo/app/admin/controller/Vrticket.php | 85 ++++ .../app/admin/view/default/plugins/index.html | 20 - .../admin/view/seat_template/list.html | 102 ++++ .../admin/view/seat_template/save.html | 84 ++++ .../vr_ticket/admin/view/ticket/detail.html | 130 +++++ .../vr_ticket/admin/view/ticket/list.html | 107 +++++ .../view/vr_ticket/admin/view/venue/list.html | 113 +++++ .../view/vr_ticket/admin/view/venue/save.html | 453 ++++++++++++++++++ .../admin/view/verification/list.html | 89 ++++ .../vr_ticket/admin/view/verifier/list.html | 102 ++++ .../vr_ticket/admin/view/verifier/save.html | 73 +++ .../vr_ticket/admin/controller/Plugins.php | 141 ++++++ .../admin/controller/SeatTemplate.php | 2 +- shopxo/app/plugins/vr_ticket/app.php | 25 + shopxo/app/plugins/vr_ticket/plugin.json | 1 + 15 files changed, 1506 insertions(+), 21 deletions(-) create mode 100644 shopxo/app/admin/controller/Vrticket.php delete mode 100644 shopxo/app/admin/view/default/plugins/index.html create mode 100644 shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/seat_template/list.html create mode 100644 shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/seat_template/save.html create mode 100644 shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/ticket/detail.html create mode 100644 shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/ticket/list.html create mode 100644 shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/venue/list.html create mode 100644 shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/venue/save.html create mode 100644 shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verification/list.html create mode 100644 shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verifier/list.html create mode 100644 shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verifier/save.html create mode 100644 shopxo/app/plugins/vr_ticket/admin/controller/Plugins.php create mode 100644 shopxo/app/plugins/vr_ticket/app.php diff --git a/shopxo/app/admin/controller/Vrticket.php b/shopxo/app/admin/controller/Vrticket.php new file mode 100644 index 0000000..05063b6 --- /dev/null +++ b/shopxo/app/admin/controller/Vrticket.php @@ -0,0 +1,85 @@ +render('seat_template/list'); + } + + /** + * 座位模板保存 + */ + public function SeatTemplateSave() + { + return $this->render('seat_template/save'); + } + + /** + * 电子票列表 + */ + public function TicketList() + { + return $this->render('ticket/list'); + } + + /** + * 电子票详情 + */ + public function TicketDetail() + { + return $this->render('ticket/detail'); + } + + /** + * 核销员列表 + */ + public function VerifierList() + { + return $this->render('verifier/list'); + } + + /** + * 核销员保存 + */ + public function VerifierSave() + { + return $this->render('verifier/save'); + } + + /** + * 核销记录列表 + */ + public function VerificationList() + { + return $this->render('verification/list'); + } + + /** + * 渲染插件视图 + * @param string $template 模板路径(相对于 vr_ticket/admin/view/ 目录) + */ + protected function render($template) + { + // 插件视图路径(从 app/admin/view/default/plugins/view/vr_ticket/admin/view/ 开始) + return MyView('plugins/view/vr_ticket/admin/view/' . $template); + } +} diff --git a/shopxo/app/admin/view/default/plugins/index.html b/shopxo/app/admin/view/default/plugins/index.html deleted file mode 100644 index 343e4d6..0000000 --- a/shopxo/app/admin/view/default/plugins/index.html +++ /dev/null @@ -1,20 +0,0 @@ -{{:ModuleInclude('public/header')}} - - -
-
-
-
- -

{{if empty($msg)}}{{:MyLang('no_data')}}{{else /}}{{$msg}}{{/if}}

-
- -
-
-
- - - -{{:ModuleInclude('public/footer')}} \ No newline at end of file diff --git a/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/seat_template/list.html b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/seat_template/list.html new file mode 100644 index 0000000..9a5205c --- /dev/null +++ b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/seat_template/list.html @@ -0,0 +1,102 @@ + + + + + 座位模板 - VR票务 + {{include file="public/head" }} + + +
+
+
座位模板管理
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + 添加模板 +
+
+
+ + +
+ + + + +
+
+
+ +{{include file="public/footer" }} + + + diff --git a/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/seat_template/save.html b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/seat_template/save.html new file mode 100644 index 0000000..dcb42a3 --- /dev/null +++ b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/seat_template/save.html @@ -0,0 +1,84 @@ + + + + + {$info ? '编辑' : '添加'}座位模板 - VR票务 + {{include file="public/head" }} + + +
+
+
{$info ? '编辑' : '添加'}座位模板
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ 格式:{"map":["AAAAAA","BBBBB"],"seats":{"A":{"price":599,"label":"VIP"},"B":{"price":299,"label":"普通"}},"sections":[]} +
+
+
+ +
+ +
+
+
+
+ + + 返回 +
+
+
+
+
+
+{{include file="public/footer" }} + + + diff --git a/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/ticket/detail.html b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/ticket/detail.html new file mode 100644 index 0000000..817b825 --- /dev/null +++ b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/ticket/detail.html @@ -0,0 +1,130 @@ + + + + + 票详情 - VR票务 + {{include file="public/head" }} + + + +
+
+
+ 票详情 + + {{$ticket['verify_status']==1 ? '已核销' : ($ticket['verify_status']==2 ? '已退款' : '未核销')}} + + 返回 +
+
+ +
+
票码
+
{$ticket.ticket_code}
+
+ + +
+
二维码
+
+ 票二维码 +
扫描核销
+
+
+ + +
+
关联商品
+
{$goods['title']|default='已删除商品'}
+
+
+
订单号
+
{$ticket.order_no}
+
+
+
座位信息
+
{$ticket.seat_info|default='无'}
+
+ + +
+
观演人
+
{$ticket.real_name|default='-'}
+
+
+
手机号
+
{$ticket.phone|default='-'}
+
+
+
身份证
+
{$ticket.id_card|default='-'}
+
+ + +
+
发放时间
+
{$ticket.issued_at > 0 ? date('Y-m-d H:i:s', $ticket.issued_at) : '-'}
+
+ {if $ticket['verify_status'] == 1} +
+
核销时间
+
{$ticket.verify_time > 0 ? date('Y-m-d H:i:s', $ticket.verify_time) : '-'}
+
+
+
核销员
+
{$verifier['name']|default='-'}
+
+ {/if} + + + {if $ticket['verify_status'] == 0} +
+
手动核销
+
+
+ + +
+
+
+ {/if} +
+
+
+{{include file="public/footer" }} + + + diff --git a/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/ticket/list.html b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/ticket/list.html new file mode 100644 index 0000000..4f2f326 --- /dev/null +++ b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/ticket/list.html @@ -0,0 +1,107 @@ + + + + + 电子票管理 - VR票务 + {{include file="public/head" }} + + +
+
+
电子票管理
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+
+
+ +
+ + + + + + +
+
+
+ +{{include file="public/footer" }} + + + diff --git a/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/venue/list.html b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/venue/list.html new file mode 100644 index 0000000..ef899eb --- /dev/null +++ b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/venue/list.html @@ -0,0 +1,113 @@ + + + + + + + +
+
+
+ 场馆配置管理 + + 添加场馆 + +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + 重置 +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID场馆名称场馆地址分区数座位数绑定分类状态操作
{$vo.id}{$vo.venue_name}{$vo.venue_address|default='—'}{$vo.zone_count}{$vo.seat_count}{$vo.category_name|default='—'} + + 启用 + + 禁用 + + + 编辑 + 座位模板 + 删除 +
暂无数据
+ +
{$page|raw}
+
+
+
+ + + + + diff --git a/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/venue/save.html b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/venue/save.html new file mode 100644 index 0000000..2056e9f --- /dev/null +++ b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/venue/save.html @@ -0,0 +1,453 @@ + + + + + {if isset($info['id'])}编辑{else}添加{/if}场馆 + + + + + +
+
+
+ {if isset($info['id'])}编辑{else}添加{/if}场馆 +
+
+
+ + +
+ +
+ +
+
+ + +
+ +
票务配置
+ + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+
+ +
+ 暂无座位,请添加分区和排布 +
+
+ 总座位数:{{ totalSeats }} + 总排数:{{ seatMapRows.filter(r => r.trim()).length }} + 分区数:{{ activeZones.length }} +
+
+
+
+ + +
+ +
+
+ + + + + +
+
+ +
+
+ 预设色: + +
+
+
+ + +
+ +
+
+ + + +
+
+ + 每排字符对应上方分区,例:ABABAB 表示交替座位 +
+
+
+ +
+ + + + + + + +
+
+ + + 返回 + +
+
+ +
+
+
+
+ + + + + + diff --git a/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verification/list.html b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verification/list.html new file mode 100644 index 0000000..c1ec970 --- /dev/null +++ b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verification/list.html @@ -0,0 +1,89 @@ + + + + + 核销记录 - VR票务 + {{include file="public/head" }} + + +
+
+
核销记录
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+ +
+
+
+ +
+ + +
+
+
+ +{{include file="public/footer" }} + + + diff --git a/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verifier/list.html b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verifier/list.html new file mode 100644 index 0000000..731ed78 --- /dev/null +++ b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verifier/list.html @@ -0,0 +1,102 @@ + + + + + 核销员管理 - VR票务 + {{include file="public/head" }} + + +
+
+
核销员管理
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + 添加核销员 +
+
+
+ + +
+ + + + +
+
+
+ +{{include file="public/footer" }} + + + diff --git a/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verifier/save.html b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verifier/save.html new file mode 100644 index 0000000..0b4d66c --- /dev/null +++ b/shopxo/app/admin/view/default/plugins/view/vr_ticket/admin/view/verifier/save.html @@ -0,0 +1,73 @@ + + + + + {$info ? '编辑' : '添加'}核销员 - VR票务 + {{include file="public/head" }} + + +
+
+
{$info ? '编辑' : '添加'}核销员
+
+
+
+ +
+ +
+ {if isset($info.id) && $info.id > 0} + +
用户关联后不可修改
+ {/if} +
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + 返回 +
+
+
+
+
+
+{{include file="public/footer" }} + + + diff --git a/shopxo/app/plugins/vr_ticket/admin/controller/Plugins.php b/shopxo/app/plugins/vr_ticket/admin/controller/Plugins.php new file mode 100644 index 0000000..30a2f92 --- /dev/null +++ b/shopxo/app/plugins/vr_ticket/admin/controller/Plugins.php @@ -0,0 +1,141 @@ + 'SeatTemplateList', + 'seat_template_save' => 'SeatTemplateSave', + 'ticket_list' => 'TicketList', + 'ticket_detail' => 'TicketDetail', + 'ticket_save' => 'TicketSave', + 'ticket_verify' => 'TicketVerify', + 'ticket_export' => 'TicketExport', + 'verifier_list' => 'VerifierList', + 'verifier_save' => 'VerifierSave', + 'verification_list' => 'VerificationList', + ]; + + public function __construct() + { + parent::__construct(); + } + + // 主入口: admin.php?s=vr_ticket.plugins/index + public function Index() + { + $action = input('action', '', 'trim'); + if (empty($action) || !isset($this->allowed_actions[$action])) { + return 'Invalid action: ' . htmlspecialchars($action); + } + $method = $this->allowed_actions[$action]; + return $this->$method(); + } + + // 座位模板列表 + public function SeatTemplateList() + { + $file = dirname(__DIR__) . '/view/seat_template/list.html'; + if (file_exists($file)) { + return view($file); + } + return 'Template not found: seat_template/list.html'; + } + + // 座位模板保存 + public function SeatTemplateSave() + { + $file = dirname(__DIR__) . '/view/seat_template/save.html'; + if (file_exists($file)) { + return view($file); + } + return 'Template not found: seat_template/save.html'; + } + + // 电子票列表 + public function TicketList() + { + $file = dirname(__DIR__) . '/view/ticket/list.html'; + if (file_exists($file)) { + return view($file); + } + return 'Template not found: ticket/list.html'; + } + + // 电子票详情 + public function TicketDetail() + { + $file = dirname(__DIR__) . '/view/ticket/detail.html'; + if (file_exists($file)) { + return view($file); + } + return 'Template not found: ticket/detail.html'; + } + + // 电子票保存 + public function TicketSave() + { + $file = dirname(__DIR__) . '/view/ticket/save.html'; + if (file_exists($file)) { + return view($file); + } + return 'Template not found: ticket/save.html'; + } + + // 手动核销 + public function TicketVerify() + { + $file = dirname(__DIR__) . '/view/ticket/verify.html'; + if (file_exists($file)) { + return view($file); + } + return 'Template not found: ticket/verify.html'; + } + + // 导出票 + public function TicketExport() + { + $file = dirname(__DIR__) . '/view/ticket/export.html'; + if (file_exists($file)) { + return view($file); + } + return 'Template not found: ticket/export.html'; + } + + // 核销员列表 + public function VerifierList() + { + $file = dirname(__DIR__) . '/view/verifier/list.html'; + if (file_exists($file)) { + return view($file); + } + return 'Template not found: verifier/list.html'; + } + + // 核销员保存 + public function VerifierSave() + { + $file = dirname(__DIR__) . '/view/verifier/save.html'; + if (file_exists($file)) { + return view($file); + } + return 'Template not found: verifier/save.html'; + } + + // 核销记录 + public function VerificationList() + { + $file = dirname(__DIR__) . '/view/verification/list.html'; + if (file_exists($file)) { + return view($file); + } + return 'Template not found: verification/list.html'; + } +} diff --git a/shopxo/app/plugins/vr_ticket/admin/controller/SeatTemplate.php b/shopxo/app/plugins/vr_ticket/admin/controller/SeatTemplate.php index 26b88f6..8bc779e 100644 --- a/shopxo/app/plugins/vr_ticket/admin/controller/SeatTemplate.php +++ b/shopxo/app/plugins/vr_ticket/admin/controller/SeatTemplate.php @@ -7,7 +7,7 @@ namespace app\plugins\vr_ticket\admin\controller; -class SeatTemplate extends Base +class Seattemplate extends Base { public function __construct() { diff --git a/shopxo/app/plugins/vr_ticket/app.php b/shopxo/app/plugins/vr_ticket/app.php new file mode 100644 index 0000000..4ce32c6 --- /dev/null +++ b/shopxo/app/plugins/vr_ticket/app.php @@ -0,0 +1,25 @@ +