star-cloud/config/ui_parts.php
terrylee b9a82235aa feat(app-ui): Phase3 後台 — 支援 color 型部位(色票選擇器)+ 新增 BG0整頁背景/C0底色/T0文字色
- config 加 background/bgcolor/textcolor 群組 + BG0(image)/C0/T0(color)
- 內容設定頁 color 型渲染勾選套用+色票(input color);updateBundleContent 存 color_value
- B014 下發 color 型已支援(不需改)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 13:34:20 +08:00

65 lines
4.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/*
|--------------------------------------------------------------------------
| APP UI 部位定義(比照舊後台 unibuy 的「類別」代碼)
|--------------------------------------------------------------------------
|
| 每個部位 = 機台 App 上一個可由後台換膚的位置。
| key 部位代碼(沿用舊後台,如 A1/A2/A3= ui_elements.part_key
| label 後台顯示名稱
| group 分類(僅用於後台排版分區)
| type image = 選一張 UI 元素圖片color = 選一個色值C/T 系列Phase 3
| width 建議上傳寬度px
| height 建議上傳高度px
| active 是否已在本階段啟用Phase 1 僅開 A1/A2/A3 滿版狀態頁)
|
| 擴充方式:後續階段把對應部位 active 改 true 並在 App 端對照表補上 view 即可,
| 後台/下發邏輯不需改動(一律以本表 active=true 的部位為準)。
|
*/
return [
// 群組定義(決定內容設定頁的分塊標題與順序;未列到的群組排最後)
'groups' => [
'fullscreen' => '滿版畫面A 系列)',
'transaction' => '交易結果E 系列)',
'payment' => '支付方式P 系列)',
'background' => '整頁背景',
'bgcolor' => '背景色C 系列)',
'textcolor' => '文字色T 系列)',
],
'parts' => [
// === A 系列:滿版 / 大圖背景 ===
'A1' => ['label' => 'A1 - 頁面跳轉中', 'group' => 'fullscreen', 'type' => 'image', 'width' => 1080, 'height' => 1920, 'active' => true],
'A2' => ['label' => 'A2 - 機台自檢中', 'group' => 'fullscreen', 'type' => 'image', 'width' => 1080, 'height' => 1920, 'active' => true],
'A3' => ['label' => 'A3 - 機台異常鎖定', 'group' => 'fullscreen', 'type' => 'image', 'width' => 1080, 'height' => 1920, 'active' => true],
// === E 系列:交易結果 ===
'E1' => ['label' => 'E1 - 交易失敗/客服圖', 'group' => 'transaction', 'type' => 'image', 'width' => 720, 'height' => 1280, 'active' => true],
// === P 系列支付方式按鈕圖width/height=建議尺寸提示crop=false 不裁切、保留原比例)===
'P1' => ['label' => 'P1 - 信用卡支付', 'group' => 'payment', 'type' => 'image', 'width' => 838, 'height' => 155, 'crop' => false, 'active' => true],
'P2' => ['label' => 'P2 - 卡片/電子票證', 'group' => 'payment', 'type' => 'image', 'width' => 704, 'height' => 159, 'crop' => false, 'active' => true],
'P3' => ['label' => 'P3 - 玉山掃碼支付', 'group' => 'payment', 'type' => 'image', 'width' => 579, 'height' => 282, 'crop' => false, 'active' => true],
'P4' => ['label' => 'P4 - 手機支付', 'group' => 'payment', 'type' => 'image', 'width' => 684, 'height' => 169, 'crop' => false, 'active' => true],
'P5' => ['label' => 'P5 - 現金支付', 'group' => 'payment', 'type' => 'image', 'width' => 846, 'height' => 266, 'crop' => false, 'active' => true],
'P6' => ['label' => 'P6 - TapPay 掃碼', 'group' => 'payment', 'type' => 'image', 'width' => 579, 'height' => 282, 'crop' => false, 'active' => true],
// === 整頁背景image滿版裁切===
'BG0' => ['label' => 'BG0 - 整頁背景(待機/銷售頁)', 'group' => 'background', 'type' => 'image', 'width' => 1080, 'height' => 1920, 'active' => true],
// === C 系列背景色color===
'C0' => ['label' => 'C0 - 機台資訊列底色', 'group' => 'bgcolor', 'type' => 'color', 'active' => true],
// === T 系列文字色color===
'T0' => ['label' => 'T0 - 機台資訊列文字色', 'group' => 'textcolor', 'type' => 'color', 'active' => true],
// --- 以下為舊後台既有部位Phase 2+ 逐步啟用active=false 時後台不顯示、不下發)---
'A4' => ['label' => 'A4 - 對話框標頭', 'group' => 'fullscreen', 'type' => 'image', 'width' => 1080, 'height' => 192, 'active' => false],
'A7' => ['label' => 'A7 - 購買頁廣告底圖', 'group' => 'fullscreen', 'type' => 'image', 'width' => 1080, 'height' => 620, 'active' => false],
'A8' => ['label' => 'A8 - 來店廣告底圖', 'group' => 'fullscreen', 'type' => 'image', 'width' => 864, 'height' => 648, 'active' => false],
],
];