瀏覽代碼

sunguidong

zhangguidong 2 年之前
父節點
當前提交
a9531a3445
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      app/api/controller/Register.php

+ 8 - 1
app/api/controller/Register.php

@@ -51,9 +51,16 @@ class Register extends BaseApi
 	{
 		$register = new RegisterModel();
 		$exist = $register->usernameExist($this->params['username']);
+
 		if ($exist) {
 			return $this->response($this->error("", "用户名已存在"));
-		} else {
+		}
+        $mobile = $register->mobileExist($this->params['mobile']);
+        if($mobile){
+            return $this->response($this->error("", "手机号已经存在"));
+
+        }
+        else {
 			// 校验验证码
 //			$captcha = new Captcha();
 //			$check_res = $captcha->checkCaptcha();