类目下商品列表
<p><strong>简要描述:</strong> </p>
<ul>
<li>类目下商品列表</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/cli/commodities</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>get </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">category_id</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>类目ID</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code> {
"result": "success",
"data": {
"current_page": 1,
"data": [
{
"id": 145,
"price": 3,
"stock": 3,
"event_start_at": "2018-08-03 00:00:00",
"event_end_at": "2018-08-24 00:00:00",
"code": "d237bb8a68ec5083",
"created_at": "2018-08-03 10:38:49",
"name": "33",
"event_price": 2,
"is_distribute": 1,
"distribute_bonus": 3,
"status": "publish",
"poster": "http://weteach-stage.ufile.ucloud.com.cn/goods/1533263888746.jpg",
"pre_sale": 1,
"open_redeem_code": 1,
"course": {
"id": 48,
"name": "测试连带商品3号",
"cover": "http://weteach-stage.ufile.ucloud.com.cn/default-cover.png",
"brief": "<p>kkkkkkkkkkkkkkkkkk</p>",
"status": "publish",
"created_at": "2018-08-02 17:28:31",
"code": "cfe0848faa134d5c",
"qr_path": null,
"total_lesson": 22,
"quiz_type": "正常模式",
"teachers": [
{
"id": 3,
"name": "Paul",
"avatar": "http://weteach-stage.ufile.ucloud.com.cn/teacher/1532685537436.png",
"brief": "必填项"
}
],
"lesson_count": 20
},
"is_in_event": true
},
{
"id": 160,
"price": 32,
"stock": 32,
"event_start_at": "2018-08-03 00:00:00",
"event_end_at": "2018-09-01 00:00:00",
"code": "af22455bf745c776",
"created_at": "2018-08-03 18:37:27",
"name": "官方",
"event_price": 3,
"is_distribute": 1,
"distribute_bonus": 32,
"status": "draft",
"poster": "http://weteach-stage.ufile.ucloud.com.cn/goods/1533292637226.png",
"pre_sale": 1,
"open_redeem_code": 0,
"course": {
"id": 46,
"name": "测试连带商品1号",
"cover": "http://weteach-stage.ufile.ucloud.com.cn/default-cover.png",
"brief": "舒服舒服",
"status": "publish",
"created_at": "2018-08-02 17:27:39",
"code": "6091bd008a32a8f2",
"qr_path": null,
"total_lesson": 23,
"quiz_type": "正常模式",
"teachers": [
{
"id": 5,
"name": "Zoe",
"avatar": "http://weteach-stage.ufile.ucloud.com.cn/teacher/1532685514629.png",
"brief": "测试测试"
}
],
"lesson_count": 0
},
"is_in_event": true
}
],
"first_page_url": "http://localhost:82/api/cli/commodities?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://localhost:82/api/cli/commodities?page=1",
"next_page_url": null,
"path": "http://localhost:82/api/cli/commodities",
"per_page": 20,
"prev_page_url": null,
"to": 2,
"total": 2
},
"message": "操作成功"
}</code></pre>
<p><strong>返回参数说明</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">groupid</td>
<td style="text-align: left;">int</td>
<td>用户组id,1:超级管理员;2:普通用户</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>
<p>欢迎使用ShowDoc!</p>