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
51
52
import React, { PropTypes } from 'react';
import { Router, Route, IndexRoute, Link, IndexRedirect } from 'react-router';
import App from '../views/App';
import Home from '../views/Home';
import Login from '../views/Login';
import Test from '../views/Test';
import Feature1 from '../feature/Feature1';
import Feature1_1 from '../feature/Feature1-1';
import Feature1_3 from '../feature/Feature1-3';
import NotFound from '../components/NotFound';
import Loding from '../components/Loding';
import SWFPage from "../swift/SWFPage2"
import LeadPage from "../swift/LeadPage"
import Preview from "../swift/Preview"
import Result from "../swift/Result"
function validate() {
// 在路由群载入时做 filter 处理
}
const Routes = ({ history }) =>
<Router history={history} basename="/swiftedit">
{/*<Route path="/login" component={Login}/>*/}
<Route path="/" onEnter={validate}>
<IndexRedirect to="home" />
<Route component={App}>
<Route path="home" component={LeadPage}/>
<Route path="home/:mctid" component={LeadPage}/>
<Route path="lead/:mctid" component={LeadPage}/>
<Route path="swift/:action/:key" component={SWFPage}/>
<Route path="swift/:action/:mctid/:key" component={SWFPage}/>
<Route path="swift/:action/:mctid/:key/:rcvbic" component={SWFPage}/>
<Route path="swift/:action/:mctid/:key/:sndbic/:rcvbic" component={SWFPage}/>
<Route path="app" component={App}/>
<Route path="preview/:kind" component={Preview}/>
<Route path="result/:kind" component={Result}/>
<Route path="feature1" component={Feature1}/>
<Route path="feature1_1" component={Feature1_1}/>
<Route path="feature1_3" component={Feature1_3}/>
</Route>
</Route>
<Route path="*" component={NotFound}/>
</Router>;
Routes.propTypes = {
history: PropTypes.any,
};
export default Routes;