商品规格


列表

<h5>简要描述</h5> <ul> <li>商品规格列表接口</li> </ul> <h5>请求URL</h5> <ul> <li><code>/api/admin/specs</code></li> </ul> <h5>请求方式</h5> <ul> <li>GET</li> </ul> <h5>请求头部</h5> <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;">Authorization  </td> <td style="text-align: left;"> 是  </td> <td style="text-align: left;">string</td> <td>JWT token      </td> </tr> </tbody> </table> <h5>Query 请求参数</h5> <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;">include        </td> <td style="text-align: left;"> 否  </td> <td style="text-align: left;">string</td> <td>追加额外关联数据:goodsType,items          </td> </tr> <tr> <td style="text-align: left;">name        </td> <td style="text-align: left;"> 否  </td> <td style="text-align: left;">string</td> <td>名称        </td> </tr> <tr> <td style="text-align: left;">limit        </td> <td style="text-align: left;"> 否  </td> <td style="text-align: left;">int</td> <td>条数        </td> </tr> </tbody> </table> <h5>返回参数说明</h5> <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;">goodsType    </td> <td style="text-align: left;"> 否  </td> <td style="text-align: left;">object</td> <td>所属的商品类型</td> </tr> <tr> <td style="text-align: left;">items    </td> <td style="text-align: left;"> 否  </td> <td style="text-align: left;">object</td> <td>商品规格的规格项</td> </tr> </tbody> </table> <h5>返回示例</h5> <ul> <li>状态码 200 请求成功</li> </ul> <pre><code>{ &amp;quot;data&amp;quot;: [ { &amp;quot;id&amp;quot;: 1, &amp;quot;goods_type_id&amp;quot;: 1, &amp;quot;name&amp;quot;: &amp;quot;存储容量&amp;quot;, &amp;quot;is_index&amp;quot;: 1, &amp;quot;sort&amp;quot;: 50, &amp;quot;created_at&amp;quot;: &amp;quot;2023-06-05T06:12:28.000000Z&amp;quot;, &amp;quot;updated_at&amp;quot;: &amp;quot;2023-06-05T06:12:28.000000Z&amp;quot;, &amp;quot;goodsType&amp;quot;: { &amp;quot;id&amp;quot;: 1, &amp;quot;name&amp;quot;: &amp;quot;手机&amp;quot;, &amp;quot;created_at&amp;quot;: &amp;quot;2023-06-05T06:12:28.000000Z&amp;quot;, &amp;quot;updated_at&amp;quot;: &amp;quot;2023-06-05T06:12:28.000000Z&amp;quot; }, &amp;quot;items&amp;quot;: { &amp;quot;data&amp;quot;: [ { &amp;quot;id&amp;quot;: 1, &amp;quot;spec_id&amp;quot;: 1, &amp;quot;name&amp;quot;: &amp;quot;128G&amp;quot; }, { &amp;quot;id&amp;quot;: 2, &amp;quot;spec_id&amp;quot;: 1, &amp;quot;name&amp;quot;: &amp;quot;256G&amp;quot; }, { &amp;quot;id&amp;quot;: 3, &amp;quot;spec_id&amp;quot;: 1, &amp;quot;name&amp;quot;: &amp;quot;512G&amp;quot; } ] } }, { &amp;quot;id&amp;quot;: 3, &amp;quot;goods_type_id&amp;quot;: 3, &amp;quot;name&amp;quot;: &amp;quot;颜色&amp;quot;, &amp;quot;is_index&amp;quot;: 0, &amp;quot;sort&amp;quot;: 50, &amp;quot;created_at&amp;quot;: &amp;quot;2023-06-05T06:12:28.000000Z&amp;quot;, &amp;quot;updated_at&amp;quot;: &amp;quot;2023-06-05T06:12:28.000000Z&amp;quot;, &amp;quot;goodsType&amp;quot;: { &amp;quot;id&amp;quot;: 3, &amp;quot;name&amp;quot;: &amp;quot;短袖&amp;quot;, &amp;quot;created_at&amp;quot;: &amp;quot;2023-06-05T06:12:28.000000Z&amp;quot;, &amp;quot;updated_at&amp;quot;: &amp;quot;2023-06-05T06:12:28.000000Z&amp;quot; }, &amp;quot;items&amp;quot;: { &amp;quot;data&amp;quot;: [ { &amp;quot;id&amp;quot;: 6, &amp;quot;spec_id&amp;quot;: 3, &amp;quot;name&amp;quot;: &amp;quot;红色&amp;quot; }, { &amp;quot;id&amp;quot;: 7, &amp;quot;spec_id&amp;quot;: 3, &amp;quot;name&amp;quot;: &amp;quot;蓝色&amp;quot; } ] } } ], &amp;quot;meta&amp;quot;: { &amp;quot;pagination&amp;quot;: { &amp;quot;total&amp;quot;: 3, &amp;quot;count&amp;quot;: 2, &amp;quot;per_page&amp;quot;: 2, &amp;quot;current_page&amp;quot;: 1, &amp;quot;total_pages&amp;quot;: 2, &amp;quot;links&amp;quot;: { &amp;quot;next&amp;quot;: &amp;quot;http://api.ying.com/api/admin/specs?include=goodsType%2Citems&amp;amp;limit=2&amp;amp;page=2&amp;quot; } } } }</code></pre>

页面列表

ITEM_HTML