30 lines
843 B
JavaScript
30 lines
843 B
JavaScript
import React from 'react';
|
|
import Route from 'react-router/lib/Route';
|
|
import { WeaLocaleProvider } from 'ecCom'
|
|
|
|
import SimpleOrg from './components/tree/index';
|
|
import StandardOrg from './components/tree/standard_org'
|
|
|
|
import stores from './stores';
|
|
import './style/index';
|
|
|
|
// 读取系统多语言配置
|
|
let getLocaleLabel = WeaLocaleProvider.getLocaleLabel.bind(this, 'ns_demo01');
|
|
|
|
// 不需要读取系统多语言
|
|
getLocaleLabel = function(nextState, replace, callback) { callback();};
|
|
|
|
const Home = props => props.children;
|
|
|
|
const Routes = (
|
|
<Route key='organization' path='organization' onEnter={getLocaleLabel} component={Home}>
|
|
<Route key='index' path='index' component={SimpleOrg} />
|
|
<Route key='standard' path='standard' component={StandardOrg} />
|
|
</Route>
|
|
);
|
|
|
|
module.exports = {
|
|
Route: Routes,
|
|
store: stores,
|
|
};
|