Skip to content

Commit

Permalink
refactor(核心): 重构积分设置在启动接口的结构
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Nov 28, 2018
1 parent 7a633b8 commit 7686639
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions app/Http/Controllers/APIs/V2/BootstrappersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '']);
Expand Down

0 comments on commit 7686639

Please sign in to comment.