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 withdraw(CoinValidator $validate) { $params = request()->post(); $params = $validate->check($params,'withdraw'); if(!is_array($params)){ return message($params, false,[]); } if(!CoinLogService::make()->withdraw($this->userInfo['user_id'], $params)){ return message(CoinLogService::make()->getError(), false); }else{ return message(CoinLogService::make()->getError(), true); } } /** * 提币审核 * @return array */ public function confirm() { return message(1002, true); } }