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