|
|
|
@ -437,6 +437,7 @@ class Posts extends BaseController |
|
|
|
(new Likes())->where('id', $exists_id)->delete(); |
|
|
|
|
|
|
|
PostsNotice::optionNotice($posts_id, $exists_id, $reply_user_id, 1, 'del'); |
|
|
|
$this->wsSendMsg($reply_user_id, 0, 'postsNotice'); |
|
|
|
return success(lang('posts.cancel_like')); |
|
|
|
} |
|
|
|
|
|
|
|
@ -552,9 +553,18 @@ class Posts extends BaseController |
|
|
|
if (!$exists) { |
|
|
|
return error(lang('system.fail')); |
|
|
|
} |
|
|
|
// 提醒用户取消删除提醒 |
|
|
|
$reply_user_id = $exists->reply_user_id; |
|
|
|
$exists->delete_time = time(); |
|
|
|
$exists->save(); |
|
|
|
PostsNotice::optionNotice($posts_id, $exists['id'], $this->uid, 2, 'del'); |
|
|
|
// 删除用户提醒 |
|
|
|
if (!$reply_user_id) { |
|
|
|
$reply_user_id = PostsModel::where('id', $posts_id)->value('user_id'); |
|
|
|
} |
|
|
|
if ($reply_user_id) { |
|
|
|
PostsNotice::optionNotice($posts_id, $exists['id'], $reply_user_id, 2, 'del'); |
|
|
|
$this->wsSendMsg($reply_user_id, 0, 'postsNotice'); |
|
|
|
} |
|
|
|
|
|
|
|
return success(lang('system.success')); |
|
|
|
} |
|
|
|
|