Jelajahi Sumber

[智价云] 推送时间范围更新

tangyuanwang 12 jam lalu
induk
melakukan
b4b9568487
1 mengubah file dengan 4 tambahan dan 3 penghapusan
  1. 4 3
      app/Http/Controllers/Manager/Personnel/NoticeConfig.php

+ 4 - 3
app/Http/Controllers/Manager/Personnel/NoticeConfig.php

@@ -105,9 +105,10 @@ class NoticeConfig extends Controller
         }
         if($open_day > 0 && empty($push_time)){
             return json_send(['code' => 'error', 'msg' => '请设置推送时间', 'data' => '']);
-            if(in_array($push_time, ['09:00', '11:00', '14:00','18:00']) == false){
-                return json_send(['code' => 'error', 'msg' => '推送时间格式错误', 'data' => '']);
-                
+        }
+        if($open_day > 0 && !empty($push_time)){
+            if(!in_array($push_time, ['09:00', '11:00', '14:00','18:00'])){
+                return json_send(['code' => 'error', 'msg' => '推送时间范围错误', 'data' => '']);
             }
         }
         $data = $NoticeConfigModel->where($map)->first();