1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- // +----------------------------------------------------------------------
- // | Niucloud-mall 企业快速开发的多应用管理平台
- // +----------------------------------------------------------------------
- // | 官方网址:https://www.niucloud.com
- // +----------------------------------------------------------------------
- // | niucloud团队 版权所有 开源版本可自由商用
- // +----------------------------------------------------------------------
- // | Author: Niucloud Team
- // +----------------------------------------------------------------------
- namespace app\api\controller\shop;
- use app\service\api\shop\ShopMemberService;
- use app\service\api\shop\ShopService;
- use core\base\BaseApiController;
- use think\Response;
- class Shop extends BaseApiController
- {
- /**
- * 店铺列表
- * @return Response
- */
- public function lists()
- {
- $data = $this->request->params([
- ['keyword', ''],
- ['group_id', ''],
- ['category_id', ''],
- ['is_self', ''],
- ]);
- return success((new ShopService())->getPage($data));
- }
- /**
- * 店铺列表
- * @return Response
- */
- public function all()
- {
- $data = $this->request->params([
- ['limit', 0],
- ]);
- return success((new ShopService())->getAll($data['limit']));
- }
- /**
- * 店铺详情
- * @param int $id
- * @return Response
- */
- public function info($id)
- {
- return success((new ShopService())->getInfo($id));
- }
- /**
- * 店铺关注
- * @return Response
- */
- public function follow($id, $is_follow)
- {
- (new ShopMemberService())->follow($id, $is_follow);
- return success('SUCCESS');
- }
- }
|