[FIX] 修正與標準化 B005 廣告下載 API 以相容既有 Android App
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 1m7s

1. 修改 MachineController@getAdvertisements 回傳欄位,將 t070v02 改為播放秒數,t070v03 改為位置代碼 (Flag)。
2. 根據 Android App 原始碼分析結果,調整位置對應:3 為待機廣告 (HomeActivity),1 為販賣頁廣告 (FontendActivity)。
3. 在 AdvertisementController@getMachineAds 增加 sort_order 排序,確保後台管理介面視圖與 API 輸出順序一致。
4. 更新廣告下載 API 的技術文件 (SKILL.md),明確標記欄位用途與位置代碼。
5. 在 routes/api.php 補上 B005 與 B009 的路由定義。
This commit is contained in:
2026-04-07 11:41:24 +08:00
parent bbdc5bad9f
commit b60afc3abe
5 changed files with 166 additions and 11 deletions

View File

@@ -179,6 +179,7 @@ class AdvertisementController extends AdminController
{
$assignments = MachineAdvertisement::where('machine_id', $machine->id)
->with('advertisement')
->orderBy('sort_order', 'asc')
->get()
->groupBy('position');