index.js 1.4 KB
Newer Older
vipcxj's avatar
vipcxj committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
/**
 * Created by zhouhuan on 2017/11/20.
 */
import List from './list';
import Add from './add';
import Edit from './edit';
import Deploy from './deploy';
import AddDeploy from './addDeploy';
import EditDeploy from './editDeploy';
import route from '../../../../components/hoc/routes';
import model from '../../../../models/main/modules/appManagement';

// noinspection JSUnusedGlobalSymbols
export default (binder) => {
  const connect = binder(model);
  return route({
    childRoutes: [
      {
        path: 'list',
        name: '列表',
        component: connect(({ appInfo, loading }) => ({ appInfo, loading }))(List),
      },
      {
        path: 'add',
        name: '新增',
        component: connect(({ appInfo, loading }) => ({ appInfo, loading }))(Add),
      },
      {
        path: 'edit',
        name: '新增',
        component: connect(({ appInfo, loading }) => ({ appInfo, loading }))(Edit),
      },
      {
        path: 'deploy',
        name: '部署',
        component: connect(({ appInfo, loading }) => ({ appInfo, loading }))(Deploy),
      },
      {
        path: 'addDeploy',
        name: '新增部署信息',
        component: connect(({ appInfo, loading }) => ({ appInfo, loading }))(AddDeploy),
      },
      {
        path: 'editDeploy',
        name: '编辑部署信息',
        component: connect(({ appInfo, loading }) => ({ appInfo, loading }))(EditDeploy),
      },
    ],
  });
};