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

fix: 修复路由问题

parent c39242ef
Pipeline #38152 skipped with stages
......@@ -4,10 +4,10 @@ export function genActiveRule(routerPrefix) {
export default {
dev: [
{
name: 'civ_oa',
entry: `//${window.location.hostname}:8080/civ_oa`,
name: 'civ_energy',
entry: `//${window.location.hostname}:8081/civ_energy`,
container: '#micro-container',
activeRule: '/civbase/civ_oa',
activeRule: '/civbase/civ_energy',
},
// {
// name: 'civ_water',
......
/* eslint-disable */
// 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';
module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
......
......@@ -252,7 +252,6 @@ const BasicLayout = props => {
/* eslint-disable no-unused-vars */
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = props.prefixCls || getPrefixCls('');
console.log("prefixCls", prefixCls);
// const [currentRoutes, setCurrentRoutes] = useState([]);
const [collapse, setCollapse] = useState(false);
const [toggleSystem, setToggleSystem] = useState(false);
......@@ -628,7 +627,7 @@ const BasicLayout = props => {
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>
{
......
......@@ -180,6 +180,8 @@ export const defaultApp = () => {
const config = createStoreage.get('globalConfig');
if (config && config.token) {
// const startWith = config.homepage ? config.homepage.split('/') : [];
// console.log(findPathByLeafId(config.homepage, '', 'url'))
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