From 755fff03a1fee77d5f89ce7c1b7aff624bfa353f Mon Sep 17 00:00:00 2001 From: xxq250 Date: Tue, 18 Jul 2023 15:15:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=9C=AC=E5=9C=B0=E7=89=88=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/forms/base_form.rb | 2 +- config/configuration.yml.example | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/forms/base_form.rb b/app/forms/base_form.rb index 74862e540..0a07e6036 100644 --- a/app/forms/base_form.rb +++ b/app/forms/base_form.rb @@ -58,7 +58,7 @@ class BaseForm def check_verifi_code(verifi_code, code) code = strip(code) return if code == "123123" && EduSetting.get("code_debug") # 万能验证码,用于测试 # TODO 万能验证码,用于测试 - return if EduSetting.get("is_local") == "true" # 本地版不需要验证码 + return if EduSetting.get("is_local") == "true" || Rails.application.config_for(:configuration)['is_local'].to_s =="true" # 本地版不需要验证码 raise VerifiCodeError, "验证码已失效" if !verifi_code&.effective? raise VerifiCodeError, "验证码不正确" if verifi_code&.code != code end diff --git a/config/configuration.yml.example b/config/configuration.yml.example index 59bb68406..5e71f66a2 100644 --- a/config/configuration.yml.example +++ b/config/configuration.yml.example @@ -1,5 +1,6 @@ default: &default platform_url: 'http://localhost:3000' + is_local: true wechat: appid: '123' secret: '123'