This commit is contained in:
root 2019-11-24 23:21:29 +08:00
parent 82146a79b8
commit b37714cf3e
3 changed files with 7 additions and 1 deletions

View File

@ -29,7 +29,9 @@ class ConfigController extends Controller
'email_verify' => (int)config('v2board.email_verify', 0),
'app_name' => config('v2board.app_name', 'V2Board'),
'app_url' => config('v2board.app_url'),
'subscribe_url' => config('v2board.subscribe_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)
],
'pay' => [
// alipay

View File

@ -72,6 +72,8 @@ class OrderController extends Controller
$order->total_amount = $plan[$request->input('cycle')];
if ($user->expired_at > time() && $order->plan_id !== $user->plan_id) {
$order->type = 3;
if ($plan->transfer_enable * 1073741824 < $user->transfer_enable) abort(500, '目前仅允许升级订阅计划');
} else if ($user->expired_at > time() && $order->plan_id == $user->plan_id) {
$order->type = 2;
} else {

View File

@ -17,6 +17,8 @@ class ConfigSave extends FormRequest
'app_name',
'app_url',
'subscribe_url',
'plan_upgrade_fee',
'plan_is_upgrade',
// server
'server_token',
// alipay