mirror of
https://github.com/v2board/v2board.git
synced 2025-01-10 08:09:10 +08:00
update: fix tryout speedlimit
This commit is contained in:
parent
e5fcec6a2a
commit
731a2b247a
@ -156,6 +156,7 @@ class AuthController extends Controller
|
||||
$user->plan_id = $plan->id;
|
||||
$user->group_id = $plan->group_id;
|
||||
$user->expired_at = time() + (config('v2board.try_out_hour', 1) * 3600);
|
||||
$user->speed_limit = $plan->speed_limit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,17 +2,12 @@
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Jobs\ServerLogJob;
|
||||
use App\Jobs\StatServerJob;
|
||||
use App\Jobs\StatUserJob;
|
||||
use App\Jobs\TrafficFetchJob;
|
||||
use App\Models\InviteCode;
|
||||
use App\Models\Order;
|
||||
use App\Models\Plan;
|
||||
use App\Models\ServerV2ray;
|
||||
use App\Models\Ticket;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class UserService
|
||||
{
|
||||
@ -33,9 +28,9 @@ class UserService
|
||||
}
|
||||
if ((int)$day >= (int)$today) {
|
||||
return $day - $today;
|
||||
} else {
|
||||
return $lastDay - $today + $day;
|
||||
}
|
||||
|
||||
return $lastDay - $today + $day;
|
||||
}
|
||||
|
||||
private function calcResetDayByYearFirstDay(): int
|
||||
|
Loading…
Reference in New Issue
Block a user