master
wangxinglong 2021-12-22 09:34:46 +08:00
parent e03dca634f
commit 3c0747fed0
1 changed files with 4 additions and 4 deletions

View File

@ -51,11 +51,11 @@ class Comment extends Base
});
if (empty($account)) {
throw new RepositoryException('用户无效!');
throw new ValidateException('用户无效!');
}
if(strtotime($account->blank_time) >time()){
throw new RepositoryException('用户被加入黑名单,暂时不能评论,请在' .$account->blank_time . "后评论");
throw new ValidateException('用户被加入黑名单,暂时不能评论,请在' .$account->blank_time . "后评论");
}
$param = [
@ -86,7 +86,7 @@ class Comment extends Base
} catch (ValidateException $e) {
return $this->json(4001, $e->getError());
} catch (RepositoryException $e) {
return $this->json(4001, $e->getError());
return $this->json(4001, $e->getMessage());
} catch (Exception $e) {
echo $e->getMessage();
return $this->json(5001, '服务器繁忙!获取用户个人信息失败');