wzyyy 3 лет назад
Родитель
Сommit
20934d2773
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/pages/oauth/index.tsx

+ 3 - 3
src/pages/oauth/index.tsx

@@ -65,8 +65,8 @@ const Oauth = () => {
         // setLoading(false);
       });
   };
-  const goOAuth2 = async () => {
-    const res = await Service.getOAuth2(params);
+  const goOAuth2 = async (data?: any) => {
+    const res = await Service.getOAuth2(params || data);
     if (res.status === 200) {
       window.location.href = res.result;
     } else {
@@ -133,7 +133,7 @@ const Oauth = () => {
       setIsLogin(true);
       initApplication(data.client_id || params.client_id);
       if (data.internal === 'true' || internal === 'true') {
-        goOAuth2();
+        goOAuth2(data);
       }
     } else if (res.status === 401) {
       setIsLogin(false);