Parcourir la source

Merge pull request #638 from jetlinks/next-wzy

fix: oauth
hear il y a 3 ans
Parent
commit
367799cbaa

+ 4 - 4
config/proxy.ts

@@ -17,11 +17,11 @@ export default {
       // 测试环境
       // target: 'http://120.77.179.54:8844/',
       // ws: 'ws://120.77.179.54:8844/',
-      target: 'http://192.168.32.65:8844/',
-      ws: 'ws://192.168.32.65:8844/',
+      // target: 'http://192.168.32.65:8844/',
+      // ws: 'ws://192.168.32.65:8844/',
       //v2环境
-      // ws: 'ws://47.109.52.230:8844',
-      // target: 'http://47.109.52.230:8844',
+      ws: 'ws://47.109.52.230:8844',
+      target: 'http://47.109.52.230:8844',
       changeOrigin: true,
       pathRewrite: { '^/api': '' },
     },

+ 1 - 1
src/pages/account/Center/bind/index.tsx

@@ -148,7 +148,7 @@ const Bind = () => {
     // const params = '5c021c8892d4afffd8fd42439c4e2382'
     setCode(params);
     bindUserInfo(params);
-    if (localStorage.getItem('onLogin') === 'yes') {
+    if (localStorage.getItem('onLogin') === 'yes' || isLogin === 'yes') {
       getDetail();
     }
     if (localStorage.getItem('onLogin')) {

+ 1 - 1
src/pages/iframe/index.tsx

@@ -13,7 +13,7 @@ const Iframe = () => {
     if (res.status === 200) {
       console.log(res.result);
       if (res.result.page.routeType === 'hash') {
-        menuUrl = `/${url}`;
+        menuUrl = `${url}`;
       }
       if (res.result.provider === 'internal-standalone') {
         //{baseUrl}/api/application/sso/{appId}/login?redirect={menuUrl}

+ 5 - 0
src/pages/system/Apply/Save/index.tsx

@@ -30,6 +30,7 @@ import usePermissions from '@/hooks/permission';
 import { useHistory, useLocation } from '@/hooks';
 import { getMenuPathByCode } from '@/utils/menu';
 import MenuPage from '../Menu';
+import _ from 'lodash';
 
 const Save = () => {
   const location = useLocation();
@@ -247,6 +248,10 @@ const Save = () => {
 
   const handleSave = async () => {
     const data: any = await form.submit();
+    const list = integrationModesList.map((item) => item.value);
+    _.difference(list, data.integrationModes).forEach((item) => {
+      delete data[item];
+    });
 
     //独立应用-api客户端 id?clientId:appId
     if (data.provider === 'internal-standalone') {