|
|
@@ -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;
|