修改评论接口,匿评结束后依然可以评论(属于留言)
This commit is contained in:
parent
9708c50899
commit
87e658a0f1
|
@ -146,13 +146,8 @@ class HomeworkService
|
|||
@cur_page,@cur_type = params[:cur_page] || 1,params[:cur_type] || 5
|
||||
@homework = HomeworkAttach.find(params[:homework_id])
|
||||
comment_status = @homework.bid.comment_status
|
||||
if @is_anonymous_comments && comment_status != 1
|
||||
case comment_status
|
||||
when 0
|
||||
raise '尚未开启匿评!'
|
||||
when 2
|
||||
raise '匿评已结束!'
|
||||
end
|
||||
if @is_anonymous_comments && comment_status == 0
|
||||
raise '尚未开启匿评!'
|
||||
end
|
||||
if @is_anonymous_comments && ((@m_score.nil? || @m_score.blank?) || !(params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != ""))
|
||||
raise '您尚未打分或评论!'
|
||||
|
|
Loading…
Reference in New Issue