Commit 77caae47 by zhangleyuan

feat:增加gitignore相关的文件

parent daf705e8
.DS_Store
node_modules/
dist/
npm-debug.log
\ No newline at end of file
......@@ -14,9 +14,6 @@ import { createHashHistory } from 'history';
import zh_CN from 'antd/es/locale/zh_CN';
import _ from 'underscore';
import Storage from '@/common/js/storage';
import { PREFIX } from '@/domains/basic-domain/constants';
import { VerifyInfo } from '@/domains/basic-domain/interface';
import 'antd/dist/antd.less';
import '@/common/less/index.less';
......
......@@ -17,18 +17,6 @@ const CloudClassConfig: MenuConfig = {
name: '云课堂',
routes: [
{
key: 'video_course',
name: '视频课',
path: '/cloudclass/video_course',
component: VideoCourse
},
{
key: 'prepare_lesson',
name: '资料云盘',
path: '/cloudclass/prepare_lesson',
component: ClassBook
},
{
key: 'test',
name: '页面测试',
path: '/cloudclass/test',
......
......@@ -5,20 +5,84 @@
* @LastEditTime: 2020-08-13 11:23:36
* @Description:
*/
import { MenuConfig, RouteConfig } from '@/routes/interface';
import CloudClass from './config/cloudClass';
// 领域路由配置
export const menuConfigs: MenuConfig[] = [ CloudClass ];
/** 所有处理后的路由的集合,用于生成Route组件 */
const allRoutes: RouteConfig[] = menuConfigs.map((config: MenuConfig) => {
return config.routes || [];
}).reduce((prev: RouteConfig[], next: RouteConfig[]) => {
return prev.concat(...next);
import {Redirect,Router, Route ,Switch} from 'react-router-dom';
import { createHashHistory } from 'history';
import App from '../modules/root/App';
import _ from 'underscore';
const history = createHashHistory();
window.RCHistory = _.extend({}, history, {
push: (obj: any) => {
history.push(obj)
},
pushState: (obj: any) => {
history.push(obj)
},
pushStateWithStatus: (obj: any) => {
history.push(obj)
},
goBack: history.goBack,
location: history.location,
replace: (obj: any) => {
history.replace(obj)
}
});
export const RootRouter = () => {
return (
// <Router {...history}>
// <Switch>
// {/* <Route key="1" exact path="/login" render={() => <Login />} />
// <Route key="6" path="/" render={() => <App dispatch={dispatch} state={state} />} /> */}
// </Switch>
// </Router>
)
}
// export const MainRoutes = () => {
// return (
// <Switch>
// {
// _.map(renderRoutes, ({
// path,
// version,
// component,
// container,
// isMicroApp,
// }, key) => {
// if (isMicroApp) {
// return <Route
// key={key}
// path={path}
// render={() => {
// return <div id={container} />
// }}
// />
// }
export default allRoutes;
// if (!version) {
// return <Route
// key={key}
// path={path}
// render={() => {
// const Component = dynamic({ path, component })
// cache[path] = Component
// return <Component />
// }}
// />
// } else if ((version === '5.0' && window.NewVersion) || (version !== '5.0' && !window.NewVersion)) {
// return <Route
// key={key}
// path={path}
// render={() => {
// const Component = dynamic({ path, component })
// cache[path] = Component
// return <Component />
// }}
// />
// }
// })
// }
// <Route key="-1" exact path='/' render={() => (<Redirect to='/home' />)} />
// </Switch>
// )
// }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment