mirror of
https://github.com/v2board/v2board.git
synced 2024-11-13 11:09:11 +08:00
update
This commit is contained in:
parent
82146a79b8
commit
b37714cf3e
@ -29,7 +29,9 @@ class ConfigController extends Controller
|
|||||||
'email_verify' => (int)config('v2board.email_verify', 0),
|
'email_verify' => (int)config('v2board.email_verify', 0),
|
||||||
'app_name' => config('v2board.app_name', 'V2Board'),
|
'app_name' => config('v2board.app_name', 'V2Board'),
|
||||||
'app_url' => config('v2board.app_url'),
|
'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' => [
|
'pay' => [
|
||||||
// alipay
|
// alipay
|
||||||
|
@ -72,6 +72,8 @@ class OrderController extends Controller
|
|||||||
$order->total_amount = $plan[$request->input('cycle')];
|
$order->total_amount = $plan[$request->input('cycle')];
|
||||||
if ($user->expired_at > time() && $order->plan_id !== $user->plan_id) {
|
if ($user->expired_at > time() && $order->plan_id !== $user->plan_id) {
|
||||||
$order->type = 3;
|
$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) {
|
} else if ($user->expired_at > time() && $order->plan_id == $user->plan_id) {
|
||||||
$order->type = 2;
|
$order->type = 2;
|
||||||
} else {
|
} else {
|
||||||
|
@ -17,6 +17,8 @@ class ConfigSave extends FormRequest
|
|||||||
'app_name',
|
'app_name',
|
||||||
'app_url',
|
'app_url',
|
||||||
'subscribe_url',
|
'subscribe_url',
|
||||||
|
'plan_upgrade_fee',
|
||||||
|
'plan_is_upgrade',
|
||||||
// server
|
// server
|
||||||
'server_token',
|
'server_token',
|
||||||
// alipay
|
// alipay
|
||||||
|
Loading…
Reference in New Issue
Block a user