Explorar o código

feat(打卡):完成开发

geek %!s(int64=5) %!d(string=hai) anos
pai
achega
3e8abc42ee
Modificáronse 1 ficheiros con 25 adicións e 0 borrados
  1. 25 0
      application/index/controller/Index.php

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

@@ -2,6 +2,7 @@
 namespace app\index\controller;
 
 use app\index\service\DaKaService;
+use app\index\service\RiBaoService;
 use think\Db;
 use think\Validate;
 
@@ -45,4 +46,28 @@ class Index
         $service->run();
 
     }
+    public function ribao() {
+
+        $data = [
+            'msgtype' => 'text',
+            'text'    => [
+                'content' => '汇报日报了各位大佬(已写的请忽略)'
+            ]
+        ];
+        $date = date('Y-m-d');
+        var_dump($date);
+        $hm = date('H:i');
+        $w = date('w', strtotime($date));
+        if($w==6 || $w == 0){
+            var_dump($date . '周末,跳过');
+            die();
+        }
+        if ($hm !== '22:30') {
+            var_dump('不是期望时间不提示');
+            die();
+        }
+        $riBao = new RiBaoService();
+        $riBao->sendMsg($data);
+
+    }
 }