service = new CoinLogService(); } /** * 获取列表 * @return array|mixed */ public function index() { $pageSize = request()->post('limit', 15); $params = request()->all(); if($this->userInfo['user_type'] == 2){ $params['business_id'] = $this->userInfo['user_id']; } $list = $this->service->getDataList($params, $pageSize); $message = array( "msg" => '操作成功', "code" => 0, "data" => isset($list['list'])? $list['list']:[], "count" => isset($list['total'])? $list['total']:0, ); return $message; } /** * 提币 * @return array */ public function transfer() { $params = request()->post(); if(!AdvertOrderService::make()->buy($this->userInfo['user_id'], $params)){ return message(AdvertOrderService::make()->getError(), false); }else{ return message(AdvertOrderService::make()->getError(), true); } } }