diff --git a/themes/tajian/controller/FrontapiController.php b/themes/tajian/controller/FrontapiController.php index 9d4f2f6..6b23688 100644 --- a/themes/tajian/controller/FrontapiController.php +++ b/themes/tajian/controller/FrontapiController.php @@ -490,6 +490,9 @@ eof; if (!empty($userDataDir) && $action == 'register') { $err = '你已经注册,请直接登录'; return $this->renderJson(compact('code', 'msg', 'err')); + }else if (empty($userDataDir) && $action == 'login') { + $err = '你还没注册,请先注册'; + return $this->renderJson(compact('code', 'msg', 'err')); } @@ -630,6 +633,13 @@ eof; $err = "{$sms_code} 验证码已过期或错误,请检查是否输入正确"; } + if (empty($err)) { + $userDataDir = Common::getUserDataDir($cellphone); + if (empty($userDataDir)) { + $err = '你还没注册,请先注册'; + } + } + if (empty($err)) { //如果数据检查通过,尝试登录 $newUser = Common::saveUserIntoSession($cellphone); if (!empty($newUser)) {