micor.js 1.71 KB
Newer Older
1
export function genActiveRule(routerPrefix) {
邓晓峰's avatar
邓晓峰 committed
2
  return location => location.pathname.startsWith(routerPrefix);
邓晓峰's avatar
邓晓峰 committed
3 4
}
export default {
邓晓峰's avatar
邓晓峰 committed
5
  dev: [
邓晓峰's avatar
邓晓峰 committed
6 7 8 9 10 11
    // {
    //   name: 'civ_energy',
    //   entry: `//${window.location.hostname}:8081/civ_energy`,
    //   container: '#micro-container',
    //   activeRule: '/civbase/civ_energy',
    // },
12 13 14 15 16 17
    // {
    //   name: 'civ_water',
    //   entry: `//${window.location.hostname}:8081/civ_water`,
    //   container: '#micro-container',
    //   activeRule: '/civbase/civ_water',
    // },
18
    {
19
      name: 'civ_pandawork',
20
      entry: `//${window.location.hostname}:8080/civ_pandawork`,
21
      container: '#micro-container',
22
      activeRule: '/civbase/civ_pandawork',
23
    },
24 25 26 27 28 29 30 31 32
    {
      name: 'report',
      entry: `//${window.location.hostname}:8345/report/workplatform`,
      container: '#micro-container',
      activeRule: '/civbase/report',
      props: {
        origin: `//${window.location.hostname}:8345`
      }
    },
33 34 35 36 37 38
    // {
    //   name: 'civ_webgis',
    //   entry: `//${window.location.hostname}:8080/civ_webgis`,
    //   container: '#micro-container',
    //   activeRule: '/civbase/civ_energy',
    // },
邓晓峰's avatar
邓晓峰 committed
39 40 41 42
    {
      name: 'civweb4',
      entry: `//${window.location.hostname}:3020/civweb4`,
      container: '#micro-container',
邓晓峰's avatar
邓晓峰 committed
43
      activeRule: '/civbase/civweb4',
邓晓峰's avatar
邓晓峰 committed
44
    },
邓晓峰's avatar
邓晓峰 committed
45 46
    {
      name: 'middleground',
邓晓峰's avatar
邓晓峰 committed
47
      entry: `//${window.location.hostname}:8082/middleground`,
邓晓峰's avatar
邓晓峰 committed
48 49 50
      container: '#micro-container',
      activeRule: '/civbase/middleground',
    },
邓晓峰's avatar
邓晓峰 committed
51 52 53 54 55 56 57 58 59 60 61
  ],
  prod: [
    {
      name: 'web4_console',
      entry: `//${window.location.host}/civweb4`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civweb4'),
      props: {},
    },
  ],
};