This commit is contained in:
root 2019-11-24 23:38:19 +08:00
parent b37714cf3e
commit 4ba7024cb8
3 changed files with 7 additions and 4 deletions

View File

@ -30,8 +30,8 @@ class ConfigController extends Controller
'app_name' => config('v2board.app_name', 'V2Board'),
'app_url' => config('v2board.app_url'),
'subscribe_url' => config('v2board.subscribe_url'),
'plan_upgrade_fee' => config('v2board.plan_upgrade_fee', 0.5),
'plan_is_upgrade' => config('v2board.plan_is_upgrade', 1)
'plan_update_fee' => config('v2board.plan_update_fee', 0.5),
'plan_is_update' => config('v2board.plan_is_update', 1)
],
'pay' => [
// alipay

View File

@ -40,6 +40,7 @@ class OrderController extends Controller
abort(500, '订单不存在');
}
$order['plan'] = Plan::find($order->plan_id);
$order['upgrade_fee'] = config('v2board.upgrade_fee', 0.5);
if (!$order['plan']) {
abort(500, '订阅不存在');
}

View File

@ -17,8 +17,8 @@ class ConfigSave extends FormRequest
'app_name',
'app_url',
'subscribe_url',
'plan_upgrade_fee',
'plan_is_upgrade',
'plan_update_fee',
'plan_is_update',
// server
'server_token',
// alipay
@ -53,6 +53,8 @@ class ConfigSave extends FormRequest
'email_verify' => 'in:0,1',
'app_url' => 'url',
'subscribe_url' => 'url',
'plan_update_fee' => 'in:0,1',
'plan_is_update' => 'numeric',
// server
'server_token' => 'min:16',
// alipay