// +---------------------------------------------------------------------- namespace App\Http\Controllers\Admin; use App\Services\Common\TradeService; /** * 交易管理-控制器 * @author laravel开发员 * @since 2020/11/11 * Class TradeController * @package App\Http\Controllers */ class TradeController extends Backend { /** * 构造函数 * @author laravel开发员 * @since 2020/11/11 * TradeController constructor. */ public function __construct() { parent::__construct(); $this->service = new TradeService(); } public function index() { $params = request()->all(); $pageSize = isset($params['pageSize'])? $params['pageSize'] : 18; $list = TradeService::make()->getDataList($params, $pageSize); $message = array( "msg" => '操作成功', "code" => 0, "data" => isset($list['list'])? $list['list']:[], "count" => isset($list['total'])? $list['total']:0, ); return $message; } }