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