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