瀏覽代碼

Merge branch 'stabble'

zz 5 年之前
父節點
當前提交
f0b50a3cc7
共有 2 個文件被更改,包括 10 次插入2 次删除
  1. 9 2
      app/Console/Kernel.php
  2. 1 0
      app/Http/Controllers/Wap/Web/WelcomeController.php

+ 9 - 2
app/Console/Kernel.php

@@ -35,9 +35,16 @@ class Kernel extends ConsoleKernel
      */
     protected function schedule(Schedule $schedule)
     {
-        $schedule->command('book:update')->dailyAt('06:00');
+        //$schedule->command('book:update')->dailyAt('06:00');
 
-        $schedule->command('book:update')->dailyAt('18:00');
+        //$schedule->command('book:update')->dailyAt('18:00');
+        $schedule->command('book:update')->hourly()->when(function (){
+            $now_hour = date('G');
+            if($now_hour %4 ==0){
+                return true;
+            }
+            return false;
+        });
 
         //$schedule->command('checkOrderStatus')->everyMinute();
     }

+ 1 - 0
app/Http/Controllers/Wap/Web/WelcomeController.php

@@ -540,6 +540,7 @@ class WelcomeController extends BaseController
         if ($this->distribution_channel_id == 5237) return '悦月文摘';
         if ($this->distribution_channel_id == 6130) return '微友书坊';
         if ($this->distribution_channel_id == 6667) return '青青书舍';
+        if ($this->distribution_channel_id == 7264) return '悠悠书汇';
         $title = "追书云";
         $get_force_subscribe_name = false;
         $subscribe = $request->cookie('force_subscribe_name');