|
|
@@ -53,13 +53,20 @@ class Wallet extends Controller
|
|
|
*/
|
|
|
function getPendingTasks()
|
|
|
{
|
|
|
- if(MenuService::checkMenu(request()->user->id,'')){
|
|
|
-
|
|
|
+ $data = [
|
|
|
+ 'recharge_task' => 0,
|
|
|
+ 'withdraw_task' => 0,
|
|
|
+ 'rmb_withdraw_task' => 0,
|
|
|
+ ];
|
|
|
+ if (MenuService::checkMenu(request()->user->id, 'withdraw/topUp')) {
|
|
|
+ $data['recharge_task'] = Recharge::where('type', 2)->where('status', 0)->count();
|
|
|
+ }
|
|
|
+ if (MenuService::checkMenu(request()->user->id, 'listUSDT')) {
|
|
|
+ $data['withdraw_task'] = Withdraw::where('status', 0)->count();
|
|
|
+ }
|
|
|
+ if (MenuService::checkMenu(request()->user->id, 'listRMB')) {
|
|
|
+ $data['rmb_withdraw_task'] = PaymentOrder::where('type', 2)->where('status', 0)->count();
|
|
|
}
|
|
|
- $data['recharge_task'] = Recharge::where('type', 2)->where('status', 0)->count();
|
|
|
- $data['withdraw_task'] = Withdraw::where('status', 0)->count();
|
|
|
- $data['rmb_withdraw_task'] = PaymentOrder::where('type', 2)->where('status', 0)->count();
|
|
|
-
|
|
|
return $this->success($data);
|
|
|
}
|
|
|
|