Просмотр исходного кода

【程序目录】优化小程序和公众号登录时候的错误抛出

吴昊天 3 лет назад
Родитель
Сommit
60c2b28cba

+ 1 - 1
crmeb/crmeb/services/oauth/storage/MiniProgram.php

@@ -55,7 +55,7 @@ class MiniProgram extends BaseStorage implements OAuthInterface
             $userInfoCong = MiniProgramService::getUserInfo($code);
             $session_key = $userInfoCong['session_key'];
         } catch (\Exception $e) {
-            throw new OAuthException(410076);
+            throw new OAuthException($e->getMessage());
         }
 
         if (!isset($userInfoCong['openid'])) {

+ 1 - 1
crmeb/crmeb/services/oauth/storage/Wechat.php

@@ -59,7 +59,7 @@ class Wechat extends BaseStorage implements OAuthInterface
             try {
                 $wechatInfo = WechatService::oauth2Service()->oauth();
             } catch (\Throwable $e) {
-                throw new OAuthException(410131);
+                throw new OAuthException($e->getMessage());
             }
         } else {
             /** @var WechatOpenService $service */