GET /quote_feedback_tags/index.json
最後更新:2026-07-30
環境:Staging
進度:2 / 3
前端呼叫位置
- 操作:進入消費者商品訂單的評價頁,點「評價」或「編輯評價」。
web-app/modules/components/dashboard/shop/Feedbacks.js:94-102:開啟評價 Modal。web-app/modules/components/dashboard/shop/Feedbacks.js:126-145:Modal 載入 tag。web-app/modules/utils/api-manager.js:2607-2615:呼叫本 API。
測試前確認
| 項目 | Staging 狀態 |
|---|---|
| Endpoint 專用 config | 無 |
| API key | 必須存在於 Staging DB 且可用;本次已通過 guard |
| 語系 config | use_multi_translation、use_multi_langs、default_lang;部署值仍待核對 |
| PHP 8 instance | Response header 應有 x-php-env: php82-staging-*;本次證據尚未拍到 |
核心 smoke test
| # | 案例 | 預期 | 狀態 |
|---|---|---|---|
| 1 | 有效 API key 呼叫 index.json | HTTP 200;error=0;data 含分數 1~5 | 已通過 |
| 2 | 前端評價頁開啟 Modal | Network 出現本 API、HTTP 200,tag 可供評價 UI 使用 | 已通過 |
| 3 | 確認處理 instance | Response header 顯示 x-php-env: php82-staging-* | 待確認 |
Raw curl
STAGING_API_KEY 從 Staging 前端既有 request 或 Staging DB 的有效 api_keys row 取得;不可把實際值寫入文件。
curl -i \
-H 'Accept-Language: zh-TW' \
-H "X-PRO360-Rest-Api-Key: ${STAGING_API_KEY}" \
'https://api-staging.pro360.com.tw/quote_feedback_tags/index.json'預期:HTTP 200、JSON;error 是 number 0;data 是 object,包含字串 key 1~5;header 顯示 x-php-env: php82-staging-*。
2026-07-30 實測結果
Response body 與 Staging DB 的 active tag、is_satisfied ASC, display_order ASC 完全一致:
{
"error": 0,
"data": {
"1": ["專家服務差", "價格太高", "態度不佳", "其他"],
"2": ["服務品質需加強", "價格太高", "態度不佳", "其他"],
"3": ["服務品質普通", "價格問題", "溝通品質", "專業度", "其他"],
"4": ["技術優良", "價格公道", "溝通良好", "專業度高", "其他"],
"5": ["技術優良", "價格公道", "溝通良好", "專業度高", "其他"]
}
}前端實測截圖
2026-07-30,Staging 消費者商品訂單評價頁的 Network 顯示 GET /quote_feedback_tags/index.json 回 200 OK。

注意:截圖可確認前端 caller 與 HTTP 200;因畫面未顯示 x-php-env,處理 instance 仍列為待確認。