-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.js
42 lines (36 loc) · 1.42 KB
/
index.js
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
import React from 'react';
import ReactDOM from 'react-dom';
import {IndexComponent} from './component/index/indexComponent';
import {ContactUsComponent} from './component/contactus/ContactUsComponent';
import {InvalidComponent} from './component/invalid/InvalidComponent';
import {FeedBackComponent} from './component/feedback/FeedBackComponent';
import {Router,Route,IndexRoute,hashHistory,browserHistory} from 'react-router';
//npm install jquery --save
//mpm install swipe --save
//npm install -S react-router
//npm install --save [email protected]
//npm install --save isomorphic-fetch es6-promise(superagent代替)
//npm install superagent
//import $ from 'jquery'
//import './index.css';
//import App from './App';
//import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(
(<Router history={browserHistory}>
<div>
<Route path="/" component={IndexComponent}/>
<Route path="/index" component={IndexComponent}/>
<Route path="/contactus" component={ContactUsComponent}/>
<Route path="/invalid/:code" component={InvalidComponent}/>
<Route path="/feedback" component={FeedBackComponent}/>
</div>
</Router>)
, document.getElementById('root'));
//nav();
//var slider1 = new Slider();
//slider1.Init();
/////屏幕大小发生改变时触发
//$(window).resize(function () {
// slider1.HanderIn();
// slider1.HanderOut();
//});