From 914bcd28c63d8d63d65f803b1995852b1b9e0c89 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 25 Nov 2019 00:38:40 +0800 Subject: [PATCH] update --- app/Http/Controllers/OrderController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 12064eb9..5c9c2ad8 100755 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -74,7 +74,7 @@ class OrderController extends Controller if ($user->expired_at > time() && $order->plan_id !== $user->plan_id) { $order->type = 3; if (!(int)config('v2board.plan_is_update', 1)) abort(500, '目前不允许更改订阅,请联系管理员'); - $order->total_amount = $order->total_amount + ((($user->expired_at - time()) / 86400) * config('v2board.plan_update_fee', 0.5) * 100); + $order->total_amount = $order->total_amount + ((($user->expired_at - strtotime(date('Y-m-d'))) / 86400) * config('v2board.plan_update_fee', 0.5) * 100); } else if ($user->expired_at > time() && $order->plan_id == $user->plan_id) { $order->type = 2; } else {