Skip to content

Commit

Permalink
修改
Browse files Browse the repository at this point in the history
  • Loading branch information
xcj-coding committed Jul 5, 2016
1 parent 631c418 commit 294f0e0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
12 changes: 6 additions & 6 deletions lib/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {Component, PropTypes} from 'react'
import React, {Component, PropTypes} from 'react';
import {render} from 'react-dom';
import {createStore} from 'redux';
import {Provider} from 'react-redux';
Expand All @@ -11,7 +11,7 @@ import T1 from './news/index';
import T2 from './t2';
import T3 from './t3';
import CRUISE from './cruise/index';
import NotFound from './notFound';
import NotFound from './common/notFound';

const history = useBasename(createHistory)({
basename: '/',
Expand All @@ -23,7 +23,7 @@ console.log('入口');
let store = createStore(reducer);

render(
<Provider store={store}>
<Provider store={store}>
<Router History={history}>
<Route path="home" component={Index} name="111首dad页">
<Route path="/home" component={Index} />
Expand All @@ -35,12 +35,12 @@ render(
<Route path="t3" component={T3} name="ddd我的地盘">
</Route>
<Route path="cruise" component={CRUISE} name="sss游轮">
<Redirect from="/" to="/cruise" />
<Route path="/cruise" component={CRUISE} />
</Route>
<Redirect from="/" to="/cruise" />
<Route path="*" component={NotFound}/>
</Router>
</Provider>,
document.getElementById('app')
</Provider>,
document.getElementById('app')
)

6 changes: 6 additions & 0 deletions lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ export class NavBottom extends Component {
<span className="am-navbar-label" style={{color:'#7f7f7f'}}>我的</span>
</a>
</li>
<li>
<a href="#/cruise">
<span className="am-icon-user" style={{color:'#7f7f7f'}}></span>
<span className="am-navbar-label" style={{color:'#7f7f7f'}}>游轮</span>
</a>
</li>
</ul>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion lib/notFound.js → lib/common/notFound.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class NotFound extends Component{
return (
<div className="ct" style={{width:600,margin:"80px auto"}}>
<p className="load"><img src="i/images/not_found.png" alt=""/></p>
<p><a href="#/index" className="cr5 ft14">返回首页</a></p>
<p><a href="/" className="cr5 ft14">返回首页</a></p>
</div>
)
}
Expand Down
28 changes: 12 additions & 16 deletions lib/cruise/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,22 @@ class CRUISE extends Component{
document.title = props.route.name
}
render(){
const transition = 'sfr';
return (
<div>
<h1>游轮</h1>
<NavBottom />
<AMUI.Button>test</AMUI.Button>
<Link to = "page1"> 页面 1 </Link>
<Link to = "page2"> 页面 2 </Link>
<AMUI.Container {...this.props}>
<AMUI.Container className="container-scrollable" transition={transition} component="div" scrollable {...this.props}>
<h1>游轮</h1>
<NavBottom />
<AMUI.Button>test</AMUI.Button>
<Link to = "page1"> 页面 1 </Link>
<Link to = "page2"> 页面 2 </Link>
<AMUI.Accordion defaultActiveKey={1}>
{albums.map((ablum, i) => {
return (
<AMUI.Accordion.Item
title={ablum.title}
key={i}
>
<p>
{ablum.desc}
</p>
</AMUI.Accordion.Item>
)
return (
<AMUI.Accordion.Item title={ablum.title} key={i}>
<p>{ablum.desc}</p>
</AMUI.Accordion.Item>
)
})}
</AMUI.Accordion>
</AMUI.Container>
Expand Down

0 comments on commit 294f0e0

Please sign in to comment.