shop-api


获取分类下的商品

<p>[TOC]</p> <h5>简要描述</h5> <ul> <li>获取分类下商品接口</li> </ul> <h5>请求URL</h5> <ul> <li><code>http://127.0.0.1:12345/front/api/goods/cat/:catid</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>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">catid</td> <td style="text-align: left;">string</td> <td>商品分类的id</td> </tr> </tbody> </table> <h5>返回示例</h5> <pre><code> {     &amp;quot;error_code&amp;quot;: 200,     &amp;quot;msg&amp;quot;: &amp;quot;分类下商品查询成功!&amp;quot;,     &amp;quot;data&amp;quot;: {         &amp;quot;goods&amp;quot;: [             {                 &amp;quot;_id&amp;quot;: &amp;quot;64798a3c7ac38c31d6196bd1&amp;quot;,                 &amp;quot;goodsname&amp;quot;: &amp;quot;82年拉菲&amp;quot;,                 &amp;quot;price&amp;quot;: 500,                 &amp;quot;spec&amp;quot;: &amp;quot;500ml&amp;quot;,                 &amp;quot;goodsimg&amp;quot;: &amp;quot;/uploads/1685686844842.jpg&amp;quot;,                 &amp;quot;cat&amp;quot;: &amp;quot;6479867ca959208341233c2d&amp;quot;,                 &amp;quot;__v&amp;quot;: 0             },             {                 &amp;quot;_id&amp;quot;: &amp;quot;64798b4f7ac38c31d6196bd3&amp;quot;,                 &amp;quot;goodsname&amp;quot;: &amp;quot;牛奶&amp;quot;,                 &amp;quot;price&amp;quot;: 20,                 &amp;quot;spec&amp;quot;: &amp;quot;300ml&amp;quot;,                 &amp;quot;goodsimg&amp;quot;: &amp;quot;/uploads/1685687119282.jpg&amp;quot;,                 &amp;quot;cat&amp;quot;: &amp;quot;6479867ca959208341233c2d&amp;quot;,                 &amp;quot;__v&amp;quot;: 0             },             {                 &amp;quot;_id&amp;quot;: &amp;quot;64798b8d7ac38c31d6196bd7&amp;quot;,                 &amp;quot;goodsname&amp;quot;: &amp;quot;芬达&amp;quot;,                 &amp;quot;price&amp;quot;: 5,                 &amp;quot;spec&amp;quot;: &amp;quot;200ml&amp;quot;,                 &amp;quot;goodsimg&amp;quot;: &amp;quot;/uploads/1685687181434.jpg&amp;quot;,                 &amp;quot;cat&amp;quot;: &amp;quot;6479867ca959208341233c2d&amp;quot;,                 &amp;quot;__v&amp;quot;: 0             }         ]     } }</code></pre> <h5>返回参数说明</h5> <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;">error_code</td> <td style="text-align: left;">int</td> <td>状态,200:成功;非200:失败</td> </tr> <tr> <td style="text-align: left;">msg</td> <td style="text-align: left;">string</td> <td>状态描述</td> </tr> <tr> <td style="text-align: left;">data</td> <td style="text-align: left;">object</td> <td>响应的数据</td> </tr> </tbody> </table> <h5>备注</h5> <ul> <li>更多返回错误代码请看首页的错误代码描述</li> </ul>

页面列表

ITEM_HTML