mirror of
				https://github.com/v2board/v2board.git
				synced 2025-11-01 01:41:47 +08:00 
			
		
		
		
	update
This commit is contained in:
		| @@ -32,7 +32,7 @@ class ConfigController extends Controller | ||||
|                     'app_name' => config('v2board.app_name', 'V2Board'), | ||||
|                     'app_url' => config('v2board.app_url'), | ||||
|                     'subscribe_url' => config('v2board.subscribe_url'), | ||||
|                     'plan_is_update' => (int)config('v2board.plan_is_update', 1), | ||||
|                     'plan_change_enable' => (int)config('v2board.plan_change_enable', 1), | ||||
|                     'plan_transfer_hour' => config('v2board.plan_transfer_hour', 12), | ||||
|                     'try_out_enable' => (int)config('v2board.try_out_enable', 0), | ||||
|                     'try_out_plan_id' => (int)config('v2board.try_out_plan_id'), | ||||
|   | ||||
| @@ -122,7 +122,7 @@ class OrderController extends Controller | ||||
|         // renew and change subscribe process | ||||
|         if ($user->expired_at > time() && $order->plan_id !== $user->plan_id) { | ||||
|             $order->type = 3; | ||||
|             if (!(int)config('v2board.plan_is_update', 1)) abort(500, '目前不允许更改订阅,请联系管理员'); | ||||
|             if (!(int)config('v2board.plan_change_enable', 1)) abort(500, '目前不允许更改订阅,请联系管理员'); | ||||
|         } else if ($user->expired_at > time() && $order->plan_id == $user->plan_id) { | ||||
|             $order->type = 2; | ||||
|         } else { | ||||
|   | ||||
| @@ -17,7 +17,7 @@ class ConfigSave extends FormRequest | ||||
|         'app_url' => 'url', | ||||
|         'subscribe_url' => 'url', | ||||
|         'plan_transfer_hour' => 'numeric', | ||||
|         'plan_is_update' => 'in:0,1', | ||||
|         'plan_change_enable' => 'in:0,1', | ||||
|         'try_out_enable' => 'in:0,1', | ||||
|         'try_out_plan_id' => 'integer', | ||||
|         'try_out_hour' => 'numeric', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user