Commit b29e908d authored by 邓晓峰's avatar 邓晓峰

fix: micor.js

parent bc013802
Pipeline #27906 skipped with stages
export function genActiveRule(routerPrefix) { export function genActiveRule(routerPrefix) {
debugger
return location => location.pathname.startsWith(routerPrefix); return location => location.pathname.startsWith(routerPrefix);
} }
export default { export default {
dev: [{ dev: [
{
name: 'civ_monitor', name: 'civ_monitor',
entry: `//${window.location.hostname}:8081/civ_monitor`, entry: `//${window.location.hostname}:8081/civ_monitor`,
container: '#micro-container', container: '#micro-container',
...@@ -16,11 +16,13 @@ export default { ...@@ -16,11 +16,13 @@ export default {
activeRule: genActiveRule('/civbase/civweb4'), activeRule: genActiveRule('/civbase/civweb4'),
}, },
], ],
prod: [{ prod: [
{
name: 'web4_console', name: 'web4_console',
entry: `//${window.location.host}/civweb4`, entry: `//${window.location.host}/civweb4`,
container: '#micro-container', container: '#micro-container',
activeRule: genActiveRule('/civbase/civweb4'), activeRule: genActiveRule('/civbase/civweb4'),
props: {}, props: {},
}, ], },
],
}; };
/* eslint-disable */ /* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin; // const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
<<<<<<< HEAD const proxyURL = 'http://172.16.10.166:8087';
const proxyURL = 'http://192.168.10.150:8777';
=======
const proxyURL = 'http://172.16.10.176:8080';
>>>>>>> 51664ab62eb0b419b6ad8715b64ad948c34dc4d5
module.exports = { module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './', assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
dev: { dev: {
...@@ -73,6 +69,16 @@ module.exports = { ...@@ -73,6 +69,16 @@ module.exports = {
'/Publish': '/Publish', '/Publish': '/Publish',
}, },
}, },
'/PandaCore': {
target: proxyURL,
changeOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
pathRewrite: {
'/PandaCore': '/PandaCore',
},
},
'/CityTemp': { '/CityTemp': {
// target: 'http://192.168.10.150:8777', // target: 'http://192.168.10.150:8777',
target: proxyURL, target: proxyURL,
......
...@@ -6,14 +6,7 @@ import React, { ...@@ -6,14 +6,7 @@ import React, {
useState, useState,
} from 'react'; } from 'react';
import { import { Anchor, Button, Popover, Radio, Result, Spin } from 'antd';
Anchor,
Button,
Popover,
Radio,
Result,
Spin,
} from 'antd';
import classNames from 'classnames'; import classNames from 'classnames';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { dom } from 'kit_utils'; import { dom } from 'kit_utils';
...@@ -24,10 +17,7 @@ import RightContent from '@/components/GlobalHeader/RightContent'; ...@@ -24,10 +17,7 @@ import RightContent from '@/components/GlobalHeader/RightContent';
import { Panel } from '@/components/SliderPanel'; import { Panel } from '@/components/SliderPanel';
import { actionCreators } from '@/containers/App/store'; import { actionCreators } from '@/containers/App/store';
import Authorized from '@/utils/Authorized'; import Authorized from '@/utils/Authorized';
import { import { findPathByLeafId, getBaseName } from '@/utils/utils';
findPathByLeafId,
getBaseName,
} from '@/utils/utils';
import { import {
LeftOutlined, LeftOutlined,
LoadingOutlined, LoadingOutlined,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment