- Introduced a new view component for product hardware hero section (_ProductHardwarePrHero.cshtml) that displays product details including titles, features, and a copy with expandable text. - Created a homepage hero products component (Default.cshtml) to showcase the first product in a list and provide navigation dots for additional products. - Added a placeholder for when no products are available, guiding users to set products in the backend. - Included a new image asset (vehicle-transportation.png) for use in the product hero section.
2.0 KiB
2.0 KiB
操作備忘錄(通用)
用途
本文件用於記錄「部署或資料調整時不可漏掉的操作步驟」。 不限定分類調整,後續所有會影響既有資料或上線流程的改動都追加在此。
2026-05-03 ~ 2026-05-05:分類骨架調整與首頁資料前置
執行目標
- 建立新分類骨架:
Hardware、Software、AI Application(6 子類)、Books(3 子類) - 補齊分類中文多語系
- 處理舊
Software子類別清理 - 保留可回滾資料
SQL 檔案
- category-restructure-20260503.sql
- category-delete-legacy-software-children-20260503.sql
- category-localization-backfill-tw-20260503.sql
操作重點
- 先執行分類重構 SQL,再執行舊子類清理 SQL。
- 語系代碼需支援
tw,否則中文多語系不會落地。 Software下舊子類刪除邏輯已改為「依父節點刪除」,不再依名稱比對。- 刪除前會備份
Category、Product_Category_Mapping、LocalizedProperty、UrlRecord到備份表。
手動設定
- 後台手動調整分類顯示順序:
Hardware = 10、Software = 20。 - 前台若未即時反映中文名稱,需清除應用程式快取。
驗證項目
AI Application下應有 6 個子類。Books下應有 3 個子類(英文預設名,中文靠多語系)。Software下子類應為空(新骨架目標)。- 13 個目標分類的中文多語系需存在於
LocalizedProperty。
回滾原則
- 先恢復分類可見性或重新建立父子關係。
- 若資料已刪除,從備份表回補
Category、Product_Category_Mapping、LocalizedProperty、UrlRecord。