Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
77caae47
Commit
77caae47
authored
Nov 24, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:增加gitignore相关的文件
parent
daf705e8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
28 deletions
+83
-28
.gitignore
+5
-0
src/index.tsx
+0
-3
src/routes/config/cloudClass.tsx
+0
-12
src/routes/index.tsx
+78
-13
No files found.
.gitignore
0 → 100644
View file @
77caae47
.DS_Store
node_modules/
dist/
npm-debug.log
\ No newline at end of file
src/index.tsx
View file @
77caae47
...
@@ -14,9 +14,6 @@ import { createHashHistory } from 'history';
...
@@ -14,9 +14,6 @@ import { createHashHistory } from 'history';
import
zh_CN
from
'antd/es/locale/zh_CN'
;
import
zh_CN
from
'antd/es/locale/zh_CN'
;
import
_
from
'underscore'
;
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
'antd/dist/antd.less'
;
import
'@/common/less/index.less'
;
import
'@/common/less/index.less'
;
...
...
src/routes/config/cloudClass.tsx
View file @
77caae47
...
@@ -17,18 +17,6 @@ const CloudClassConfig: MenuConfig = {
...
@@ -17,18 +17,6 @@ const CloudClassConfig: MenuConfig = {
name
:
'云课堂'
,
name
:
'云课堂'
,
routes
:
[
routes
:
[
{
{
key
:
'video_course'
,
name
:
'视频课'
,
path
:
'/cloudclass/video_course'
,
component
:
VideoCourse
},
{
key
:
'prepare_lesson'
,
name
:
'资料云盘'
,
path
:
'/cloudclass/prepare_lesson'
,
component
:
ClassBook
},
{
key
:
'test'
,
key
:
'test'
,
name
:
'页面测试'
,
name
:
'页面测试'
,
path
:
'/cloudclass/test'
,
path
:
'/cloudclass/test'
,
...
...
src/routes/index.tsx
View file @
77caae47
...
@@ -5,20 +5,84 @@
...
@@ -5,20 +5,84 @@
* @LastEditTime: 2020-08-13 11:23:36
* @LastEditTime: 2020-08-13 11:23:36
* @Description:
* @Description:
*/
*/
import
{
MenuConfig
,
RouteConfig
}
from
'@/routes/interface'
;
import
CloudClass
from
'./config/cloudClass'
;
import
CloudClass
from
'./config/cloudClass'
;
// 领域路由配置
import
{
Redirect
,
Router
,
Route
,
Switch
}
from
'react-router-dom'
;
export
const
menuConfigs
:
MenuConfig
[]
=
[
CloudClass
];
import
{
createHashHistory
}
from
'history'
;
import
App
from
'../modules/root/App'
;
/** 所有处理后的路由的集合,用于生成Route组件 */
import
_
from
'underscore'
;
const
allRoutes
:
RouteConfig
[]
=
menuConfigs
.
map
((
config
:
MenuConfig
)
=>
{
const
history
=
createHashHistory
();
return
config
.
routes
||
[];
window
.
RCHistory
=
_
.
extend
({},
history
,
{
}).
reduce
((
prev
:
RouteConfig
[],
next
:
RouteConfig
[])
=>
{
push
:
(
obj
:
any
)
=>
{
return
prev
.
concat
(...
next
);
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment