zhanglinxin преди 1 година
родител
ревизия
4a269f2a03
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      app/services/user/LoginServices.php

+ 3 - 0
app/services/user/LoginServices.php

@@ -289,6 +289,9 @@ class LoginServices extends BaseServices
         
         //数据库查询
         $user = $this->dao->getOne(['account|phone' => $phone, 'is_del' => 0]);
+        if ($user) {
+            throw new ApiException('邮箱已注册');
+        }
         if (!$user) {
             $user = $this->register($phone, $password, $spread, $user_type,$account);
             if (!$user) {