From 97fb0ba95a863fe9b77eecdaee7410b28fc342f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=A6=E8=8D=A3=E8=B6=85?= <302645122@qq.com> Date: Fri, 4 Mar 2022 18:39:30 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=82=AE=E7=AE=B1=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=8F=90=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/UserEmailVerification.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Models/UserEmailVerification.php b/app/Models/UserEmailVerification.php index 9d75a1520..fdb71063a 100644 --- a/app/Models/UserEmailVerification.php +++ b/app/Models/UserEmailVerification.php @@ -67,10 +67,13 @@ class UserEmailVerification extends AbstractModel }); } catch (Exception $exception) { // 一般是请求超时 - if (strpos($exception->getMessage(), "Timed Out") !== false) + if (strpos($exception->getMessage(), "Timed Out") !== false) { throw new ApiException("language.TimedOut"); - else + } elseif ($exception->getCode() == 550) { + throw new ApiException('邮件内容被拒绝,请检查邮箱是否开启接收功能'); + } else { throw new ApiException($exception->getMessage()); + } } } }