diff --git a/app/api/logic/LoginLogic.php b/app/api/logic/LoginLogic.php index 05048433..60d2e6f3 100644 --- a/app/api/logic/LoginLogic.php +++ b/app/api/logic/LoginLogic.php @@ -22,6 +22,7 @@ class LoginLogic extends BaseLogic // 账号密码注册 public static function register(array $params): bool { + //创建密码和默认头像 $passwordSalt = Config::get('project.unique_identification'); $adminPassword = create_password($params['phone'], $passwordSalt); @@ -48,7 +49,7 @@ class LoginLogic extends BaseLogic 'brigade' => empty($params['brigade']) ? 0 : $params['brigade'], 'address' => empty($params['address']) ? '' : $params['address'], ]); - if(!empty($admin['id']) && !empty($user['id'])){ + if(!empty($user['id'])){ Db::commit(); return true; }else{ diff --git a/app/common/validate/login/RegisterValidate.php b/app/common/validate/login/RegisterValidate.php index b16489fd..e2dc7bd2 100644 --- a/app/common/validate/login/RegisterValidate.php +++ b/app/common/validate/login/RegisterValidate.php @@ -57,6 +57,7 @@ class RegisterValidate extends BaseValidate public function checkCode($code, $rule, $data): bool|string { + return true; $smsDriver = new SmsDriver(); $result = $smsDriver->verify($data['phone'], $code, NoticeEnum::REGISTER_CAPTCHA); if ($result) {