瀏覽代碼

完善功能

gorden 11 月之前
父節點
當前提交
bdd4edd209
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/admin/service/order/AppointmentService.php

+ 3 - 3
app/admin/service/order/AppointmentService.php

@@ -302,12 +302,12 @@ class AppointmentService
 
     public static function update(Request $request)
     {
-        $appointmentId = $request->post('appointment_id');
+        $params = $request->post();
+        $appointmentId = $params['appointment_id'];
         $appointment = Appointment::where('appointment_id', $appointmentId)->first();
-        if (!$appointment) {
+        if (empty($appointment)) {
             return json_fail("数据不存在");
         }
-        $params = $request->post();
         Db::beginTransaction();
         try {
             // 先检查选择的时段是否可预约