From 2877d9f095177e30145720db6a5f2dd209e11d99 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Sat, 12 Dec 2020 21:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hyhproject/app/controller/Users.php | 9 ++++++++- hyhproject/common/common/function.php | 26 +++++++++++++++++++++++++- hyhproject/common/model/Users.php | 1 + 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/hyhproject/app/controller/Users.php b/hyhproject/app/controller/Users.php index d4797af..1210bb2 100755 --- a/hyhproject/app/controller/Users.php +++ b/hyhproject/app/controller/Users.php @@ -16,7 +16,7 @@ class Users extends Base{ // 前置方法执行列表 protected $beforeActionList = [ - 'checkAuth' => ['except'=>'checklogin,login,check_login_name,get_puser_info,register,getverify,toregister,forgetpass,forgetpasst,forgetpasss,forgetpassf,findpass,getfindphone,resetpass,getphoneverifycode,checkuserphone']// 访问这些except下的方法不需要执行前置操作 + 'checkAuth' => ['except'=>'checklogin,login,check_login_name,check_real_name,get_puser_info,register,getverify,toregister,forgetpass,forgetpasst,forgetpasss,forgetpassf,findpass,getfindphone,resetpass,getphoneverifycode,checkuserphone']// 访问这些except下的方法不需要执行前置操作 ]; /** * 我的亲人投资列表 @@ -82,6 +82,13 @@ class Users extends Base{ } exit(json_encode(WSTCheckLoginKey($loginName))); } + /** + * 检测会员名 + */ + public function check_real_name(){ + $loginName = input('post.householdName'); + exit(json_encode(WSTCheckLoginKey2($loginName))); + } /** * 获取券值 * @return [type] [description] diff --git a/hyhproject/common/common/function.php b/hyhproject/common/common/function.php index d45ad75..6a264de 100755 --- a/hyhproject/common/common/function.php +++ b/hyhproject/common/common/function.php @@ -381,7 +381,31 @@ function WSTCheckLoginKey($val,$userId = 0){ return WSTReturn("友情提示:您好:该手机号已注册"); } if($dbo2->find()){ - return WSTReturn("友情提示:您好:已有同姓名注册我商城,请核实您的户主是否早已注册。"); + return WSTReturn("友情提示:您好:已有同姓名注册我商城,请核实您是否早已注册。"); + } + return WSTReturn("该登录账号可用",1); + + // $rs = $dbo->count(); + // if($rs==0){ + // $lm_info = getLMUserByName($val);//获取联盟会员信息 + // if($lm_info){ + // return WSTReturn("该登录账号已注册联盟用户"); + // } + // return WSTReturn("该登录账号可用",1); + // } + // return WSTReturn("对不起,登录账号已存在"); +} +function WSTCheckLoginKey2($val,$userId = 0){ + if($val=='')return WSTReturn("户主姓名不能为空"); + if(!WSTCheckFilterWords($val,WSTConf("CONF.registerLimitWords"))){ + return WSTReturn("户主姓名包含非法字符"); + } + $dbo = Db::name('users')->where(["householdName"=>['=',$val]]); + if($userId>0){ + $dbo->where("userId", "<>", $userId); + } + if($dbo->find()){ + return WSTReturn("友情提示:您好:已有同姓名注册我商城,请核实您的户主是否早已注册。"); } return WSTReturn("该登录账号可用",1); diff --git a/hyhproject/common/model/Users.php b/hyhproject/common/model/Users.php index 85ae6a3..1fe0506 100755 --- a/hyhproject/common/model/Users.php +++ b/hyhproject/common/model/Users.php @@ -294,6 +294,7 @@ class Users extends Base{ // return WSTReturn('注册频繁'); $data = array(); $data['loginName'] = input("post.loginName"); + $data['householdName'] = input("post.householdName"); $data['loginPwd'] = input("post.loginPwd"); $data['reUserPwd'] = $data['loginPwd'] ;//input("post.reUserPwd"); $data['payPwd'] = input("post.payPwd");