This commit is contained in:
尖叫 2023-12-01 11:17:03 +08:00
parent 657fddc0e0
commit faa7cd7413
2 changed files with 2 additions and 2 deletions

View File

@ -710,7 +710,7 @@ class UserController extends Controller
* @title 用户取消收藏
* @description 用户取消收藏
* @method get
* @url /api/user/user-collect
* @url /api/user/user-collect-del
* @param id 必选 string 对应收藏列表的ID
* @return {"code":0,"msg":"取消收藏成功","data":{}}
*/

View File

@ -126,7 +126,7 @@ class UserCollectForm extends ApiModel
return $this->apiReturnError('收藏的ID错误');
}
$model = UserCollect::findOne(['id' => $this->id]);
$model = UserCollect::findOne(['goods_id' => $this->id, 'user_id' => $this->user_id]);
if ($model == null) {
return $this->apiReturnError('收藏不存在');