Browse Source

收藏店铺

master
Lemon 5 years ago
parent
commit
dabe8fbe7a
  1. 5
      app/Controller/v3/CollectStoreController.php
  2. 2
      app/Controller/v3/UserAddressController.php

5
app/Controller/v3/CollectStoreController.php

@ -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);
} }

2
app/Controller/v3/UserAddressController.php

@ -32,7 +32,7 @@ class UserAddressController extends BaseController
public function get() public function get()
{ {
$userAddressId = $this->request->input('$user_address_id');
$userAddressId = $this->request->input('user_address_id');
$res = $this->userAddressService->get($userAddressId); $res = $this->userAddressService->get($userAddressId);
return $this->success($res); return $this->success($res);
} }

Loading…
Cancel
Save