vali há 6 anos atrás
pai
commit
d9bd031df4
1 ficheiros alterados com 9 adições e 1 exclusões
  1. 9 1
      application/index/controller/Index.php

+ 9 - 1
application/index/controller/Index.php

@@ -1,4 +1,5 @@
 <?php
+
 namespace app\index\controller;
 
 use think\Controller;
@@ -14,7 +15,7 @@ class Index extends Controller
     public function chat()
     {
         // 跳转到移动端
-        if(request()->isMobile()){
+        if (request()->isMobile()) {
             $param = http_build_query([
                 'id' => input('param.id'),
                 'name' => input('param.name'),
@@ -48,4 +49,11 @@ class Index extends Controller
 
         return $this->fetch();
     }
+
+    public function systime()
+    {
+        $time = time();
+        return json(['code' => 1, 'data' => ['time' => $time], 'msg' => '成功']);
+    }
+
 }