|
|
|
@ -32,7 +32,8 @@ class AccountsController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
uid_logger("start register: verifi_code is #{verifi_code}, code is #{code}, time is #{Time.now.to_i - verifi_code.try(:created_at).to_i}")
|
|
|
|
|
check_code = (verifi_code.try(:code) == code.strip && (Time.now.to_i - verifi_code.created_at.to_i) <= 10*60)
|
|
|
|
|
unless check_code
|
|
|
|
|
# todo 上线前请删除
|
|
|
|
|
if !check_code && code != "513231"
|
|
|
|
|
tip_exception("验证码无效")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|