1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- // +----------------------------------------------------------------------
- // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
- // +----------------------------------------------------------------------
- // | Author: 萤火科技 <admin@yiovo.com>
- // +----------------------------------------------------------------------
- declare (strict_types = 1);
- namespace app\api\controller\providers;
- use app\api\controller\Controller;
- use app\store\model\Shops;
- /**
- * 对外提供的接口服务
- * Class OutServices
- * @package app\api\controller\balance
- */
- class OutServices extends Controller
- {
- /**
- * 余额账单明细列表
- * @return array
- * @throws \app\common\exception\BaseException
- * @throws \think\db\exception\DbException
- */
- public function add()
- {
- $model = new Shops();
- $data = $model->add($this->postData(),true);
- if ($data) {
- return $this->renderSuccess($data,'添加成功');
- }
- return $this->renderError($model->getError());
- }
- /**
- * 编辑门店
- * @return array|\think\response\Json
- */
- public function edit(){
- $model = new Shops();
- if ($model->edit($this->postData())) {
- return $this->renderSuccess('编辑成功');
- }
- return $this->renderError($model->getError() ?: '编辑失败');
- }
- }
|