|
|
@ -22,10 +22,11 @@ class CollectStoreController extends BaseController |
|
|
$exists = $this->collectStoreService->check($params['user_id'],$params['store_id']); |
|
|
$exists = $this->collectStoreService->check($params['user_id'],$params['store_id']); |
|
|
//如果已收藏则删除
|
|
|
//如果已收藏则删除
|
|
|
if($exists){ |
|
|
if($exists){ |
|
|
$res = $this->collectStoreService->undo($params['user_id'],$params['store_id']); |
|
|
|
|
|
|
|
|
$this->collectStoreService->undo($params['user_id'],$params['store_id']); |
|
|
}else{ |
|
|
}else{ |
|
|
$res = $this->collectStoreService->do($params['user_id'],$params['store_id']); |
|
|
|
|
|
|
|
|
$this->collectStoreService->do($params['user_id'],$params['store_id']); |
|
|
} |
|
|
} |
|
|
|
|
|
$res = $this->collectStoreService->check($params['user_id'],$params['store_id']); |
|
|
return $this->success($res); |
|
|
return $this->success($res); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|