兔姬桑 4 years ago
parent
commit
58970e6d60

+ 1 - 1
app/Http/Controllers/AdminController.php

@@ -47,7 +47,7 @@ class AdminController extends Controller
         $view['unActiveUserCount'] = User::whereEnable(1)->whereBetween('t', [1, $past,])->count(); // 不活跃用户数
         $view['onlineUserCount'] = User::where('t', '>=', strtotime("-10 minutes"))->count(); // 10分钟内在线用户数
         $view['expireWarningUserCount'] = User::whereBetween('expired_at',
-            [date('Y-m-d'), strtotime("+".sysConfig('expire_days')." days")])->count(); // 临近过期用户数
+            [date('Y-m-d'), date('Y-m-d', strtotime("+".sysConfig('expire_days')." days"))])->count(); // 临近过期用户数
         $view['largeTrafficUserCount'] = User::whereRaw('(u + d) >= 107374182400')->where('status', '<>', -1)->count(); // 流量超过100G的用户
 
         $view['flowAbnormalUserCount'] = count($this->trafficAbnormal());// 1小时内流量异常用户

+ 1 - 1
resources/lang/ja/home.php

@@ -52,7 +52,7 @@ return [
     'reason_traffic_exhausted'        => '利用可能なデータをすべて使用しました',
     'reason_overused'                 => '1時間あたりのデータ使用量がシステムの1時間あたりの制限に達しました',
     'reason_unknown'                  => '不明、チケットを開いてカスタマーサービスに依頼してください',
-    'never_logging'                   => '从未登',
+    'never_logging'                   => '从未登',
     'never_loggedin'                  => 'ログインされていない',
     'announcement'                    => 'お知らせ',
     'recharge_credit'                 => 'チャージ',

+ 2 - 2
resources/lang/zh-CN/home.php

@@ -37,7 +37,7 @@ return [
     'account_status'                  => '账号状态',
     'account_expire'                  => '套餐时长',
     'account_last_usage'              => '最近使用',
-    'account_last_login'              => '最近登',
+    'account_last_login'              => '最近登',
     'bandwidth'                       => '流量',
     'account_bandwidth_usage'         => '剩余流量',
     'account_total_traffic'           => '共计',
@@ -57,7 +57,7 @@ return [
     'reason_traffic_exhausted'        => '您的账号[剩余流量]消耗殆尽',
     'reason_overused'                 => '本时段使用流量超过 <code>:data</code> GB触发系统限制<br/> <code id="countdown">:min</code> 后解除限制',
     'reason_unknown'                  => '未知原因,请开工单联系管理',
-    'never_loggedin'                  => '从未登',
+    'never_loggedin'                  => '从未登',
     'announcement'                    => '公告',
     'recharge_credit'                 => '余额充值',
     'payment_method'                  => '充值方式',

+ 2 - 2
resources/lang/zh-tw/home.php

@@ -37,7 +37,7 @@ return [
     'account_status'                  => '狀態',
     'account_expire'                  => '有效期至',
     'account_last_usage'              => '最近使用',
-    'account_last_login'              => '最近登',
+    'account_last_login'              => '最近登',
     'account_bandwidth_usage'         => '流量',
     'account_total_traffic'           => '共計',
     'account_usage_traffic'           => '已使用',
@@ -54,7 +54,7 @@ return [
     'reason_traffic_exhausted'        => '您的賬號可用流量消耗殆盡',
     'reason_overused'                 => '您的流量小時流量超過了系統限制',
     'reason_unknown'                  => '未知,請開工單聯繫管理',
-    'never_loggedin'                  => '從未登',
+    'never_loggedin'                  => '從未登',
     'announcement'                    => '公告',
     'recharge_credit'                 => '餘額充值',
     'payment_method'                  => '充值管道',

+ 1 - 1
resources/views/admin/config/system.blade.php

@@ -197,7 +197,7 @@
                                             <label class="col-md-3 col-form-label" for="maintenance_mode">维护模式</label>
                                             <span class="col-md-9"><input type="checkbox" id="maintenance_mode" data-plugin="switchery" @if($maintenance_mode) checked
                                                                           @endif onchange="updateFromOther('switch','maintenance_mode')"></span>
-                                            <span class="text-help offset-md-3"> 启用后,用户访问转移至维护界面 </span>
+                                            <span class="text-help offset-md-3"> 启用后,用户访问转移至维护界面 | 管理员使用 <a href="javascript:(0)">{{route('admin.login')}}</a> 登录</span>
                                         </div>
                                     </div>
                                     <div class="form-group col-lg-6">

+ 3 - 2
resources/views/auth/login.blade.php

@@ -1,7 +1,7 @@
 @extends('auth.layouts')
 @section('title', trans('auth.login'))
 @section('content')
-    <form action="/login" method="post" id="login-form">
+    <form action="{{request()->routeIs('login', 'admin.login')? Request::url() : route('login')}}" method="post" id="login-form">
         @csrf
         @if($errors->any())
             <x-alert type="danger" :message="$errors->all()"/>
@@ -23,7 +23,8 @@
             <div class="form-group form-material floating input-group" data-plugin="formMaterial">
                 <input type="text" class="form-control" name="captcha"/>
                 <label class="floating-label" for="captcha">{{trans('auth.captcha')}}</label>
-                <img src="{{captcha_src()}}" class="float-right" onclick="this.src='/captcha/default?'+Math.random()" alt="{{trans('auth.captcha')}}"/>
+                <img src="{{captcha_src()}}" class="float-right" onclick="this.src='/captcha/default?'+Math.random()"
+                     alt="{{trans('auth.captcha')}}"/>
             </div>
             @break
             @case(2)<!-- Geetest -->

+ 1 - 1
routes/web.php

@@ -23,7 +23,7 @@ Route::middleware(['isForbidden', 'affiliate', 'isMaintenance'])->group(function
     Route::get('create/string', '\Illuminate\Support\Str@random')->name('createStr'); // 生成随机密码
     Route::get('create/uuid', '\Illuminate\Support\Str@uuid')->name('createUUID'); // 生成UUID
 });
-Route::any('admin/login', 'AuthController@login')->middleware('isForbidden', 'isSecurity'); // 管理登录
+Route::any('admin/login', 'AuthController@login')->name('admin.login')->middleware('isForbidden', 'isSecurity'); // 管理登录
 
 // 用户相关
 Route::middleware(['isForbidden', 'isMaintenance', 'isLogin'])->group(function () {