Commit 4230c42a authored by 邓晓峰's avatar 邓晓峰

fix: 修复路由问题

parent c39242ef
Pipeline #38152 skipped with stages
...@@ -4,10 +4,10 @@ export function genActiveRule(routerPrefix) { ...@@ -4,10 +4,10 @@ export function genActiveRule(routerPrefix) {
export default { export default {
dev: [ dev: [
{ {
name: 'civ_oa', name: 'civ_energy',
entry: `//${window.location.hostname}:8080/civ_oa`, entry: `//${window.location.hostname}:8081/civ_energy`,
container: '#micro-container', container: '#micro-container',
activeRule: '/civbase/civ_oa', activeRule: '/civbase/civ_energy',
}, },
// { // {
// name: 'civ_water', // name: 'civ_water',
......
/* 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;
const proxyURL = 'https://mis.panda-water.cn' const proxyURL = 'http://192.168.12.136:8989'
//'http://192.168.12.47:8081'; //'http://192.168.12.47:8081';
module.exports = { module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './', assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
......
...@@ -252,7 +252,6 @@ const BasicLayout = props => { ...@@ -252,7 +252,6 @@ const BasicLayout = props => {
/* eslint-disable no-unused-vars */ /* eslint-disable no-unused-vars */
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = props.prefixCls || getPrefixCls(''); const prefixCls = props.prefixCls || getPrefixCls('');
console.log("prefixCls", prefixCls);
// const [currentRoutes, setCurrentRoutes] = useState([]); // const [currentRoutes, setCurrentRoutes] = useState([]);
const [collapse, setCollapse] = useState(false); const [collapse, setCollapse] = useState(false);
const [toggleSystem, setToggleSystem] = useState(false); const [toggleSystem, setToggleSystem] = useState(false);
...@@ -628,7 +627,7 @@ const BasicLayout = props => { ...@@ -628,7 +627,7 @@ const BasicLayout = props => {
item.routes ? renderChildrenMenu(item) : ( item.routes ? renderChildrenMenu(item) : (
<> <>
{ {
item.icon ? item.icon: item.extData && /.svg/.test(item.extData.icon) ? <ReactSVG src={item.extData.icon} beforeInjection={svg => console.log(svg)} style={{width: '18px', height: '18px'}}/>:item.extData && <img src={item.extData.icon} style={{width: '18px', height: '18px'}}/> item.icon ? item.icon: item.extData && /.svg/.test(item.extData.icon) ? <ReactSVG src={item.extData.icon} style={{width: '18px', height: '18px'}}/>:item.extData && <img src={item.extData.icon} style={{width: '18px', height: '18px'}}/>
} }
<span className={layoutStyles['menu-item-name']}>{item.name}</span> <span className={layoutStyles['menu-item-name']}>{item.name}</span>
{ {
......
...@@ -180,6 +180,8 @@ export const defaultApp = () => { ...@@ -180,6 +180,8 @@ export const defaultApp = () => {
const config = createStoreage.get('globalConfig'); const config = createStoreage.get('globalConfig');
if (config && config.token) { if (config && config.token) {
// const startWith = config.homepage ? config.homepage.split('/') : []; // const startWith = config.homepage ? config.homepage.split('/') : [];
// console.log(findPathByLeafId(config.homepage, '', 'url')) // console.log(findPathByLeafId(config.homepage, '', 'url'))
const basePath = const basePath =
......
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