From 81e52b9e18d9bcacda1a174feb29a08fa6aca7bb Mon Sep 17 00:00:00 2001 From: p31729568 Date: Tue, 16 Jul 2019 09:36:16 +0800 Subject: [PATCH] modify check mail and phone valid --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f9516b9e4..fbb1fef12 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -48,7 +48,7 @@ class ApplicationController < ActionController::Base # 考虑到安全参数问题,多一次查询,去掉Union user = User.where(phone: login).first || User.where(mail: login).first if type.to_i == 1 && !user.nil? - tip_exception("该手机号码或邮箱已被注册") + tip_exception(-2, "该手机号码或邮箱已被注册") elsif type.to_i == 2 && user.nil? tip_exception("该手机号码或邮箱未注册") end