diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 6ac62f887..288cf2acc 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -35,7 +35,7 @@ class AccountsController < ApplicationController # todo 上线前请删除万能验证码"513231" if code != "513231" tip_exception(-2, "验证码不正确") if verifi_code.try(:code) != code.strip - tip_exception(-2, "验证码已失效") if (Time.now.to_i - verifi_code.created_at.to_i) <= 10*60 + tip_exception(-2, "验证码已失效") if (Time.now.to_i - verifi_code.created_at.to_i) > 10*60 end code = generate_identifier User, 8 diff --git a/app/forms/add_school_apply_form.rb b/app/forms/add_school_apply_form.rb index c0b767f06..f98e8b05b 100644 --- a/app/forms/add_school_apply_form.rb +++ b/app/forms/add_school_apply_form.rb @@ -4,7 +4,7 @@ class AddSchoolApplyForm attr_accessor :name, :province, :city, :address, :remarks validates :name, presence: true - validates :province, presence: true - validates :city, presence: true - validates :address, presence: true + # validates :province, presence: true + # validates :city, presence: true + # validates :address, presence: true end \ No newline at end of file diff --git a/app/models/searchable/shixun.rb b/app/models/searchable/shixun.rb index 7abd76ec6..bc19967a2 100644 --- a/app/models/searchable/shixun.rb +++ b/app/models/searchable/shixun.rb @@ -43,6 +43,7 @@ module Searchable::Shixun def to_searchable_json { id: id, + identifier: identifier, author_name: user.real_name, author_school_name: user.school_name, visits_count: visits, @@ -55,4 +56,4 @@ module Searchable::Shixun { user: { user_extension: :school } } end end -end \ No newline at end of file +end