council(draft): BackendArchitect - create debug plan for "Undefined array key 'id'" error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
council/BackendArchitect
Council 2026-04-20 09:46:29 +08:00
commit 04766c2424
45 changed files with 3133 additions and 468 deletions

174
README.md
View File

@ -1,6 +1,7 @@
# VR票务插件 for ShopXO
> 基于 ShopXO 生态的 VR 演唱会票务解决方案Plan B
> 仓库:`http://xmhome.ow-my.com:3000/sileya-ai/vr-shopxo-plugin`
---
@ -14,104 +15,129 @@
---
## ⚠️ 踩坑经验(接手本插件前必读)
## 📚 文档索引
> 本插件经历了一整夜重构调试,发现了大量反直觉的坑。**任何 agent 或开发者接手前,请先阅读这份经验文档,避免重蹈覆辙。**
### 🔴 必读
📋 **[docs/EXPERIENCES.md](docs/EXPERIENCES.md)** — ShopXO 插件踩坑经验全记录16条核心教训
| 文档 | 说明 |
|------|------|
| **[docs/VR_GOODS_CONFIG_SPEC.md](docs/VR_GOODS_CONFIG_SPEC.md)** | ⚠️ **vr_goods_config JSON 格式 v3.0 完整规格**(商品配置核心) |
| **[docs/PHASE2_PLAN.md](docs/PHASE2_PLAN.md)** | Phase 2 当前状态 + 下一步工作计划 |
| **[docs/EXPERIENCES.md](docs/EXPERIENCES.md)** | ⚠️ **踩坑经验(必读)** — 16条核心教训 |
| **[docs/DEVELOPMENT_LOG.md](docs/DEVELOPMENT_LOG.md)** | 开发日志(完整变更记录) |
> **最关键的3条**
> 1. `{{:ModuleInclude('public/footer')}}` 缺失 → 页面无限加载(不是后端死循环)
> 2. Vue 3 `[[ ]]` 插值禁止用于 `<textarea>`(导致浏览器卡死)
> 3. 字段名不能猜,必须查源码(已有人踩过)
### 🔧 实现参考
| 文档 | 说明 |
|------|------|
| [docs/GOODS_PHP_MODIFICATION.md](docs/GOODS_PHP_MODIFICATION.md) | Goods.php 1行改动说明 |
| [docs/09_SHOPXO_HOOKS_REFERENCE.md](docs/09_SHOPXO_HOOKS_REFERENCE.md) | ShopXO 全部钩子清单(从源码提取) |
| [docs/07_SHOPXO_PLUGIN_MECHANISM.md](docs/07_SHOPXO_PLUGIN_MECHANISM.md) | 插件开发机制 |
| [docs/08_SHOPXO_REQUIREMENTS_MAPPING.md](docs/08_SHOPXO_REQUIREMENTS_MAPPING.md) | 票务需求 → ShopXO 机制映射 |
### 📖 调研存档
| 文档 | 说明 |
|------|------|
| [docs/01_SHOPXO_TECHNICAL_RESEARCH.md](docs/01_SHOPXO_TECHNICAL_RESEARCH.md) | ShopXO 技术能力调研 |
| [docs/02_FRONTEND_CUSTOMIZATION.md](docs/02_FRONTEND_CUSTOMIZATION.md) | uni-app 前端定制 |
| [docs/03_VERIFICATION_SYSTEM.md](docs/03_VERIFICATION_SYSTEM.md) | 核销系统设计 |
| [docs/06_SEAT_MAP_INTEGRATION.md](docs/06_SEAT_MAP_INTEGRATION.md) | 座位图集成 |
| [docs/14_TEMPLATE_RENDER_INVESTIGATION.md](docs/14_TEMPLATE_RENDER_INVESTIGATION.md) | 模板渲染调研 |
| [docs/COUNCIL_EVALUATION_REPORT.md](docs/COUNCIL_EVALUATION_REPORT.md) | Council 安全评审报告 |
### 🗂️ 历史存档(已过时,仅供参考)
| 文档 | 说明 |
|------|------|
| `docs/ALIGNMENT.md` | 早期规划对齐记录 |
| `docs/SPEC_DESIGN_DECISION.md` | 早期设计决策 |
| `docs/ROUND2_ANALYSIS.md` | 第二轮分析 |
| `docs/VR_PLUGIN_REFACTOR_BRIEFING.md` | 重构简报 |
| `docs/PHASE2_RESEARCH_ARCHIVE.md` | Phase 2 调研存档 |
| `docs/PHASE2_DEVELOPMENT_LOG.md` | Phase 2 旧版开发日志 |
---
## 核心能力
## 🗺️ vr_goods_config JSON 结构v3.0 最新)
| 能力 | 实现方式 |
|---|---|
| 场次管理 | ShopXO spec = 场次(无需独立表) |
| 商品详情页定制 | **`Goods.php` 1 行** + 自定义模板 |
| 选座 UI | 自定义 Vue 组件Fork shopxo-uniapp |
| 观演人收集 | 插件钩子,下单时写入 `vr_tickets` 表 |
| QR 电子票 | 支付成功后钩子生成AES 加密 |
| 微信小程序 | shopxo-uniapp 已支持HBuilderX 一键发行 |
| B 端核销 | Fork `realstore/check/check.vue`,完整参考 |
| 会员/积分/优惠券 | 全部复用 ShopXO 内置能力 |
> 完整规格见 [docs/VR_GOODS_CONFIG_SPEC.md](docs/VR_GOODS_CONFIG_SPEC.md)
```json
{
"version": 3.0,
"template_id": 4,
"selected_rooms": ["room_id_xxx"],
"selected_sections": { "room_id_xxx": ["A", "B"] },
"sessions": [{ "start": "15:00", "end": "16:59" }],
"template_snapshot": {
"venue": { "name": "...", "address": "...", "location": {}, "images": [] },
"rooms": [{ "id": "...", "name": "...", "map": [...], "sections": [...], "seats": {...} }]
}
}
```
| 字段 | 说明 |
|------|------|
| `version` | 协议版本(当前 3.0 |
| `template_id` | 发布/编辑时读取最新 vr_seat_templates 的依据 |
| `selected_rooms` | 用户选择:启用了哪些演播 |
| `selected_sections` | 用户选择key=房间IDvalue=该房间选中的分区字符数组 |
| `sessions` | 用户管理的场次列表 |
| `template_snapshot` | 发布时从 vr_seat_templates 读取并存储的快照(含 venue + rooms |
---
## 快速开始
## 🏗️ 项目状态
| 阶段 | 状态 | 说明 |
|------|------|------|
| Phase 1 | ✅ 完成 | 商品详情页座位图 + 观演人表单 + 模板渲染 |
| **Phase 2** | 🔜 **进行中** | Issue #13vr_goods_config v3.0 落地 |
| Phase 3 | ❌ 未开始 | 核销 API + 后台 4 控制器联调 |
**Phase 2 当前工作**[Issue #13](http://xmhome.gitop.top:3000/sileya-ai/vr-shopxo-plugin/issues/13) — vr_goods_config v3.0 落地实现
---
## ⚠️ 踩坑经验(接手前必读)
> 完整列表见 [docs/EXPERIENCES.md](docs/EXPERIENCES.md)
1. ThinkTemplate `{include file="..."}` 在 Linux 下因 `view_depr=/` 导致路径拼接错误 → 改用 PHP `ModuleInclude()`
2. Vue 3 `[[ ]]` 插值禁止用于 `<textarea>` → 浏览器卡死
3. 字段名不能猜,必须查源码
4. ShopXO `MyView()` 加载插件模板时 view_path 被覆盖 → 影响 ModuleInclude 解析
---
## 🚀 快速开始
```bash
# 1. 克隆本仓库
# 1. 克隆
git clone http://xmhome.ow-my.com:3000/sileya-ai/vr-shopxo-plugin.git
# 2. 上传插件到 ShopXO
# 2. 上传插件
cp -r vr_ticket /path/to/shopxo/app/plugins/
# 3. 数据库迁移Phase 1
mysql -u root -p < database/migrations/001_vr_seat_templates.sql
mysql -u root -p < database/migrations/002_vr_tickets.sql
mysql -u root -p < database/migrations/003_vr_verifiers.sql
mysql -u root -p < database/migrations/004_vr_verifications.sql
# 3. 数据库迁移
mysql -u root -p < app/plugins/vr_ticket/install.sql
# 4. 后台安装
# 4. 修改 Goods.php让 ShopXO 加载票务详情页)
# 详见 docs/GOODS_PHP_MODIFICATION.md
# 5. 后台安装
# 管理后台 → 应用中心 → 插件管理 → 安装 VR票务插件
# 5. 修改 Goods.phpPhase 2
# 在 ShopXO 源码 app/index/controller/Goods.php 的 Index() 方法中:
# 在 return MyView(); 之前加入 ticket 类型判断(见 docs/GOODS_PHP_MODIFICATION.md
# 6. shopxo-uniapp 改造
# HBuilderX 导入 shopxo-uniapp
# 添加 pages/ticket-buy/ 和 pages/ticket-verify/
# 配置 manifest.json 的 AppID
# 发行 → 微信小程序
```
---
## 官方文档(开发前必查)
## 官方文档
| 资源 | URL |
|---|---|
| 官方文档首页 | https://doc.shopxo.net/ |
| **插件开发文档** | https://doc.shopxo.net/article/3.html |
| **开发文档索引** | https://doc.shopxo.net/article/4.html |
| 插件开发文档 | https://doc.shopxo.net/article/3.html |
| 开发文档索引 | https://doc.shopxo.net/article/4.html |
| uniapp 打包教程 | https://doc.shopxo.net/article/1/293727233598554112.html |
| shopxo-uniapp Gitee | https://gitee.com/zongzhige/shopxo-uniapp |
## 技术调研文档
- [docs/EXPERIENCES.md](docs/EXPERIENCES.md) — ⚠️ **踩坑经验(必读)** — 16条核心教训
- [docs/01_SHOPXO_TECHNICAL_RESEARCH.md](docs/01_SHOPXO_TECHNICAL_RESEARCH.md) — ShopXO 技术能力调研
- [docs/02_FRONTEND_CUSTOMIZATION.md](docs/02_FRONTEND_CUSTOMIZATION.md) — uni-app 前端定制
- [docs/03_VERIFICATION_SYSTEM.md](docs/03_VERIFICATION_SYSTEM.md) — 核销系统设计
- [docs/04_IMPLEMENTATION_ROADMAP.md](docs/04_IMPLEMENTATION_ROADMAP.md) — 实施路线图
- [docs/07_SHOPXO_PLUGIN_MECHANISM.md](docs/07_SHOPXO_PLUGIN_MECHANISM.md) — 插件开发机制
- [docs/08_SHOPXO_REQUIREMENTS_MAPPING.md](docs/08_SHOPXO_REQUIREMENTS_MAPPING.md) — 票务需求 → ShopXO 机制映射
- [docs/09_SHOPXO_HOOKS_REFERENCE.md](docs/09_SHOPXO_HOOKS_REFERENCE.md) — ShopXO 全部钩子清单(从源码提取)
## 关键发现2026-04-14/15
- ✅ ShopXO 内置 **CustomView Ace 编辑器**(全代码自定义页面)
- ✅ 商品详情页 **30+ 插件钩子**
- ✅ shopxo-uniapp **已支持微信小程序**,条件编译已配置
- ✅ ShopXO 内置 **phpqrcode** QR 码生成库
- ✅ `realstore/check/check.vue` 是 **B 端核销页最佳参考**
- ✅ `site_type=3`(虚拟商品)可绕过地址选择弹出
- ✅ ShopXO 完全支持修改核心代码(自己部署原则)
- ✅ **推荐:改 Goods.php 1 行**,比 Hook 方案更干净(符合核心原则)
## 项目状态
**Phase 1 完成**:商品详情页座位图 + 观演人表单
🔜 **Phase 2 进行中**:后台管理(场馆/座位模板/电子票/核销员)
- ✅ 场馆 CRUD + Vue3 编辑器
- 🔜 后台管理添加商品 Hook快速选择场馆信息
## 仓库地址
`http://xmhome.ow-my.com:3000/sileya-ai/vr-shopxo-plugin`
| shopxo-uniapp | https://gitee.com/zongzhige/shopxo-uniapp |

View File

@ -0,0 +1,192 @@
# 文档评估综合报告
> 评估时间2026-04-20 | Council: Architect + BackendArchitect
> 评审文档docs/14_TEMPLATE_RENDER_INVESTIGATION.md / docs/PHASE2_PLAN.md / docs/DEVELOPMENT_LOG.md
---
## 一、docs/14_TEMPLATE_RENDER_INVESTIGATION.md
### 各维度评分
| 维度 | Architect | BackendArchitect |
|------|-----------|-----------------|
| 准确性 | 7/10 | 7/10 |
| 完整性 | 6/10 | 6/10 |
| 可操作性 | 8/10 | 7/10 |
| 一致性 | 8/10 | 5/10 |
### 跨文档共识问题
**表名前缀不一致(一致性 5/10**
| 文档 | 表名 |
|------|------|
| docs/14 Section 2.2 | `vr_seat_templates`(无前缀)❌ |
| DEVELOPMENT_LOG.md 建表 SQL | `vrt_vr_seat_templates`(有前缀)✅ |
| PHASE2_PLAN.md | `vrt_vr_seat_templates`(有前缀)✅ |
这是**唯一的重大跨文档一致性问题**,必须修正。
### Architect 发现
- `$assign` 变量在 Section 2.1 代码示例中未定义(与实际 `MyViewAssign()` 不符)
- JOIN 联查条件(`spec_base_id` / `goods_id`)未记录
- Section 2.1 标题写"✅ 已提交"Section 4 状态表写"⚠️ 待验证"——矛盾
### BackendArchitect 发现
- "ShopXO 原生平表"说法不精确,应改为"本项目对应的 `sxo_order_detail`"
- `|raw` 过滤器安全性前提未注明(需后台管理端完全控制)
- Phase 1/Phase 2 两套 Goods.php 改法MyView vs 绝对路径)关系未说明
---
## 二、docs/PHASE2_PLAN.md
### 各维度评分
| 维度 | Architect | BackendArchitect |
|------|-----------|-----------------|
| 准确性 | 7/10 | 7/10 |
| 完整性 | 7/10 | 6/10 |
| 可操作性 | 7/10 | 7/10 |
| 一致性 | 8/10 | 8/10 |
### Architect 发现
**高风险Step 4 核销 API 缺少认证描述**
- 无 JWT token / session 说明
- 无权限模型RLS profiles.role='staff')说明
- 直接实现可能暴露无鉴权接口
**高风险决策点第3项过时**
- "Layui 是否继续使用"列在决策项,但 4 个后台控制器已用 Layui
- 容易让读者困惑当前技术栈状态
**缺失Step 1 前置条件清单**
- 需确认goods_id=118 的票务商品 + 座位模板绑定 + 场次 spec_base
- 无测试数据则 Step 1 无法执行
### BackendArchitect 发现
**高风险Step 1 操作绑定个人**
- "操作人:大头" → 其他成员无法执行
- 应改为说明容器访问方式Docker exec / SSH
**缺失:决策点无决策框架**
- loadSoldSeats 实时查库 vs 前端 JS 状态管理各自的优劣未列出
- 长期悬而未决会阻塞 Step 1-4
**轻微Step 3 联调缺少 URL 格式和期望行为定义**
---
## 三、docs/DEVELOPMENT_LOG.md第十一、十二章
### 各维度评分
| 维度 | BackendArchitect |
|------|-----------------|
| 准确性 | 8/10 |
| 完整性 | 6/10 |
| 可操作性 | 7/10 |
| 一致性 | 7/10 |
### BackendArchitect 发现
**高风险Git 状态快照落后一个提交**
- 11.3 写最新提交是 `7bd896764`
- 实际最新是 `914e2a0fc`docs 修正提交)
- 基于旧快照做 git blame 会误判
**缺失:执行人/决策人未记录**
- Phase 2 比 Phase 1 更复杂,缺少执行人记录影响知识传递
**缺失Phase 2 与 Phase 1 关系未说明**
- Section 11.1 未说明 Phase 1 的 `MyView()` 改法是否被替代
- docs/14 提到 Phase 2 绝对路径方案,但 DEVELOGOPMENT_LOG 无对应说明
**轻微cleanup 记录措辞歧义**
- "重写修正版"让人以为物理覆盖原文件
---
## 四、Top 3 最需要修正的问题
### 🔴 #1:跨文档表名前缀不一致
**问题**`docs/14` 第 2.2 节用 `vr_seat_templates`(无前缀),其他文档统一用 `vrt_vr_seat_templates`(有前缀)。
**修正**docs/14 Section 2.2 第 3 步,将 `vr_seat_templates``vrt_vr_seat_templates`
**影响**:不修正在此文档指导下工作的人会查询不存在的表。
---
### 🔴 #2docs/DEVELOPMENT_LOG.md Section 11.3 Git 状态落后
**问题**:记录最新提交为 `7bd896764`,实际为 `914e2a0fc`,相差一个 docs 修正提交。
**修正**Section 11.3 更正为:
```
914e2a0fc docs: 修正 docs/14 + 新增 PHASE2_PLAN.md ← HEAD
7bd896764 feat(Phase 2): 完成票务商品前端展示层
```
**影响**:开发者基于此做 git blame / git log 会误判最新状态。
---
### 🟡 #3docs/PHASE2_PLAN.md Step 4 核销 API 安全上下文缺失
**问题**`POST /api/vr_ticket/verify` 无认证机制、权限模型、请求参数格式说明。
**修正**:补充以下内容:
```
### 核销 API 设计要点
认证JWT Bearer Token从微信小程序静默登录获取
权限RLS — `auth.jwt->>'role' = 'staff'`
请求:
POST /api/vr_ticket/verify
{
"ticket_code": "string",
"verifier_id": int,
"token": "Bearer <jwt>"
}
响应:
{
"code": 0,
"msg": "核销成功",
"data": { seat_info, real_name, goods_name }
}
```
**影响**:不做此补充,后续实现可能产生无鉴权接口,在测试环境暴露安全风险。
---
## 五、各文档综合评价
| 文档 | 综合评分 | 评价 |
|------|---------|------|
| docs/14 | 6.8/10 | 技术分析价值高,但表名前缀错误和状态矛盾是硬伤。修正说明机制设计良好。 |
| PHASE2_PLAN | 7.0/10 | 结构清晰现状准确Step 1 成功标准写得很好。核销 API 安全上下文缺失是最大风险。 |
| DEVELOPMENT_LOG | 7.0/10 | commit 号准确时间线一致。Git 快照落后 + 缺少执行人记录是主要问题。 |
---
## 六、下一步行动
| 优先级 | 行动 | 负责人 |
|--------|------|--------|
| P0 | 修正 docs/14 表名前缀(`vr_seat_templates` → `vrt_vr_seat_templates` | 西莉雅 |
| P0 | 更新 DEVELOPMENT_LOG Section 11.3 Git 状态快照 | 西莉雅 |
| P1 | PHASE2_PLAN Step 1 补充前置条件清单(测试数据检查) | 西莉雅 |
| P1 | PHASE2_PLAN Step 4 补充核销 API 安全设计要点 | 西莉雅 |
| P2 | DEVELOPMENT_LOG 补充执行人记录 | 待定 |
| P2 | docs/14 补充 spec_base_id_map JSON 结构说明 | 待定 |
| P3 | docs/14 明确 Phase 1 / Phase 2 两套 Goods.php 改法的替代关系 | 待定 |

View File

@ -445,3 +445,158 @@ dc63cff77 chore: clean up my_test_plugin residual hooks
- `shopxo/test_ticket.php` → 移至 `_backup_20260420/test_ticket.php`(临时测试脚本,不入仓库)
- `docs/14_TEMPLATE_RENDER_INVESTIGATION.md` → 重写修正版(删除错误信息,保留调查价值)
- 核心代码Goods.php / SeatSkuService.php / TicketService.php→ 全部提交推送
---
## 十二、模板渲染修复 + JSON 格式升级2026-04-20 白天)
### 12.1 模板渲染修复v2.0 路线 B
**问题**ThinkTemplate 的 `{include file="public/head"}` 标签在 Linux 下因 `view_depr=/` 导致路径拼接错误,页面以纯文本输出。
**解决方案(路线 B**
1. `{include}` / `{:}` ThinkTemplate 标签 → `<?php echo ModuleInclude(...) ?>` 原生 PHP
2. `{$var|default='...'}``<?php echo $var ?? '...' ?>`
3. `{json_decode(...)|raw}``<?php echo json_encode(...) ?>`
4. 复制 ShopXO `app/index/view/default/public/``plugins/vr_ticket/view/goods/public/`
**提交记录**
```
349ec063c fix: 替换 ThinkTemplate 标签为 PHP ModuleInclude
c894e7018 fix: 复制 ShopXO public 模板 + 修复 footer_page 不存在问题
1b0ac3276 fix: 替换为票务专用精简 footer449行→53行
```
**渲染结果**:✅ 商品详情页正常渲染,但场次为空(待适配新 JSON 格式)。
### 12.2 vr_goods_config JSON 格式重新设计(重大变更)
**背景**:大头 + Gemini 重新设计了 vr_goods_config 规格,从依赖 `vr_seat_templates` 表实时查询,改为商品发布时快照模式。
**新格式核心**
- `goods.vr_goods_config` 包含完整的 `rooms[]` 快照(座位图+sections+seats
- 不再需要实时查 `vr_seat_templates`
- `spec_base_id_map` 格式:`{room_id}_{row}_{colNum}` → `spec_base_id`
**设计原则**
- 商品发布时快照 → 已发布商品与 `vr_seat_templates` 解耦
- 修改模板不影响已发布商品 → 绝对一致性
- SKU 和 config 一起过时、一起更新
**新文档**
- `docs/VR_GOODS_CONFIG_SPEC.md` — 新 JSON 格式完整规格说明(已确认)
- `docs/PHASE2_PLAN.md` v2.0 — 同步更新,下一步工作计划
### 12.3 当前 Git 状态
```
1b0ac3276 fix: 替换为票务专用精简 footer ← HEAD
c894e7018 fix: 复制 ShopXO public 模板
349ec063c fix: 替换 ThinkTemplate 标签为 PHP ModuleInclude
7bd896764 feat(Phase 2): 完成票务商品前端展示层
```
### 12.4 接下来需要实现
| 任务 | 负责人 | 依赖 |
|------|--------|------|
| 重写 GetGoodsViewData() 适配新格式 | 待定 | VR_GOODS_CONFIG_SPEC.md 已确认 |
| 更新 ticket_detail.html JSrooms[] 结构) | 待定 | GetGoodsViewData() 输出确定后 |
| AdminGoodsSaveHandle SKU 生成 | 待定 | 新格式已确认 |
| loadSoldSeats() 实现 | 待定 | vr_tickets 有数据后 |
---
## 十三、模板渲染修复 + vr_goods_config v3.0 格式确认2026-04-20 上午)
### 13.1 模板渲染修复
**问题**ThinkTemplate 的 `{include file="public/head"}` 在 Linux 下因 `view_depr=/` 导致路径拼接错误。
**方案(路线 B**ThinkTemplate → PHP ModuleInclude
- `{include file=...}``<?php echo ModuleInclude(...) ?>`
- `{:Config()} / {:IsMobileLogin()}``<?php echo Config() ?> / <?php echo IsMobileLogin() ?>`
- `{$var|default='...'}``<?php echo $var ?? '...' ?>`
- `{if}...{/if}``<?php if():?>...<?php endif;?>`
复制 ShopXO `app/index/view/default/public/``plugins/vr_ticket/view/goods/public/`
**提交记录**
```
349ec063c fix: 替换 ThinkTemplate 标签为 PHP ModuleInclude
c894e7018 fix: 复制 ShopXO public 模板 + 修复 footer_page 不存在问题
1b0ac3276 fix: 替换为票务专用精简 footer449行→53行
```
### 13.2 vr_goods_config JSON 格式 v3.0 最终确认
**变更历程**
- v2.0rooms 直接嵌入,但 selected_sections 格式不确定
- v3.0(最终):增加 `template_snapshot` 字段selected_sections 确认为对象格式
**最终 v3.0 结构**
```json
{
"version": 3.0,
"template_id": 4,
"selected_rooms": ["room_id_xxx"],
"selected_sections": { "room_id_xxx": ["A", "B"] },
"sessions": [{ "start": "15:00", "end": "16:59" }],
"template_snapshot": {
"venue": { ... },
"rooms": [{ "id": "...", "map": [...], "sections": [...], "seats": {...} }]
}
}
```
**核心设计决策**
- `template_id`:发布/编辑时读取最新 vr_seat_templates 的依据
- `template_snapshot`:发布时从 vr_seat_templates 读取并存储的快照,前端渲染数据来源
- `selected_sections`:对象格式 `{ room_id: ["A","B"] }`(每个房间各自的选择)
- `spec_base_id_map`不入库GetGoodsViewData 从 `goods_spec_base.extends->seat_key` 动态构建
- `seat_key` 格式:`{roomId}_{rowLabel}_{colNum}`(无 MD5
- 现有前端编辑体验**完全不受影响**前端只提交选择项template_snapshot 由后端保存时填充)
### 13.3 spec_base_id_map 断路问题
**根因**BatchGenerate 生成 GoodsSpecBase.id 后,从未写入 spec_base_id_map。
**解决方案**
- BatchGenerate 写入 `goods_spec_base.extends.seat_key = "roomId_rowLabel_colNum"`
- GetGoodsViewData 从 `extends.seat_key` 动态构建 `spec_base_id_map`
### 13.4 Git 状态
```
741f25451 docs: v3.0 最终规格 - template_snapshot 字段 + selected_sections 对象格式
6daa33232 docs: new vr_goods_config spec + Phase 2 v3.0 plan
1b0ac3276 fix: 替换为票务专用精简 footer
c894e7018 fix: 复制 ShopXO public 模板
349ec063c fix: 替换 ThinkTemplate 标签为 PHP ModuleInclude
7bd896764 feat(Phase 2): 完成票务商品前端展示层
```
### 13.5 Issue 记录
- **Issue #13**[P0] vr_goods_config v3.0 落地实现
- Step 1AdminGoodsSaveHandle 填充 template_snapshot
- Step 2BatchGenerate 写入 extends.seat_key
- Step 3GetGoodsViewData 重写
- Step 4ticket_detail.html JS seatKey 格式更新
### 13.6 AdminGoodsSaveHandle template_snapshot 填充逻辑澄清
**template_snapshot 的前端职责 vs 后端职责**
- **前端**Admin 编辑页打开时):用 `template_id` 读最新 vr_seat_templates填充 `template_snapshot` 到表单数据,一并提交
- **后端**AdminGoodsSaveHandle save_thing_end检测 `template_snapshot` 是否缺失,若缺失则从 vr_seat_templates 读表填充,再写回 goods 表,然后 BatchGenerate
这意味着:
- `template_snapshot` 主要由**前端**在编辑页加载时填充
- 后端只是兜底(兼容旧商品、或前端未传的情况)
- BatchGenerate 仍读 `vr_seat_templates` 表(实时数据),不受 template_snapshot 影响
- 前端展示用 `template_snapshot`SKU 生成用 `vr_seat_templates`(数据层和展示层分离)
**提交**
```
bbea35d83 feat(AdminGoodsSaveHandle): 保存时自动填充 template_snapshot
```

View File

@ -1,146 +1,78 @@
# Phase 2 — 计划与当前状态
> 版本v1.0 | 日期2026-04-20 | 状态:执行中
> 关联提交7bd896764
> 版本v3.0 | 日期2026-04-20 | 状态:实现准备就绪
> 关联 Issue#13
> 关联文档:`docs/VR_GOODS_CONFIG_SPEC.md`v3.0 JSON 格式,已确认)
---
## 一、Phase 2 完成情况
## ⚠️ v3.0 核心变更摘要
### ✅ 已完成
- 新增 `template_snapshot` 字段(发布时从 `vr_seat_templates.seat_map` 读取并存储)
- `selected_sections` 保持对象格式 `{ room_id: ["A","B"] }`
- `spec_base_id_map` 不入库GetGoodsViewData 从 `goods_spec_base.extends->seat_key` 动态构建
- 现有前端编辑体验**完全不受影响**(前端只提交选择项)
| 任务 | 文件 | 说明 |
|------|------|------|
| Goods.php 改法 | `app/index/controller/Goods.php` | item_type=ticket → ticket_detail.html + 数据注入 |
| GetGoodsViewData() | `SeatSkuService.php` | 为前端模板提供座位图+场次数据 |
| onOrderPaid() 修复 | `TicketService.php` | sxo_order_detail + JSON spec 解析 |
| 模板渲染调研 | `docs/14_TEMPLATE_RENDER_INVESTIGATION.md` | 已修正,记录完整调查过程 |
完整规格见 `docs/VR_GOODS_CONFIG_SPEC.md`
### ⚠️ 待验证(容器内)
---
| 任务 | 优先级 | 说明 |
|------|--------|------|
| `{include}` 标签实测 | P0 | ticket_detail.html 中 `{include file="public/head"}` 是否能正确解析 |
| ModuleInclude 备选方案 | P1 | 若 `{include}` 失败,切换 `ModuleInclude()` |
| loadSoldSeats() | P1 | 查询已售座位,前端座位图需显示已售状态 |
## 一、vr_goods_config v3.0 结构(已确认)
### ❌ 未开始
```json
{
"version": 3.0,
"template_id": 4,
"selected_rooms": ["room_id_xxx"],
"selected_sections": { "room_id_xxx": ["A", "B"] },
"sessions": [{ "start": "15:00", "end": "16:59" }],
"template_snapshot": {
"venue": { ... },
"rooms": [{ "id": "...", "name": "...", "map": [...], "sections": [...], "seats": {...} }]
}
}
```
| 任务 | 说明 |
详细字段说明见 `docs/VR_GOODS_CONFIG_SPEC.md` 第一章。
---
## 二、实现顺序Issue #13
### Step 1AdminGoodsSaveHandle — 保存时填充 template_snapshot
`save_thing_end` 时机BatchGenerate 之前:
1. 用 `template_id` 读取 `vr_seat_templates.seat_map`(最新数据)
2. 按 `selected_rooms` 过滤(只存用户选中的房间)
3. 填充 `config.template_snapshot`
### Step 2BatchGenerate — 写入 extends
insertGetId 中加入 `extends.seat_key = roomId_rowLabel_colNum`
### Step 3GetGoodsViewData — 重写
- 读 `vr_goods_config[0]`,透传 `template_snapshot`
- 从 `goods_spec_base.extends` 动态构建 `spec_base_id_map`
- `selected_sections` 适配对象格式
- `goods_spec_data` 按场次聚合
### Step 4ticket_detail.html JS — seatKey 格式
```javascript
// 改为带 roomId
var seatKey = seat.roomId + '_' + seat.rowLabel + '_' + seat.colNum;
var specBaseId = self.specBaseIdMap[seatKey] || 0;
```
---
## 三、Phase 2 当前状态
| 任务 | 状态 |
|------|------|
| vr_ticket Hook.php 钩子补充 | 缺失 `plugins_service_goods_spec_data` 处理 |
| 后台座位模板管理 | admin/controller/SeatTemplate.php已生成未调试 |
| 后台电子票列表 | admin/controller/Ticket.php已生成未调试 |
| 后台核销员管理 | admin/controller/Verifier.php已生成未调试 |
| 后台核销记录 | admin/controller/Verification.php已生成未调试 |
| 核销 API | B 端扫码核销 REST 接口 |
---
## 二、模板渲染问题现状
### 问题
票务商品详情页 ThinkTemplate 标签未解析(`{$...}` / `{include}` / `{if}` 以原文输出)。
### 根因
Goods.php 原来用 `MyView()` 加载主题模板,票务商品需要加载插件独立模板 `ticket_detail.html`
### 解决路径Goods.php 绝对路径方案)
```
Goods::Index()
→ $goods['item_type'] === 'ticket'
→ SeatSkuService::GetGoodsViewData($goods_id)
→ MyViewAssign([vr_seat_template, goods_spec_data])
→ View::fetch($tplFile) [$tplFile = 绝对路径]
→ ThinkTemplate 渲染 ticket_detail.html含 {include} 标签)
```
### 待实测项(容器内操作)
```bash
# 在 shopxo-php 容器内
docker exec -it shopxo-php bash
cd /var/www/html
curl "http://localhost:10000/?s=goods/index/id/118.html"
# 检查:
# 1. {include file="public/head"} 是否被解析为 HTML 内容
# 2. {$goods.title} 是否显示商品标题
# 3. 座位图是否正常渲染
```
### 失败备选
`{include}` 标签失败,修改 `ticket_detail.html`
```php
<!-- 替换 -->
{include file="public/head" /}
<!-- 改为 -->
<?php echo ModuleInclude('public/head'); ?>
```
---
## 三、Phase 2 接下来的工作
### Step 1模板渲染实测容器内
**操作人:** 大头(容器在本机)
```bash
docker ps | grep shopxo-php # 确认容器运行中
curl -s "http://localhost:10000/?s=goods/index/id/118.html" | head -50
```
**成功标准:** HTML 源码中不再有 ThinkTemplate 标签(`{include}` / `{$` / `{if}`),座位图 div 正常显示。
### Step 2座位图已售状态
SeatSkuService 需要补充 `loadSoldSeats()` 方法,查询 `vr_tickets` 表中该商品+场次已生成的票,返回已售座位 ID 列表,前端据此灰化已售座位。
### Step 3后台管理页面联调
4 个后台控制器SeatTemplate / Ticket / Verifier / Verification均已生成需要
1. 确认路由可访问(后台 URL 格式)
2. 验证 CRUD 操作正常
3. 确认 RLS 策略
### Step 4核销 API
`POST /api/vr_ticket/verify` — B 端小程序扫码调用。
---
## 四、数据库表结构(当前)
| 表名 | 用途 | 状态 |
|------|------|------|
| `vrt_vr_seat_templates` | 座位模板 | ✅ |
| `vrt_vr_tickets` | 电子票 | ✅ |
| `vrt_vr_verifiers` | 核销员 | ✅ |
| `vrt_vr_verifications` | 核销记录 | ✅ |
| `vrt_vr_audit_log` | 审计日志 | ✅ |
| `goods.vr_goods_config` | 商品配置JSON | ✅ |
| `sxo_order_detail` | 订单明细ShopXO | ✅ |
---
## 五、已知风险
| 风险 | 影响 | 缓解 |
|------|------|------|
| `{include}` 标签容器内解析失败 | P0页面无样式 | 切换 ModuleInclude 方案 |
| shopxo-php 容器未启动 | 无法验证 | 每次操作前 `docker ps` 确认 |
| Admin 控制器鉴权链不完整 | 后台无法访问 | 确认继承 Common 并调用 IsLogin/IsPower |
| 座位模板与商品分类绑定逻辑 | 需确认 1:N 还是 1:1 | 实测验证 |
---
## 六、决策点(待大头确认)
1. **模板 include 方案**:先试 `{include}`,失败后换 `ModuleInclude()`,还是直接内联 CSS/JS
2. **loadSoldSeats()**:是否需要实时查库,还是前端纯靠 JS 状态管理?
3. **后台前端框架**Layui 是否继续使用,还是改用其他方案?
| 模板渲染 | ✅ 正常 |
| 票务 footer | ✅ 已精简 |
| Issue #13 实现v3.0 落地) | ⚠️ 待动手 |
| 核销 API | ❌ 未开始 |
| 后台 4 控制器联调 | ❌ 未开始 |

View File

@ -0,0 +1,349 @@
# vr_goods_config JSON 规格说明
> 版本v3.0 | 日期2026-04-20 | 状态:**已确认,待实现**
> 关联 Issue#13
## 目录
- [一、vr_goods_config 完整结构](#一vr_goods_config-完整结构)
- [二、设计意图](#二设计意图)
- [三、spec_base_id_map 生成与存储](#三spec_base_id_map-生成与存储)
- [四、AdminGoodsSaveHandle 改动方案](#四admingoodsshandler-改动方案)
- [五、前端数据结构](#五前端数据结构)
- [六、需要修改的文件](#六需要修改的文件)
- [七、降级兼容](#七降级兼容)
- [八、已确认的设计决策](#八已确认的设计决策)
---
## ⚠️ v3.0 vs 旧版本的区别
**旧版**rooms/sections/seats 存放在 `vr_seat_templates.seat_map` JSON 里,前端需要跨表查询。
**v3.0(最终)**:发布时将 `vr_seat_templates.seat_map` 快照存入 `template_snapshot`,和用户选择一起存储,前端完全不跨表。
---
## 一、vr_goods_config 完整结构
```json
[
{
"version": 3.0,
"template_id": 4,
"selected_rooms": ["room_id_1776341371905", "room_id_1776341444657"],
"selected_sections": {
"room_id_1776341371905": ["A", "B"],
"room_id_1776341444657": ["A"]
},
"sessions": [
{ "start": "15:00", "end": "16:59" },
{ "start": "18:00", "end": "21:59" }
],
"template_snapshot": {
"venue": {
"name": "测试 2",
"address": "测试地址",
"location": { "lng": "", "lat": "" },
"images": []
},
"rooms": [
{
"id": "room_id_1776341371905",
"name": "1号放映室VV",
"map": ["AAAAB__BBB_BAAAA", "AAAAB__BBB_BAAAA"],
"sections": [
{ "char": "A", "name": "VIP区", "price": 100, "color": "#f06292" },
{ "char": "B", "name": "看台区", "price": 50, "color": "#4fc3f7" }
],
"seats": {
"A": { "char": "A", "name": "VIP区", "price": 100, "color": "#f06292" },
"B": { "char": "B", "name": "看台区", "price": 50, "color": "#4fc3f7" }
}
}
]
}
}
]
```
### 字段说明
| 字段 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `version` | float | ✅ | 协议版本(当前 3.0),用于前向兼容判断 |
| `template_id` | int | ✅ | 发布/编辑时读取最新 vr_seat_templates 的依据 |
| `selected_rooms` | string[] | ✅ | 用户选择:启用了哪些演播(房间 ID 列表) |
| `selected_sections` | object | ✅ | 用户选择key=房间IDvalue=该房间选中的分区字符列表 |
| `sessions` | object[] | ✅ | 用户管理:场次列表 |
| `template_snapshot` | object | ✅ | 发布时从 vr_seat_templates.seat_map 读取的快照(含 venue + rooms |
### selected_sections 格式说明
```json
"selected_sections": {
"room_id_1776341371905": ["A", "B"],
"room_id_1776341444657": ["A"]
}
```
key = 房间 IDvalue = 该房间选中的分区字符数组。为什么用对象格式?因为同一个 section char如 "A"可能在不同房间里代表不同的区VIP区 vs 普通区),所以必须按 room_id 区分。
---
## 二、设计意图
### 流程说明
```
商品发布/编辑时:
前端提交 → selected_rooms / selected_sections / sessions
后端 AdminGoodsSaveHandle →
1. 用 template_id 读取 vr_seat_templates.seat_map最新数据
2. 按 selected_rooms 过滤,填充 template_snapshot
3. 和 selected_* 一起写入 goods.vr_goods_config
4. BatchGenerate 生成 SKU
```
### template_snapshot 的前端职责 vs 后端职责
**前端职责Admin 编辑页)**
- 用户打开新建/编辑页时,前端用 `template_id` 读取**最新** `vr_seat_templates`
- 将 `venue` + `rooms` 快照填入 `template_snapshot`,随表单一起提交
- 编辑过程中模板变化了?以打开页面时的快照为准,**不重新读**(避免不确定性)
**后端职责AdminGoodsSaveHandle**
- 检测 `template_snapshot` 是否缺失,若缺失则从 `vr_seat_templates` 读表填充(兜底)
- 将填充后的完整 config 写回 `goods.vr_goods_config`
- 再执行 `BatchGenerate` 生成 SKU
**数据层分离**
- `template_snapshot`**前端渲染用**(展示层)
- `vr_seat_templates` 实时读取 → **BatchGenerate 生成 SKU**(数据层)
### 现有前端兼容性
- 前端在编辑页加载时填充 `template_snapshot` 并提交
- `AdminGoodsSaveHandle` 若检测到未传则自动填充(兜底),完全透明
- 现有商品编辑体验**完全不受影响**
### template_snapshot 的作用
- 前端渲染所需的所有座位图/sections/seats 数据都来自 `template_snapshot`
- `selected_rooms` / `selected_sections` 用于高亮、过滤等交互逻辑
- 若 `template_snapshot` 为空(兼容旧商品),降级读 `vr_seat_templates`
---
## 三、spec_base_id_map 生成与存储
### 3.1 当前断路问题
```
BatchGenerate() → 生成 GoodsSpecBase.id
→ 从未写入 spec_base_id_map ← 断路
前端 JS → 用 "roomId_row_col" 格式查 → 永远查不到
```
### 3.2 解决方案:使用 goods_spec_base.extends
ShopXO 原生 `goods_spec_base` 表有 `extends` 字段JSON 扩展数据。BatchGenerate 每次都删除+重建全量 spec放心写入 `extends`
**存储时**BatchGenerate 写入 GoodsSpecBase
```php
$extends = json_encode([
'seat_key' => $roomId . '_' . $rowLabel . '_' . $col
], JSON_UNESCAPED_UNICODE);
Db::name('GoodsSpecBase')->insertGetId([
'goods_id' => $goodsId,
'price' => $seatPrice,
'inventory' => 1,
// ... 其他字段
'extends' => $extends,
]);
```
**读取时**GetGoodsViewData 动态构建):
```php
$specs = Db::name('GoodsSpecBase')
->where('goods_id', $goodsId)
->where('inventory', '>', 0)
->select();
$specBaseIdMap = [];
foreach ($specs as $spec) {
$ext = json_decode($spec['extends'] ?? '{}', true);
if (!empty($ext['seat_key'])) {
$specBaseIdMap[$ext['seat_key']] = intval($spec['id']);
}
}
```
**spec_base_id_map 最终格式**
```json
{
"room_id_1776341371905_A_3": 2001,
"room_id_1776341371905_B_5": 2002
}
```
---
## 四、AdminGoodsSaveHandle 改动方案
### 保存时填充 template_snapshot
`save_thing_end` 时机BatchGenerate 之前:
```php
// foreach ($configs as $config) 循环内:
$templateId = intval($config['template_id'] ?? 0);
$selectedRooms = $config['selected_rooms'] ?? [];
// 1. 读取最新 vr_seat_templates.seat_map
$template = Db::name(self::table('seat_templates'))->find($templateId);
$seatMap = json_decode($template['seat_map'] ?? '{}', true);
$allRooms = $seatMap['rooms'] ?? [];
// 2. 按 selected_rooms 过滤(只存用户选中的房间)
$filteredRooms = [];
foreach ($allRooms as $room) {
if (in_array($room['id'], $selectedRooms)) {
$filteredRooms[] = $room;
}
}
// 3. 填充 template_snapshot
$config['template_snapshot'] = [
'venue' => $seatMap['venue'] ?? [],
'rooms' => $filteredRooms,
];
// 4. 用更新后的 config 覆盖($configs[$i] = $config
// 5. 后续 BatchGenerate 继续使用更新后的 $config
```
---
## 五、前端数据结构GetGoodsViewData 输出)
```php
[
'vr_seat_template' => [
'venue' => $config['template_snapshot']['venue'] ?? [],
'rooms' => $config['template_snapshot']['rooms'] ?? [], // 直接透传快照
'sessions' => $config['sessions'] ?? [],
'selected_rooms' => $config['selected_rooms'] ?? [],
'selected_sections'=> $config['selected_sections'] ?? {}, // {room_id: [chars]}
'spec_base_id_map' => $specBaseIdMap, // 动态构建
],
'goods_spec_data' => $goodsSpecData,
'goods_config' => $config
]
```
### goods_spec_data 生成逻辑
```php
// 从 goods_spec_base 按场次维度聚合(每个座位 = 一条 GoodsSpecBase
$specs = Db::name('GoodsSpecBase')->where('goods_id', $goodsId)
->where('inventory', '>', 0)->select();
$sessionPrices = [];
$sessionSpecs = [];
foreach ($specs as $spec) {
// 从 goods_spec_value 找到场次维度值(格式:"HH:mm-HH:mm"
$sessionValue = Db::name('GoodsSpecValue')
->where('goods_spec_base_id', $spec['id'])
->where('value', 'REGEXP', '^[0-9]{2}:[0-9]{2}-[0-9]{2}:[0-9]{2}$')
->find();
if ($sessionValue) {
$sessionStr = $sessionValue['value'];
if (!isset($sessionPrices[$sessionStr]) || $spec['price'] < $sessionPrices[$sessionStr]) {
$sessionPrices[$sessionStr] = floatval($spec['price']);
}
if (!isset($sessionSpecs[$sessionStr])) {
$sessionSpecs[$sessionStr] = intval($spec['id']);
}
}
}
$goodsSpecData = [];
foreach ($sessions as $s) {
$start = $s['start'] ?? '';
$end = $s['end'] ?? '';
$sessionStr = $start && $end ? "{$start}-{$end}" : ($start ?: $end);
$goodsSpecData[] = [
'spec_id' => $sessionSpecs[$sessionStr] ?? 0,
'spec_name' => $sessionStr,
'price' => $sessionPrices[$sessionStr] ?? floatval($goods['price'] ?? 0),
];
}
```
### 前端 JS 使用方式
```javascript
// ticket_detail.html JS
var specBaseIdMap = <?php echo json_encode($vr_seat_template['spec_base_id_map'] ?? []); ?>;
// submit() 时:根据选中座位查 spec_base_id
var seatKey = seat.roomId + '_' + seat.rowLabel + '_' + seat.colNum;
// 例:"room_id_1776341371905_A_3"
var specBaseId = specBaseIdMap[seatKey] || 0;
// goods_params 格式(每座一行)
{
goods_id: goodsId,
spec_base_id: specBaseId,
stock: 1,
extension_data: JSON.stringify({ attendee, seat: {...} })
}
```
---
## 六、需要修改的文件
| 文件 | 改动 |
|------|------|
| `AdminGoodsSaveHandle` | save_thing_end 中 BatchGenerate 之前:从 vr_seat_templates 读取并填充 `config.template_snapshot` |
| `SeatSkuService::BatchGenerate()` | insertGetId 中写入 `extends.seat_key` |
| `SeatSkuService::GetGoodsViewData()` | 重写:读 `template_snapshot`;从 `extends` 动态构建 `spec_base_id_map`;适配 `selected_sections` 对象格式 |
| `ticket_detail.html` JS | `seatKey` 格式改为 `roomId + '_' + rowLabel + '_' + colNum` |
---
## 七、降级兼容
```php
$config = json_decode($goods['vr_goods_config'] ?? '', true);
if (empty($config)) {
return /* 错误 */;
}
$config = $config[0] ?? $config;
if (version_compare($config['version'] ?? 0, 3.0, '<')) {
// 旧版格式(无 template_snapshot降级读 vr_seat_templates 表
return self::GetGoodsViewDataLegacy($goodsId, $config);
}
// v3.0 新格式
// ...
```
---
## 八、已确认的设计决策
| 决策 | 结论 |
|------|------|
| `selected_sections` 格式 | 对象 `{ room_id: ["A","B"] }`(每个房间独立选择) |
| `template_snapshot` | 发布时从 vr_seat_templates.seat_map 读取并存储,不实时查表 |
| `spec_base_id_map` | 不入库GetGoodsViewData 动态从 `extends.seat_key` 构建 |
| `seat_key` 格式 | `{roomId}_{rowLabel}_{colNum}`(无 MD5 |
| `goods_spec_data.price` | 取该场次所有座位中的最低价(用于卡片显示) |
| 现有前端兼容性 | ✅ 前端只提交选择项template_snapshot 由后端保存时填充 |

306
plan.md
View File

@ -1,271 +1,85 @@
# vr-shopxo-plugin Phase 2 Bugfix — plan.md
# Plan — 调试 "Undefined array key 'id'" PHP 错误
> 版本v1.0 | 日期2026-04-16 | Agentcouncil/FrontendDev
> 背景Phase 2 后台管理两个致命问题 — 侧栏乱码 + 路由无法渲染
> 版本v1.0 | 日期2026-04-20 | Agentcouncil/BackendArchitect
> 关联提交bbea35d83feat: 保存时自动填充 template_snapshot
---
## 问题总览
## 任务概述
| # | 问题 | 症状 | 优先级 |
|---|------|------|--------|
| **P1** | 插件控制器路由无法渲染 | 内容区空白,"template not exists" | 高 |
| **P2** | 侧边栏插件名乱码 | `VR票务`(应为 `VR票务` | 中 |
调试 ShopXO 后台编辑票务商品goods_id=118保存时报错
```
Undefined array key "id"
```
根因代码位于 `bbea35d83` 新增的 `AdminGoodsSaveHandle.php` save_thing_end 时机。
---
## P1 — 路由无法渲染问题
## 任务清单
### 已知现象
- 访问 `adminwatekc.php?s=VrTicket/SeatTemplateList` → 侧栏正常,主内容区空白
- ShopXO `Plugins/Index` 控制器调用插件时有 `strtolower+ucfirst` 类名匹配问题
- 当前 `SeatTemplate.php``admin/controller/` 子目录
### 已知正确模式freightfee/answers
```
app/plugins/{plugin}/
├── Admin.php ← 直接在插件根目录,继承 think\Controller
├── Hook.php
├── config.json
└── admin/view/... ← 视图在 admin/view/ 子目录
```
### 当前 vr_ticket 结构(有问题)
```
app/plugins/vr_ticket/
├── admin/controller/SeatTemplate.php ← ❌ 在子目录
└── admin/view/seat_template/list.html
```
### 任务清单
- [x] **P1-T1**: 验证 `strtolower+ucfirst` 路由匹配机制
- PluginsService::PluginsControlCall: `class = \app\plugins\{plugin}\{group}\{ucfirst(control)}`
- sidebar URL `/plugins/vr_ticket/admin/seatTemplateList`
- → pluginsname=vr_ticket, pluginscontrol=admin, pluginsaction=seatTemplateList
- → class = \app\plugins\vr_ticket\admin\Admin ✓
- → method = ucfirst('seatTemplateList') = 'SeatTemplateList' ✓
- [x] **P1-T2**: 对比 Admin.php 根目录模式 vs 当前 admin/controller/ 子目录模式
- 根目录 Admin.php (`app/plugins/vr_ticket/admin/Admin.php`) 可以被正确加载 ✓
- 旧子目录控制器无法被 PluginsService 找到(类路径不匹配)✗
- [x] **P1-T3**: 实施修复 — 创建 `admin/Admin.php`(注意:不是根目录,是 admin/ 子目录)
- `admin/Admin.php` 路径 → 类名 `\app\plugins\vr_ticket\admin\Admin`
- 方法使用 camelCase`SeatTemplateList()`, `TicketList()`
- sidebar URL 必须用 camelCase`pluginsaction=seatTemplateList`
- 修复 plugin.json sidebar URL改为 `/plugins/vr_ticket/admin/seatTemplateList` 格式
- [ ] **P1-T4**: 验证修复后路由能否正常渲染(需实际访问 URL 截图)
---
## P2 — 侧栏插件名乱码问题
### 已知现象
- 侧栏显示:`VR票务`(应为 `VR票务`
- 这是 UTF-8 字符串被当作 Latin1/ISO-8859-1 解码的结果
- 乱码规律:`票` (E7 A5 8A) → Latin1 解码为 `票务`
### 乱码根因假设
| 假设 | 可能性 | 验证方式 |
|------|--------|----------|
| 数据库 `vrt_power` 表 name 字段 latin1 编码存储 | 高 | 检查 MySQL `SHOW CREATE TABLE vrt_power` |
| 数据库连接 charset 不匹配 | 中 | 检查 ShopXO 数据库配置 charset |
| plugin.json 编码问题 | 低 | plugin.json 已是正确 UTF-8 |
### 任务清单
- [ ] **P2-T1**: 确认乱码根因 — 检查 vrt_power 表结构
- `SHOW CREATE TABLE vrt_power`
- `SHOW FULL COLUMNS FROM vrt_power`
- 确认 name 字段 charset 和 collate
- [ ] **P2-T2**: 如果是数据库 latin1 问题 — 修复方案
- 方案AALTER TABLE 转换 latin1 → utf8mb4
- 方案BMySQL CONVERT/CAST 函数读取时转换
- 方案CPHP 层以 latin1 读出再转 utf8
---
## 视图路径问题Round 5 根因确认 + 修复)
### 根因BackendArchitect 分析)
ThinkPHP 5 视图路径解析规则:
1. 相对路径(如 `'seat_template/list'`):相对于**控制器 namespace 对应的默认视图目录**
2. namespace `app\plugins\vr_ticket\admin` → 默认视图目录 `app/plugins/vr_ticket/admin/view/`
3. 实际文件在 `app/admin/view/default/plugins/view/vr_ticket/admin/view/` ← 路径不匹配!
### 实际文件位置
```
app/admin/view/default/plugins/view/vr_ticket/admin/view/
├── seat_template/
│ ├── list.html
│ └── save.html
├── ticket/
│ ├── list.html
│ └── detail.html
├── venue/
│ ├── list.html
│ └── save.html
├── verifier/
│ ├── list.html
│ └── save.html
└── verification/
└── list.html
```
### 修复方案
ThinkPHP 5 以 `/` 开头的视图路径为**绝对路径**,相对于配置的视图根目录(`app/admin/view/default/`)解析。
修复前(错误):
```php
return view('seat_template/list', $data); // 解析到 app/plugins/vr_ticket/admin/view/ ← 不存在
```
修复后(正确):
```php
return view('/plugins/view/vr_ticket/admin/view/seat_template/list', $data);
// → app/admin/view/default/plugins/view/vr_ticket/admin/view/seat_template/list.html ✓
```
**所有 9 个 view() 调用已全部修复为绝对路径格式。**
### Vrticket.php 的参考价值
`shopxo/app/admin/controller/Vrticket.php` 使用 `MyView('../../../plugins/vr_ticket/admin/' . $template)` 手动处理路径。
Admin.php 使用 ThinkPHP `view()` 函数,以 `/` 开头则由 ThinkPHP 自动解析到 `app/admin/view/default/`
- [ ] [Claimed: council/BackendArchitect] **Task 1**: 根因定位 — 逐行分析所有 "id" 访问位置
- [ ] [Claimed: council/BackendArchitect] **Task 2**: Db::name() 表前缀问题 — ShopXO 插件表前缀行为确认
- [ ] [Claimed: council/BackendArchitect] **Task 3**: 根因 1 — `$r['id']` 空安全AdminGoodsSaveHandle 第 79 行)
- [ ] [Claimed: council/BackendArchitect] **Task 4**: 根因 2 — `find()` 返回 null 的空安全AdminGoodsSaveHandle 第 72 行)
- [ ] [Claimed: council/BackendArchitect] **Task 5**: 根因 3 — `$config['template_id']` / `selected_rooms` 数据类型问题
- [ ] [Claimed: council/BackendArchitect] **Task 6**: SeatSkuService::BatchGenerate 类似问题审计
- [ ] [Claimed: council/BackendArchitect] **Task 7**: 修复方案汇总 + 建议修复优先级
- [ ] [Claimed: council/BackendArchitect] **Task 8**: 将修复方案写入 `reviews/BackendArchitect-on-Issue-13-debug.md`
---
## 阶段划分
| 阶段 | 内容 | 负责 |
|------|------|------|
| **Round 1规划** | 分析根因,制定修复方案 | FrontendDev |
| **Round 2执行** | 实施 admin/Admin.php + plugin.json 修复 | FrontendDev |
| **Round 3综合** | 合并到 main完整验证 | 所有成员 |
| 阶段 | 内容 |
|------|------|
| **Draft** | Task 1-6根因定位只读不修改代码 |
| **Review** | Task 7汇总所有根因给出修复建议 |
| **Finalize** | Task 8输出评审报告到 reviews/ |
---
## 依赖关系
- P1-T3 和 P1-T4 需要实际访问 URL 验证(无法在 CLI 环境截图)
- P2-T1 需要连接数据库检查编码
- Task 2、3、4、5 互不依赖,可并行分析
- Task 6 依赖 Task 1 的结论(确认 BatchGenerate 中类似位置)
- Task 7 依赖 Task 1-6 的结论
- Task 8 依赖 Task 7
---
## 交付物
## 执行顺序
1. 修复后的 `shopxo/app/plugins/vr_ticket/admin/Admin.php`(路由正确)
2. 修复后的 `shopxo/app/plugins/vr_ticket/plugin.json`sidebar URL 使用 camelCase
3. 乱码问题修复(需数据库层修复)
## 状态
| 任务 | 状态 | 备注 |
|------|------|------|
| P1-T1 | [Done] | PluginsService 路由机制已分析 |
| P1-T2 | [Done] | admin/Admin.php 模式正确 |
| P1-T3 | [Done] | admin/Admin.php 已创建 + plugin.json 已修复 |
| P1-T4 | [Pending] | 需实际访问 URL 截图验证 |
| P2-T1 | [Done] | 根因plugins.name 字段 Latin1 存储 |
| P2-T2 | [Done] | SQL 修复脚本见 docs/SQL_FIX_garbled_plugin_name.md |
| P1-视图路径 | [Done] | 所有 9 个 view() 改为绝对路径 `/plugins/view/vr_ticket/admin/view/...` |
---
## BackendArchitect Round 5 实现
### 交付物
1. ✅ `shopxo/app/plugins/vr_ticket/admin/Admin.php` — 9 个 view() 调用全部改为 `/plugins/view/vr_ticket/admin/view/...` 绝对路径
2. ✅ `docs/SQL_FIX_garbled_plugin_name.md` — 乱码修复 SQL 脚本
3. ✅ `plan.md` — 更新根因分析
### P1 乱码 DB 根因(最终确认)
- `plugins.name` 字段 = `VR票务`Latin1 解码的 UTF-8 字节)
- 安装时 `plugin.json``title: "VR票务"` 被以 Latin1 编码存入 MySQL
- 读取时 MySQL 连接 charset 是 utf8mb4所以 Latin1 字节被错误解码为乱码
- **修复**:执行 `UPDATE sx_plugins SET name = 'VR票务' WHERE plugins = 'vr_ticket'`
### 乱码字节分析
`票` UTF-8: `E7 A5 8A` → Latin1 解读为: `票务`
`务` UTF-8: `E5 8A B1` → (in `VR票务` combined string)
---
---
## BackendArchitect — Round 1 文档评估任务
> 任务:对三份文档进行评审,不动代码,不碰远程,输出到 `reviews/` 目录
> 关联提交914e2a0fcdocs: 修正 docs/14 + 新增 PHASE2_PLAN.md
### 评审任务清单
- [ ] [Claimed: council/BackendArchitect] 评审 docs/14 → `reviews/BackendArchitect-on-14_TEMPLATE_RENDER_INVESTIGATION.md`
- [ ] [Claimed: council/BackendArchitect] 评审 docs/PHASE2_PLAN.md → `reviews/BackendArchitect-on-PHASE2_PLAN.md`
- [ ] [Claimed: council/BackendArchitect] 评审 docs/DEVELOPMENT_LOG.md第十一、十二章`reviews/BackendArchitect-on-DEVELOPMENT_LOG.md`
- [ ] [Claimed: council/BackendArchitect] 综合建议 → `reviews/BackendArchitect-DOCUMENTATION_REVIEW_SUMMARY.md`
### 三份文档清单
| # | 文档 | 重点 |
|---|------|------|
| 1 | docs/14_TEMPLATE_RENDER_INVESTIGATION.md | 数据流描述、表名、解决方案合理性 |
| 2 | docs/PHASE2_PLAN.md | 任务优先级、风险评估、决策点清晰度 |
| 3 | docs/DEVELOPMENT_LOG.md第11-12章 | 事实准确性、时间线一致性、遗漏信息 |
### 评审维度
1. **准确性**:技术描述、数据流、表结构是否正确
2. **完整性**:边界条件、安全考量、依赖项是否遗漏
3. **可操作性**:下一步行动是否清晰可执行
4. **一致性**:各文档之间、表名/文件路径/状态描述是否一致
5. **误导风险**:是否有表述容易让后续接手者误解
### 规则
- 只读文档,不读 .php / .html / .sql 文件
- 不修改任何文件
- 不 push 到远程
- 评审在本地 worktree 完成
### 依赖关系
无依赖,三份文档可并行评审。
---
## SecurityEngineer Round 5 补充
### 关键发现VenueList() 方法缺失Critical Bug
plugin.json sidebar URL `/plugins/vr_ticket/admin/venueList` 链接到 `VenueList()` 方法,但 admin/Admin.php 中该方法不存在 → 点击"场馆配置"菜单会导致 500 错误。
**已修复**:在 admin/Admin.php 中添加:
- `VenueList()` — 场馆列表(含 v3.0 seat_map 解析)
- `VenueSave()` — 场馆创建/编辑(含 v3.0 JSON 构建和验证)
- `VenueDelete()` — 场馆软删除(含审计日志)
- `countSeatsV2()` — v2 格式(数组)座位计数辅助方法
### 安全审计结论
| 安全项 | 风险等级 | 结论 |
|--------|----------|------|
| SQL 注入 | LOW | 所有查询使用 ThinkPHP query builder + 参数绑定 |
| XSS | LOW | ThinkPHP 模板引擎自动转义,无 `\|raw` 输出 |
| 路径遍历 | LOW | 所有视图路径为硬编码方法名,无用户输入 |
| CSRF | MEDIUM | ShopXO 框架级缺失,插件层面无法单独修复 |
| 数据编码P1乱码| LOW | DB latin1 存储导致乱码,非安全漏洞 |
### P1 乱码 DB 修复 SQL
```sql
-- 1. 诊断
SELECT id, name, title, LENGTH(name), HEX(name) FROM shx_plugins WHERE name LIKE '%vr%';
-- 2. 修复 plugins 表
UPDATE shx_plugins SET name = 'vr_ticket', title = 'VR票务' WHERE name = 'vr_ticket';
-- 3. 修复 vrt_power 表(如果存在乱码)
SELECT id, name, LENGTH(name), HEX(name) FROM vrt_power WHERE name LIKE '%票%';
UPDATE vrt_power SET name = 'VR票务' WHERE HEX(name) LIKE '%E7A58A%';
```
并行:
Task 1: 读 AdminGoodsSaveHandle.php → 分析所有 $r['id'] / $template['seat_map'] / $r['id'] 访问
Task 2: 读 BaseService::table() + ShopXO Db::name() 前缀逻辑
Task 3: Task 1 完成后,确认 $r['id'] 空安全
Task 4: Task 2 完成后,确认 find() null 处理
Task 5: Task 1 完成后,确认 selected_rooms 类型匹配
串行:
Task 6: 读 SeatSkuService.php → 检查 ensureAndFillVrSpecTypes / BatchGenerate 类似问题
Task 7: 汇总根因,写修复建议
Task 8: 输出 reviews/BackendArchitect-on-Issue-13-debug.md
```
详细安全分析见:`reviews/SecurityEngineer-round5-review.md`
---
## 关键文件(只读)
| 文件 | 关注点 |
|------|--------|
| `shopxo/app/plugins/vr_ticket/hook/AdminGoodsSaveHandle.php` | save_thing_end 逻辑template_snapshot 填充代码 |
| `shopxo/app/plugins/vr_ticket/service/SeatSkuService.php` | BatchGenerate、ensureAndFillVrSpecTypes |
| `shopxo/app/plugins/vr_ticket/service/BaseService.php` | table() 前缀方法 |
| `docs/VR_GOODS_CONFIG_SPEC.md` | vr_goods_config v3.0 JSON 格式 |
| `docs/PHASE2_PLAN.md` | 项目背景 |
---
## 根因假设(待 Task 1-6 验证/推翻)
1. **Primary**: `array_filter``$r['id']` 访问 — `$r` 数组缺少 `'id'` key → "Undefined array key 'id'"
2. **Secondary**: `Db::name('vr_seat_templates')` 可能查错表ShopXO 插件表前缀机制)
3. **Tertiary**: `find()` 返回 null → `$template['seat_map']` 抛出 "Undefined array key 'seat_map'"
4. **潜在**: `selected_rooms` 元素类型不匹配(字符串 vs 整数)→ `in_array` 永远 false

View File

@ -0,0 +1,107 @@
# 文档评审综合报告
> 评估时间2026-04-20 | 评估人council/Architect
> 评审范围docs/14_TEMPLATE_RENDER_INVESTIGATION.md、docs/PHASE2_PLAN.md、docs/DEVELOPMENT_LOG.md十一、十二章
---
## 各文档评分汇总
| 文档 | 准确性 | 完整性 | 可操作性 | 一致性 | 综合 |
|------|--------|--------|----------|--------|------|
| docs/14_TEMPLATE_RENDER_INVESTIGATION.md | 7/10 | 6/10 | 8/10 | 8/10 | **7.3** |
| docs/PHASE2_PLAN.md | 7/10 | 7/10 | 7/10 | 8/10 | **7.3** |
| docs/DEVELOPMENT_LOG.md十一、十二章| 6/10 | 7/10 | 7/10 | 5/10 | **6.3** |
---
## Top 3 最需要修正的问题
### 🔴 问题 1`{include}` 标签验证状态未闭环(高风险)
**涉及文档**doc14Section 2.1/4、PHASE2_PLAN.mdSection 2
**问题描述**
doc14 在 Section 2.1 标题标注"✅ 已验证(已提交 7bd896764"Section 6 "关联提交"也声称代码已提交。但在 Section 4 模板渲染现状表格中,`{include file="public/head"}` 明确标注"⚠️ 待验证"Section 5 列出了方向 A/B/C 作为待实测方案。PHASE2_PLAN.md Section 2 也将 `{include}` 解析列为"待实测项"。
**核心矛盾**:已提交 ≠ 已验证成功。这两件事被混淆在同一份文档里,读者无法判断票务商品详情页的 `{include}` 标签当前是否工作。
**实际状态**:根据 commit 7bd896764 的描述,该提交仅完成了" Goods.php 绝对路径方案 + SeatSkuService::GetGoodsViewData() + TicketService::onOrderPaid() 修复"`{include}` 标签解析**从未在容器内被实测验证**。这是 Phase 2 当前最大的未闭环风险点。
**修正建议**
1. doc14 Section 2.1 标题的"✅ 已验证"改为"✅ 代码已提交P0容器内实测待完成"
2. Section 4 状态表格提升优先级标注:标记 `{include}` 解析为 **P0**,而非普通"待验证"项
3. 在 PHASE2_PLAN.md Section 3 Step 1 补充:执行 curl 之前必须先确认测试数据存在goods_id=118 + 对应座位模板 + 场次 spec_base
---
### 🔴 问题 2DEVELOPMENT_LOG 存在两条未衔接的 Git 时间线(高风险)
**涉及文档**docs/DEVELOPMENT_LOG.md
**问题描述**
Chapter 8.1"当前状态快照 2026-04-15")记录 commit 历史截止 `7508bed`Phase 0/1 完成。Chapter 11"Phase 2 前台展示层完成 2026-04-20")直接引用 commit `7bd896764` 作为当前 HEAD但该 commit 未出现在 Chapter 8.1 的历史列表中。同时Chapter 5.1 的 Goods.php 代码示例Phase 1 版本)与 doc14 Section 2.1Phase 2 最终版本)存在根本性差异(相对路径 vs 绝对路径),后者没有在 DEVELOPMENT_LOG 中记录。
**风险**:接手者无法从 DEVELOPMENT_LOG 独立重建"Phase 1 → Phase 2"的代码演进路径。Chapter 5.1 的 Goods.php 代码示例是已被替换的旧版本,但没有任何注释说明。
**修正建议**
1. 将 DEVELOPMENT_LOG 的 Git 历史合并为单一时间线,从 `34f7045`Phase 0`7bd896764`Phase 2 前台),在 Chapter 11.3 中补充完整的 commit 序列
2. 在 Chapter 5.1 或新增 Chapter 10.5 中记录 Phase 1 → Phase 2 Goods.php 代码的演进原因(为什么从相对路径 MyView 改为绝对路径 View::fetch
3. 清理 Chapter 8.3 失效路径信息(`~/.openclaw/workspace/...`),改为当前 vr-shopxo-plugin 的实际目录结构
---
### 🟡 问题 3测试数据 goods_id 在四份文档中出现三个不同值(误导风险)
**涉及文档**DEVELOPMENT_LOG.mdChapter 4/5、doc14Section 1、PHASE2_PLAN.mdSection 3 Step 1
**问题描述**
| 来源 | goods_id | 含义 |
|------|----------|------|
| DEVELOPMENT_LOG Chapter 4 | 112 | Phase 0 测试数据:"VR演唱会电子票 2024" |
| DEVELOPMENT_LOG Chapter 5.2 | 1 | Phase 1 URL 测试:`id/1` |
| doc14 Section 1 | 118 | 调查对象 URL`id/118.html` |
| PHASE2_PLAN.md Step 1 | 118 | Step 1 实测 URL`id/118.html` |
没有任何文档解释goods_id 112 和 118 是否是同一商品的不同 IDgoods_id=1 是什么商品Phase 1 和 Phase 2 是否使用不同的测试商品?
**风险**:读者无法判断当前哪个 goods_id 是有效的测试入口,容易在调研过程中以错误的 ID 访问到不相关商品,进而对系统行为产生误判。
**修正建议**
1. 在 DEVELOPMENT_LOG Chapter 4 测试数据节中,明确列出所有 Phase 0-2 使用过的测试商品 ID 及其用途(如 goods_id=112 是 Phase 0 场次模板绑定测试商品goods_id=118 是 Phase 2 票务详情页渲染测试商品)
2. PHASE2_PLAN.md Step 1 补充"当前有效测试商品"清单(只保留 goods_id=118标注为 Phase 2 唯一有效测试入口)
3. 删除或标注 goods_id=1 的 Phase 1 测试记录(因为它与当前代码版本不对应)
---
## 次要问题(建议修复,但不阻塞)
| # | 问题 | 涉及文档 | 优先级 |
|---|------|----------|--------|
| A | `spec_base_id_map` JSON 结构未记录(座位图渲染核心字段)| doc14 Section 2.2 | 高 |
| B | Step 4 核销 API 缺少认证/权限上下文 | PHASE2_PLAN.md Section 3 | 高 |
| C | `vrt_vr_tickets.order_no` 无 NOT NULL 约束,缺少空值防御 | DEVELOPMENT_LOG Chapter 4 | 中 |
| D | "第十二章"在任务要求中出现但文档中不存在 | DEVELOPMENT_LOG.md | 中 |
| E | 决策点3Layui 是否继续使用)已过时(后台已用 Layui| PHASE2_PLAN.md Section 6 | 低 |
| F | doc14 Section 3.1 缺少根因总结view_path 拼接错误)| doc14 Section 3.1 | 低 |
---
## 文档间一致性总览
| 检查项 | 状态 | 说明 |
|--------|------|------|
| 表名前缀vrt_vr_ vs sx_/sxo_ | ✅ 一致 | 插件表 vrt_vr_ShopXO 原生平表 sxo_ |
| commit 7bd896764 引用 | ✅ 一致 | 三份文档均引用 |
| `goods.vr_goods_config` JSON 字段 | ✅ 一致 | 三份文档均正确 |
| `sxo_order_detail` 表名 | ✅ 一致 | 三份文档均一致 |
| Goods.php 方法名Index vs detail| ❌ 不一致 | DEVELOPMENT_LOG 写 detail()doc14 写 Index() |
| Goods.php 路径方案(相对 vs 绝对)| ❌ 不一致 | Phase 1 相对路径 vs Phase 2 绝对路径 |
| goods_id 测试数据 | ❌ 不一致 | 1 / 112 / 118 三个不同值 |
| Git 时间线 | ❌ 不一致 | Chapter 8.1 截止 Phase 1Chapter 11 从 Phase 2 开始 |
---
## 总体结论
三份文档的修正意识值得肯定doc14 修正说明表格、Chapter 11 清理记录),但在"已提交 vs 已验证"的闭环性、多时间线合并、以及测试数据的唯一性方面存在系统性问题。最紧迫的是**立即在容器内实测 `{include}` 标签解析**Top 1这是整个 Phase 2 前台展示层是否真正完成的关键验证节点;其次是**整理 DEVELOPMENT_LOG 的时间线**Top 2使项目历史可以被独立追溯最后**统一测试数据 goods_id**Top 3避免后续开发者在错误的测试数据上浪费时间。

View File

@ -0,0 +1,76 @@
# docs/DEVELOPMENT_LOG.md 评估报告(第十一、十二章)
> 评估时间2026-04-20 | 评估人council/Architect
---
## 准确性评分6/10
- **问题1**Chapter 8.1 "Git Commit 历史"最新记录是 `7508bed`Phase 0/1 完成),但 Chapter 11 开篇就提到 commit `7bd896764`Phase 2 前台展示层),该 commit **未出现在 Chapter 8.1 的历史列表中**。Chapter 8.1 的历史在 Chapter 11 之后被追加,但两章内容没有合并,造成同一日志中出现两段不同时间线的 commit 历史。
- **问题2**Chapter 5.1 "修改内容"中 `return MyView('public/../../../plugins/vr_ticket/view/goods/ticket_detail', [...])` 这行代码使用的是相对路径 `public/../../../`,而 doc14 中说明的实际实现commit 7bd896764使用的是**绝对路径** `ROOT . 'app' . DS . 'plugins' ...`。两个文件描述的是**不同版本的代码**Chapter 5.1 记录的是 Phase 1 早期版本,而非最终提交版本。
- **问题3**Chapter 5.1 位置描述"detail() 方法",但 doc14 和 PHASE2_PLAN.md 均使用 `Goods::Index()`。ShopXO Goods 控制器实际方法名为 `Index()`(对应 `goods/index` 路由)或 `detail()`(对应 `goods/detail` 路由),需要确认实际的路由 URL 才能判断哪个正确——但基于文档内部不一致,**必定有一处是错的**。
- **问题4中等**Chapter 4 Phase 0 建表 DDL 中 `vrt_vr_tickets.order_no VARCHAR(64)` 没有 NOT NULL 约束,但 TicketService::onOrderPaid()doc14 Section 2.3)会写入 `order_no` 字段。如果 phase0 建表时 order_no 允许 NULL后续业务逻辑没有对此做防御性处理。
- **问题5中等**Chapter 4 DDL `spec_base JSON COMMENT '座位规格基数据'` 字段名是 `spec_base`,但 doc14 Section 2.2 中 `vr_seat_templates` 表的联查提到的是 `goods_spec_value` + `goods_spec_base`。两张表都叫 `spec_base`,但一个是插件表 JSON 列(`vrt_vr_seat_templates.spec_base`),一个是 ShopXO 原生平表(`goods_spec_base`)。文档没有明确区分,容易混淆。
---
## 完整性评分7/10
- **缺失项1**Chapter 5 Phase 1 完成内容(座位图三行渲染、场次选择、观演人表单)没有说明这些 UI 是在 Phase 1 完成还是在 Phase 2 完成。Chapter 11 说 Phase 2 前台展示层commit 7bd896764才引入 `SeatSkuService::GetGoodsViewData()` 和独立 `ticket_detail.html`,而 Chapter 5 的 Phase 1 记录里 Goods.php 代码示例没有提到这个服务。这说明 Phase 1 和 Phase 2 的前端渲染能力有显著差异,但两章的边界描述不够清晰。
- **缺失项2中等**Chapter 11.4 Phase 2 剩余工作提到 "vr_ticket Hook.php 补充:`plugins_service_goods_spec_data`",但没有说明这个钩子**为什么未实现**、对票务功能的具体影响是什么,以及**是否阻塞**其他任务。
- **缺失项3中等**Chapter 11.5 清理记录提到"临时测试脚本 → 移至 `_backup_20260420/`",但没有说明该备份目录是否已提交到仓库,还是只存在于本地文件系统。
- **缺失项4**Chapter 12第十二章在当前 DEVELOPMENT_LOG.md 中**完全不存在**,只到第十一章。但任务要求评审"第十一、十二章"。这可能意味着第十二章尚未创建,或日志结构与要求不符。
---
## 可操作性评分7/10
- **优点**Chapter 11.1 完成内容中每个文件改动都有简洁说明便于后续接手者定位改动范围。清理记录Chapter 11.5)有助于理解项目状态的来龙去脉。
- **建议1中等**Chapter 8.3 "关键文件路径"中的 ShopXO 容器源码路径 (`~/.openclaw/...`) 是旧的工作空间路径,与当前 `vr-shopxo-plugin` 的实际目录结构不符。应更新为当前实际路径或删除此节(该节内容已严重过时)。
- **建议2**Chapter 4 DDL 建表语句没有版本号或日期标记,后续如果表结构变更,无法追溯哪个版本引入了哪些字段。建议在 DDL 头部加上版本注释(如 `-- v1.0 2026-04-15 Phase 0`)。
---
## 一致性评分5/10
- **冲突项1**`goods_id` 在不同章节不一致:
- Chapter 4 测试数据:`goods_id = 112`
- Chapter 5.2 URL商品1`id/1`
- doc14 调查 URL`id/118.html`
- PHASE2_PLAN.md Step 1`id/118.html`
四个不同的 goods_id没有解释为什么。读者无法判断哪个是当前有效的测试商品。
- **冲突项2**Goods.php 代码示例在 Chapter 5.1Phase 1 记录)与 doc14 Section 2.1Phase 2 最终版本完全不同Phase 1 用相对路径 `MyView('public/../../../plugins/...')`Phase 2 用绝对路径 `View::fetch($tplFile)`。DEVELOPMENT_LOG 没有说明这次重大改动的背景和原因。
- **冲突项3中等**Chapter 8.1 Git 历史截止 `7508bed`,而 Chapter 11.3 Git 状态显示 `7bd896764` 才是 HEAD。两段 commit 历史没有衔接,读者无法理解从 Phase 0/1 到 Phase 2 的演进路径。
- **一致项**
- vrt_ 表前缀使用一致
- 票务插件目录结构(`app/plugins/vr_ticket/`)记录一致
---
## 误导风险评估
- **高风险项**
- Goods.php 代码示例Chapter 5.1)展示的是 Phase 1 早期版本,但没有任何注释说明这是"旧版本/已被替换"。接手者如果从 DEVELOPMENT_LOG 出发,很可能直接复制这段代码使用,而不知道 doc14 中有更新的版本。
- 四个不同的 `goods_id`1 / 112 / 118 / 未指定)散布在不同章节,没有任何解释,极易让读者认为存在多个测试商品或数据混乱,进而对整体系统状态产生错误判断。
- "第十二章"在任务要求中出现但文档中不存在,可能导致任务发起者误以为章节已写而未被评审。
- **低风险项**
- Chapter 8.3 的旧路径信息(如 `~/.openclaw/workspace/council-research/...`)现在完全无效,但仍然保留在文档中。读者如果信任这个路径去查找文件,会浪费时间。
---
## 总体评价
DEVELOPMENT_LOG.md 是项目的核心历史记录,第十一章对 Phase 2 前台展示层的完成内容有较为清晰的总结,清理记录也有助于理解项目演进。主要问题集中在**两段时间线未合并**Chapter 8.1 截止 Phase 1Chapter 11 从 Phase 2 重新开始),以及 **Goods.php 代码示例存在两个不同版本**Phase 1 相对路径 vs Phase 2 绝对路径),均未标注版本关系。这使得 DEVELOPMENT_LOG 无法独立作为"当前状态参考",必须配合 doc14 和 commit 历史才能还原真实代码演进。建议将 DEVELOPMENT_LOG 重组为时间线顺序Phase 0 → Phase 1 → Phase 2并为每个关键代码示例标注对应的 commit hash。同时"第十二章"缺失需要向任务发起者确认是否需要补充。

View File

@ -0,0 +1,67 @@
# docs/PHASE2_PLAN.md 评估报告
> 评估时间2026-04-20 | 评估人council/Architect
---
## 准确性评分7/10
- **问题1中等**Section 2 "模板渲染问题现状"描述"Goods.php 原来用 `MyView()` 加载主题模板",但实际 Goods.php 原代码中使用的是 `return MyView();`(无参数),而修正方案改用 `View::fetch($tplFile)`。文档将"原方案"简化为 `MyView()`,忽略了 `MyView()` 在 Phase 1 验证阶段已经过多次迭代(详见 DEVELOPMENT_LOG Chapter 5读者无法理解这次改动的上下文。
- **问题2中等**Section 2 解决路径第7步写"ThinkTemplate 渲染 ticket_detail.html含 {include} 标签)",但如 doc14 评审所指出,`{include}` 标签是否能正确解析**从未被容器实测验证**。将此描述为"解决路径"而非"待验证路径"存在准确性风险。
- **问题3**Section 3 Step 1 成功标准写"HTML 源码中不再有 ThinkTemplate 标签(`{include}` / `{$` / `{if}`",但实际上票务模板可能根本没有 `{if}` 标签,这个成功标准缺少针对性。
---
## 完整性评分7/10
- **缺失项1**Section 3 "Phase 2 接下来的工作"没有说明 Step 1 的依赖条件——需要商品数据goods_id=118 的票务商品 + 绑定座位模板 + 场次 spec_base。如果这些测试数据不存在Step 1 根本无法执行。应在 Step 1 前补充"前置条件检查清单"。
- **缺失项2**Step 4 "核销 API"只写了端点 `POST /api/vr_ticket/verify`但没有说明认证方式JWT token / session、权限模型RLS profiles.role='staff')和请求参数格式。这使 Step 4 几乎无法直接执行。
- **缺失项3中等**Section 5 "已知风险"没有提到"测试数据缺失"风险——容器内商品 ID 118 是否存在?座位模板是否已绑定对应分类?这些是 Step 1 的前置依赖,但风险表中未提及。
- **缺失项4中等**Section 6 "决策点"第2点"loadSoldSeats() 是否需要实时查库"没有给出背景说明——为什么这是决策项?实时查库的性能影响有多大?前端座位状态管理的备选方案各有什么优劣?
- **缺失项5**Section 4 数据库表结构中没有列出 `goods`ShopXO 原生平表),但这是 Phase 2 前台展示层最重要的数据来源之一,缺少它会导致读者对数据流理解不完整。
---
## 可操作性评分7/10
- **优点**Step 顺序清晰,每个 Step 都有操作命令示例docker / curl失败备选也有代码。
- **建议1中等**Step 1 提到"操作人:大头(容器在本机)",但计划文档应该是环境无关的行动指南,不应将操作绑定到个人。建议改为"前置条件:容器运行中 + 测试数据就绪",避免文档因人员变动而失效。
- **建议2中等**Step 3 "后台管理页面联调"列出了3个子项路由、CRUD、RLS但没有给出具体的 URL 格式和期望行为定义。接手者需要自行探索 ShopXO 后台路由规则。建议补充期望的 URL 和返回格式。
- **建议3**Step 2 loadSoldSeats() 的描述是文字说明,没有给出 spec_base_id_map 如何映射到已售座位的具体逻辑,这会让实现者产生歧义。
---
## 一致性评分8/10
- **一致项**
- 表名 `sxo_order_detail` / `goods.vr_goods_config` 与 doc14 一致
- commit 7bd896764 引用一致
- vrt_vr_* 表前缀使用合理(插件表 vs ShopXO 原生平表区分清晰)
- **不一致项(低)**Section 5 风险表提到"shopxo-php 容器未启动",但这个风险在 Step 1 里没有对应的预防性检查命令。建议统一:在 Step 1 开头加 `docker ps | grep shopxo-php` 检查。
---
## 误导风险评估
- **高风险项**
- Step 4 "核销 API"缺少认证和权限描述,可能让接手者直接实现一个无鉴权的 API在测试环境中暴露安全风险。
- "决策点"中"Layui 是否继续使用"列在决策项里,但 4 个后台控制器Section 1 ❌ 未开始)如果已经用了 Layui这实际上不是一个待决策项。容易让读者困惑当前技术栈状态。
- **低风险项**
- "容器内操作"的说明文字暗示这是开发人员的手动步骤,但没有说明如何在 CI/CD 或自动化测试环境中复现,降低了文档的长期可维护性。
---
## 总体评价
PHASE2_PLAN.md 作为阶段性状态文档,结构清晰、优先级划分合理,对已完成工作的记录较为准确。主要风险在于 Step 1 的前置条件(测试数据、容器状态)描述不足,使得"看起来可执行"但"实际无法直接执行"Step 4 核销 API 缺少安全上下文的描述存在直接实现无鉴权接口的误导风险。决策点的第三项Layui 选型)已过时(后台控制器已使用 Layui建议删除或改为确认项。整体适合作为技术负责人的执行参考但需要补充前置条件清单和 API 安全规范才能独立驱动开发。

View File

@ -0,0 +1,65 @@
# docs/14_TEMPLATE_RENDER_INVESTIGATION.md 评估报告
> 评估时间2026-04-20 | 评估人council/Architect
---
## 准确性评分7/10
- **问题1中等**Section 2.1 Goods.php 代码示例中 `$assign` 变量未定义。实际代码Section 2.2)中数据通过 `MyViewAssign()` 注入,而非 `fetch($tplFile, $assign)` 的第二个参数传参。示例代码与说明不一致,容易让读者误以为 `$assign` 需要额外构建。
- **问题2中等**Section 2.2 数据流第4步描述"从 ShopXO 原生表 `goods_spec_value` + `goods_spec_base` 联查",但没有说明联查的 JOIN 条件(`spec_base_id` / `goods_id`)。缺少关键连接字段会让接手者无法独立还原查询逻辑。
- **问题3**Section 4 模板渲染现状表格中,`{include file="public/head"}` 和 `{$vr_seat_template.seat_map|raw}` 均标注"⚠️ 待验证",但 Section 2.1 标题已写"✅ 已验证(已提交)"。状态标记存在矛盾。
- **问题4**Section 3.1 描述 ThinkTemplate `parseTemplateFile()` 时,写的是 `$template = $this->config['view_path'] . $template . '.' . $view_suffix`,这是 ThinkPHP 5 的标准行为但文档没有说明这正是导致票务模板无法渲染的根因ThinkTemplate 拼接了错误的 view_path 前缀)。
---
## 完整性评分6/10
- **缺失项1**`vr_seat_templates.spec_base_id_map` JSON 的结构完全没有说明。这个字段是前端渲染座位图的核心数据源,缺少字段说明会导致接手者无法理解座位 ID 如何映射到 spec_base_id。
- **缺失项2**`plugins_service_goods_spec_data` 钩子未实现P1 问题),文档中仅一句话带过,但没有说明这个钩子当前对票务功能的影响范围(是否会导致某些规格无法显示)。
- **缺失项3中等**`loadSoldSeats()` 函数为空TODO但没有说明这个函数应该由谁实现、前端座位图对已售座位的灰化处理依赖此函数。
- **缺失项4中等**Section 2.2 第5步返回三个 key但 Goods.php 中实际注入的是 `vr_seat_template``goods_spec_data`(与模板变量名对应)。文档没有说明为什么返回结构与模板使用结构有差异,以及这些变量在模板中具体如何使用。
---
## 可操作性评分8/10
- **优点**三个方向A/B/C描述清晰每种方案都有具体操作步骤失败切换路径明确。
- **建议1**Section 5 容器实测命令缺少 `docker ps` 前置确认,建议加入 `--first-flow` 步骤,避免读者在容器未启动时执行 curl 导致误导(误以为方案失败)。
- **建议2**`sxo_order_detail.spec` JSON 解码逻辑Section 2.3)只是描述性文字,没有给出 PHP 示例代码。后续接手者需要参考 `TicketService.php` 源码才能理解实际解析方式,建议在此补充一行示例。
---
## 一致性评分8/10
- **冲突项(低)**Section 6 "关联提交"中声称"代码已提交",但 Section 4 的状态表格明确列出 `{include}``{$vr_seat_template.seat_map|raw}` 均未验证。已提交 ≠ 已验证成功,这种混淆会导致读者认为功能已完成。
- **一致项**
- 表名 `sxo_order_detail` 与 PHASE2_PLAN.md 一致
- commit 7bd896764 在各文档中引用一致
- `goods.vr_goods_config` JSON 字段描述一致
---
## 误导风险评估
- **高风险项**
- "Section 2.1 改动状态:✅ 已提交7bd896764"与"Section 4 `{include}` 标签:⚠️ 待验证"并存在同一文档中,读者容易误认为 `{include}` 问题已解决,而实际上问题未经验证。
- Section 3.1 的 ThinkTemplate 根因分析没有明确指出"错误的 view_path 拼接"是渲染失败的根本原因读者可能无法理解为什么Goods.php 绝对路径方案能work。
- **低风险项**
- 修正说明表格Section 0设计良好清晰告知读者哪些内容已被修正降低了误信旧信息的风险。
---
## 总体评价
这份文档在修正版中大幅改善了表名和数据流描述(相比原版),修正说明表格设计合理,体现了良好的文档维护意识。主要风险在于"已提交"与"已验证"的混淆——`{include}` 标签解析在容器内**从未被实测验证过**,但文档的语气暗示问题已解决。此外 `spec_base_id_map` JSON 结构完全缺失,使得文档只能指导"怎么改的"而无法回答"为什么这样改"。建议在完成容器实测后更新 Section 4 的状态标记,并在 Section 2.2 补充 spec_base_id_map 结构说明。

View File

@ -62,6 +62,36 @@ class AdminGoodsSaveHandle
$configs = json_decode($rawConfig, true);
if (is_array($configs) && !empty($configs)) {
// 0) 填充 template_snapshot前端没传时兜底从 vr_seat_templates 读)
foreach ($configs as $i => &$config) {
if (empty($config['template_snapshot'])) {
$templateId = intval($config['template_id'] ?? 0);
if ($templateId > 0) {
$template = Db::name('vr_seat_templates')->find($templateId);
$seatMap = json_decode($template['seat_map'] ?? '{}', true);
$allRooms = $seatMap['rooms'] ?? [];
// 按 selected_rooms 过滤,只存用户选中的房间
$selectedRoomIds = array_column(
array_filter($allRooms, function ($r) use ($config) {
return in_array($r['id'], $config['selected_rooms'] ?? []);
}), null
);
$config['template_snapshot'] = [
'venue' => $seatMap['venue'] ?? [],
'rooms' => $selectedRoomIds,
];
}
}
}
unset($config); // 解除引用,避免后续误改
// 将填充后的完整 config 写回 goods 表
Db::name('Goods')->where('id', $goodsId)->update([
'vr_goods_config' => json_encode($configs, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
]);
// a) 清空原生规格数据 —— 避免列偏移
Db::name('GoodsSpecType')->where('goods_id', $goodsId)->delete();
Db::name('GoodsSpecBase')->where('goods_id', $goodsId)->delete();

View File

@ -0,0 +1,15 @@
{{if !empty($module_data['title']) and !empty($module_data['back_url'])}}
<legend class="am-flex am-flex-items-center">
<a href="{{$module_data.back_url}}" class="am-text-lg">
<i class="iconfont icon-back"></i>
</a>
<em class="form-nav-top-retreat-ds am-color-grey-light am-text-xs am-margin-horizontal-sm">|</em>
<div class="am-flex am-gap-1">
<span class="am-text-sm am-font-weight">{{$module_data.title}}</span>
{{if !empty($module_data['btn_text']) and !empty($module_data['btn_popup'])}}
<em class="form-nav-top-btn-ds am-color-grey-light am-text-xs am-margin-horizontal-sm">|</em>
<a href="javascript:;" class="am-text-primary am-text-sm" data-am-modal="{target: '{{$module_data.btn_popup}}'{{if !empty($module_data['btn_popup_width'])}},width: {{$module_data.btn_popup_width}}{{/if}}}">{{$module_data.btn_text}}</a>
{{/if}}
</div>
</legend>
{{/if}}

View File

@ -0,0 +1,37 @@
{{if !empty($breadcrumb_data) and MyC('home_main_breadcrumb_header_status', 1) eq 1}}
<div class="breadcrumb-data am-hide-sm-only">
<div class="am-container">
<ul class="am-breadcrumb am-margin-bottom-0">
{{foreach $breadcrumb_data as $v}}
{{if !empty($v['name'])}}
{{switch $v.type}}
{{case 0}}
<li {{if empty($v['url'])}}class="am-active"{{/if}}>
{{if !empty($v['url'])}}<a href="{{$v.url}}">{{/if}}
{{$v.name}}
{{if !empty($v['url'])}}</a>{{/if}}
</li>
{{/case}}
{{case 1}}
{{if !empty($v['data']) and is_array($v['data'])}}
<li>
<div class="am-dropdown am-cursor-pointer" data-am-dropdown>
<span class="am-dropdown-toggle" data-am-dropdown-toggle>{{$v.name}} <i class="am-icon-angle-down"></i></span>
<ul class="am-dropdown-content am-radius">
{{foreach $v.data as $vs}}
{{if !empty($vs['name']) and !empty($vs['url'])}}
<li><a href="{{$vs.url}}">{{$vs.name}}</a></li>
{{/if}}
{{/foreach}}
</ul>
</div>
</li>
{{/if}}
{{/case}}
{{/switch}}
{{/if}}
{{/foreach}}
</ul>
</div>
</div>
{{/if}}

View File

@ -0,0 +1,21 @@
{{if is_array(MyLang('custom_to_value_tips'))}}
<div class="am-tips-card">
{{foreach :MyLang('custom_to_value_tips') as $k=>$v}}
<div {{if $k gt 0}}class="am-margin-top-xs"{{/if}}>
<p><strong>{{$v.name}}</strong></p>
{{if !empty($v['item'])}}
<div class="am-padding-left-lg">
{{foreach $v.item as $vs}}
<p>{{$vs}}</p>
{{/foreach}}
{{if !empty($v['tips']) and $v['type'] eq 'mini' and !empty($site_store_links) and !empty($site_store_links['app_mini_pages'])}}
<p>
<a href="{{$site_store_links.app_mini_pages}}" target="_blank">{{$v.tips}} <i class="am-icon-external-link"></i></a>
</p>
{{/if}}
</div>
{{/if}}
</div>
{{/foreach}}
</div>
{{/if}}

View File

@ -0,0 +1,9 @@
{{if !empty($module_data['nav_data']) and is_array($module_data['nav_data'])}}
<div class="detail-content-nav-switch-tabs">
{{foreach $module_data.nav_data as $k=>$v}}
{{if !isset($v.is_show) or $v.is_show eq 1}}
<a class="item {{if isset($module_data['index']) and $module_data.index eq $k or (!isset($module_data['index']) and $k eq 0)}}am-active{{/if}}" data-key="{{$v.key}}">{{$v.name}}</a>
{{/if}}
{{/foreach}}
</div>
{{/if}}

View File

@ -0,0 +1,21 @@
{{if is_array(MyLang('event_value_tips_list'))}}
<div class="am-tips-card">
{{foreach :MyLang('event_value_tips_list') as $k=>$v}}
<div {{if $k gt 0}}class="am-margin-top-xs"{{/if}}>
<p><strong>{{$v.name}}</strong></p>
{{if !empty($v['item'])}}
<div class="am-padding-left-lg">
{{foreach $v.item as $vs}}
<p>{{$vs}}</p>
{{/foreach}}
{{if !empty($v['tips']) and $v['type'] eq 'mini' and !empty($site_store_links) and !empty($site_store_links['app_mini_pages'])}}
<p>
<a href="{{$site_store_links.app_mini_pages}}" target="_blank">{{$v.tips}} <i class="am-icon-external-link"></i></a>
</p>
{{/if}}
</div>
{{/if}}
</div>
{{/foreach}}
</div>
{{/if}}

View File

@ -0,0 +1,57 @@
<?php
// VR票务专用精简页脚 — 不过度引入 ShopXO 默认导航
$shopxo_config = [];
$config_file = ROOT . 'app' . DS . 'config' . DS . 'shopxo.php';
if (is_file($config_file)) {
$shopxo_config = include $config_file;
}
$shop_name = $shopxo_config['shop_name'] ?? 'VR票务';
$icp = $shopxo_config['icp'] ?? '';
$security_desc = $shopxo_config['security_desc'] ?? '';
?>
</div><!-- end .vr-ticket-page -->
<style>
.vr-footer {
padding: 30px 20px;
text-align: center;
background: #f8f9fa;
border-top: 1px solid #e8e8e8;
margin-top: 80px; /* 避开固定底部购买栏 */
}
.vr-footer-links {
margin-bottom: 12px;
}
.vr-footer-links a {
color: #666;
font-size: 13px;
text-decoration: none;
margin: 0 12px;
}
.vr-footer-links a:hover { color: #409eff; }
.vr-footer-copy {
font-size: 12px;
color: #999;
margin-bottom: 6px;
}
.vr-footer-icp {
font-size: 11px;
color: #bbb;
}
</style>
<div class="vr-footer">
<div class="vr-footer-links">
<a href="<?php echo Config('shopxo.host_url'); ?>">返回首页</a>
</div>
<div class="vr-footer-copy">
&copy; <?php echo date('Y'); ?> <?php echo htmlspecialchars($shop_name, ENT_QUOTES, 'UTF-8'); ?> All Rights Reserved.
</div>
<?php if (!empty($icp)): ?>
<div class="vr-footer-icp">
<a href="https://beian.miit.gov.cn/" target="_blank" style="color:#bbb;text-decoration:none"><?php echo htmlspecialchars($icp, ENT_QUOTES, 'UTF-8'); ?></a>
</div>
<?php endif; ?>
</div>
<?php echo Config('shopxo.is_close_website_footer_js') != 1 ? '<script src="' . Config('shopxo.host_url') . 'static/common/js/footer.js?v=' . $shopxo_config['version'] . '"></script>' : ''; ?>

View File

@ -0,0 +1,20 @@
<div class="footer-filing-content theme-data-edit-event" data-module="site_filing">
<p class="powered">
{{:str_replace('version', APPLICATION_VERSION, $home_theme_footer_bottom_powered)}}
</p>
{{if !empty($site_filing_list) and is_array($site_filing_list)}}
{{foreach $site_filing_list as $v}}
{{if !empty($v['show_name'])}}
<b>|</b>
<p class="footer-icp">
<a {{if empty($v['url'])}}href="javascript:;"{{else /}}href="{{$v.url}}" target="_blank"{{/if}}>
{{if !empty($v['icon'])}}
<img src="{{$v.icon}}" alt="{{$v.show_name}}" />
{{/if}}
{{$v.show_name}}
</a>
</p>
{{/if}}
{{/foreach}}
{{/if}}
</div>

View File

@ -0,0 +1,165 @@
<!-- is footer hook -->
{{if empty($module_data) or !isset($module_data['is_footer_hook']) or $module_data['is_footer_hook'] eq 1}}
<!-- 底部导航上面钩子 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_footer_top</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_footer_top_data) and is_array($plugins_view_common_footer_top_data)}}
{{foreach $plugins_view_common_footer_top_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
{{/if}}
<!-- 底部内容及页脚 -->
{{if MyC('home_main_footer_content_status', 1) eq 1 and (!IsMobile() or (IsMobile() and MyC('common_is_mobile_concise_model') neq 1))}}
<footer data-am-widget="footer" class="am-footer am-footer-default" data-am-footer="{}">
{{if empty($module_data) or !isset($module_data['is_footer_nav_content']) or $module_data['is_footer_nav_content'] eq 1}}
<div class="am-container footer-nav-content">
<!-- 底部导航 -->
{{if !empty($nav_footer)}}
<ul data-am-widget="gallery" class="am-gallery am-avg-sm-2 am-avg-md-4 am-avg-lg-4 am-gallery-overlay am-no-layout am-u-md-8 am-u-lg-9 footer-nav-list theme-data-edit-event" data-module="navigation_footer" data-am-gallery="{}">
{{foreach $nav_footer as $k=>$v}}
{{if $k lt 4}}
<li>
<div class="am-gallery-item">
<p class="footer-nav-title am-text-truncate">{{$v.name}}</p>
{{if !empty($v['items'])}}
{{foreach $v.items as $vs}}
<p class="am-text-truncate">
<a href="{{$vs.url}}" {{if $vs['is_new_window_open'] eq 1}}target="_blank"{{/if}}>{{$vs.name}}</a>
</p>
{{/foreach}}
{{/if}}
</div>
</li>
{{/if}}
{{/foreach}}
</ul>
{{/if}}
<!-- 商店信息 -->
{{if !empty($site_info_data) and is_array($site_info_data)}}
<ul class="footer-about am-u-md-4 am-u-lg-3 theme-data-edit-event" data-module="store_config">
<!-- 客服信息 -->
{{if !empty($site_info_data['chat']['data']['text']) and is_array($site_info_data['chat']['data']['text'])}}
{{foreach $site_info_data.chat.data.text as $v}}
{{if !empty($v['value']) and !empty($v['key'])}}
<li class="am-text-left">
<i class="iconfont {{$v.icon}} am-vertical-align-middle"></i>
{{switch $v.key}}
{{case tel}}
<a href="tel:{{$v.value}}" class="am-vertical-align-middle">{{$v.value}}</a>
{{/case}}
{{case email}}
<a href="mailto:{{$v.value}}" class="am-vertical-align-middle">{{$v.value}}</a>
{{/case}}
{{case qq}}
<a href="https://wpa.qq.com/msgrd?v=3&uin={{$v.value}}&site=qq&menu=yes" target="_blank" class="am-vertical-align-middle">{{$v.value}}</a>
{{/case}}
{{case url}}
<a href="{{$v.value}}" target="_blank" class="am-vertical-align-middle">{{$v.name}}</a>
{{/case}}
{{default /}}
<span class="am-vertical-align-middle">{{$v.value}}</span>
{{/switch}}
</li>
{{/if}}
{{/foreach}}
{{/if}}
<!-- 基础信息 -->
{{if !empty($site_info_data['base']['data']['text']) and is_array($site_info_data['base']['data']['text'])}}
{{foreach $site_info_data.base.data.text as $v}}
{{if !empty($v['value']) and !empty($v['key'])}}
<li class="am-text-left">
<i class="iconfont {{$v.icon}} am-vertical-align-middle"></i>
<span class="am-vertical-align-middle">{{$v.value}}</span>
</li>
{{/if}}
{{/foreach}}
{{/if}}
<!-- 图片信息 -->
{{if (!empty($site_info_data['chat']['data']['images']) and is_array($site_info_data['chat']['data']['images'])) or (!empty($site_info_data['base']['data']['images']) and is_array($site_info_data['base']['data']['images'])) or (!empty($site_info_data['client']['data']['images']) and is_array($site_info_data['client']['data']['images']))}}
<li class="am-padding-right-0">
<ul class=" am-avg-sm-3 am-avg-md-3 am-text-center am-margin-top-xs am-margin-bottom-0">
<!-- 客服图片 -->
{{if !empty($site_info_data['chat']['data']['images']) and is_array($site_info_data['chat']['data']['images'])}}
{{foreach $site_info_data.chat.data.images as $v}}
{{if !empty($v['value']) and !empty($v['name'])}}
<li class="am-padding-bottom-xs am-padding-right-sm">
<img src="{{$v.value}}" class="am-radius am-max-wh-auto common-annex-view-event" data-title="{{$v.name}}" alt="{{$v.name}}" />
<p class="am-text-xs">{{$v.name}}</p>
</li>
{{/if}}
{{/foreach}}
{{/if}}
<!-- 基础图片 -->
{{if !empty($site_info_data['base']['data']['images']) and is_array($site_info_data['base']['data']['images'])}}
{{foreach $site_info_data.base.data.images as $v}}
{{if !empty($v['value']) and !empty($v['name'])}}
<li class="am-padding-bottom-xs am-padding-right-sm">
<img src="{{$v.value}}" class="am-radius am-max-wh-auto common-annex-view-event" data-title="{{$v.name}}" alt="{{$v.name}}" />
<p class="am-text-xs">{{$v.name}}</p>
</li>
{{/if}}
{{/foreach}}
{{/if}}
<!-- 平台客户端图片 -->
{{if !empty($site_info_data['client']['data']['images']) and is_array($site_info_data['client']['data']['images'])}}
{{foreach $site_info_data.client.data.images as $v}}
{{if !empty($v['value']) and !empty($v['name'])}}
<li class="am-padding-bottom-xs am-padding-right-sm">
<img src="{{$v.value}}" class="am-radius am-max-wh-auto common-annex-view-event" data-title="{{$v.name}}" alt="{{$v.name}}" />
<p class="am-text-xs">{{$v.name}}</p>
</li>
{{/if}}
{{/foreach}}
{{/if}}
</ul>
</li>
{{/if}}
</ul>
{{/if}}
</div>
<!-- 页脚 -->
<div class="am-footer-miscs">
<div class="am-container">
<!-- 友情链接 -->
{{if !empty($link_list)}}
<div class="friendship-list theme-data-edit-event" data-module="link_list">
<ul class="am-cf am-margin-bottom-sm">
<li class="am-fl am-text-center title">友情链接</li>
{{foreach $link_list as $v}}
<li class="am-fl am-text-center">
<a href="{{$v.url}}" {{if $v['is_new_window_open'] eq 1}} target="_blank"{{/if}}>{{$v.name}}</a>
</li>
{{/foreach}}
</ul>
</div>
{{/if}}
<!-- 页脚信息 -->
{{:ModuleInclude('public/footer_filing')}}
</div>
</div>
{{else /}}
<div class="am-footer-miscs">
{{:ModuleInclude('public/footer_filing')}}
</div>
{{/if}}
</footer>
{{else /}}
<!-- 页脚 -->
<footer class="am-footer am-footer am-footer-default footer-base-content">
<div class="am-footer-miscs">
{{:ModuleInclude('public/footer_filing')}}
</div>
</footer>
{{/if}}

View File

@ -0,0 +1,89 @@
<!-- 商品分类 -->
<div id="goods-category" class="am-container am-hide-sm-only am-hide-md-only" data-controller-name="{{$controller_name}}">
<div class="goods-category-s">
{{if MyC('home_main_header_status', 1) eq 1}}
<a href="{{:MyUrl('index/category/index')}}">
<div class="goods-category-title">
<span class="all-goods">{{:MyLang('common.all_category_text')}}</span>
</div>
</a>
{{/if}}
<div class="category-content theme-data-edit-event" data-module="goods_category" {{if (isset($common_goods_category_hidden) and $common_goods_category_hidden eq 1)}}style="display:none;"{{/if}}>
<div class="category">
<ul class="category-list category-row-{{if !empty($goods_category_list) and is_array($goods_category_list)}}{{:count($goods_category_list)}}{{/if}}">
{{if !empty($goods_category_list) and is_array($goods_category_list)}}
{{foreach $goods_category_list as $k=>$v}}
<li class="first" data-index="{{$k}}">
{{if $category_show_level neq 1}}
<img class="category-fillet-top am-hide" src="{{:StaticAttachmentUrl('corner_round_top.png')}}" />
<img class="category-fillet-bottom am-hide" src="{{:StaticAttachmentUrl('corner_round_bottom.png')}}" />
{{/if}}
<a href="{{:MyUrl('index/search/index', ['cid'=>$v['id']])}}" class="am-block">
<div class="category-info">
<h3 class="category-name b-category-name am-text-truncate">
{{if !empty($v['icon'])}}
<img class="category-menu-img" src="{{$v.icon}}" />
<img class="category-menu-img-active" src="{{if empty($v.icon_active)}}{{$v.icon}}{{else/}}{{$v.icon_active}}{{/if}}" />
{{/if}}
<span class="bd-name">{{$v.name}}</span>
</h3>
<i class="iconfont icon-angle-right"></i>
</div>
</a>
{{if $category_show_level neq 1}}
<div class="menu-item menu-in top">
{{if !empty($v['items'])}}
<div class="area-in">
<div class="area-bg">
<div class="menu-srot">
<div class="sort-side {{if $category_show_level eq 2}}am-flex-row{{elseif in_array($category_show_level, [0,3])}}am-flex-col{{/if}}">
{{foreach $v.items as $vs}}
{{if $category_show_level eq 2}}
<dl class="dl-sort {{if $category_show_level eq 2}}dl-sort-two{{/if}}">
<dd >
<a href="{{:MyUrl('index/search/index', ['cid'=>$vs['id']])}}">
{{if !empty($vs['icon'])}}
<img src="{{$vs.icon}}" width="50" />
{{/if}}
<span>{{$vs.name}}</span>
</a>
</dd>
</dl>
{{elseif in_array($category_show_level, [0,3])}}
<div class="category-show-level3">
<div class="category-show-level3-title">
<a href="{{:MyUrl('index/search/index', ['cid'=>$vs['id']])}}">
<span>{{$vs.name}}</span>
</a>
</div>
{{if !empty($vs['items'])}}
<div class="category-show-level3-child">
{{foreach $vs.items as $vss}}
<div>
<a href="{{:MyUrl('index/search/index', ['cid'=>$vss['id']])}}">
<span>{{$vss.name}}</span>
</a>
</div>
{{/foreach}}
</div>
{{/if}}
</div>
{{/if}}
{{/foreach}}
</div>
</div>
</div>
</div>
{{else /}}
{{:ModuleInclude('public/not_data')}}
{{/if}}
</div>
{{/if}}
</li>
{{/foreach}}
{{/if}}
</ul>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,265 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="{{:MyConfig('shopxo.default_charset', 'utf-8')}}" />
<title>{{$home_seo_site_title}}</title>
<meta name="keywords" content="{{$home_seo_site_keywords}}" />
<meta name="description" content="{{$home_seo_site_description}}" />
<meta name="generator" content="{{$my_url}}" />
<meta name="application-name" content="{{$home_seo_site_title}}" />
<meta name="msapplication-tooltip" content="{{$home_seo_site_title}}" />
<meta name="msapplication-starturl" content="{{$my_url}}" />
<link rel="shortcut icon" type="image/x-icon" href="{{$public_host}}favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="{{$home_site_name}}">
<link rel="apple-touch-icon" href="{{$home_site_logo_square}}">
<link rel="apple-touch-icon-precomposed" href="{{$home_site_logo_square}}">
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/iconfont/iconfont.css?v={{$static_cache_version}}" />
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/assets/css/amazeui.css?v={{$static_cache_version}}" />
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/amazeui-switch/amazeui.switch.css?v={{$static_cache_version}}" />
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/amazeui-chosen/amazeui.chosen.css?v={{$static_cache_version}}" />
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/cropper/cropper.min.css?v={{$static_cache_version}}" />
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/amazeui-tagsinput/amazeui.tagsinput.css?v={{$static_cache_version}}" />
<!-- 轮播插件 -->
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/swiper/swiper.min.css?v={{$static_cache_version}}" />
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/swiper/swiper-bundle.min.css?v={{$static_cache_version}}" />
<!-- highlight代码高亮 -->
<link rel="stylesheet" href="{{$public_host}}static/common/lib/highlight/monokai_sublime.min.css?v={{$static_cache_version}}" />
<!-- wangEditor -->
<link rel="stylesheet" href="{{$public_host}}static/common/lib/wangeditor/wangeditor-5.1.23.css?v={{$static_cache_version}}" />
<!-- 公共css -->
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/css/common.css?v={{$static_cache_version}}" />
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/css/forminput.css?v={{$static_cache_version}}" />
<!-- 模块公共css -->
{{if !empty($static_path_data['common_css'])}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/{{$static_path_data.common_css}}?v={{$static_cache_version}}" />
{{/if}}
{{if !empty($static_path_data['theme_import_css']) and is_array($static_path_data['theme_import_css'])}}
{{foreach $static_path_data.theme_import_css as $v}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/{{$v}}?v={{$static_cache_version}}" />
{{/foreach}}
{{/if}}
{{if !empty($static_path_data['module_css'])}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/{{$static_path_data.module_css}}?v={{$static_cache_version}}" />
{{/if}}
{{if !empty($static_path_data['other_css'])}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/{{$static_path_data.other_css}}?v={{$static_cache_version}}" />
{{/if}}
<!-- ckplayer播放器 -->
{{if isset($is_load_ckplayer) and $is_load_ckplayer eq 1}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/ckplayer/css/ckplayer.css?v={{$static_cache_version}}" />
{{/if}}
<!-- 打印css -->
{{if isset($is_load_hiprint) and $is_load_hiprint eq 1}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/hiprint/css/hiprint.css" />
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/hiprint/css/print-lock.css" />
{{/if}}
<!-- 范围滑条 -->
{{if isset($is_load_jrange) and $is_load_jrange eq 1}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/jRange/jquery.range.css?v={{$static_cache_version}}" />
{{/if}}
<!-- webuploader -->
{{if isset($is_load_webuploader) and $is_load_webuploader eq 1}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/lib/ueditor/third-party/webuploader/webuploader.css?v={{$static_cache_version}}" />
{{/if}}
<!-- 插件 -->
{{if !empty($static_path_data['plugins_css'])}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/{{$static_path_data.plugins_css}}?v={{$static_cache_version}}" />
{{/if}}
<!-- 可视化拖拽 -->
{{if isset($is_load_layout) and $is_load_layout eq 1}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/css/layout.css?v={{$static_cache_version}}" />
{{/if}}
{{if isset($is_load_layout_admin) and $is_load_layout_admin eq 1}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/common/css/layout.admin.css?v={{$static_cache_version}}" />
{{/if}}
<!-- 页面样式 -->
{{if !empty($static_path_data['page_css'])}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}static/{{$static_path_data.page_css}}?v={{$static_cache_version}}" />
{{/if}}
<!-- css钩子 -->
{{if !empty($plugins_css_data) and is_array($plugins_css_data)}}
{{foreach $plugins_css_data as $hook}}
{{if !empty($hook) and is_string($hook)}}
{{if substr($hook, 0, 4) eq 'http'}}
<link rel="stylesheet" type="text/css" href="{{$hook}}?v={{$static_cache_version}}" />
{{else /}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}{{$hook}}?v={{$static_cache_version}}" />
{{/if}}
{{elseif is_array($hook) /}}
{{foreach $hook as $hook_css}}
{{if !empty($hook_css) and is_string($hook_css)}}
{{if substr($hook_css, 0, 4) eq 'http'}}
<link rel="stylesheet" type="text/css" href="{{$hook_css}}?v={{$static_cache_version}}" />
{{else /}}
<link rel="stylesheet" type="text/css" href="{{$public_host}}{{$hook_css}}?v={{$static_cache_version}}" />
{{/if}}
{{/if}}
{{/foreach}}
{{/if}}
{{/foreach}}
{{/if}}
<!-- 公共header内钩子 -->
{{if !empty($plugins_common_header_data) and is_array($plugins_common_header_data)}}
{{foreach $plugins_common_header_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
<!-- 主题配色 -->
<style type="text/css">
:root {
{{if !empty($theme_style_data) and is_array($theme_style_data)}}
{{foreach $theme_style_data as $k=>$v}}
--{{:str_replace('_', '-', $k);}}: {{$v}}{{if $k eq 'html_body_size'}}px{{elseif in_array($k, ['border_radius', 'border_radius_sm', 'border_radius_lg'])}}rem{{/if}};
{{/foreach}}
{{else /}}
{{:ModuleInclude('public/header_style_root')}}
{{/if}}
}
/* 公共header内js钩子 */
{{if !empty($plugins_common_header_css_data) and is_array($plugins_common_header_css_data)}}
{{foreach $plugins_common_header_css_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</style>
<script type="text/javascript">
// 基础配置
var __system_type__ = '{{$system_type}}';
var __root__ = '{{$public_host}}';
var __my_http__ = '{{$my_http}}';
var __my_host__ = '{{$my_host}}';
var __my_url__ = '{{$my_url}}';
var __my_view_url__ = '{{$my_view_url}}';
var __my_public_url__ = '{{$my_public_url}}';
var __public__ = '{{$public_host}}';
var __default_theme__ = '{{$default_theme}}';
var __modal_login_url__ = '{{:MyUrl("index/user/modallogininfo")}}';
var __attachment_host__ = '{{$attachment_host}}';
var __seo_url_suffix__ = '{{:MyC("home_seo_url_html_suffix", "html", true)}}';
var __user_id__ = {{if empty($user['id'])}}0{{else /}}{{$user.id}}{{/if}};
var __currency_symbol__ = '{{$currency_symbol}}';
var __is_mobile__ = '{{if IsMobile()}}1{{else}}0{{/if}}';
var __env_max_input_vars_count__ = '{{$env_max_input_vars_count}}';
var __map_view_url__ = '{{:MyUrl("index/map/index")}}';
var __load_map_type__ = '{{$load_map_type}}';
var __user_login_info_url__ = '{{:MyUrl("index/user/logininfo")}}';
var __user_register_info_url__ = '{{:MyUrl("index/user/reginfo")}}';
var __user_forget_info_url__ = '{{:MyUrl("index/user/forgetpwdinfo")}}';
var __goods_spec_type_url__ = '{{:MyUrl("index/goods/spectype")}}';
var __goods_spec_detail_url__ = '{{:MyUrl("index/goods/specdetail")}}';
var __goods_stock_url__ = '{{:MyUrl("index/goods/stock")}}';
var __goods_cart_save_url__ = '{{:MyUrl("index/cart/save")}}';
var __goods_cart_info_url__ = '{{:MyUrl("index/goods/cartinfo")}}';
var __goods_favor_url__ = '{{:MyUrl("index/goods/favor")}}';
{{if !empty($theme_data_admin_data) and isset($theme_data_admin_data['status']) and $theme_data_admin_data['status'] eq 1 and !empty($theme_data_admin_data['admin_url_data']) and is_array($theme_data_admin_data['admin_url_data'])}}
{{foreach $theme_data_admin_data.admin_url_data as $k=>$v}}
var __theme_data_admin_{{$k}}_url__ = '{{$v}}';
{{/foreach}}
{{/if}}
// 语言定义用于js调用、模板引擎直接使用$lang_data.xxx获取对应语言即可
{{if !empty($lang_data)}}
{{foreach $lang_data as $k=>$v}}
{{if !empty($k) and isset($v) and !is_array($v)}}
var lang_{{$k}} = '{{$v}}';
{{/if}}
{{/foreach}}
{{/if}}
// 公共header内js钩子
{{if !empty($plugins_common_header_javascript_data) and is_array($plugins_common_header_javascript_data)}}
{{foreach $plugins_common_header_javascript_data as $v}}
{{if is_array($v)}}
{{if isset($v['var']) and isset($v['value'])}}
{{if is_string($v['value']) or is_int($v['value'])}}
var plugins_{{$v.var}} = '{{$v.value}}';
{{/if}}
{{else /}}
{{foreach $v as $vs}}
{{if isset($vs['var']) and isset($vs['value']) and (is_string($vs['value']) or is_int($vs['value']))}}
var plugins_{{$vs.var}} = '{{$vs.value}}';
{{/if}}
{{/foreach}}
{{/if}}
{{/if}}
{{/foreach}}
{{/if}}
</script>
</head>
<body class="{{$page_unique_mark}} {{if in_array(MiniAppEnv(), MyConfig('shopxo.mini_app_type_list'))}} mini-app-env{{/if}}">
<div class="body-content-container">
<div class="body-content-formal-container">
<!-- 页面加载层 -->
{{if isset($is_page_loading) and $is_page_loading eq 1}}
{{:ModuleInclude('public/page_loading')}}
{{/if}}
<!-- css钩子 -->
{{if (!isset($page_pure) or $page_pure neq 1) and (!isset($is_header) or $is_header eq 1)}}
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_css</span>
</div>
{{/if}}
{{/if}}
<!-- 公共header内钩子 -->
{{if (!isset($page_pure) or $page_pure neq 1) and (!isset($is_header) or $is_header eq 1)}}
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_common_header</span>
</div>
{{/if}}
{{/if}}
{{if empty($module_data) or !isset($module_data['is_header_hook']) or $module_data['is_header_hook'] eq 1}}
<!-- 公共顶部钩子 -->
{{if !isset($page_pure) or $page_pure neq 1}}
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_top</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_top_data) and is_array($plugins_view_common_top_data)}}
{{foreach $plugins_view_common_top_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
{{/if}}
<!-- header公共顶部钩子 -->
{{if !isset($is_header) or $is_header eq 1}}
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_top_header</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_top_header_data) and is_array($plugins_view_common_top_header_data)}}
{{foreach $plugins_view_common_top_header_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
{{/if}}
{{/if}}

View File

@ -0,0 +1,139 @@
{{if MyC('home_main_header_status', 1) eq 1}}
<header class="am-topbar shop-navigation">
<div class="am-container">
<!-- 中间导航左侧 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_header_nav_left</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_header_nav_left_data) and is_array($plugins_view_common_header_nav_left_data)}}
{{foreach $plugins_view_common_header_nav_left_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
<!-- 手机端导航伸展按钮 -->
<button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-default am-show-sm-only switch-submit" data-am-collapse="{target: '#doc-topbar-collapse'}">
<span class="iconfont icon-more-phone"></span>
</button>
<!-- 全部分类 -->
<a href="{{:MyUrl('index/category/index')}}" class="am-show-md-only">
<div class="goods-category-title am-hide-sm-only">
<span class="all-goods">{{:MyLang('common.all_category_text')}}</span>
</div>
</a>
<!-- 手机端搜索 -->
<form class="am-topbar-form am-topbar-left am-form-inline am-show-sm-only navigation-search" role="search" action="{{:MyUrl('index/search/index')}}" method="POST">
<div class="am-input-group am-input-group-sm">
<input type="text" name="wd" class="am-form-field" placeholder="{{:MyLang('common.search_input_placeholder')}}" value="{{if !empty($params['wd'])}}{{$params.wd}}{{/if}}" autocomplete="off" data-is-clearout="0" />
<span class="am-input-group-btn">
<button class="am-btn am-btn-default" type="submit">
<span class="am-icon-search am-icon-xs"></span>
</button>
</span>
</div>
<!-- 中间导航搜索内部 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_header_nav_search_inside</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_header_nav_search_inside_data) and is_array($plugins_view_common_header_nav_search_inside_data)}}
{{foreach $plugins_view_common_header_nav_search_inside_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</form>
<div class="am-collapse am-topbar-collapse" id="doc-topbar-collapse">
<!-- 中间导航内容内部顶部 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_header_nav_content_inside_top</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_header_nav_content_inside_top_data) and is_array($plugins_view_common_header_nav_content_inside_top_data)}}
{{foreach $plugins_view_common_header_nav_content_inside_top_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
{{if empty($user)}}
<!-- 未登录操作栏 -->
<div class="navigation-button am-show-sm-only">
{{if !empty($home_user_login_type)}}
<a href="{{:MyUrl('index/user/logininfo')}}" class="am-btn am-btn-primary am-topbar-btn am-btn-sm">{{:MyLang('common.login_title')}}</a>
{{/if}}
{{if !empty($home_user_reg_type)}}
<a href="{{:MyUrl('index/user/reginfo')}}" class="am-btn am-btn-warning am-topbar-btn am-btn-sm">{{:MyLang('common.register_title')}}</a>
{{/if}}
</div>
{{/if}}
<!-- 主导航 -->
{{if !empty($nav_header)}}
<ul class="am-nav am-nav-pills am-topbar-nav theme-data-edit-event" data-module="navigation_header">
{{foreach $nav_header as $nav}}
{{if empty($nav['items'])}}
<li>
<a href="{{$nav.url}}" {{if $nav['is_new_window_open'] eq 1}}target="_blank"{{/if}} {{if isset($nav['active']) and $nav['active'] eq 1}}class="active"{{/if}}>{{$nav.name}}</a>
</li>
{{else /}}
<li class="am-dropdown" data-am-dropdown>
<a class="am-dropdown-toggle {{if isset($nav['active']) and $nav['active'] eq 1}}active{{/if}}" data-am-dropdown-toggle href="javascript:;">
{{$nav.name}} <span class="am-icon-caret-down"></span>
</a>
<ul class="am-dropdown-content am-radius">
{{foreach $nav.items as $navs}}
<li>
<a href="{{$navs.url}}" {{if isset($navs['active']) and $navs['active'] eq 1}}class="active"{{/if}}>{{$navs.name}}</a>
</li>
{{/foreach}}
</ul>
</li>
{{/if}}
{{/foreach}}
</ul>
{{/if}}
<!-- 中间导航内容内部底部 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_header_nav_content_inside_bottom</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_header_nav_content_inside_bottom_data) and is_array($plugins_view_common_header_nav_content_inside_bottom_data)}}
{{foreach $plugins_view_common_header_nav_content_inside_bottom_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
<!-- 中间导航右侧 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_header_nav_right</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_header_nav_right_data) and is_array($plugins_view_common_header_nav_right_data)}}
{{foreach $plugins_view_common_header_nav_right_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
</header>
{{/if}}

View File

@ -0,0 +1,60 @@
<div class="nav-seasrch header-nav-simple {{if !isset($module_data['is_sm_hide']) or $module_data['is_sm_hide'] eq 1}}am-hide-sm-only{{/if}}">
<div class="am-container">
<div class="logo theme-data-edit-event" data-module="site_base">
<a href="{{$home_url}}">
<img src="{{$home_site_logo}}" alt="{{$home_site_name}}" />
</a>
</div>
{{if !empty($module_data['title'])}}
<p class="login-title am-fl am-vertical-align-middle am-margin-left-main">{{$module_data.title}}</p>
{{/if}}
{{if !empty($module_data['search']) and $module_data['search'] eq 1}}
<div class="search-bar am-fr">
<!-- 公共搜索框内左侧 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_search_inside_left</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_search_inside_left_data) and is_array($plugins_view_common_search_inside_left_data)}}
{{foreach $plugins_view_common_search_inside_left_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
<!-- 搜索框 -->
<form action="{{:MyUrl('index/search/index')}}" method="POST">
<div class="search-group am-radius am-nbfc">
<input id="search-input" name="wd" type="text" placeholder="{{:MyLang('common.search_input_placeholder')}}" value="{{if !empty($params['wd'])}}{{$params.wd}}{{/if}}" autocomplete="off" data-is-clearout="0" />
<button type="submit" id="ai-topsearch" class="submit am-btn-primary">
<span>{{:MyLang('common.search_button_text')}}</span>
</button>
</div>
</form>
<!-- 公共搜索框内右侧 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_search_inside_right</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_search_inside_right_data) and is_array($plugins_view_common_search_inside_right_data)}}
{{foreach $plugins_view_common_search_inside_right_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
{{/if}}
{{if isset($module_data['is_go_home']) and $module_data['is_go_home'] eq 1}}
<p class="am-fr gohome am-padding-right-xs am-show-sm-down">
<a href="{{$home_url}}">
<i class="iconfont icon-index"></i>
</a>
</p>
{{/if}}
</div>
</div>

View File

@ -0,0 +1,166 @@
/* 基础 */
--html-body-size: 10px;
--body-bg-color: #f7f7f7;
--color-price: #E22C08;
--color-red: #E22C08;
--color-yellow: #E22C08;
--color-blue: #76AFFF;
--color-green: #5EB95E;
/* 主色 */
--color-main: #E22C08;
--color-main-light: #ffe3de;
--color-main-hover: #EA6B52;
/* 次色 */
--color-secondary: #FFB8AA;
/* 圆角 */
--border-radius-sm: 0.2rem;
--border-radius: 0.4rem;
--border-radius-lg: 0.8rem;
/* 阴影 */
--box-shadow: 0 5px 20px rgba(50,55,58,0.1);
--box-shadow-sm: 0 2px 8px rgba(50,55,58,0.1);
--box-shadow-lg: 0 8px 34px rgba(50,55,58,0.1);
/* 按钮部分 */
/* 默认基础色 - 按钮 */
--color-button-default: #EEEEEE;
--color-button-default-hover: #dddddd;
--color-button-default-focus: #c7c7c7;
--color-button-default-active: #c7c7c7;
--color-button-default-disabled: #c2c2c2;
--color-button-default-border: #EEEEEE;
--color-button-default-hover-border: #dddddd;
--color-button-default-focus-border: #c7c7c7;
--color-button-default-active-border: #c7c7c7;
--color-button-default-disabled-border: #c7c7c7;
--color-button-default-text: #666666;
--color-button-default-hover-text: #444444;
--color-button-default-focus-text: #444444;
--color-button-default-active-text: #444444;
--color-button-default-disabled-text: #444444;
/* 主色 - 按钮 */
--color-button-primary: #E22C08;
--color-button-primary-hover: #EA6B52;
--color-button-primary-focus: #C02000;
--color-button-primary-active: #C02000;
--color-button-primary-disabled: #F6BFB4;
--color-button-primary-border: #E22C08;
--color-button-primary-hover-border: #EA6B52;
--color-button-primary-focus-border: #C02000;
--color-button-primary-active-border: #C02000;
--color-button-primary-disabled-border: #F6BFB4;
--color-button-primary-text: #FFFFFF;
--color-button-primary-hover-text: #FFFFFF;
--color-button-primary-focus-text: #FFFFFF;
--color-button-primary-active-text: #FFFFFF;
--color-button-primary-disabled-text: #FFFFFF;
/* 次色 - 按钮 */
--color-button-secondary: #FFEFE5;
--color-button-secondary-hover: #FCE9E6;
--color-button-secondary-focus: #FCE9E6;
--color-button-secondary-active: #F5B5A9;
--color-button-secondary-disabled: #F5B5A9;
--color-button-secondary-border: #FFCBAB;
--color-button-secondary-hover-border: #FDB6B0;
--color-button-secondary-focus-border: #FDB6B0;
--color-button-secondary-active-border: #F5B5A9;
--color-button-secondary-disabled-border: #F5B5A9;
--color-button-secondary-text: #E22C08;
--color-button-secondary-hover-text: #EA6247;
--color-button-secondary-focus-text: #E64829;
--color-button-secondary-active-text: #E2300D;
--color-button-secondary-disabled-text: #E2300D;
/* 成功 - 按钮 */
--color-button-success: #a8e6a8;
--color-button-success-hover: #97ee97;
--color-button-success-focus: #5eb95e;
--color-button-success-active: #85c085;
--color-button-success-disabled: #85c085;
--color-button-success-border: #7fe27f;
--color-button-success-hover-border: #97ee97;
--color-button-success-focus-border: #5eb95e;
--color-button-success-active-border: #85c085;
--color-button-success-disabled-border: #85c085;
--color-button-success-text: #258f25;
--color-button-success-hover-text: #239b23;
--color-button-success-focus-text: #FFFFFF;
--color-button-success-active-text: #bffbbf;
--color-button-success-disabled-text: #bffbbf;
/* 警告 - 按钮 */
--color-button-warning: #FAAD14;
--color-button-warning-hover: #FBC55A;
--color-button-warning-focus: #FBC55A;
--color-button-warning-active: #EB9C00;
--color-button-warning-disabled: #FDE6B8;
--color-button-warning-border: #FAAD14;
--color-button-warning-hover-border: #FBC55A;
--color-button-warning-focus-border: #FBC55A;
--color-button-warning-active-border: #EB9C00;
--color-button-warning-disabled-border: #FDE6B8;
--color-button-warning-text: #FFFFFF;
--color-button-warning-hover-text: #FFFFFF;
--color-button-warning-focus-text: #FFFFFF;
--color-button-warning-active-text: #FFFFFF;
--color-button-warning-disabled-text: #FFFFFF;
/* 危险 - 按钮 */
--color-button-danger: #ffebeb;
--color-button-danger-hover: #FFEFED;
--color-button-danger-focus: #FFEFED;
--color-button-danger-active: #FFC2B6;
--color-button-danger-disabled: #FFFFFF;
--color-button-danger-border: #E33816;
--color-button-danger-hover-border: #DF2500;
--color-button-danger-focus-border: #D58576;
--color-button-danger-active-border: #FFC2B6;
--color-button-danger-disabled-border: #D58E80;
--color-button-danger-text: #da5c43;
--color-button-danger-hover-text: #e04527;
--color-button-danger-focus-text: #E12C08;
--color-button-danger-active-text: #C72100;
--color-button-danger-disabled-text: #FFC3B7;
/* 小徽章部分 */
/* 默认基础色 - 小徽章 */
--color-badge-default: #EEEEEE;
--color-badge-default-hover: #e9e9e9;
--color-badge-default-text: #666666;
--color-badge-default-hover-text: #666666;
/* 主色 - 小徽章 */
--color-badge-primary: #eaf1fb;
--color-badge-primary-hover: #e4eefe;
--color-badge-primary-text: #0c7cd5;
--color-badge-primary-hover-text: #0c7cd5;
/* 次色 - 小徽章 */
--color-badge-secondary: #ffefe5;
--color-badge-secondary-hover: #ffebdf;
--color-badge-secondary-text: #f18f51;
--color-badge-secondary-hover-text: #f18f51;
/* 成功色 - 小徽章 */
--color-badge-success: #d5fbd5;
--color-badge-success-hover: #c6f9c6;
--color-badge-success-text: #46cf45;
--color-badge-success-hover-text: #46cf45;
/* 警告色 - 小徽章 */
--color-badge-warning: #ffeac2;
--color-badge-warning-hover: #ffe3ae;
--color-badge-warning-text: #f3a200;
--color-badge-warning-hover-text: #f3a200;
/* 危险色 - 小徽章 */
--color-badge-danger: #FFE6E6;
--color-badge-danger-hover: #ffdcdc;
--color-badge-danger-text: #e04527;
--color-badge-danger-hover-text: #e04527;

View File

@ -0,0 +1,207 @@
{{if MyC('home_main_top_header_status', 1) eq 1}}
<!-- 顶部导航条 start -->
<div class="header-top">
<div class="am-container header">
<ul class="top-nav-left top-nav-left-content am-hide-sm-only">
<div class="top-nav-items">
<div class="menu-hd">
<!-- 公共顶部小导航钩子-左侧前面 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_header_navigation_top_left_begin</span>
</div>
{{/if}}
{{if !empty($plugins_view_header_navigation_top_left_begin_data) and is_array($plugins_view_header_navigation_top_left_begin_data)}}
{{foreach $plugins_view_header_navigation_top_left_begin_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
{{if empty($user)}}
<em class="first">{{:MyLang('common.header_top_nav_left_not_login_first')}}</em>
<em class="site-name">{{$home_site_name}}</em>
{{if !empty($home_user_login_type)}}
[<a href="{{:MyUrl('index/user/logininfo')}}">{{:MyLang('common.login_title')}}</a>]
{{/if}}
{{if !empty($home_user_reg_type)}}
[<a href="{{:MyUrl('index/user/reginfo')}}">{{:MyLang('common.register_title')}}</a>]
{{/if}}
{{else /}}
<em class="first">{{:MyLang('common.header_top_nav_left_login_first')}}</em>
{{if !empty($user['icon'])}}
<img src="{{$user.icon}}" class="common-user-icon" {{if !empty($user['icon_title'])}}title="{{$user.icon_title}}"{{/if}} />
{{/if}}
{{if !empty($user['user_name_view'])}}
<em class="user">{{$user.user_name_view}}</em>
{{/if}}
<em class="last">{{:MyLang('common.header_top_nav_left_login_last')}}</em>
<em class="site-name">{{$home_site_name}}</em>
<em class="logout"><a href="{{:MyUrl('index/user/logout')}}">[{{:MyLang('common.logout_title')}}]</a></em>
{{/if}}
<!-- 公共顶部小导航钩子-左侧后面 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_header_navigation_top_left_end</span>
</div>
{{/if}}
{{if !empty($plugins_view_header_navigation_top_left_end_data) and is_array($plugins_view_header_navigation_top_left_end_data)}}
{{foreach $plugins_view_header_navigation_top_left_end_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
</div>
</ul>
<div class="top-nav-left top-nav-left-site-logo am-show-sm-only">
<a href="{{if empty($module_data['url'])}}{{$home_url}}{{else /}}{{$module_data.url}}{{/if}}">
<img class="am-height" src="{{if empty($module_data['logo'])}}{{$home_site_logo_wap}}{{else /}}{{$module_data.logo}}{{/if}}" alt="{{if empty($module_data['name'])}}{{$home_site_name}}{{else /}}{{$module_data.name}}{{/if}}" />
</a>
</div>
<ul class="top-nav-right">
<!-- 公共顶部小导航钩子-右侧前面 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_header_navigation_top_right_begin</span>
</div>
{{/if}}
{{if !empty($plugins_view_header_navigation_top_right_begin_data) and is_array($plugins_view_header_navigation_top_right_begin_data)}}
{{foreach $plugins_view_header_navigation_top_right_begin_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
<!-- 非首页则展示首页入口 -->
{{if MyC('home_header_top_is_home', 0) eq 1 and $module_name.$controller_name.$action_name neq 'indexindexindex'}}
<div class="top-nav-items top-nav-items-home">
<div class="menu-hd">
<a href="{{$home_url}}">
<i class="iconfont icon-index"></i>
<span>{{:MyLang('common.shop_home_title')}}</span>
</a>
</div>
</div>
{{/if}}
<!-- 右侧导航 -->
{{if !empty($common_nav_top_right_list) and is_array($common_nav_top_right_list)}}
{{foreach $common_nav_top_right_list as $nav}}
{{if empty($nav['items'])}}
<div class="top-nav-items {{if !empty($nav['type'])}}top-nav-items-{{$nav.type}}{{/if}}">
<div class="menu-hd {{if isset($nav['is_login']) and $nav['is_login'] eq 1 and empty($user)}}login-event{{/if}}">
<a href="{{if empty($user)}}javascript:;{{else /}}{{if !empty($nav['url'])}}{{$nav.url}}{{/if}}{{/if}}" {{if !empty($nav['class'])}}class="{{$nav.class}}"{{/if}} {{if !empty($nav['attr_data'])}}{{$nav.attr_data|raw}}{{/if}}>
{{if IsUrl($nav['icon'])}}
<img src="{{$nav.icon}}" class="nav-icon am-vertical-align-middle" />
{{else /}}
<i class="iconfont {{$nav.icon}} am-vertical-align-middle"></i>
{{/if}}
<span class="am-vertical-align-middle">{{$nav.name}}</span>
{{if isset($nav['badge']) and $nav['badge'] gt -1}}
{{if $nav['badge'] gt 0}}
<strong class="am-badge am-badge-danger am-round am-badge-tips {{if isset($nav['type']) and $nav['type'] eq 'cart'}}common-cart-total{{/if}}">{{$nav.badge}}</strong>
{{else /}}
<strong class="am-round {{if isset($nav['type']) and $nav['type'] eq 'cart'}}common-cart-total{{/if}}">{{$nav.badge}}</strong>
{{/if}}
{{/if}}
</a>
</div>
</div>
{{else /}}
<div class="top-nav-items {{if !empty($nav['type'])}}top-nav-items-{{$nav.type}}{{/if}}">
<div class="am-dropdown menu-hd" data-am-dropdown>
<a class="am-dropdown-toggle" href="javascript:;" data-am-dropdown-toggle>
{{if IsUrl($nav['icon'])}}
<img src="{{$nav.icon}}" class="nav-icon am-vertical-align-middle" />
{{else /}}
<i class="iconfont {{$nav.icon}} am-vertical-align-middle"></i>
{{/if}}
<span class="am-vertical-align-middle">{{$nav.name}}</span>
<i class="am-icon-angle-down am-vertical-align-middle"></i>
</a>
<ul class="am-dropdown-content am-radius">
{{foreach $nav.items as $navs}}
<!-- 是否为事件类型和事件值数据格式 -->
{{if isset($navs['event_type']) and isset($navs['event_value'])}}
<li class="nav-event-item" {{if !empty($navs['data_value'])}}data-value="{{$navs.data_value}}"{{/if}}>
{{if isset($navs['event_type']) and isset($navs['event_value']) and in_array($navs['event_type'], [3,4])}}
{{switch navs.event_type}}
{{case 3}}
<!-- 地图 -->
<a href="javascript:;" {{if !empty($navs['event_value_data']) and isset($navs['event_value_data'][2]) and isset($navs['event_value_data'][3]) and $navs['event_value_data'][2] neq 0 and $navs['event_value_data'][3] neq 0}}class="submit-map-popup am-flex am-flex-items-center" data-lng="{{$navs['event_value_data'][2]}}" data-lat="{{$navs['event_value_data'][3]}}"{{/if}}>
<p class="nav-images am-margin-right-xs" style="{{if !empty($navs['bg_color'])}}background:{{$navs.bg_color}};{{/if}}">
{{if (!empty($navs['icon']) or !empty($navs['images_url'])) and !empty($navs['name'])}}
<img src="{{if !empty($navs['icon'])}}{{$navs.icon}}{{else /}}{{$navs.images_url}}{{/if}}" alt="{{$navs.name}}" class="am-width am-block" />
{{/if}}
</p>
{{/case}}
{{case 4}}
<!-- 电话 -->
<a {{if !empty($navs['event_value'])}}href="tel:{{$navs.event_value}}"{{else /}}href="javascript:;"{{/if}} class="am-flex am-flex-items-center">
<p class="nav-images am-margin-right-xs" style="{{if !empty($navs['bg_color'])}}background:{{$navs.bg_color}};{{/if}}">
{{if (!empty($navs['icon']) or !empty($navs['images_url'])) and !empty($navs['name'])}}
<img src="{{if !empty($navs['icon'])}}{{$navs.icon}}{{else /}}{{$navs.images_url}}{{/if}}" alt="{{$navs.name}}" class="am-width am-block" />
{{/if}}
</p>
{{/case}}
{{/switch}}
{{else /}}
<!-- 默认url地址 -->
<a {{if !empty($navs['event_value'])}}href="{{$navs.event_value}}"{{else /}}href="javascript:;"{{/if}} class="am-flex am-flex-items-center">
<p class="nav-images am-margin-right-xs" style="{{if !empty($navs['bg_color'])}}background:{{$navs.bg_color}};{{/if}}">
{{if (!empty($navs['icon']) or !empty($navs['images_url'])) and !empty($navs['name'])}}
<img src="{{if !empty($navs['icon'])}}{{$navs.icon}}{{else /}}{{$navs.images_url}}{{/if}}" alt="{{$navs.name}}" class="am-width am-block" />
{{/if}}
</p>
{{/if}}
<p class="am-text-truncate">{{$navs.name}}</p>
</a>
</li>
{{else /}}
<!-- 默认为标准名称和url格式 -->
{{if !empty($navs['name'])}}
<li class="{{if ((isset($nav['is_login']) and $nav['is_login'] eq 1) or (isset($navs['is_login']) and $navs['is_login'] eq 1)) and empty($user)}}login-event{{/if}}">
<a class="am-flex am-flex-items-center {{if !empty($navs['class'])}}{{$navs.class}}{{/if}}" href="{{if ((isset($nav['is_login']) and $nav['is_login'] eq 1) or (isset($navs['is_login']) and $navs['is_login'] eq 1)) and empty($user)}}javascript:;{{else /}}{{if !empty($navs['url'])}}{{$navs.url}}{{/if}}{{/if}}" {{if !empty($navs['attr_data'])}}{{$navs.attr_data|raw}}{{/if}}>
{{if !empty($navs['icon']) or !empty($navs['images_url'])}}
<p class="nav-images am-margin-right-xs" >
<img src="{{if !empty($navs['icon'])}}{{$navs.icon}}{{else /}}{{$navs.images_url}}{{/if}}" alt="{{$navs.name}}" class="am-width am-block" />
</p>
{{/if}}
<p class="am-text-truncate">{{$navs.name}}</p>
</a>
</li>
{{/if}}
{{/if}}
{{/foreach}}
</ul>
</div>
</div>
{{/if}}
{{/foreach}}
{{/if}}
<!-- 公共顶部小导航钩子-右侧后面 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_header_navigation_top_right_end</span>
</div>
{{/if}}
{{if !empty($plugins_view_header_navigation_top_right_end_data) and is_array($plugins_view_header_navigation_top_right_end_data)}}
{{foreach $plugins_view_header_navigation_top_right_end_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</ul>
</div>
</div>
<!-- 顶部导航条 end -->
{{/if}}

View File

@ -0,0 +1,27 @@
{{if !empty($banner_list)}}
<div class="banner theme-data-edit-event" data-module="slide_list">
<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{&quot;directionNav&quot;:false}'>
<ul class="am-slides">
{{foreach $banner_list as $banner}}
{{if !empty($banner['images_url'])}}
<li {{if !empty($banner['bg_color'])}}style="background: {{$banner.bg_color}};"{{/if}}>
{{switch banner.event_type}}
{{case 3}}
<!-- 地图 -->
<a href="javascript:;" {{if !empty($banner['event_value_data']) and isset($banner['event_value_data'][2]) and isset($banner['event_value_data'][3]) and $banner['event_value_data'][2] neq 0 and $banner['event_value_data'][3] neq 0}}class="submit-map-popup" data-lng="{{$banner['event_value_data'][2]}}" data-lat="{{$banner['event_value_data'][3]}}"{{/if}}><img src="{{$banner.images_url}}" alt="{{$banner.name}}" /></a>
{{/case}}
{{case 4}}
<!-- 电话 -->
<a {{if !empty($banner['event_value'])}}href="tel:{{$banner.event_value}}"{{else /}}href="javascript:;"{{/if}}><img src="{{$banner.images_url}}" alt="{{$banner.name}}" /></a>
{{/case}}
{{default /}}
<!-- 默认url地址 -->
<a {{if !empty($banner['event_value'])}}href="{{$banner.event_value}}" target="_blank"{{else /}}href="javascript:;"{{/if}}><img src="{{$banner.images_url}}" alt="{{$banner.name}}" /></a>
{{/switch}}
</li>
{{/if}}
{{/foreach}}
</ul>
</div>
</div>
{{/if}}

View File

@ -0,0 +1,28 @@
{{if !empty($navigation)}}
<div class="am-container">
<div class="am-g small-nav">
{{foreach $navigation as $nav}}
<div class="am-u-sm-3">
{{switch nav.event_type}}
{{case 3}}
<!-- 地图 -->
<a href="javascript:;" {{if $nav['is_need_login'] eq 1 and empty($user)}} class="login-event" {{else /}}{{if !empty($nav['event_value_data']) and isset($nav['event_value_data'][2]) and isset($nav['event_value_data'][3]) and $nav['event_value_data'][2] neq 0 and $nav['event_value_data'][3] neq 0}}class="submit-map-popup" data-lng="{{$nav['event_value_data'][2]}}" data-lat="{{$nav['event_value_data'][3]}}"{{/if}}{{/if}}>
{{/case}}
{{case 4}}
<!-- 电话 -->
<a {{if $nav['is_need_login'] eq 1 and empty($user)}} href="javascript:;" class="login-event" {{else /}}{{if !empty($nav['event_value'])}}href="tel:{{$nav.event_value}}"{{else /}}href="javascript:;"{{/if}}{{/if}}>
{{/case}}
{{default /}}
<!-- 默认url地址 -->
<a {{if $nav['is_need_login'] eq 1 and empty($user)}} href="javascript:;" class="login-event" {{else /}}{{if !empty($nav['event_value'])}}href="{{$nav.event_value}}"{{else /}}href="javascript:;"{{/if}}{{/if}}>
{{/switch}}
<div class="nav-icon {{if empty($nav['bg_color'])}} item-exposed{{/if}}" style="{{if !empty($nav['bg_color'])}}background:{{$nav.bg_color}};{{/if}}">
<img src="{{$nav.images_url}}" alt="{{$nav.name}}" />
</div>
<div class="mini-nav-title">{{$nav.name}}</div>
</a>
</div>
{{/foreach}}
</div>
</div>
{{/if}}

View File

@ -0,0 +1 @@

View File

@ -0,0 +1,50 @@
{{:ModuleInclude('public/header')}}
<!-- header nav start -->
{{if isset($is_header) and $is_header eq 1}}
<!-- header top nav -->
{{:ModuleInclude('public/header_top_nav')}}
<!-- search -->
{{:ModuleInclude('public/nav_search')}}
<!-- header nav -->
{{:ModuleInclude('public/header_nav')}}
<!-- goods category -->
{{:ModuleInclude('public/goods_category')}}
{{/if}}
<!-- header nav end -->
<!-- conntent start -->
<div class="am-g">
<div class="am-text-center am-margin-top-xl am-padding-xl">
<p><i class="am-icon-info-circle am-icon-lg am-text-xl am-text-warning"></i></p>
<p class="am-margin-top-xs am-text-sm">{{if isset($msg)}}{{$msg}}{{else /}}{{:MyLang('operate_fail')}}{{/if}}</p>
<p class="am-margin-top-xl">
<a href="{{if empty($url)}}javascript:history.go(-1){{else /}}{{$url}}{{/if}}" class="am-text-primary">{{:MyLang('back_prev_page_name')}}</a>
<span class="am-margin-left-sm"><span class="wait-time">{{if empty($wait_time)}}5{{else /}}{{$wait_time}}{{/if}}</span>{{:MyLang('back_prev_time_auto_text')}}</span>
</p>
</div>
</div>
<!-- conntent end -->
<!-- footer -->
{{:ModuleInclude('public/footer')}}
<script type="text/javascript">
var interval = setInterval(function()
{
var time = parseInt($('.wait-time').text() || 5)-1;
if(time <= 0)
{
clearInterval(interval);
{{if empty($url)}}
history.go(-1);
{{else /}}
window.location.href = '{{$url}}';
{{/if}}
} else {
$('.wait-time').text(time);
}
}, 1000);
</script>

View File

@ -0,0 +1,50 @@
{{:ModuleInclude('public/header')}}
<!-- header nav start -->
{{if isset($is_header) and $is_header eq 1}}
<!-- header top nav -->
{{:ModuleInclude('public/header_top_nav')}}
<!-- search -->
{{:ModuleInclude('public/nav_search')}}
<!-- header nav -->
{{:ModuleInclude('public/header_nav')}}
<!-- goods category -->
{{:ModuleInclude('public/goods_category')}}
{{/if}}
<!-- header nav end -->
<!-- conntent start -->
<div class="am-g">
<div class="am-text-center am-margin-top-xl am-padding-xl">
<p><i class="am-icon-check-circle am-icon-lg am-text-xl am-text-success"></i></p>
<p class="am-margin-top-xs am-text-sm">{{if isset($msg)}}{{$msg}}{{else /}}{{:MyLang('operate_success')}}{{/if}}</p>
<p class="am-margin-top-xl">
<a href="{{if empty($url)}}javascript:history.go(-1){{else /}}{{$url}}{{/if}}" class="am-text-primary">{{:MyLang('back_prev_page_name')}}</a>
<span class="am-margin-left-sm"><span class="wait-time">{{if empty($wait_time)}}5{{else /}}{{$wait_time}}{{/if}}</span>{{:MyLang('back_prev_time_auto_text')}}</span>
</p>
</div>
</div>
<!-- content end -->
<!-- footer -->
{{:ModuleInclude('public/footer')}}
<script type="text/javascript">
var interval = setInterval(function()
{
var time = parseInt($('.wait-time').text() || 5)-1;
if(time <= 0)
{
clearInterval(interval);
{{if empty($url)}}
history.go(-1);
{{else /}}
window.location.href = '{{$url}}';
{{/if}}
} else {
$('.wait-time').text(time);
}
}, 1000);
</script>

View File

@ -0,0 +1,4 @@
<div class="loading-container am-text-center am-text-grey">
<img src="{{:StaticAttachmentUrl('loading.gif')}}" />
<p>{{:MyLang('processing_tips')}}</p>
</div>

View File

@ -0,0 +1,56 @@
{{:ModuleInclude('public/header')}}
<!-- header nav start -->
{{if isset($is_header) and $is_header eq 1}}
<!-- header top nav -->
{{:ModuleInclude('public/header_top_nav')}}
<!-- search -->
{{:ModuleInclude('public/nav_search')}}
<!-- header nav -->
{{:ModuleInclude('public/header_nav')}}
<!-- goods category -->
{{:ModuleInclude('public/goods_category')}}
{{/if}}
<!-- header nav end -->
<!-- conntent start -->
<div class="am-g my-content tips-success">
<div class="am-u-md-6 am-u-sm-centered am-text-center">
<i class="am-icon-check-circle am-icon-lg"></i>
<span class="msg">{{$msg}}</span>
{{if !isset($is_home) or $is_home eq 1}}
<div class="tips-nav">
<a href="{{$home_url}}" class="am-btn am-btn-secondary am-radius">{{:MyLang('common.back_to_the_home_title')}}</a>
</div>
{{/if}}
</div>
</div>
<!-- conntent end -->
{{:ModuleInclude('public/footer')}}
{{if !empty($data['body_html'])}}
{{$data.body_html|raw}}
{{/if}}
<script type="text/javascript">
{{if isset($is_parent) and $is_parent eq 1}}
setTimeout(function()
{
if(self.frameElement && self.frameElement.tagName == "IFRAME")
{
parent.location.reload();
}else{
window.location.href='{{$home_url}}';
}
}, 1500);
{{else /}}
setTimeout(function()
{
window.location.href='{{$home_url}}';
}, 1500);
{{/if}}
</script>

View File

@ -0,0 +1,15 @@
{{if !empty($common_bottom_nav_list)}}
<ul class="mobile-navigation">
{{foreach $common_bottom_nav_list as $nav}}
<li {{if $controller_name.$action_name eq $nav['only_tag']}}class="active"{{/if}}>
<a {{if isset($nav['is_login']) and $nav['is_login'] eq 1 and empty($user)}}href="javascript:;" data-login-info="1" class="login-event am-block"{{else /}} href="{{$nav.url}}" class="am-block"{{/if}}>
<i class="iconfont {{$nav.icon}}{{if $controller_name.$action_name eq $nav['only_tag']}}-active{{/if}}"></i>
<p>{{$nav.name}}</p>
</a>
{{if isset($nav['badge']) and $nav['badge'] nheq null and $nav['badge'] gt 0}}
<span class="am-badge am-badge-danger am-round common-cart-total hot-icon">{{$nav.badge}}</span>
{{/if}}
</li>
{{/foreach}}
</ul>
{{/if}}

View File

@ -0,0 +1,87 @@
{{if MyC('home_main_logo_search_status', 1) eq 1}}
<!-- 搜索框 start -->
<div class="nav-search white am-hide-sm-only">
<div class="am-container">
<div class="logo-big theme-data-edit-event" data-module="site_base">
<a href="{{$home_url}}">
<img src="{{$home_site_logo}}" alt="{{$home_site_name}}" />
</a>
</div>
<!-- logo右侧 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_logo_right</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_logo_right_data) and is_array($plugins_view_common_logo_right_data)}}
{{foreach $plugins_view_common_search_right_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
<div class="search-bar">
<!-- 公共搜索框内左侧 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_search_inside_left</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_search_inside_left_data) and is_array($plugins_view_common_search_inside_left_data)}}
{{foreach $plugins_view_common_search_inside_left_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
<!-- 搜索框 -->
<form action="{{:MyUrl('index/search/index')}}" method="POST">
<div class="search-group am-radius am-nbfc">
<input id="search-input" name="wd" type="text" placeholder="{{:MyLang('common.search_input_placeholder')}}" value="{{if !empty($params['wd'])}}{{$params.wd}}{{/if}}" autocomplete="off" data-is-clearout="0" />
<button type="submit" id="ai-topsearch" class="submit am-btn-primary">
<span>{{:MyLang('common.search_button_text')}}</span>
</button>
</div>
{{if !empty($home_search_keywords)}}
<ul class="search-hot-keywords">
{{foreach $home_search_keywords as $v}}
<li><a href="{{:MyUrl('index/search/index', ['wd'=>StrToAscii($v)])}}" target="_blank">{{$v}}</a></li>
{{/foreach}}
</ul>
{{/if}}
</form>
<!-- 公共搜索框内右侧 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_search_inside_right</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_search_inside_right_data) and is_array($plugins_view_common_search_inside_right_data)}}
{{foreach $plugins_view_common_search_inside_right_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
<!-- 公共搜索框右侧 -->
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
<div class="plugins-tag">
<span>plugins_view_common_search_right</span>
</div>
{{/if}}
{{if !empty($plugins_view_common_search_right_data) and is_array($plugins_view_common_search_right_data)}}
{{foreach $plugins_view_common_search_right_data as $hook}}
{{if is_string($hook) or is_int($hook)}}
{{$hook|raw}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
</div>
<!-- 搜索框 end -->
{{/if}}

View File

@ -0,0 +1,9 @@
{{if !empty($module_data['nav_data']) and is_array($module_data['nav_data'])}}
<div class="nav-switch-btn">
{{foreach $module_data.nav_data as $k=>$v}}
{{if (!isset($v.is_show) or $v.is_show eq 1) and isset($v['key']) and isset($v['name'])}}
<a href="javascript:;" class="item {{if isset($module_data['index']) and $module_data.index eq $k or (!isset($module_data['index']) and $k eq 0)}}am-active{{/if}}" data-key="{{$v.key}}">{{$v.name}}</a>
{{/if}}
{{/foreach}}
</div>
{{/if}}

View File

@ -0,0 +1,25 @@
{{if !empty($module_data['nav_data']) and is_array($module_data['nav_data'])}}
<div class="nav-switch-tabs am-pr">
<ul>
{{foreach $module_data.nav_data as $v}}
<!-- 页面含有两级 -->
{{if !empty($module_data['view_type']) and isset($module_data['view_type'])}}
<li class="{{if $module_data['view_type'] eq $v['type']}}am-active{{/if}}" data-type="{{$v.type}}">
<a href="{{:MyUrl($module_data['url'], ['nav_type'=>$module_data['nav_type'], 'view_type'=>$v['type']])}}">{{$v.name}}</a>
</li>
{{else /}}
<!-- 页面只含有一级 -->
<li class="{{if $module_data['nav_type'] eq $v['type']}}am-active{{/if}}" data-type="{{$v.type}}">
<a href="{{:MyUrl($module_data['url'], ['type'=>$v['type']])}}">{{$v.name}}</a>
</li>
{{/if}}
{{/foreach}}
</ul>
{{if !empty($module_data['other']) and !empty($module_data['other_url'])}}
<a class="more-text" href="{{$module_data.other_url}}" target="_blank">
<i class="iconfont {{if empty($module_data['other_icon'])}}icon-download-btn{{else /}}{{$module_data.other_icon}}{{/if}}"></i>
<span class="am-hide-sm-only am-margin-left-xs">{{$module_data.other_name}} </span>
</a>
{{/if}}
</div>
{{/if}}

View File

@ -0,0 +1,4 @@
<div class="table-no am-radius">
<img src="{{if !empty($module_data) and !empty($module_data['icon'])}}{{$module_data.icon}}{{else /}}{{:StaticAttachmentUrl('no-data.png')}}{{/if}}" />
<p class="am-margin-top-sm">{{if !empty($module_data) and !empty($module_data['msg'])}}{{$module_data.msg}}{{else /}}{{:MyLang('no_data')}}{{/if}}</p>
</div>

View File

@ -0,0 +1,7 @@
<div class="am-modal am-page-loading" style="--loading-logo:url({{$page_loading_logo}});--loading-logo-border:url({{$page_loading_logo_border}});">
{{if isset($is_page_loading_images) and $is_page_loading_images eq 1 and !empty($page_loading_images_url)}}
<img src="{{$page_loading_images_url}}" />
{{else /}}
<div class="loading-logo-content"></div>
{{/if}}
</div>

View File

@ -0,0 +1,20 @@
{{if !empty($module_data['plugins']) and (!empty($module_data['title']) or (!empty($module_data['nav_data']) and is_array($module_data['nav_data'])))}}
<div class="nav-switch-tabs am-pr plugins-admin-nav-container {{$module_data.plugins}}">
{{if !empty($module_data['back_url'])}}
<a href="{{$module_data.back_url}}" class="form-nav-top-retreat am-fr am-text-lg">
<i class="iconfont icon-back"></i>
</a>
{{/if}}
{{if !empty($module_data['nav_data']) and is_array($module_data['nav_data'])}}
<ul>
{{foreach $module_data.nav_data as $v}}
<li {{if (isset($v['is_active']) and $v['is_active'] eq 1) or (!isset($v['is_active']) and !empty($plugins_controller_name) and !empty($plugins_action_name) and $plugins_controller_name.$plugins_action_name eq $v['control'].$v['action'])}}class="am-active"{{/if}}>
<a href="{{:PluginsHomeUrl(empty($v['plugins']) ? $module_data['plugins'] : $v['plugins'], $v['control'], $v['action'], empty($v['params']) ? [] : $v['params'])}}">{{$v.name}}</a>
</li>
{{/foreach}}
</ul>
{{else /}}
<span class="am-text-default">{{$module_data.title}}</span>
{{/if}}
</div>
{{/if}}

View File

@ -0,0 +1,9 @@
{{if !empty($module_data['plugins']) and !empty($module_data['nav_data']) and is_array($module_data['nav_data'])}}
<div class="nav-switch-btn plugins-admin-nav-btn-container {{$module_data.plugins}}">
{{foreach $module_data.nav_data as $k=>$v}}
{{if !isset($v.is_show) or $v.is_show eq 1}}
<a href="{{if empty($v['url'])}}javascript:;{{else /}}{{$v.url}}{{/if}}" class="item {{if (isset($params['type']) and isset($v['type']) and $params['type'] eq $v['type']) or (!empty($plugins_controller_name) and !empty($v['control']) and $plugins_controller_name eq $v['control']) or (!isset($params['type']) and isset($v['type']) and $k eq 0)}} am-active{{/if}}" data-key="{{if isset($v['type'])}}{{$v.type}}{{/if}}">{{$v.name}}</a>
{{/if}}
{{/foreach}}
</div>
{{/if}}

View File

@ -0,0 +1,37 @@
{{:ModuleInclude('public/header')}}
<!-- header nav start -->
{{if isset($is_header) and $is_header eq 1}}
<!-- header top nav -->
{{:ModuleInclude('public/header_top_nav')}}
<!-- search -->
{{:ModuleInclude('public/nav_search')}}
<!-- header nav -->
{{:ModuleInclude('public/header_nav')}}
<!-- goods category -->
{{:ModuleInclude('public/goods_category')}}
{{/if}}
<!-- header nav end -->
<!-- conntent start -->
<div class="am-g tips-error">
<div class="am-u-md-6 am-u-sm-centered am-text-center">
<i class="am-icon-times-circle am-icon-lg"></i>
<span class="msg">{{$msg}}</span>
<div class="tips-nav">
{{if !isset($is_to_home) or $is_to_home eq 1}}
<a href="{{$home_url}}" class="am-btn am-btn-warning am-btn-xs am-radius">{{:MyLang('common.back_to_the_home_title')}}</a>
{{/if}}
{{if !empty($to_url) and !empty($to_title)}}
<a href="{{$to_url}}" class="am-btn am-btn-primary am-btn-xs am-radius">{{$to_title}}</a>
{{/if}}
</div>
</div>
</div>
<!-- conntent end -->
<!-- footer -->
{{:ModuleInclude('public/footer')}}

View File

@ -0,0 +1,37 @@
{{:ModuleInclude('public/header')}}
<!-- header nav start -->
{{if isset($is_header) and $is_header eq 1}}
<!-- header top nav -->
{{:ModuleInclude('public/header_top_nav')}}
<!-- search -->
{{:ModuleInclude('public/nav_search')}}
<!-- header nav -->
{{:ModuleInclude('public/header_nav')}}
<!-- goods category -->
{{:ModuleInclude('public/goods_category')}}
{{/if}}
<!-- header nav end -->
<!-- conntent start -->
<div class="am-g tips-success">
<div class="am-u-md-6 am-u-sm-centered am-text-center">
<i class="am-icon-check-circle am-icon-lg"></i>
<span class="msg">{{$msg}}</span>
<div class="tips-nav">
{{if !isset($is_to_home) or $is_to_home eq 1}}
<a href="{{$home_url}}" class="am-btn am-btn-secondary am-radius">{{:MyLang('common.back_to_the_home_title')}}</a>
{{/if}}
{{if !empty($to_url) and !empty($to_title)}}
<a href="{{$to_url}}" class="am-btn am-btn-primary am-radius">{{$to_title}}</a>
{{/if}}
</div>
</div>
</div>
<!-- conntent end -->
<!-- footer -->
{{:ModuleInclude('public/footer')}}

View File

@ -0,0 +1,28 @@
{{if !empty($home_seo_site_title)}}
<div class="am-flex am-flex-items-center am-margin-bottom-main">
{{if !empty($module_data['operate_url']) and !empty($module_data['operate_name'])}}
<a href="{{$module_data['operate_url']}}" class="am-text-sm am-color-main">
{{if !empty($module_data['operate_icon'])}}
<i class="iconfont {{$module_data['operate_icon']}}"></i>
{{/if}}
<span>{{$module_data['operate_name']}}</span>
</a>
<em class="form-nav-top-retreat-ds am-color-grey-light am-text-sm am-margin-horizontal">|</em>
{{/if}}
<h1 class="user-center-main-title am-text-sm">
{{if empty($module_data['title'])}}
{{if empty($user_center_main_title)}}
{{if stripos($home_seo_site_title, ' - ') heq false}}
{{$home_seo_site_title}}
{{else /}}
{{:explode(' - ', $home_seo_site_title)[0]}}
{{/if}}
{{else /}}
{{$user_center_main_title}}
{{/if}}
{{else /}}
{{$module_data.title}}
{{/if}}
</h1>
</div>
{{/if}}

View File

@ -0,0 +1,87 @@
<!-- 用户中心菜单 -->
<div class="user-sidebar am-offcanvas" id="user-offcanvas">
<div class="am-offcanvas-bar user-offcanvas-bar am-padding-left-lg am-padding-right-xs am-padding-vertical-sm am-background-white am-radius">
<ul class="am-list user-sidebar-list am-margin-bottom-0 am-padding-bottom-0">
{{if !empty($user_left_menu) and is_array($user_left_menu)}}
{{foreach $user_left_menu as $k=>$v}}
{{if $v.is_show eq 1}}
{{if empty($v['item'])}}
<li class="{{if isset($v['contains']) and ((in_array(strtolower($module_name.$controller_name.$action_name), $v['contains']) and isset($v['is_system']) and $v['is_system'] eq 1) or (!empty($plugins_module_name) and !empty($plugins_controller_name) and !empty($plugins_action_name) and in_array(strtolower($plugins_module_name.$plugins_controller_name.$plugins_action_name), $v['contains']) and (!isset($v['is_system']) or $v['is_system'] neq 1)))}} am-active{{/if}}" >
<a href="{{$v.url}}">{{if !empty($v['icon'])}}<i class="iconfont {{$v.icon}}"></i>{{/if}} {{$v.name}}</a>
</li>
{{else /}}
<li>
<a class="am-cf user-item-parent" data-am-collapse="{target: '#collapse-nav-{{$k}}'}">{{if !empty($v['icon'])}}<i class="iconfont {{$v.icon}}"></i>{{/if}} {{$v.name}}</a>
<ul class="am-list am-collapse user-sidebar-sub am-in" id="collapse-nav-{{$k}}">
{{foreach $v.item as $vs}}
{{if $vs.is_show eq 1}}
<li class="{{if isset($vs['contains']) and ((in_array(strtolower($module_name.$controller_name.$action_name), $vs['contains']) and isset($vs['is_system']) and $vs['is_system'] eq 1) or (!empty($plugins_module_name) and !empty($plugins_controller_name) and !empty($plugins_action_name) and in_array(strtolower($plugins_module_name.$plugins_controller_name.$plugins_action_name), $vs['contains']) and (!isset($vs['is_system']) or $vs['is_system'] neq 1)))}} am-active{{/if}}">
<a href="{{$vs.url}}" class="am-cf">{{$vs.name}}</a>
</li>
{{/if}}
{{/foreach}}
</ul>
</li>
{{/if}}
{{/if}}
{{/foreach}}
{{/if}}
</ul>
</div>
</div>
<a href="javascript:;" class="am-icon-btn am-show-sm-only user-menu" data-am-offcanvas="{target: '#user-offcanvas'}">
<i class="iconfont icon-table-grid"></i>
</a>
<!-- 用户头像修改 -->
<div class="am-popup am-radius common-cropper-popup" id="user-avatar-popup">
<div class="am-popup-inner">
<div class="am-popup-hd meila-radius">
<h4 class="am-popup-title">{{:MyLang('common.avatar_upload_title')}}</h4>
<span data-am-modal-close class="am-close">&times;</span>
</div>
<div class="am-popup-bd">
<form class="am-form form-validation-user-avatar am-form-full-screen am-form-popup-fixed" action="{{:MyUrl('index/personal/useravatarupload')}}" method="POST" request-type="ajax-reload" enctype="multipart/form-data">
<div class="cropper-images-view">
<div class="img-container am-fl user-avatar-img-container">
<img src="{{:UserDefaultAvatar()}}" alt="Picture" />
</div>
<div class="img-preview preview-lg am-fl am-radius user-avatar-img-preview am-hide-sm-only"></div>
<div class="img-preview preview-md am-fl am-radius user-avatar-img-preview "></div>
<div class="img-preview preview-sm am-fl am-radius user-avatar-img-preview "></div>
<input type="hidden" name="img_x" id="user-avatar-img_x" />
<input type="hidden" name="img_y" id="user-avatar-img_y" />
<input type="hidden" name="img_width" id="user-avatar-img_width" />
<input type="hidden" name="img_height" id="user-avatar-img_height" />
<input type="hidden" name="img_rotate" id="user-avatar-img_rotate" />
</div>
<div class="submit-operation am-margin-top-xs">
<button type="button" class="am-btn am-btn-default am-fl am-icon-search-plus am-btn-xs am-radius" data-method="zoom" data-option="0.1"></button>
<div class="am-form-group am-form-file am-fl am-form-group-refreshing">
<button type="button" class="am-btn am-btn-default am-btn-xs am-radius cropper-input-images-submit">
<i class="am-icon-cloud-upload"></i> {{:MyLang('common.choice_images_text')}}</button>
<input type="file" name="file" multiple accept="image/gif,image/jpeg,image/jpg,image/png" data-validation-message="{{:MyLang('common.choice_images_error_tips')}}" required />
</div>
<button type="button" class="am-btn am-btn-default am-fl am-icon-search-minus am-btn-xs am-radius" data-method="zoom" data-option="-0.1"></button>
</div>
{{if is_array(MyLang('common.avatar_upload_tips'))}}
<div class="am-alert am-alert-secondary">
<p>{{:implode('</p><p>', MyLang('common.avatar_upload_tips'))}}</p>
</div>
{{/if}}
<div class="am-form-popup-submit">
<button type="button" class="am-btn am-btn-warning am-radius am-btn-xs am-margin-right-lg" data-am-modal-close>
<i class="am-icon-paint-brush"></i>
<span>{{:MyLang('cancel_title')}}</span>
</button>
<button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner: 'circle-o-notch', loadingText:'{{:MyLang('confirm_upload_title')}}'}">
<i class="am-icon-cloud-upload"></i>
<span>{{:MyLang('confirm_upload_title')}}</span>
</button>
</div>
</form>
</div>
</div>
</div>

View File

@ -1,4 +1,4 @@
{include file="public/head" /}
<?php echo ModuleInclude('public/header'); ?>
<style>
/* VR票务 - 票务商品详情页 */
@ -121,8 +121,8 @@
<div class="vr-ticket-page" id="vrTicketApp">
<!-- 商品头部 -->
<div class="vr-ticket-header">
<div class="vr-event-title">{$goods.title|default='VR演唱会'}</div>
<div class="vr-event-subtitle">{$goods.simple_desc|default=''}</div>
<div class="vr-event-title"><?php echo htmlspecialchars($goods['title'] ?? 'VR演唱会', ENT_QUOTES, 'UTF-8'); ?></div>
<div class="vr-event-subtitle"><?php echo htmlspecialchars($goods['simple_desc'] ?? '', ENT_QUOTES, 'UTF-8'); ?></div>
</div>
<!-- 场次选择 -->
@ -158,12 +158,12 @@
</div>
<!-- 商品详情(保留) -->
{if !empty($goods.content)}
<?php if (!empty($goods['content'])): ?>
<div class="vr-seat-section">
<div class="vr-section-title">演出详情</div>
<div class="goods-detail-content">{$goods.content}</div>
<div class="goods-detail-content"><?php echo $goods['content']; ?></div>
</div>
{/if}
<?php endif; ?>
<!-- 购买栏 -->
<div class="vr-purchase-bar">
@ -177,20 +177,20 @@
</div>
</div>
{include file="public/footer" /}
<?php echo ModuleInclude('public/footer'); ?>
<script>
(function() {
var app = {
goodsId: {$goods.id|default=0},
seatMap: {json_decode($vr_seat_template.seat_map|default='{}', true)|raw},
specBaseIdMap: {json_decode($vr_seat_template.spec_base_id_map|default='{}', true)|raw},
goodsId: <?php echo intval($goods['id'] ?? 0); ?>,
seatMap: <?php echo json_encode($vr_seat_template['seat_map'] ?? []); ?>,
specBaseIdMap: <?php echo json_encode($vr_seat_template['spec_base_id_map'] ?? []); ?>,
selectedSeats: [], // [{row, col, char, price, label, classes}]
soldSeats: {}, // {row_col: true}
currentSession: null,
sessionSpecId: null,
requestUrl: '{:Config("shopxo.host_url")}',
userId: {:IsMobileLogin()},
requestUrl: '<?php echo Config("shopxo.host_url"); ?>',
userId: <?php echo IsMobileLogin(); ?>,
init: function() {
this.renderSessions();
@ -200,7 +200,7 @@
// 渲染场次列表(基于 ShopXO spec 数据)
renderSessions: function() {
var specData = {$goods_spec_data|json_encode|raw} || [];
var specData = <?php echo json_encode($goods_spec_data ?? []); ?> || [];
var html = '';
if (specData.length > 0) {
specData.forEach(function(spec) {
@ -448,4 +448,4 @@
})();
</script>
{include file="public/footer_page" /}
<?php echo ModuleInclude('public/footer'); ?>