wesmiler 2 лет назад
Родитель
Сommit
6091647602
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      app/Services/LiveService.php

+ 1 - 2
app/Services/LiveService.php

@@ -617,7 +617,7 @@ class LiveService extends BaseService
     public function leave($userId)
     {
         $id = request()->post('id', 0);
-        if ($id && !$info = $this->getCacheInfo($id)) {
+        if (!$id || ($id && !$info = $this->getCacheInfo($id))) {
             $this->error = 2981;
             return false;
         }
@@ -625,7 +625,6 @@ class LiveService extends BaseService
         if($info['user_id'] != $userId){
             $updateData = ['is_online'=> 2, 'update_time'=> time()];
             VideoCollectModel::where(['user_id'=>$userId,'type'=>1,'source_type'=>2,'collect_id'=> $id,'mark'=>1])->update($updateData);
-
         }
 
         $this->error = 1002;