micor.js 888 Bytes
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 6 7
  dev: [
    {
      name: 'civ_monitor',
邓晓峰's avatar
邓晓峰 committed
8
      entry: `//${window.location.hostname}:8080/civ_monitor`,
邓晓峰's avatar
邓晓峰 committed
9
      container: '#micro-container',
邓晓峰's avatar
邓晓峰 committed
10
      activeRule: '/civbase/civ_monitor',
邓晓峰's avatar
邓晓峰 committed
11
    },
邓晓峰's avatar
邓晓峰 committed
12 13
    {
      name: 'civ_water',
邓晓峰's avatar
邓晓峰 committed
14
      entry: `//${window.location.hostname}:8082/civ_water`,
邓晓峰's avatar
邓晓峰 committed
15
      container: '#micro-container',
邓晓峰's avatar
邓晓峰 committed
16
      activeRule: '/civbase/civ_water',
邓晓峰's avatar
邓晓峰 committed
17
    },
邓晓峰's avatar
邓晓峰 committed
18 19 20 21
    {
      name: 'civweb4',
      entry: `//${window.location.hostname}:3020/civweb4`,
      container: '#micro-container',
邓晓峰's avatar
邓晓峰 committed
22
      activeRule: '/civbase/civweb4',
邓晓峰's avatar
邓晓峰 committed
23 24 25 26 27 28 29 30 31 32 33 34
    },
  ],
  prod: [
    {
      name: 'web4_console',
      entry: `//${window.location.host}/civweb4`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civweb4'),
      props: {},
    },
  ],
};