Explorar o código

技能服务订单预约时间兼容处理

zhangxiaobin hai 1 ano
pai
achega
74f31b35e1
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      application/api/controller/Dispatch.php

+ 4 - 0
application/api/controller/Dispatch.php

@@ -353,6 +353,10 @@ class Dispatch extends Common
         $num = $this->request->request('num',0,"intval"); // 数量
         $make_time = $this->request->request('make_time'); // 预约时间 格式:时间戳。
         $describe = $this->request->request('describe'); // 备注要求
+        $makeTimeLen = strlen($make_time);
+        if (!empty($make_time) && $makeTimeLen > 10) {//处理时间戳位数问题
+            $make_time = substr($make_time,0,10);
+        }
         if (!$skill_id || !$num) {
             $this->error(__('Invalid parameters'));
         }