max 10 meses atrás
pai
commit
ed5e272a6f

+ 6 - 1
frontendApi/modules/v1/controllers/UserController.php

@@ -627,7 +627,12 @@ SQL;
             $allData['data'][] = $post;
             if ($formModel->load($allData, '') && $result = $formModel->add()) {
                 //发送邮件
-                Email::sendRegistrationEmail($post['email'], $post['insertUserName'], $post['password']);
+                try {
+                    Email::sendRegistrationEmail($post['email'], $post['insertUserName'], $post['password']);
+                } catch (\Exception $e) {
+                    //Yii::error($e->getMessage());
+                    Yii::$app->log->info('邮箱:'.$post['email'].'----错误信息:'.$e->getMessage());
+                }
                 return static::notice($result);//报单成功
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);