From 768663964b165b9ad0b702d4b054edfb254513f6 Mon Sep 17 00:00:00 2001 From: Seven Du Date: Wed, 28 Nov 2018 17:10:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=A0=B8=E5=BF=83):=20=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E7=A7=AF=E5=88=86=E8=AE=BE=E7=BD=AE=E5=9C=A8=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=8E=A5=E5=8F=A3=E7=9A=84=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #420 --- .../APIs/V2/BootstrappersController.php | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/APIs/V2/BootstrappersController.php b/app/Http/Controllers/APIs/V2/BootstrappersController.php index faa74c838..051044f2a 100644 --- a/app/Http/Controllers/APIs/V2/BootstrappersController.php +++ b/app/Http/Controllers/APIs/V2/BootstrappersController.php @@ -66,12 +66,25 @@ public function show(BootstrapAPIsEventer $events, AdvertisingSpace $space, Gold $bootstrappers['wallet:recharge'] = ['open' => config('wallet.recharge.status', true)]; $bootstrappers['wallet:transform'] = ['open' => config('wallet.transform.status', true)]; - $bootstrappers['currency:cash'] = [ - 'open' => setting('currency', 'cash')['status'] ?? true, - ]; - $bootstrappers['currency:recharge'] = [ - 'open' => setting('currency', 'recharge')['status'], + $bootstrapper['currency'] = [ 'IAP_only' => config('currency.recharge.IAP.only', true), + 'cash' => setting('currency', 'cash', [ + 'rule' => '我是提现规则', + 'status' => true, // 提现开关 + ]), + 'recharge' => setting('currency', 'recharge', [ + 'rule' => '我是积分充值规则', + 'status' => true, // 充值开关 + ]), + 'rule' => setting('currency', 'rule', '我是积分规则'), + 'settings' => setting('currency', 'settings', [ + 'recharge-ratio' => 1, + 'recharge-options' => '100,500,1000,2000,5000,10000', + 'recharge-max' => 10000000, + 'recharge-min' => 100, + 'cash-max' => 10000000, + 'cash-min' => 100, + ]), ]; $goldSetting = $goldType->where('status', 1)->select('name', 'unit')->first() ?? collect(['name' => '金币', 'unit' => '个']);