request->params([ [ 'status', '' ] ]); return success((new ShopApplyService())->getPage($data)); } /** * 店铺申请详情 * @return Response */ public function info($id) { return success((new ShopApplyService())->getInfo($id)); } /** * 添加店铺申请 * @return Response */ public function add() { $data = $this->request->params([ [ 'site_name', '' ], [ 'user_name', '' ], [ 'user_mobile', '' ], [ 'category_id', '' ], [ 'group_id', '' ], [ 'business_license', '' ], [ 'status', 1 ] ]); $this->validate($data, 'app\validate\shop\ShopApply.add'); $id = ( new ShopApplyService() )->add($data); return success('ADD_SUCCESS', [ 'id' => $id ]); } /** * 编辑店铺申请 * @param $id - 店铺申请id * @return Response */ public function edit($id) { $data = $this->request->params([ [ 'site_name', '' ], [ 'user_name', '' ], [ 'user_mobile', '' ], [ 'category_id', '' ], [ 'group_id', '' ], [ 'business_license', '' ], [ 'status', 1 ] ]); $this->validate($data, 'app\validate\shop\ShopApply.edit'); ( new ShopApplyService() )->edit($id, $data); return success('EDIT_SUCCESS'); } /** * 查询店铺分类列表 * @return Response */ public function shopCategory() { $data = $this->request->params([ [ 'category_name', '' ], ]); return success(( new ShopCategoryService() )->getList($data ,'category_id, category_name')); } /** * 查询店铺套餐列表 * @return Response */ public function siteGroup() { $data = $this->request->params([ [ 'group_name', '' ], ]); return success(( new SiteGroupService() )->getList($data ,'group_id, group_name')); } /** * 获取店铺申请协议内容 * @return Response */ public function agreement() { return success(( new AgreementService() )->getAgreement('apply')); } /** * 店铺申请状态 * @return Response */ public function statusList() { return success((new ShopApplyService())->getStatusList()); } }