浏览代码

feat(打卡):完成开发

geek 5 年之前
父节点
当前提交
18f69547a4
共有 2 个文件被更改,包括 14 次插入0 次删除
  1. 6 0
      application/index/controller/Index.php
  2. 8 0
      application/index/service/DaKaService.php

+ 6 - 0
application/index/controller/Index.php

@@ -67,6 +67,12 @@ class Index
             var_dump('不是期望时间不提示'.$wishTime);
             die();
         }
+
+        if(strtotime('now') < strtotime('2020-01-31')){
+            var_dump('不是期望时间不提示'.$wishTime);
+            die();
+        }
+
         $riBao = new RiBaoService();
         $riBao->sendMsg($data);
 

+ 8 - 0
application/index/service/DaKaService.php

@@ -44,6 +44,8 @@ class DaKaService {
 
 
     public function init() {
+
+
         $date = date('Y-m-d');
         $hour = date('H');
         $w = date('w', strtotime($date));
@@ -51,6 +53,12 @@ class DaKaService {
             var_dump($date . '周末,跳过');
             die();
         }
+
+        if($date < '2020-01-31' && $date > '2020-01-23'){
+            var_dump($date . '放假时间');
+            die();
+        }
+
         list($year, $month, $day) = explode('-', $date);
         if ($hour >= 6 && $hour <= 12) {
             $min = $day + 2;