Selaa lähdekoodia

Merge branch 'master' of http://59.57.98.130:3000/jjhc/reservation_admin

王亚超 1 vuosi sitten
vanhempi
commit
9b1267e705

+ 1 - 0
app/admin/controller/Appointment.php

@@ -184,6 +184,7 @@ class Appointment extends Permissions
             if (false == $this->getModel()->where('id', $id)->delete()) {
                 $this->error('删除失败');
             } else {
+                \app\common\model\AppointmentTicket::where('appointment_id',$id)->delete();
                 $this->success('删除成功', 'index');
             }
         }

+ 4 - 0
app/api/controller/Appointment.php

@@ -105,6 +105,10 @@ class Appointment extends Base
 
         foreach ($tickets as $k => $item) {
             $appoint = $item->appointment;
+            if (empty($appoint)) {
+                unset($item);
+                continue;
+            }
             //专家信息
             $item->specialist;
             $item->specialist->head_pic = geturl($item->specialist->head_pic, '', true);

+ 1 - 1
app/api/controller/Common.php

@@ -34,8 +34,8 @@ class Common extends Base
     {
         $user = User::get(9);
         //登入成功 ,返回 前端
+        return (Permissions::createJwt($user->id, $user->login_time, 3600 * 24));
         $return_url = 'https://localhost:8080/';
-//        halt(Permissions::createJwt($user->id, $user->login_time, 3600 * 24));
         $this->redirect($return_url . '?jwt=' . Permissions::createJwt($user->id, $user->login_time, 3600 * 24));
     }