| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- // +----------------------------------------------------------------------
- // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
- // +----------------------------------------------------------------------
- // | 版权所有 2017~2021 LARAVEL研发中心
- // +----------------------------------------------------------------------
- // | 官方网站: http://www.laravel.cn
- // +----------------------------------------------------------------------
- // | Author: laravel开发员 <laravel.qq.com>
- // +----------------------------------------------------------------------
- namespace App\Http\Controllers\Admin;
- use App\Services\Common\StoreService;
- /**
- * 商户管理-控制器
- * @author laravel开发员
- * @since 2020/11/11
- * @package App\Http\Controllers
- */
- class StoreController extends Backend
- {
- /**
- * 构造函数
- * @author laravel开发员
- * @since 2020/11/11
- */
- public function __construct()
- {
- parent::__construct();
- $this->service = new StoreService();
- }
- public function index()
- {
- $pageSize = request()->get('limit', 15);
- $params = request()->all();
- $params['store_id'] = $this->storeId;
- return $this->service->getDataList($params, $pageSize);
- }
- /**
- * 获取详情
- * @return array
- */
- public function info()
- {
- return $this->service->info();
- }
- /**
- * 审核商家
- * @return array
- */
- public function confirm()
- {
- $params = request()->post();
- if ($this->service->confirm($this->userId, $params)) {
- return message($this->service->getError(), true);
- } else {
- return message($this->service->getError(), false);
- }
- }
- /**
- * 设置状态(禁用/启用)
- * @return array
- */
- public function status()
- {
- $params = request()->post();
- if ($this->service->setStatus($params)) {
- return message($this->service->getError(), true);
- } else {
- return message($this->service->getError(), false);
- }
- }
- /**
- * 选项列表
- * @return mixed
- */
- public function options()
- {
- $result = $this->service->options();
- return message(1002, true, $result);
- }
- }
|