## 1.24. User\_CommentCtl
./shop/controllers/User/CommentCtl.php 商品評價控制器
### 1.24.1. 商品評價首頁
#### 1.24.1.1. 請求URL
api.php?ctl=User\_Comment&met=index&typ=json
#### 1.24.1.2. 返回數據
~~~json
{
}
~~~
### 1.24.2. 商品評價管理界面
#### 1.24.2.1. 請求URL
api.php?ctl=User\_Comment&met=manage&typ=json
#### 1.24.2.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| product\_id | int | 產品id |
| item\_id | int | 商品id |
| order\_id | string | 訂單Id |
#### 1.24.2.3. 返回數據
~~~json
{
}
~~~
### 1.24.3. 加載更多的商品評論
#### 1.24.3.1. 請求URL
api.php?ctl=User\_Comment&met=loadMoreComment&typ=json
#### 1.24.3.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| product\_id | int | 產品id |
| item\_id | int | 商品id |
| order\_id | string | 商品id |
#### 1.24.3.3. 返回數據
~~~json
{
}
~~~
### 1.24.4. 商品評價列表數據
#### 1.24.4.1. 請求URL
api.php?ctl=User\_Comment&met=lists&typ=json
#### 1.24.4.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| page | int | 當前頁碼 |
| rows | int | 每頁記錄條數 |
| sidx | string | 排序字段 |
| sord | string | 排序方式: ASC | DESC |
#### 1.24.4.3. 返回數據
~~~json
{
}
~~~
### 1.24.5. 讀取商品評價
#### 1.24.5.1. 請求URL
api.php?ctl=User\_Comment&met=get&typ=json
#### 1.24.5.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| comment\_id | int | 評論ID |
| product\_id | int | 產品id |
| item\_id | int | 商品id |
| order\_id | string | 描述 |
#### 1.24.5.3. 返回數據
~~~json
{
}
~~~
### 1.24.6. 添加商品評價
#### 1.24.6.1. 請求URL
api.php?ctl=User\_Comment&met=add&typ=json
#### 1.24.6.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| order\_id | string | 訂單Id |
| product\_id | int | 產品id |
| item\_id | int | 商品id |
| comment\_scores | int | 評價星級1-5積分 |
| comment\_content | string | 評價內容 |
| comment\_image | array | 評論上傳的圖片:|分割多張圖片 |
#### 1.24.6.3. 返回數據
~~~json
{
}
~~~
### 1.24.7. 刪除商品評價
#### 1.24.7.1. 請求URL
api.php?ctl=User\_Comment&met=remove&typ=json
#### 1.24.7.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| comment\_id | string | ","分割 |
#### 1.24.7.3. 返回數據
~~~json
{
}
~~~
### 1.24.8. 修改商品評價
#### 1.24.8.1. 請求URL
api.php?ctl=User\_Comment&met=edit&typ=json
#### 1.24.8.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| comment\_id | string |
| order\_id | string | 訂單Id |
| product\_id | string | 產品id |
| item\_id | string | 商品id |
| store\_id | int | 賣家店鋪id-冗余 |
| store\_name | string | 店鋪名稱 |
| user\_id | int | 買家id |
| user\_name | string | 買家姓名 |
| comment\_points | float | 獲得積分-冗余,獨立表記錄 |
| comment\_scores | int | 評價星級1-5積分 |
| comment\_content | string | 評價內容 |
| comment\_image | string | 評論上傳的圖片:|分割多張圖片 |
| comment\_helpful | int | 有幫助 |
| comment\_nohelpful | int | 無幫助 |
| comment\_time | string | 評價時間 |
| comment\_is\_anonymous | int | 匿名評價 |
| comment\_enable | int | 評價信息的狀態(BOOL): 1-正常顯示; 0-禁止顯示 |
| comment\_store\_desc\_credit | int | 描述相符評分 - order\_buyer\_evaluation\_status , 評價狀態改變后不需要再次評論,根據訂單走 |
| comment\_store\_service\_credit | int | 服務態度評分 - order\_buyer\_evaluation\_status |
| comment\_store\_delivery\_credit | int | 發貨速度評分 - order\_buyer\_evaluation\_status |
#### 1.24.8.3. 返回數據
~~~json
{
}
~~~
- 開發文檔
- /輸出格式化處理
- /MySQL.md
- /tpl.md
- /locale.md
- /試衣鏡.md
- /note.md
- /api/shop.md
- Table of Content
- shop 項目
- 1.1. ActivityCtl
- 1.2. CartCtl
- 1.3. CategoryCtl
- 1.4. ChainCtl
- 1.5. ChooseIndustryCtl
- 1.6. Distribution_UserCtl
- 1.7. IndexCtl
- 1.8. JoinController
- 1.9. JoinCtl
- 1.10. LoginCtl
- 1.11. MediaCtl
- 1.12. PageCtl
- 1.13. PlatformController
- 1.14. PointController
- 1.15. PointCtl
- 1.16. ProductCtl
- 1.17. SitemapCtl
- 1.18. StoreController
- 1.19. StoreCtl
- 1.20. UrlCtl
- 1.21. User_AccountCtl
- 1.22. User_ActivityCtl
- 1.23. User_AskCtl
- 1.24. User_CommentCtl
- 1.25. User_DeliveryAddressCtl
- 1.26. User_FavoritesCtl
- 1.27. User_FeedbackCtl
- 1.28. User_InvoiceCtl
- 1.29. User_OrderCtl
- 1.30. User_ResourceCtl
- 1.31. User_ReturnCtl
- 1.32. User_VoucherCtl
- 1.33. UserCenterController
- 1.34. UserCtl
- 1.35. VerifyCodeCtl
- 1.36. WechatCallbackCtl
- /框架核心說明.md