收藏,取消收藏
<h3>请求路由url</h3>
<p>/api/collect/add</p>
<h3>请求方式</h3>
<p>post|get</p>
<h3>请求参数</h3>
<table>
<thead>
<tr>
<th style="text-align: center;"><strong> 参数 </strong></th>
<th style="text-align: center;"><strong> 说明 </strong></th>
<th style="text-align: center;"><strong> 类型 </strong></th>
<th style="text-align: center;"><strong> 是否必要 </strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">token</td>
<td style="text-align: center;">登录时返回的token</td>
<td style="text-align: center;">string</td>
<td style="text-align: center;">是</td>
</tr>
<tr>
<td style="text-align: center;">goods_id</td>
<td style="text-align: center;">商品id</td>
<td style="text-align: center;">int</td>
<td style="text-align: center;">是</td>
</tr>
<tr>
<td style="text-align: center;">store_id</td>
<td style="text-align: center;">商品所属商家id</td>
<td style="text-align: center;">int</td>
<td style="text-align: center;">是</td>
</tr>
</tbody>
</table>
<h3>请求结果</h3>
<pre><code class="language-json">{
"code": 1,
"msg": "操作成功",
"time": "1642211407",
"data": {
"collect": 1//1表示成功收藏,0表示取消收藏
}
}</code></pre>
<h3>备注</h3>