micor.js 2.25 KB
Newer Older
1 2 3 4 5 6 7 8
/*
 * @Author: ZengJing
 * @Date: 2022-04-12 18:26:15
 * @LastEditTime: 2022-04-14 09:47:56
 * @LastEditors: ZengJing
 * @Description: 
 * @FilePath: \CivWeb\config\micor.js
 */
9
export function genActiveRule(routerPrefix) {
邓晓峰's avatar
邓晓峰 committed
10 11 12 13

  return location => {
    return location.pathname.startsWith(routerPrefix)
  };
邓晓峰's avatar
邓晓峰 committed
14 15
}
export default {
邓晓峰's avatar
邓晓峰 committed
16
  dev: [
邓晓峰's avatar
邓晓峰 committed
17
    // {
邓晓峰's avatar
邓晓峰 committed
18 19
    //   name: 'dosing-web',
    //   entry: `//${window.location.hostname}:8080/dosing-web`,
邓晓峰's avatar
邓晓峰 committed
20
    //   container: '#micro-container',
邓晓峰's avatar
邓晓峰 committed
21 22
    //   activeRule: '/civbase/dosing-web',
    // },
23
    {
邓晓峰's avatar
邓晓峰 committed
24 25
      name: 'civ_pandawork',
      entry: `//${window.location.hostname}:3000/civ_pandawork`,
26
      container: '#micro-container',
邓晓峰's avatar
邓晓峰 committed
27
      activeRule: '/civbase/civ_pandawork',
28
    },
29 30 31 32 33 34
    // {
    //   name: 'civ_configuration',
    //   entry: `//${window.location.hostname}:8080/civ_configuration`,
    //   container: '#micro-container',
    //   activeRule: '/civbase/civ_configuration',
    // },
邓晓峰's avatar
邓晓峰 committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
    {
      name: 'report',
      entry: `//192.168.12.145:8346/report/workplatform`,
      container: '#micro-container',
      activeRule: '/civbase/report',
      props: {
        origin: `//192.168.12.145:8346`,
      },
    },
    {
      name: 'civ_webgis',
      entry: `//${window.location.hostname}:8081/civ_webgis`,
      container: '#micro-container',
      activeRule: '/civbase/civ_webgis',
    },
邓晓峰's avatar
邓晓峰 committed
50 51 52 53
    {
      name: 'civweb4',
      entry: `//${window.location.hostname}:3020/civweb4`,
      container: '#micro-container',
邓晓峰's avatar
邓晓峰 committed
54
      activeRule: '/civbase/civweb4',
邓晓峰's avatar
邓晓峰 committed
55
    },
56 57 58 59 60 61
    {
      name: 'civ_energy',
      entry: `//${window.location.hostname}:8081/civ_energy`,
      container: '#micro-container',
      activeRule: '/civbase/civ_energy',
    },
62 63 64 65 66 67 68 69 70 71 72 73
    // {
    //   name: 'middleground',
    //   entry: `//${window.location.hostname}:8082/middleground`,
    //   container: '#micro-container',
    //   activeRule: '/civbase/middleground',
    // },
    // {
    //   name: 'civ_3d',
    //   entry: `//${window.location.hostname}:12000/civ_3d`,
    //   container: '#micro-container',
    //   activeRule: '/civbase/civ_3d',
    // },
邓晓峰's avatar
邓晓峰 committed
74 75 76 77 78 79 80 81 82 83 84
  ],
  prod: [
    {
      name: 'web4_console',
      entry: `//${window.location.host}/civweb4`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civweb4'),
      props: {},
    },
  ],
};