## 1.16. ProductCtl
./shop/controllers/ProductCtl.php
### 1.16.1. 首頁
#### 1.16.1.1. 請求URL
api.php?ctl=Product&met=index&typ=json
#### 1.16.1.2. 返回數據
~~~json
{
}
~~~
### 1.16.2. 管理界面
#### 1.16.2.1. 請求URL
api.php?ctl=Product&met=manage&typ=json
#### 1.16.2.2. 返回數據
~~~json
{
}
~~~
### 1.16.3. 列表數據, 不論用戶是否登錄,收藏等等數據不做處理。
#### 1.16.3.1. 請求URL
api.php?ctl=Product&met=lists&typ=json
#### 1.16.3.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| category\_id | int | 描述 |
| store\_id | int | 描述 |
| brand\_id | int | 描述 |
| keyword | string | 描述 |
| keywords | string | 描述 |
| user\_cart\_quantity | int | 描述 |
#### 1.16.3.3. 返回數據
~~~json
{
}
~~~
### 1.16.4. 接口名稱
#### 1.16.4.1. 請求URL
api.php?ctl=Product&met=listName&typ=json
#### 1.16.4.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| category\_id | int | 描述 |
| store\_id | int | 描述 |
| brand\_id | int | 描述 |
#### 1.16.4.3. 返回數據
~~~json
{
}
~~~
### 1.16.5. 讀取
#### 1.16.5.1. 請求URL
api.php?ctl=Product&met=item&typ=json
#### 1.16.5.2. 返回數據
~~~json
{
}
~~~
### 1.16.6. 通過item\_id或者product\_id獲取商品詳情
#### 1.16.6.1. 請求URL
api.php?ctl=Product&met=detail&typ=json
#### 1.16.6.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| item\_id | int | 描述 |
| id | int | 描述 |
| product\_id | int | 描述 |
| id | int | 描述 |
| comment\_flag | int | 描述 |
#### 1.16.6.3. 返回數據
~~~json
{
}
~~~
### 1.16.7. 讀取
#### 1.16.7.1. 請求URL
api.php?ctl=Product&met=quick&typ=json
#### 1.16.7.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| item\_id | int | 描述 |
| id | int | 描述 |
| product\_id | int | 描述 |
| id | int | 描述 |
#### 1.16.7.3. 返回數據
~~~json
{
}
~~~
### 1.16.8. 讀取
#### 1.16.8.1. 請求URL
api.php?ctl=Product&met=info&typ=json
#### 1.16.8.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| item\_id | int | 描述 |
| id | int | 描述 |
#### 1.16.8.3. 返回數據
~~~json
{
}
~~~
### 1.16.9. 刪除操作
#### 1.16.9.1. 請求URL
api.php?ctl=Product&met=remove&typ=json
#### 1.16.9.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| product\_id | string | 描述 |
#### 1.16.9.3. 返回數據
~~~json
{
}
~~~
### 1.16.10. 修改
#### 1.16.10.1. 請求URL
api.php?ctl=Product&met=edit&typ=json
#### 1.16.10.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| product\_id | string | 產品id |
| product\_name | string | 產品名稱 |
| product\_tips | string | 商品廣告詞-商品賣點 |
| store\_id | int | 店鋪id |
| store\_name | string | 店鋪名稱 |
| product\_market\_price | float | 市場價 |
| product\_unit\_price | float | 商品單價 |
| product\_cost\_price | float | 成本價 |
| product\_number | string | 商品編號-貨號 |
| product\_barcode | string | 商品條形碼 |
| product\_image | string | 商品主圖 |
| product\_sale\_time | string | 預設上架時間-發布時間 |
| product\_is\_lock | int | 是否鎖定 - 參加團購的商品不予許修改 |
#### 1.16.10.3. 返回數據
~~~json
{
}
~~~
### 1.16.11. 接口名稱
#### 1.16.11.1. 請求URL
api.php?ctl=Product&met=manufacturer&typ=json
#### 1.16.11.2. 返回數據
~~~json
{
}
~~~
### 1.16.12. 接口名稱
#### 1.16.12.1. 請求URL
api.php?ctl=Product&met=compare&typ=json
#### 1.16.12.2. 返回數據
~~~json
{
}
~~~
### 1.16.13. 接口名稱
#### 1.16.13.1. 請求URL
api.php?ctl=Product&met=search&typ=json
#### 1.16.13.2. 返回數據
~~~json
{
}
~~~
### 1.16.14. 接口名稱
#### 1.16.14.1. 請求URL
api.php?ctl=Product&met=treeview&typ=json
#### 1.16.14.2. 返回數據
~~~json
{
}
~~~
### 1.16.15. 接口名稱
#### 1.16.15.1. 請求URL
api.php?ctl=Product&met=category&typ=json
#### 1.16.15.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| category\_id | int | 描述 |
| recursive | int | 描述 |
#### 1.16.15.3. 返回數據
~~~json
{
}
~~~
### 1.16.16. 接口名稱
#### 1.16.16.1. 請求URL
api.php?ctl=Product&met=brand&typ=json
#### 1.16.16.2. 返回數據
~~~json
{
}
~~~
### 1.16.17. 接口名稱
#### 1.16.17.1. 請求URL
api.php?ctl=Product&met=test&typ=json
#### 1.16.17.2. 返回數據
~~~json
{
}
~~~
### 1.16.18. 商品評價
#### 1.16.18.1. 請求URL
api.php?ctl=Product&met=comment&typ=json
#### 1.16.18.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| item\_id | int | 描述 |
| product\_id | int | 描述 |
| comment\_id | int | 描述 |
| page | int | 當前頁碼 |
| rows | int | 每頁記錄條數 |
| only\_has\_pic | int | 是否只加載包含圖片的評論 |
| sidx | string | 排序字段 |
| sord | string | 排序方式: ASC | DESC |
| comment\_type | int | 描述 |
#### 1.16.18.3. 返回數據
~~~json
{
}
~~~
### 1.16.19. 商品問答
#### 1.16.19.1. 請求URL
api.php?ctl=Product&met=faq&typ=json
#### 1.16.19.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| product\_id | int | 描述 |
| ask\_question | string | 描述 |
| page | int | 當前頁碼 |
| rows | int | 每頁記錄條數 |
| sidx | string | 排序字段 |
| sord | string | 排序方式: ASC | DESC |
#### 1.16.19.3. 返回數據
~~~json
{
}
~~~
### 1.16.20. 評論回復
#### 1.16.20.1. 請求URL
api.php?ctl=Product&met=addCommentReply&typ=json
#### 1.16.20.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| comment\_id | int | 描述 |
| text | string | 描述 |
#### 1.16.20.3. 返回數據
~~~json
{
}
~~~
### 1.16.21. 評論點贊
#### 1.16.21.1. 請求URL
api.php?ctl=Product&met=commentHelpful&typ=json
#### 1.16.21.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| comment\_id | int | 描述 |
#### 1.16.21.3. 返回數據
~~~json
{
}
~~~
### 1.16.22. 配送區域信息及運費
#### 1.16.22.1. 請求URL
api.php?ctl=Product&met=shippingDistrict&typ=json
#### 1.16.22.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| item\_id | int | 描述 |
| district\_id | int | 描述 |
| district\_ids | string | 描述 |
#### 1.16.22.3. 返回數據
~~~json
{
}
~~~
### 1.16.23. 接口名稱
#### 1.16.23.1. 請求URL
api.php?ctl=Product&met=getSpec&typ=json
#### 1.16.23.2. 請求參數
| 鍵值 | 類型 | 描述 |
| --- | --- | --- |
| product\_id | int | 描述 |
#### 1.16.23.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