1
0
Эх сурвалжийг харах

增加一些国家/地区图标

zhangjiangbin 8 жил өмнө
parent
commit
87a429b997

+ 1 - 1
app/Console/Commands/AutoStatisticsNodeDailyTrafficJob.php

@@ -11,7 +11,7 @@ use Log;
 class AutoStatisticsNodeDailyTrafficJob extends Command
 {
     protected $signature = 'command:autoStatisticsNodeDailyTrafficJob';
-    protected $description = '节点每日流量自动统计';
+    protected $description = '自动统计节点每日流量';
 
     public function __construct()
     {

+ 1 - 1
app/Console/Commands/AutoStatisticsNodeHourlyTrafficJob.php

@@ -11,7 +11,7 @@ use Log;
 class AutoStatisticsNodeHourlyTrafficJob extends Command
 {
     protected $signature = 'command:autoStatisticsNodeHourlyTrafficJob';
-    protected $description = '节点每小时流量自动统计';
+    protected $description = '自动统计节点每小时流量';
 
     public function __construct()
     {

+ 1 - 1
app/Console/Commands/AutoStatisticsUserDailyTrafficJob.php

@@ -12,7 +12,7 @@ use Log;
 class AutoStatisticsUserDailyTrafficJob extends Command
 {
     protected $signature = 'command:autoStatisticsUserDailyTrafficJob';
-    protected $description = '用户每日流量自动统计';
+    protected $description = '自动统计用户每日流量';
 
     public function __construct()
     {

+ 1 - 1
app/Console/Commands/AutoStatisticsUserHourlyTrafficJob.php

@@ -12,7 +12,7 @@ use Log;
 class AutoStatisticsUserHourlyTrafficJob extends Command
 {
     protected $signature = 'command:autoStatisticsUserHourlyTrafficJob';
-    protected $description = '用户每小时流量自动统计';
+    protected $description = '自动统计用户每小时流量';
 
     public function __construct()
     {

+ 1 - 1
app/Console/Commands/UserExpireWarningJob.php

@@ -13,7 +13,7 @@ use Log;
 class UserExpireWarningJob extends Command
 {
     protected $signature = 'command:userExpireWarningJob';
-    protected $description = '用户到期自动发邮件提醒';
+    protected $description = '自动发邮件提醒用户临近到期';
 
     protected static $config;
 

+ 1 - 1
app/Console/Commands/UserTrafficWarningJob.php

@@ -13,7 +13,7 @@ use Log;
 class UserTrafficWarningJob extends Command
 {
     protected $signature = 'command:userTrafficWarningJob';
-    protected $description = '用户流量警告自动发邮件提醒';
+    protected $description = '自动发邮件提醒用户流量超过警告阈值';
 
     protected static $config;
 

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

@@ -44,13 +44,13 @@ class AdminController extends BaseController
     public function index(Request $request)
     {
         $past = strtotime(date('Y-m-d', strtotime("-" . self::$config['expire_days'] . " days")));
-        $online = time() - 1800;
+        $online = time() - 120;
 
         $view['userCount'] = User::query()->count();
         $view['activeUserCount'] = User::query()->where('t', '>=', $past)->count();
         $view['onlineUserCount'] = User::query()->where('t', '>=', $online)->count();
         $view['nodeCount'] = SsNode::query()->count();
-        $flowCount = UserTrafficLog::query()->sum('u') + UserTrafficLog::query()->sum('d');
+        $flowCount = SsNodeTrafficDaily::query()->where('created_at', '>=', date('Y-m-d 00:00:00', strtotime("-30 days")))->sum('total');
         $flowCount = $this->flowAutoShow($flowCount);
         $view['flowCount'] = $flowCount;
         $view['totalBalance'] = User::query()->sum('balance') / 100;

BIN
public/assets/images/country/bg.png


BIN
public/assets/images/country/co.png


BIN
public/assets/images/country/ke.png


BIN
public/assets/images/country/lt.png


BIN
public/assets/images/country/mo.png


+ 4 - 4
resources/views/admin/index.blade.php

@@ -21,7 +21,7 @@
                             <h3 class="font-green-soft">
                                 <span data-counter="counterup" data-value="{{$userCount}}"></span>
                             </h3>
-                            <small>账号</small>
+                            <small>用户</small>
                         </div>
                         <div class="icon">
                             <i class="icon-users"></i>
@@ -36,7 +36,7 @@
                             <h3 class="font-green-sharp">
                                 <span data-counter="counterup" data-value="{{$activeUserCount}}">0</span>
                             </h3>
-                            <small>活跃账号</small>
+                            <small>活跃用户</small>
                         </div>
                         <div class="icon">
                             <i class="icon-user"></i>
@@ -51,7 +51,7 @@
                             <h3 class="font-green-sharp">
                                 <span data-counter="counterup" data-value="{{$onlineUserCount}}">0</span>
                             </h3>
-                            <small>当前在线数量</small>
+                            <small>当前在线</small>
                         </div>
                         <div class="icon">
                             <i class="icon-user"></i>
@@ -96,7 +96,7 @@
                     <div class="display">
                         <div class="number">
                             <h3 class="font-blue-sharp"> {{$flowCount}} </h3>
-                            <small>消耗流量</small>
+                            <small>30日内消耗流量</small>
                         </div>
                         <div class="icon">
                             <i class="icon-speedometer"></i>

+ 5 - 0
sql/update/20171204.sql

@@ -0,0 +1,5 @@
+INSERT INTO `country` VALUES ('47', '保加利亚', 'bg');
+INSERT INTO `country` VALUES ('48', '立陶宛', 'lt');
+INSERT INTO `country` VALUES ('49', '哥伦比亚', 'co');
+INSERT INTO `country` VALUES ('50', '澳门', 'mo');
+INSERT INTO `country` VALUES ('51', '肯尼亚', 'ke');