From b615da169e79cfbc831e30791ef30a1a57b46956 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Wed, 28 Aug 2024 11:55:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=8E=B0=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/WithdrawLogic.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/api/logic/WithdrawLogic.php b/app/api/logic/WithdrawLogic.php index d620ead7..2d7e9fdc 100755 --- a/app/api/logic/WithdrawLogic.php +++ b/app/api/logic/WithdrawLogic.php @@ -30,7 +30,7 @@ class WithdrawLogic extends Logic */ public static function config($user_id, $hide = '') { - + $hide_item = explode(',', $hide); $user = User::where('id', $user_id)->find(); $config = [ 'able_withdraw' => $user['earnings'] ? $user['earnings'] : 0, @@ -57,9 +57,15 @@ class WithdrawLogic extends Logic $a = $config['type'][0]; $config['type'][0] = $config['type'][1]; $config['type'][1] = $config['type'][2]; + dump($config);die; + foreach ($hide_item as &$v) { + if ($v == 'balance') { + unset($config['type'][2]); + } - if ($hide == 'balance') { - unset($config['type'][2]); + if ($v == 'bankCard') { + unset($config['type'][2]); + } } return $config;