lizhen_gitee 9 months ago
parent
commit
9687763c62
2 changed files with 11 additions and 1 deletions
  1. 4 0
      application/api/controller/doctor/Wenzhen.php
  2. 7 1
      application/common.php

+ 4 - 0
application/api/controller/doctor/Wenzhen.php

@@ -391,6 +391,10 @@ class Wenzhen extends Apic
         Db::name('doctor')->where('id',$this->auth->id)->setInc('ordernum');
 
         Db::commit();
+
+        //发送im消息给用户,让他不能再输入
+
+
         $this->success('操作成功');
     }
 

+ 7 - 1
application/common.php

@@ -634,8 +634,14 @@ if (!function_exists('get_last_time')) {
         $time = ($time === NULL || empty($time) || $time > $nowtime) ? $nowtime : intval($time);
         $t = $nowtime - $time; //时间差 (秒)
         $y = date('Y', $time)-date('Y', $nowtime);//是否跨年
+
+        //switch不识别0
+        if($t == 0){
+            return '刚刚';
+        }
+
         switch($t){
-            /*case $t = 0:
+            /*case $t == 0:
                 $text = '刚刚';
                 break;*/
             case $t < 60: