Exemplo n.º 1
0
 public function listDraw()
 {
     $status = Input::get('status', null);
     $per_page = Input::get('per_page', 10000000);
     try {
         $query = UsersDraw::with(['bank']);
         if (!empty($status)) {
             $query = $query->where('d_status', '=', (int) $status);
         }
         $list = $query->paginate($per_page);
         $data['rows'] = [];
         foreach ($list as $key => $draw) {
             $data['rows'][] = $draw->showInList();
         }
         $data['total'] = $list->getTotal();
         $re = Tools::reTrue('获取提现列表成功', $data, $list);
     } catch (Exception $e) {
         $re = Tools::reFalse($e->getCode(), '获取提现列表失败:' . $e->getMessage());
     }
     return Response::json($re);
 }
Exemplo n.º 2
0
 public function listWalletDraw()
 {
     $token = Input::get('token', '');
     $u_id = Input::get('u_id', 0);
     $per_page = Input::get('per_page', 30);
     try {
         $user = User::chkUserByToken($token, $u_id);
         $list = UsersDraw::with(['bank'])->where('u_id', '=', $u_id)->paginate($per_page);
         $data = [];
         foreach ($list as $key => $draw) {
             $data[] = $draw->showInList();
         }
         $re = Tools::reTrue('获取提现记录成功', $data);
     } catch (Exception $e) {
         $re = Tools::reFalse($e->getCode(), '获取提现记录失败:' . $e->getMessage());
     }
     return Response::json($re);
 }