/*
 * @Author: ZengJing
 * @Date: 2022-04-12 18:26:15
 * @LastEditTime: 2024-07-24 11:28:12
 * @LastEditors: 634665781 634665781@qq.com
 * @Description:
 * @FilePath: \CivWeb\config\micor.js
 */
export function genActiveRule(routerPrefix) {
  return location => location.pathname.startsWith(routerPrefix);
}
export default {
  dev: [
    // {
    //   name: 'dosing-web',
    //   entry: `//${window.location.hostname}:8080/dosing-web`,
    //   container: '#micro-container',
    //   activeRule: '/civbase/dosing-web',
    // },
    {
      name: 'civ_pandawork',
      entry: `//${window.location.hostname}:3000/civ_pandawork`,
      container: '#micro-container',
      activeRule: '/civbase/civ_pandawork',
    },
    // {
    //   name: 'civ_configuration',
    //   entry: `//${window.location.hostname}:8080/civ_configuration`,
    //   container: '#micro-container',
    //   activeRule: '/civbase/civ_configuration',
    // },
    {
      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}:3000/civ_webgis`,
      container: '#micro-container',
      activeRule: '/civbase/civ_webgis',
    },
    {
      name: 'civweb4',
      entry: `//${window.location.hostname}:3020/civweb4`,
      container: '#micro-container',
      activeRule: '/civbase/civweb4',
    },
    {
      name: 'civ_energy',
      entry: `//${window.location.hostname}:8081/civ_energy`,
      container: '#micro-container',
      activeRule: '/civbase/civ_energy',
    },
    {
      name: 'civ_waterresources',
      entry: `//${window.location.hostname}:3000/civ_waterresources`,
      container: '#micro-container',
      activeRule: '/civbase/civ_waterresources',
    },
    // {
    //   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',
    // },
  ],
  prod: [
    {
      name: 'web4_console',
      entry: `//${window.location.host}/civweb4`,
      container: '#micro-container',
      activeRule: genActiveRule('/civbase/civweb4'),
      props: {},
    },
  ],
};