├── .gitignore ├── README.md ├── commonConfig.js ├── entry ├── about.js ├── airport_pickup.js ├── destination.js ├── ecommerce.js ├── eyesonworld.js ├── game.js ├── index.js ├── media.js ├── news.js ├── social.js └── stocks.js ├── html ├── about.html ├── airport_pickup.html ├── destination.html ├── ecommerce.html ├── eyesonworld.html ├── game.html ├── media.html ├── news.html ├── social.html ├── stocks.html └── weibo.html ├── image ├── Ticket1.png ├── Ticket2.png ├── Ticket3.png ├── Ticket4.png ├── Ticket5.png ├── Ticket6.png ├── aboutIcon.png ├── aboutbanner.png ├── aboutshenhangicon.png ├── agree.png ├── agreep.png ├── airport_pickup.png ├── airport_pickup_icon.png ├── airport_send.png ├── airport_send_preview.png ├── atlas.png ├── backicon.png ├── backline_left.png ├── backline_right.png ├── beiwawang.png ├── bhdjp.png ├── bottom_bacground.jpg ├── bottom_email.png ├── bottom_lianxi.png ├── bottom_weizhi.png ├── bottomcut.png ├── buyicon.png ├── centercut.png ├── chendi.png ├── citychoose.png ├── cjbcbanner.jpg ├── cjbccontent.jpg ├── cztdc.png ├── dashedcut.png ├── des-navfood-g.png ├── des-navfood.png ├── des-navscenic-g.png ├── des-navscenic.png ├── des-navshopping-g.png ├── des-navshopping.png ├── destinationicon.png ├── dingwei.png ├── e.jpg ├── ecommerce_icon.png ├── eyesicon.png ├── eyesonworldicon.png ├── food1.jpg ├── foodicon.png ├── footprints.png ├── footprintsp.png ├── gameIcon.png ├── game_icon.png ├── gupiaoIcon.png ├── huakuai.png ├── hulian_icon.png ├── huoxing.png ├── icon_news.png ├── jiesongIcon.png ├── jiesong_icon.png ├── kaola.png ├── kaolasmall.png ├── landi.png ├── left_touch.png ├── leftarrow.png ├── like.png ├── likep.png ├── line_left.png ├── line_right.png ├── liyanbanner.jpg ├── liyancontent.jpg ├── locationicon.png ├── logo.png ├── maige.png ├── music.mp3 ├── musicBackground.png ├── musicJiaoPian.png ├── musicJiaoPianTou.png ├── musicSunLine.png ├── musicTiaoZhen.png ├── navigation_logo.png ├── newsIcon.png ├── news_detail_back.png ├── news_more_r.png ├── next.png ├── online_game.png ├── placeIcon.png ├── plane.png ├── play.png ├── playSprite.png ├── play_icon.png ├── previous.png ├── qq_icon.png ├── result.png ├── right_touch.png ├── rightarrow.png ├── scenic1.jpg ├── scenicicon.png ├── scyl.png ├── searchicon.png ├── shadow2.png ├── shoppingicon.png ├── shoppingpay_icon.png ├── socialIcon.png ├── social_icon.png ├── sohu.png ├── stopping.png ├── strategyline.png ├── szlogo.png ├── test1.jpg ├── test2.jpg ├── test3.jpg ├── test4.jpg ├── test5.jpg ├── titlecut.png ├── videoCursor.png ├── videoIcon.png ├── weibo_icon.png ├── white_search.png ├── worldIcon.png ├── wx_icon.png ├── xfxj.png ├── xue.png ├── yingyin.png ├── youku.png └── zhanweiIcon.png ├── index.html ├── js ├── about │ ├── About.js │ ├── AboutContainer.js │ ├── Footer.js │ ├── Header.js │ ├── Image.js │ └── Products.js ├── airport_pickup │ └── index.js ├── destination │ ├── Footer.js │ ├── Header.js │ ├── Image.js │ ├── LinkImg.js │ ├── SwitchCity.js │ ├── atlas │ │ ├── AtlasContainer.js │ │ ├── Atlascontent.js │ │ └── Slider.js │ ├── city │ │ ├── CityContainer.js │ │ ├── RecommendTypeList.js │ │ └── RecommendTypeTab.js │ ├── destination.js │ ├── home │ │ ├── CityRecommend.js │ │ ├── FocusContainer.js │ │ └── HomeContainer.js │ └── strategy │ │ └── StrategyContainer.js ├── ecommerce │ └── index.js ├── eyesonworld │ ├── Eyesonworld.js │ ├── Footer.js │ ├── Header.js │ ├── Image.js │ ├── LinkImg.js │ ├── detail │ │ └── EyesDetail.js │ └── home │ │ └── EyesContainer.js ├── game │ └── index.js ├── index │ └── index.js ├── media │ ├── cartoon.js │ ├── hotPlay.js │ ├── kmplayer.js │ ├── mainMedia.js │ ├── musicplayer.js │ ├── play.js │ └── videoColumn.js ├── news │ ├── content.js │ ├── detail.js │ ├── header.js │ └── index.js ├── social │ └── index.js ├── stock │ └── stocks.js └── util │ ├── jquery.js │ ├── loading.js │ ├── mqttws31.js │ ├── navigationBar.js │ ├── pushMessage.js │ └── swiper.js ├── less ├── about │ └── about.less ├── common.less ├── destination │ └── destination.less ├── eyesonworld │ └── eyesonworld.less ├── index │ ├── index.less │ └── swiper-3.3.1.min.css ├── media │ ├── cartoon.less │ ├── hotPlay.less │ ├── index.less │ ├── kmplayer.less │ ├── musicplay.less │ └── videocolumn.less ├── news │ └── index.less └── stock │ └── stock.less ├── package.json ├── server.js └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | reactjs 2 | ======= 3 | # React-webpack 4 | 使用react+webpack+es6+route的开发框架 5 | 其中包含了一些基本的路由控制等等. 6 | 7 | 打开你的终端
8 | 1.npm install
9 | 2.npm start
10 | 3.在你的浏览器中输入htpp://localhost:8080 就可以看到相应的界面了 11 | -------------------------------------------------------------------------------- /commonConfig.js: -------------------------------------------------------------------------------- 1 | const HOST = 'http://api.sh.jiaxiaolei.com:9999/' 2 | // const HOST = 'http://172.168.10.17:9999/' 3 | export default { 4 | /*index page*/ 5 | FETCH_URL: HOST, 6 | USER:'renwenqing', 7 | 8 | // news 9 | API_NEWS_CATEGORYS: HOST + 'api/1/news/categories/', 10 | API_NEWS: HOST + 'api/1/news/', 11 | API_NEWS_DETAIL: HOST + 'api/1/news/', 12 | PAGE_SIZE: '10', 13 | 14 | // airport pickup 15 | API_AIRPORT_PICKUP: HOST + 'api/1/flight/', 16 | PICKUP_CARCAR: 'http://car.qunar.com/CharteredCar/index.jsp?serviceType=2&from=177', 17 | PICKUP_SH: 'http://www.26262662.cn/jcjs.html', 18 | SH_DEST: ['TPE'], 19 | 20 | // 目的地 21 | DISCOVERY_CITIES: HOST + 'api/1/discovery/cities/', 22 | DISCOVERY_HOME: HOST + 'api/1/discovery/home/', 23 | 24 | // PA 25 | PA_HOST: 'kiteapp.cicaero.com', 26 | PA_PORT: 10001, 27 | 28 | // game 29 | API_GAME: HOST + 'api/1/op/game/', 30 | 31 | // weibo 32 | WEIBO: 'https://passport.weibo.cn/signin/login?entry=mweibo', 33 | 34 | // yimi 35 | ECOMMERCE: 'http://hiyimi.kitefans.com/#/home?islogin=0' 36 | } 37 | -------------------------------------------------------------------------------- /entry/about.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | import { Router,Route, hashHistory} from 'react-router' 4 | import About from '../js/about/About' 5 | import Products from '../js/about/Products' 6 | 7 | 8 | render(( 9 | 10 | 11 | 12 | 13 | 14 | 15 | ), document.getElementById('about')) 16 | -------------------------------------------------------------------------------- /entry/airport_pickup.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | import { Router, Route, hashHistory } from 'react-router' 4 | import App, {SendAirport} from '../js/airport_pickup/index' 5 | 6 | render(( 7 | 8 | 9 | 10 | ), document.getElementById('root')) 11 | -------------------------------------------------------------------------------- /entry/destination.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | import { Router,Route, hashHistory} from 'react-router' 4 | import Destination from '../js/destination/Destination' 5 | import CityContainer from '../js/destination/city/CityContainer' 6 | import AtlasContainer from '../js/destination/atlas/AtlasContainer' 7 | import StrategyContainer from '../js/destination/strategy/StrategyContainer' 8 | 9 | render(( 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ), document.getElementById('destination')) 20 | -------------------------------------------------------------------------------- /entry/ecommerce.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | import { Router, Route, IndexRoute, Redirect, browserHistory, hashHistory } from 'react-router' 4 | 5 | import App from '../js/ecommerce/index' 6 | 7 | 8 | render(( 9 | 10 | 11 | 12 | 13 | ), document.getElementById('root')) 14 | -------------------------------------------------------------------------------- /entry/eyesonworld.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | import { Router,Route, hashHistory} from 'react-router' 4 | import Eyesonworld from '../js/eyesonworld/Eyesonworld' 5 | import EyesDetail from '../js/eyesonworld/detail/EyesDetail' 6 | 7 | 8 | render(( 9 | 10 | 11 | 12 | 13 | 14 | 15 | ), document.getElementById('eyesonworld')) 16 | -------------------------------------------------------------------------------- /entry/game.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | import { Router, Route, hashHistory } from 'react-router' 4 | 5 | import App, { Game } from '../js/game/index' 6 | 7 | 8 | render(( 9 | 10 | 11 | 12 | 13 | 14 | 15 | ), document.getElementById('root')) 16 | -------------------------------------------------------------------------------- /entry/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | import { Router,Route,Link,browserHistory} from 'react-router' 4 | 5 | import Index from '../js/index/index' 6 | 7 | 8 | render(( 9 | 10 | ), document.getElementById('root')); 11 | -------------------------------------------------------------------------------- /entry/media.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { render } from 'react-dom'; 3 | import { Router,Route, hashHistory,browserHistory} from 'react-router'; 4 | import MainMedia from '../js/media/mainMedia'; 5 | import HotPlay from "../js/media/hotPlay"; 6 | import Kmplayer from '../js/media/kmplayer'; 7 | import MusicPlay from '../js/media/musicplayer'; 8 | import Cartoon from '../js/media/cartoon'; 9 | import Play from '../js/media/play'; 10 | 11 | render(( 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | ), document.getElementById('media')) -------------------------------------------------------------------------------- /entry/news.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | import { Router, Route, IndexRedirect, Redirect, browserHistory, hashHistory} from 'react-router' 4 | 5 | import { App, NewsList, DetailIndex } from '../js/news/index' 6 | 7 | 8 | render(( 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ), document.getElementById('root')) 17 | -------------------------------------------------------------------------------- /entry/social.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | import { Router, Route, IndexRoute, Redirect, browserHistory, hashHistory } from 'react-router' 4 | 5 | import App, { Weibo } from '../js/social/index' 6 | 7 | 8 | render(( 9 | 10 | 11 | 12 | 13 | 14 | ), document.getElementById('root')); -------------------------------------------------------------------------------- /entry/stocks.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | import { Router,Route,Link,browserHistory} from 'react-router' 4 | 5 | import Stock from '../js/stock/stocks' 6 | 7 | 8 | render(( 9 | 10 | ), document.getElementById('root')); 11 | -------------------------------------------------------------------------------- /html/about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 深航专区 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /html/airport_pickup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 接送机 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /html/destination.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 目的地 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /html/ecommerce.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 空中电商 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /html/eyesonworld.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 丽眼看世界 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /html/game.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 游戏 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /html/media.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 影音 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /html/news.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 资讯 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /html/social.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 社交 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /html/stocks.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 股票行情 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /html/weibo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 微博 7 | 8 | 9 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /image/Ticket1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/Ticket1.png -------------------------------------------------------------------------------- /image/Ticket2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/Ticket2.png -------------------------------------------------------------------------------- /image/Ticket3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/Ticket3.png -------------------------------------------------------------------------------- /image/Ticket4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/Ticket4.png -------------------------------------------------------------------------------- /image/Ticket5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/Ticket5.png -------------------------------------------------------------------------------- /image/Ticket6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/Ticket6.png -------------------------------------------------------------------------------- /image/aboutIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/aboutIcon.png -------------------------------------------------------------------------------- /image/aboutbanner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/aboutbanner.png -------------------------------------------------------------------------------- /image/aboutshenhangicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/aboutshenhangicon.png -------------------------------------------------------------------------------- /image/agree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/agree.png -------------------------------------------------------------------------------- /image/agreep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/agreep.png -------------------------------------------------------------------------------- /image/airport_pickup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/airport_pickup.png -------------------------------------------------------------------------------- /image/airport_pickup_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/airport_pickup_icon.png -------------------------------------------------------------------------------- /image/airport_send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/airport_send.png -------------------------------------------------------------------------------- /image/airport_send_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/airport_send_preview.png -------------------------------------------------------------------------------- /image/atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/atlas.png -------------------------------------------------------------------------------- /image/backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/backicon.png -------------------------------------------------------------------------------- /image/backline_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/backline_left.png -------------------------------------------------------------------------------- /image/backline_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/backline_right.png -------------------------------------------------------------------------------- /image/beiwawang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/beiwawang.png -------------------------------------------------------------------------------- /image/bhdjp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/bhdjp.png -------------------------------------------------------------------------------- /image/bottom_bacground.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/bottom_bacground.jpg -------------------------------------------------------------------------------- /image/bottom_email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/bottom_email.png -------------------------------------------------------------------------------- /image/bottom_lianxi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/bottom_lianxi.png -------------------------------------------------------------------------------- /image/bottom_weizhi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/bottom_weizhi.png -------------------------------------------------------------------------------- /image/bottomcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/bottomcut.png -------------------------------------------------------------------------------- /image/buyicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/buyicon.png -------------------------------------------------------------------------------- /image/centercut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/centercut.png -------------------------------------------------------------------------------- /image/chendi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/chendi.png -------------------------------------------------------------------------------- /image/citychoose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/citychoose.png -------------------------------------------------------------------------------- /image/cjbcbanner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/cjbcbanner.jpg -------------------------------------------------------------------------------- /image/cjbccontent.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/cjbccontent.jpg -------------------------------------------------------------------------------- /image/cztdc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/cztdc.png -------------------------------------------------------------------------------- /image/dashedcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/dashedcut.png -------------------------------------------------------------------------------- /image/des-navfood-g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/des-navfood-g.png -------------------------------------------------------------------------------- /image/des-navfood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/des-navfood.png -------------------------------------------------------------------------------- /image/des-navscenic-g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/des-navscenic-g.png -------------------------------------------------------------------------------- /image/des-navscenic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/des-navscenic.png -------------------------------------------------------------------------------- /image/des-navshopping-g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/des-navshopping-g.png -------------------------------------------------------------------------------- /image/des-navshopping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/des-navshopping.png -------------------------------------------------------------------------------- /image/destinationicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/destinationicon.png -------------------------------------------------------------------------------- /image/dingwei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/dingwei.png -------------------------------------------------------------------------------- /image/e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/e.jpg -------------------------------------------------------------------------------- /image/ecommerce_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/ecommerce_icon.png -------------------------------------------------------------------------------- /image/eyesicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/eyesicon.png -------------------------------------------------------------------------------- /image/eyesonworldicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/eyesonworldicon.png -------------------------------------------------------------------------------- /image/food1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/food1.jpg -------------------------------------------------------------------------------- /image/foodicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/foodicon.png -------------------------------------------------------------------------------- /image/footprints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/footprints.png -------------------------------------------------------------------------------- /image/footprintsp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/footprintsp.png -------------------------------------------------------------------------------- /image/gameIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/gameIcon.png -------------------------------------------------------------------------------- /image/game_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/game_icon.png -------------------------------------------------------------------------------- /image/gupiaoIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/gupiaoIcon.png -------------------------------------------------------------------------------- /image/huakuai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/huakuai.png -------------------------------------------------------------------------------- /image/hulian_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/hulian_icon.png -------------------------------------------------------------------------------- /image/huoxing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/huoxing.png -------------------------------------------------------------------------------- /image/icon_news.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/icon_news.png -------------------------------------------------------------------------------- /image/jiesongIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/jiesongIcon.png -------------------------------------------------------------------------------- /image/jiesong_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/jiesong_icon.png -------------------------------------------------------------------------------- /image/kaola.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/kaola.png -------------------------------------------------------------------------------- /image/kaolasmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/kaolasmall.png -------------------------------------------------------------------------------- /image/landi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/landi.png -------------------------------------------------------------------------------- /image/left_touch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/left_touch.png -------------------------------------------------------------------------------- /image/leftarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/leftarrow.png -------------------------------------------------------------------------------- /image/like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/like.png -------------------------------------------------------------------------------- /image/likep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/likep.png -------------------------------------------------------------------------------- /image/line_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/line_left.png -------------------------------------------------------------------------------- /image/line_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/line_right.png -------------------------------------------------------------------------------- /image/liyanbanner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/liyanbanner.jpg -------------------------------------------------------------------------------- /image/liyancontent.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/liyancontent.jpg -------------------------------------------------------------------------------- /image/locationicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/locationicon.png -------------------------------------------------------------------------------- /image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/logo.png -------------------------------------------------------------------------------- /image/maige.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/maige.png -------------------------------------------------------------------------------- /image/music.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/music.mp3 -------------------------------------------------------------------------------- /image/musicBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/musicBackground.png -------------------------------------------------------------------------------- /image/musicJiaoPian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/musicJiaoPian.png -------------------------------------------------------------------------------- /image/musicJiaoPianTou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/musicJiaoPianTou.png -------------------------------------------------------------------------------- /image/musicSunLine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/musicSunLine.png -------------------------------------------------------------------------------- /image/musicTiaoZhen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/musicTiaoZhen.png -------------------------------------------------------------------------------- /image/navigation_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/navigation_logo.png -------------------------------------------------------------------------------- /image/newsIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/newsIcon.png -------------------------------------------------------------------------------- /image/news_detail_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/news_detail_back.png -------------------------------------------------------------------------------- /image/news_more_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/news_more_r.png -------------------------------------------------------------------------------- /image/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/next.png -------------------------------------------------------------------------------- /image/online_game.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/online_game.png -------------------------------------------------------------------------------- /image/placeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/placeIcon.png -------------------------------------------------------------------------------- /image/plane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/plane.png -------------------------------------------------------------------------------- /image/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/play.png -------------------------------------------------------------------------------- /image/playSprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/playSprite.png -------------------------------------------------------------------------------- /image/play_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/play_icon.png -------------------------------------------------------------------------------- /image/previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/previous.png -------------------------------------------------------------------------------- /image/qq_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/qq_icon.png -------------------------------------------------------------------------------- /image/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/result.png -------------------------------------------------------------------------------- /image/right_touch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/right_touch.png -------------------------------------------------------------------------------- /image/rightarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/rightarrow.png -------------------------------------------------------------------------------- /image/scenic1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/scenic1.jpg -------------------------------------------------------------------------------- /image/scenicicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/scenicicon.png -------------------------------------------------------------------------------- /image/scyl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/scyl.png -------------------------------------------------------------------------------- /image/searchicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/searchicon.png -------------------------------------------------------------------------------- /image/shadow2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/shadow2.png -------------------------------------------------------------------------------- /image/shoppingicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/shoppingicon.png -------------------------------------------------------------------------------- /image/shoppingpay_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/shoppingpay_icon.png -------------------------------------------------------------------------------- /image/socialIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/socialIcon.png -------------------------------------------------------------------------------- /image/social_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/social_icon.png -------------------------------------------------------------------------------- /image/sohu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/sohu.png -------------------------------------------------------------------------------- /image/stopping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/stopping.png -------------------------------------------------------------------------------- /image/strategyline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/strategyline.png -------------------------------------------------------------------------------- /image/szlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/szlogo.png -------------------------------------------------------------------------------- /image/test1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/test1.jpg -------------------------------------------------------------------------------- /image/test2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/test2.jpg -------------------------------------------------------------------------------- /image/test3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/test3.jpg -------------------------------------------------------------------------------- /image/test4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/test4.jpg -------------------------------------------------------------------------------- /image/test5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/test5.jpg -------------------------------------------------------------------------------- /image/titlecut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/titlecut.png -------------------------------------------------------------------------------- /image/videoCursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/videoCursor.png -------------------------------------------------------------------------------- /image/videoIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/videoIcon.png -------------------------------------------------------------------------------- /image/weibo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/weibo_icon.png -------------------------------------------------------------------------------- /image/white_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/white_search.png -------------------------------------------------------------------------------- /image/worldIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/worldIcon.png -------------------------------------------------------------------------------- /image/wx_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/wx_icon.png -------------------------------------------------------------------------------- /image/xfxj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/xfxj.png -------------------------------------------------------------------------------- /image/xue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/xue.png -------------------------------------------------------------------------------- /image/yingyin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/yingyin.png -------------------------------------------------------------------------------- /image/youku.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/youku.png -------------------------------------------------------------------------------- /image/zhanweiIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arenwen/React-webpack/75475af1e8a2ad9e1f7c3ac424f2b814237cc815/image/zhanweiIcon.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 首页 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /js/about/About.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | require('../../less/about/about') 3 | import NavigationBar from '../util/navigationBar' 4 | import Header from './Header' 5 | import AboutContainer from './AboutContainer' 6 | import Footer from './Footer' 7 | export default class About extends Component { 8 | componentDidMount(){ 9 | } 10 | render() { 11 | let allStyle = { 12 | height: '100%' 13 | } 14 | let wrapperStyle = { 15 | minHeight: '100%' 16 | } 17 | let mainStyle = { 18 | paddingBottom: '82px' 19 | } 20 | 21 | let container = ( 22 | 23 | ) 24 | 25 | if (this.props.params.pid) { 26 | container = ( 27 |
28 | {this.props.children} 29 |
30 | ) 31 | } 32 | return ( 33 |
34 |
35 |
36 | 37 |
38 | {container} 39 |
40 |
41 |
42 |
43 | ) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /js/about/AboutContainer.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | require('../../less/about/about') 3 | import NavigationBar from '../util/navigationBar' 4 | import Header from './Header' 5 | import Image from './Image' 6 | import config from '../../commonConfig' 7 | import { Link } from 'react-router' 8 | 9 | export default class AboutContainer extends Component { 10 | render() { 11 | let AboutContainerStyle = { 12 | background: 'url(../image/aboutbanner.png) no-repeat ', 13 | backgroundSize: '100% auto', 14 | paddingTop: '200px' 15 | } 16 | return ( 17 |
18 | 19 |
20 | ) 21 | } 22 | } 23 | class ContentContainer extends Component { 24 | constructor(props) { 25 | super(props) 26 | this.state = { 27 | code: 1, 28 | data: [] 29 | } 30 | } 31 | 32 | componentDidMount() { 33 | fetch(config.FETCH_URL+'api/1/about/') 34 | .then(response => response.json()) 35 | .then(json => this.setStateByCode(json)) 36 | .catch(e => console.log('Oops,error', e)) 37 | 38 | } 39 | 40 | setStateByCode(json) { 41 | if(json.code != 0) { 42 | return 43 | } 44 | 45 | this.setState({ 46 | code: json.code, 47 | data: json.data 48 | }) 49 | } 50 | render() { 51 | let containerStyle = { 52 | width: '75%', 53 | margin: '0 auto', 54 | background: '#fff', 55 | padding:'7%' 56 | } 57 | return ( 58 |
59 | 60 | 61 | 62 |
63 | ) 64 | } 65 | } 66 | 67 | class Title extends Component { 68 | render() { 69 | let titleStyle = { 70 | paddingLeft: '11px', 71 | borderLeft: '10px solid #010101', 72 | margin: '30px 0' 73 | } 74 | let wordStyle = { 75 | fontSize: '18px', 76 | fontWeight: 'bold' 77 | } 78 | return ( 79 |
80 |
{this.props.EWord}
81 |
{this.props.CWord}
82 |
83 | ) 84 | } 85 | } 86 | class Advocate extends Component { 87 | render() { 88 | let contentStyle = { 89 | display: '-webkit-flex' 90 | } 91 | let imgWrapStyle = { 92 | WebkitFlex: '1', 93 | background: 'url(../image/szlogo.png) no-repeat center center', 94 | backgroundSize: '80%' 95 | } 96 | let wordWrapStyle = { 97 | WebkitFlex: '1', 98 | borderLeft: '1px solid #979797', 99 | padding: '0 5%', 100 | textAlign: 'center' 101 | } 102 | let eWordStyle = { 103 | fontSize: '50px', 104 | borderBottom: '1px solid #979797' 105 | } 106 | let cWordStyle = { 107 | fontSize: '32px', 108 | lineHeight: '1.8', 109 | borderBottom: '1px solid #979797' 110 | } 111 | return ( 112 |
113 | 114 | <div style={contentStyle}> 115 | <div style={imgWrapStyle}></div> 116 | <div style={wordWrapStyle}> 117 | <div style={eWordStyle}> 118 | <p>AT ANY</p> 119 | <p>ANYTIME</p> 120 | </div> 121 | <p style={cWordStyle}>任何时候 体贴自然</p> 122 | </div> 123 | </div> 124 | </div> 125 | ) 126 | } 127 | } 128 | 129 | class Introduction extends Component { 130 | render() { 131 | 132 | let introStyle = { 133 | color: '#484949', 134 | lineHeight: '1.4', 135 | borderBottom: '1px dashed #c9c8c8' 136 | } 137 | let introInfo = {__html: this.props.introInfo} 138 | return ( 139 | <div style={introStyle}> 140 | <Title EWord='INTRODUCTION' CWord='深航简介' /> 141 | <div className='pwrap'> 142 | <div dangerouslySetInnerHTML={introInfo} /> 143 | </div> 144 | </div> 145 | ) 146 | } 147 | } 148 | 149 | class FeaturedProducts extends Component { 150 | static get defaultProps() { 151 | return { 152 | imgRatio: '56.09%', 153 | products: [] 154 | } 155 | } 156 | 157 | render() { 158 | let contentWrapStyle = { 159 | overflow: 'hidden' 160 | } 161 | let itemWrapStyle = { 162 | width: '30%', 163 | padding: '1.6%', 164 | float: 'left', 165 | fontSize: '16px', 166 | color: '#5d5d5d', 167 | textAlign: 'center', 168 | lineHeight: '3' 169 | } 170 | console.log('pppp',this.props.products) 171 | let products =this.props.products.map((product,i) => { 172 | let url = `about/${product.id}` 173 | return ( 174 | <div style={itemWrapStyle} key={i}> 175 | <Link to={url}> 176 | <Image imgRatio={this.props.imgRatio} imgSrc={product.cover_image}/> 177 | <p>{product.title}</p> 178 | </Link> 179 | </div> 180 | 181 | ) 182 | } 183 | ) 184 | return ( 185 | <div> 186 | <Title EWord='INTRODUCTION' CWord='特色产品' /> 187 | <div> 188 | <div style={contentWrapStyle}> 189 | {products} 190 | </div> 191 | </div> 192 | </div> 193 | ) 194 | } 195 | } 196 | -------------------------------------------------------------------------------- /js/about/Footer.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | 3 | // Footer—————— 4 | export default class Footer extends Component { 5 | render() { 6 | let wrapStyle = { 7 | paddingLeft:'80px', 8 | backgroundColor:'#000', 9 | marginTop: '-95px' 10 | } 11 | let titleStyle = { 12 | fontSize:'24px', 13 | color:'#fff', 14 | padding:'18px 0' 15 | } 16 | let stateStyle = { 17 | fontSize:'12px', 18 | color:'#fff', 19 | paddingBottom:'12px' 20 | } 21 | return ( 22 | <div style={wrapStyle}> 23 | <div style={titleStyle}>风筝·云图联合出品</div> 24 | <div style={stateStyle}>互联网违法和不良信息举报方式 电话:010 826771035 邮箱:buliang@shenzhenair.com</div> 25 | </div> 26 | ) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /js/about/Header.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | 3 | // Header—————— 4 | export default class Header extends Component { 5 | render() { 6 | let headerStyle = { 7 | padding:'24px 24px 20px 24px', 8 | display:'-webkit-flex', 9 | WebkitJustifyContent: 'space-between', 10 | justifyContent: 'space-between', 11 | borderBottom:'2px solid #d93600' 12 | } 13 | return ( 14 | <div style={headerStyle}> 15 | <HeaderTitle backiconUrl="../image/backicon.png" 16 | iconUrl="../image/aboutshenhangicon.png" 17 | headerTitle="深航专区" 18 | /> 19 | </div> 20 | ) 21 | } 22 | } 23 | 24 | class HeaderTitle extends Component { 25 | 26 | handleClick() { 27 | window.history.go(-1) 28 | } 29 | 30 | render() { 31 | 32 | let backStyle = { 33 | width: '20px', 34 | height: '30px', 35 | display: 'inline-block' 36 | } 37 | let iconStyle = { 38 | width: '100%', 39 | height: '100%', 40 | verticalAlign:'middle' 41 | } 42 | let destinationiconStyle = { 43 | width:'38px', 44 | height: '38px', 45 | display: 'inline-block', 46 | margin:'0 18px' 47 | } 48 | let titleStyle = { 49 | fontSize: '22px', 50 | color: '#D93600', 51 | verticalAlign:'middle' 52 | } 53 | return ( 54 | <div> 55 | <span style={backStyle} onClick={this.handleClick}> 56 | <img style={iconStyle} src={this.props.backiconUrl} /> 57 | </span> 58 | <span style={destinationiconStyle}> 59 | <img style={iconStyle} src={this.props.iconUrl} /> 60 | </span> 61 | 62 | <span style={titleStyle}>{this.props.headerTitle}</span> 63 | </div> 64 | ) 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /js/about/Image.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | 3 | export default class Image extends Component { 4 | static get defaultProps() { 5 | return { 6 | imgRatio: '56.25%', 7 | } 8 | } 9 | 10 | render() { 11 | let imgWrapStyle = { 12 | width: '100%', 13 | position: 'relative', 14 | paddingBottom: this.props.imgRatio 15 | } 16 | 17 | let imgStyle = { 18 | width:'100%', 19 | height: '100%', 20 | position: 'absolute', 21 | display:'block' 22 | } 23 | 24 | return ( 25 | <div style={imgWrapStyle}> 26 | <img style={imgStyle} src={this.props.imgSrc} /> 27 | </div> 28 | ) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /js/about/Products.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | require('../../less/about/about') 3 | import Header from './Header' 4 | import Image from './Image' 5 | import fetch from 'isomorphic-fetch' 6 | import config from '../../commonConfig' 7 | 8 | export default class Products extends Component { 9 | constructor() { 10 | super() 11 | this.state = { 12 | code: 1, 13 | data: { 14 | content: '' 15 | } 16 | } 17 | } 18 | 19 | componentDidMount() { 20 | fetch(config.FETCH_URL+`api/1/about/product/?pid=${this.props.params.pid}`) 21 | .then(response => response.json()) 22 | .then(json => this.setStateByCode(json)) 23 | .catch(e => console.log('Oops,error', e)) 24 | } 25 | 26 | 27 | setStateByCode(json) { 28 | if(json.code != 0) { 29 | return 30 | } 31 | 32 | this.setState({ 33 | code: json.code, 34 | data: json.data 35 | }) 36 | } 37 | 38 | render() { 39 | let imgWrapStyle = { 40 | width: '100%' 41 | } 42 | let imgInfo= {__html: this.state.data.content} 43 | return ( 44 | <div style = {imgWrapStyle}> 45 | <p dangerouslySetInnerHTML={imgInfo} /> 46 | </div> 47 | ) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /js/airport_pickup/index.js: -------------------------------------------------------------------------------- 1 | import fetch from 'isomorphic-fetch' 2 | import React, { Component } from 'react' 3 | import config from '../../commonConfig' 4 | import Select, { Option } from 'rc-select' 5 | import 'rc-select/assets/index.css' 6 | 7 | 8 | export default class App extends Component { 9 | 10 | constructor() { 11 | super() 12 | this.state = { 13 | code: 1, 14 | data: null, 15 | status: 0 // 0 接机 1 送机 16 | } 17 | } 18 | 19 | get destUrl() { 20 | if (this.state.data.carzone.shenzhenair.find(d => d.code === this.state.data.depAirport)) { 21 | return config.PICKUP_SH 22 | } 23 | 24 | return config.PICKUP_CARCAR 25 | } 26 | 27 | setStateByCode(json) { 28 | console.log('[APP] setStateByCode') 29 | if (json.code != 0) { 30 | // # TODO 31 | console.log('Oops, error', json.message) 32 | } 33 | else { 34 | this.setState({ 35 | code: json.code, 36 | data: json.data, 37 | status: 0 38 | }) 39 | } 40 | } 41 | 42 | componentDidMount() { 43 | console.log('[app] componentDidMount') 44 | fetch(config.API_AIRPORT_PICKUP).then(response => response.json()) 45 | .then(json => this.setStateByCode(json)) 46 | .catch(e => console.log('Oops, error', e)) 47 | } 48 | 49 | setStatus(val) { 50 | const s = this.state 51 | s.status = val 52 | this.setState(s) 53 | } 54 | 55 | render() { 56 | let divStyle = { 57 | width: '100%', 58 | margin: '0 auto' 59 | } 60 | let iframeStyle = { 61 | height: 600, 62 | minWidth: '100%', 63 | border: 0 64 | } 65 | return ( 66 | <div> 67 | <Header setStatus={ this.setStatus.bind(this) } /> 68 | {this.state.status == 1 ? 69 | <SendAirport />: 70 | <div style={divStyle}> 71 | { 72 | this.state.data && 73 | <iframe style={iframeStyle} scrolling='yes' src={ this.destUrl } > 74 | </iframe> 75 | } 76 | </div> 77 | } 78 | </div> 79 | ) 80 | } 81 | } 82 | 83 | 84 | class Header extends Component { 85 | constructor(props) { 86 | super(props) 87 | this.state = { 88 | selectedVal: 0 89 | } 90 | } 91 | 92 | onChange(e) { 93 | let val 94 | if (e && e.target) { 95 | val = e.target.value 96 | } 97 | else { 98 | val = e 99 | } 100 | 101 | this.setState({ 102 | selectedVal: val 103 | }) 104 | 105 | this.props.setStatus(val) 106 | } 107 | 108 | render() { 109 | let headerStyle = { 110 | padding:'24px 24px 20px 24px', 111 | display:'-webkit-flex', 112 | WebkitJustifyContent: 'space-between', 113 | justifyContent: 'space-between', 114 | borderBottom:'2px solid #d93600' 115 | } 116 | let iconStyle = { 117 | width: '50%', 118 | height: '50%', 119 | verticalAlign:'middle' 120 | } 121 | const imgs = [ 122 | <img src='../image/airport_pickup.png' style={iconStyle} />, 123 | <img src='../image/airport_send.png' style={iconStyle} /> 124 | ] 125 | return ( 126 | <div style={headerStyle}> 127 | <HeaderTitle backiconUrl="../image/backicon.png" 128 | iconUrl="../image/airport_pickup_icon.png" 129 | headerTitle="接送机" 130 | /> 131 | 132 | <div style={{ margin: '0 auto', width: 300 }}> 133 | <Select showSearch={false} onChange={this.onChange.bind(this)} 134 | style={{ width: 120 }} value={imgs[this.state.selectedVal]}> 135 | <Option value='0'>{imgs[0]}</Option> 136 | <Option value='1'>{imgs[1]}</Option> 137 | </Select> 138 | </div> 139 | </div> 140 | ) 141 | } 142 | } 143 | 144 | 145 | class HeaderTitle extends Component { 146 | 147 | render() { 148 | 149 | let backStyle = { 150 | width: '20px', 151 | height: '30px', 152 | display: 'inline-block' 153 | } 154 | let iconStyle = { 155 | width: '100%', 156 | height: '100%', 157 | verticalAlign:'middle' 158 | } 159 | let destinationiconStyle = { 160 | width:'38px', 161 | height: '28px', 162 | display: 'inline-block', 163 | margin:'0 18px' 164 | } 165 | let titleStyle = { 166 | fontSize: '22px', 167 | color: '#D93600', 168 | verticalAlign:'middle' 169 | } 170 | return ( 171 | <div> 172 | <span style={backStyle}> 173 | <a href='/'> 174 | <img style={iconStyle} src={this.props.backiconUrl} /> 175 | </a> 176 | </span> 177 | <span style={destinationiconStyle}> 178 | <img style={iconStyle} src={this.props.iconUrl} /> 179 | </span> 180 | 181 | <span style={titleStyle}>{this.props.headerTitle}</span> 182 | </div> 183 | ) 184 | } 185 | } 186 | 187 | 188 | class SendAirport extends Component { 189 | 190 | render() { 191 | return ( 192 | <div> 193 | <img src='../image/airport_send_preview.png' /> 194 | </div> 195 | ) 196 | } 197 | } 198 | 199 | 200 | export { SendAirport } 201 | -------------------------------------------------------------------------------- /js/destination/Footer.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | 3 | // Footer—————— 4 | export default class Footer extends Component { 5 | render() { 6 | let wrapStyle = { 7 | paddingLeft:'80px', 8 | backgroundColor:'#000', 9 | marginTop: '-95px' 10 | } 11 | let titleStyle = { 12 | fontSize:'24px', 13 | color:'#fff', 14 | padding:'18px 0' 15 | } 16 | let stateStyle = { 17 | fontSize:'12px', 18 | color:'#fff', 19 | paddingBottom:'12px' 20 | } 21 | return ( 22 | <div style={wrapStyle}> 23 | <div style={titleStyle}>风筝·云图联合出品</div> 24 | <div style={stateStyle}>互联网违法和不良信息举报方式 电话:010 826771035 邮箱:buliang@shenzhenair.com</div> 25 | </div> 26 | ) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /js/destination/Header.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import SwitchCity from './SwitchCity' 3 | 4 | function Store(options) { 5 | let tmp = {} 6 | 7 | for (let key in options.obj) { 8 | if (options.obj.hasOwnProperty(key)) { 9 | tmp[key] = options.obj[key] 10 | 11 | Object.defineProperty(this, key, { 12 | get: function() { 13 | return tmp[key] 14 | }, 15 | 16 | set: function(value) { 17 | tmp[key] = value 18 | options.onChange({ 19 | [key]: value 20 | }) 21 | } 22 | }) 23 | } 24 | } 25 | } 26 | 27 | // Header—————— 28 | export default class Header extends Component { 29 | static get defaultProps() { 30 | return { 31 | 32 | } 33 | } 34 | constructor(props) { 35 | super(props) 36 | 37 | this.state = { 38 | title: '目的地', 39 | city: '北京', 40 | showSelectCity: false 41 | } 42 | } 43 | 44 | onLocationClick() { 45 | this.setState({ 46 | showSelectCity: true 47 | }) 48 | } 49 | 50 | onSwitchCityClose() { 51 | this.setState({ 52 | showSelectCity: false 53 | }) 54 | } 55 | 56 | onSwitchCityClick() { 57 | this.setState({ 58 | showSelectCity: false 59 | }) 60 | } 61 | 62 | componentDidMount() { 63 | window.store = new Store({ 64 | obj: { 65 | title: '', 66 | city: '北京' 67 | }, 68 | onChange: this.setState.bind(this) 69 | }) 70 | } 71 | 72 | render() { 73 | 74 | let headerStyle = { 75 | padding:'24px 24px 20px 24px', 76 | display:'-webkit-flex', 77 | WebkitJustifyContent: 'space-between', 78 | justifyContent: 'space-between', 79 | borderBottom:'2px solid #d93600', 80 | position: 'relative' 81 | } 82 | 83 | return ( 84 | <div style={headerStyle}> 85 | <HeaderTitle 86 | backiconUrl="../image/backicon.png" 87 | iconUrl= "../image/destinationicon.png" 88 | title={this.state.title} 89 | params={this.props.params} 90 | 91 | /> 92 | {this.state.showSelectCity ? <SwitchCity onClick={this.onSwitchCityClick.bind(this)} onClose={this.onSwitchCityClose.bind(this)} /> : ''} 93 | <ChooseCity city={this.state.city} onClick={this.onLocationClick.bind(this)}/> 94 | </div> 95 | ) 96 | } 97 | } 98 | 99 | class HeaderTitle extends Component { 100 | 101 | handleClick() { 102 | if(!this.props.params.cid) { 103 | window.location.href = '/' 104 | return 105 | } 106 | if(this.props.params.cid && this.props.params.tid ) { 107 | window.location.hash = '' 108 | return 109 | } 110 | window.history.go(-1) 111 | } 112 | 113 | render() { 114 | 115 | let backStyle = { 116 | width: '20px', 117 | height: '30px', 118 | display: 'inline-block' 119 | } 120 | let iconStyle = { 121 | width: '100%', 122 | height: '100%', 123 | verticalAlign:'middle' 124 | } 125 | 126 | let destinationiconStyle = { 127 | width:'38px', 128 | height: '28px', 129 | display: 'inline-block', 130 | margin:'0 18px' 131 | } 132 | let titleStyle = { 133 | fontSize: '22px', 134 | color: '#D93600', 135 | verticalAlign:'middle' 136 | } 137 | let centerTitleStyle = { 138 | fontSize: '22px', 139 | color: '#D93600', 140 | verticalAlign:'middle', 141 | position: 'absolute', 142 | top: '55%', 143 | left: '50%', 144 | WebkitTransform: 'translate(-50%,-50%)' 145 | } 146 | 147 | return ( 148 | <div> 149 | <span style={backStyle} onClick={this.handleClick.bind(this)}> 150 | <img style={iconStyle} src={this.props.backiconUrl} /> 151 | </span> 152 | {this.props.title == '目的地' ? 153 | <span style={destinationiconStyle}> 154 | <img style={iconStyle} src={this.props.iconUrl} /> 155 | </span> : '' 156 | } 157 | <span style={this.props.title== '目的地'? titleStyle : centerTitleStyle }> 158 | {this.props.title} 159 | </span> 160 | </div> 161 | ) 162 | } 163 | } 164 | 165 | class ChooseCity extends Component { 166 | static get defaultProps() { 167 | return { 168 | city: '北京' 169 | } 170 | } 171 | 172 | constructor(props) { 173 | super(props) 174 | } 175 | 176 | render() { 177 | let imgStyle = { 178 | width:'100%', 179 | heihgt: '100%', 180 | verticalAlign:'middle' 181 | } 182 | 183 | let locationiconStyle={ 184 | width:'16px', 185 | heihgt:'18px', 186 | display:'inline-block' 187 | } 188 | 189 | let locationStyle = { 190 | fontSize:'18px', 191 | color:'#484949', 192 | verticalAlign:'middle', 193 | paddingLeft:'15px' 194 | } 195 | 196 | return ( 197 | <div onClick={this.props.onClick}> 198 | <span style={locationiconStyle}> 199 | <img style={imgStyle} src="../image/locationicon.png" /> 200 | </span> 201 | <span style={locationStyle}>{this.props.city}</span> 202 | </div> 203 | ) 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /js/destination/Image.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | 3 | export default class Image extends Component { 4 | static get defaultProps() { 5 | return { 6 | imgRatio: '56.25%', 7 | onClick: function () { 8 | 9 | } 10 | } 11 | } 12 | 13 | render() { 14 | let imgWrapStyle = { 15 | width: '100%', 16 | position: 'relative', 17 | paddingBottom: this.props.imgRatio 18 | } 19 | 20 | let imgStyle = { 21 | width:'100%', 22 | height: '100%', 23 | position: 'absolute', 24 | display:'block' 25 | } 26 | 27 | return ( 28 | <div style={imgWrapStyle}> 29 | <img data-index={this.props.index} onClick={this.props.onClick} style={imgStyle} src={this.props.imgSrc} /> 30 | <ImgTitleBox imgTitle={this.props.imgTitle} /> 31 | </div> 32 | ) 33 | } 34 | } 35 | 36 | class ImgTitleBox extends Component { 37 | render() { 38 | let imgTitleBoxStyle = { 39 | width:'100%', 40 | background:'linear-gradient(to top, rgba(0,0,0,.5) ,rgba(0,0,0,0))', 41 | position:'absolute', 42 | left:'0', 43 | bottom:'0' 44 | } 45 | let ImgTitleStyle = { 46 | color: '#fff', 47 | fontSize: '18px', 48 | lineHeight: '1.3', 49 | display: 'inline-block', 50 | padding: '8px 8px' 51 | } 52 | return ( 53 | <div style={imgTitleBoxStyle}> 54 | <span style={ImgTitleStyle}>{this.props.imgTitle}</span> 55 | </div> 56 | ) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /js/destination/LinkImg.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | require('../../less/destination/destination') 3 | import { Link } from 'react-router' 4 | import Image from './Image' 5 | export default class LinkImg extends Component { 6 | static get defaultProps() { 7 | return { 8 | url: '/', 9 | onClick: function() {} 10 | } 11 | } 12 | 13 | render() { 14 | return ( 15 | <Link to={this.props.url}> 16 | <Image 17 | {...this.props} 18 | /> 19 | </Link> 20 | ) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /js/destination/SwitchCity.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import Image from './Image' 3 | import { Link } from 'react-router' 4 | import config from '../../commonConfig' 5 | 6 | export default class SwitchCity extends Component { 7 | static get defaultProps() { 8 | return { 9 | } 10 | } 11 | 12 | constructor(props) { 13 | super(props) 14 | 15 | this.state = { 16 | filter: '', 17 | cities: [] 18 | } 19 | } 20 | 21 | componentDidMount() { 22 | fetch(config.FETCH_URL+'api/1/discovery/cities/') 23 | .then(response => response.json()) 24 | .then(resp => this.setStateByCode(resp)) 25 | .catch(e => console.log("Oops,error", e)) 26 | } 27 | 28 | setStateByCode(resp) { 29 | if(resp.code != 0) { 30 | console.log("Oops,error", resp.message) 31 | return 32 | } 33 | 34 | let cities = [] 35 | for (var key in resp.data.cities) { 36 | if (resp.data.cities.hasOwnProperty(key)) { 37 | cities = cities.concat(resp.data.cities[key]); 38 | } 39 | } 40 | 41 | this.setState({ 42 | code: resp.code, 43 | cities: cities 44 | }) 45 | } 46 | 47 | onInput(ev) { 48 | this.setState({ 49 | filter: ev.target.value 50 | }) 51 | } 52 | 53 | render() { 54 | let switchCityWrap = { 55 | width: '100%', 56 | height: '100%', 57 | background: 'rgba(0,0,0,.5)', 58 | zIndex: '9', 59 | position: 'fixed', 60 | top:'0', 61 | left:'0' 62 | } 63 | let switchcityStyle = { 64 | position: 'absolute', 65 | width: '66%', 66 | top: '76px', 67 | left: '50%', 68 | WebkitTransform: 'translateX(-50%)', 69 | zIndex: 233, 70 | backgroundColor: '#fff' 71 | } 72 | 73 | let results = this.state.filter ? this.state.cities.filter(city => { 74 | return city.code.indexOf(this.state.filter) !== -1 || 75 | city.name.indexOf(this.state.filter) !== -1 76 | }) : this.state.cities 77 | 78 | return ( 79 | <div style={switchCityWrap}> 80 | <div style={switchcityStyle}> 81 | <SwitchHeader onClose={this.props.onClose} /> 82 | <SearchBar onInput={this.onInput.bind(this)} /> 83 | <CityWrap cities={results} onClick={this.props.onClick} /> 84 | </div> 85 | </div> 86 | 87 | ) 88 | } 89 | } 90 | 91 | class SwitchHeader extends Component { 92 | render() { 93 | let switchHeaderStyle = { 94 | background: 'url(../image/dashedcut.png) repeat-x center bottom', 95 | backgroundSize: '150%', 96 | textAlign: 'center', 97 | lineHeight: '3', 98 | position: 'relative' 99 | } 100 | let switchTitleStyle = { 101 | color: '#d93600', 102 | fontSize: '22px', 103 | fontFamily: 'PingFang-SC-Medium' 104 | } 105 | let switchCloseStyle = { 106 | position: 'absolute', 107 | right: '10px', 108 | top: '-8px', 109 | color: '#999', 110 | fontSize: '26px' 111 | } 112 | return ( 113 | <div style={switchHeaderStyle}> 114 | <p style={switchTitleStyle}>切换城市</p> 115 | <span style={switchCloseStyle} onClick={this.props.onClose}>×</span> 116 | </div> 117 | ) 118 | } 119 | } 120 | 121 | class SearchBar extends Component { 122 | static get defaultProps() { 123 | return { 124 | onInput: function() {} 125 | } 126 | } 127 | 128 | componentDidMount() { 129 | this.refs.input.focus() 130 | } 131 | 132 | render() { 133 | let searchBarStyle = { 134 | position: 'relative', 135 | width: '85%', 136 | height: '44px', 137 | border: '1px solid #b5b5b5', 138 | margin: '15px auto' 139 | } 140 | let inputStyle = { 141 | width: '100%', 142 | height: '100%', 143 | fontSize:'18px', 144 | textAlign: 'center' 145 | } 146 | let searchIconStyle = { 147 | position:'absolute', 148 | width: '34px', 149 | height: '34px', 150 | top:'8px', 151 | left:'24%' 152 | } 153 | let imgStyle = { 154 | width: '100%' 155 | } 156 | 157 | return ( 158 | <div style={searchBarStyle}> 159 | <input type="text" ref="input" onInput={this.props.onInput} style={inputStyle} placeholder="输入城市名或者拼音" /> 160 | <div style={searchIconStyle}> 161 | <img style={imgStyle} src="../image/searchicon.png" alt="" /> 162 | </div> 163 | </div> 164 | ) 165 | } 166 | } 167 | 168 | class CityWrap extends Component { 169 | static get defaultProps() { 170 | return { 171 | onClick: function () {} 172 | } 173 | } 174 | 175 | render() { 176 | let cityWrapStyle = { 177 | width: '85%', 178 | margin: '0 auto' 179 | } 180 | let cityWrap = [] 181 | let lastAlphabet = null 182 | let cities = this.props.cities.sort((a, b) => a.code[0] > b.code[0] ? 1 : -1) 183 | 184 | cities.forEach(city => { 185 | let firstLetter = city.code[0] 186 | 187 | if(firstLetter !== lastAlphabet){ 188 | cityWrap.push(<Alphabet alphabet={firstLetter } key={Math.random()}/>) 189 | } 190 | 191 | cityWrap.push(<AlphabetCity name={city.name} cid={city.id} onClick={this.props.onClick}/>) 192 | 193 | lastAlphabet = firstLetter 194 | }) 195 | 196 | return ( 197 | <div style={cityWrapStyle}> 198 | {cityWrap} 199 | </div> 200 | ) 201 | } 202 | } 203 | 204 | class Alphabet extends Component { 205 | render() { 206 | let alphabetStyle = { 207 | fontSize: '18px', 208 | color: '#484949', 209 | lineHeight: '2', 210 | backgroundColor: '#eee', 211 | textIndent: '15px', 212 | margin: '0 auto' 213 | } 214 | return ( 215 | <div style={alphabetStyle}> 216 | {this.props.alphabet} 217 | </div> 218 | ) 219 | } 220 | } 221 | class AlphabetCity extends Component { 222 | static get defaultProps() { 223 | return { 224 | onClick: function () {} 225 | } 226 | } 227 | 228 | constructor(props) { 229 | super(props) 230 | } 231 | 232 | onClick(event) { 233 | window.store.title = this.props.name 234 | window.store.city = this.props.name 235 | 236 | this.props.onClick(event) 237 | } 238 | render() { 239 | let alphabetCityStyle = { 240 | fontSize: '18px', 241 | color: '#999', 242 | lineHeight: '3', 243 | textIndent: '15px', 244 | borderBottom: '1px solid #d0d0d0' 245 | } 246 | let LinkTo = `/city/${this.props.cid}/tab/foods/` 247 | return ( 248 | 249 | <div style={alphabetCityStyle}> 250 | <Link to={LinkTo} onClick={this.onClick.bind(this)}> 251 | <div> 252 | {this.props.name} 253 | </div> 254 | </Link> 255 | </div> 256 | ) 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /js/destination/atlas/AtlasContainer.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import ReactDOM from 'react-dom' 3 | import {findDOMNode} from 'react-dom' 4 | import { Link } from 'react-router' 5 | import {ImgsWrap, SliderContainer} from './AtlasContent' 6 | 7 | 8 | export default class AtlasContainer extends Component { 9 | static get defaultProps() { 10 | return { 11 | 12 | } 13 | } 14 | 15 | constructor(props) { 16 | super(props) 17 | 18 | this.state = { 19 | showSlider: false, 20 | sliderStart: 1, 21 | images: [] 22 | } 23 | } 24 | 25 | componentDidMount() { 26 | let atlas = window.store.atlasList[this.props.params.aid] 27 | 28 | window.store.title = atlas.title 29 | this.setState({ 30 | images: atlas.image_urls 31 | }) 32 | } 33 | 34 | removeSlider() { 35 | this.setState({showSlider: false}) 36 | } 37 | 38 | showSlider(ev) { 39 | this.setState({ 40 | showSlider: true, 41 | sliderStart: +ev.currentTarget.dataset.index 42 | }) 43 | } 44 | 45 | render() { 46 | let mainStyle={ 47 | padding:'1%', 48 | overflow: 'hidden' 49 | } 50 | let linkPrefix = `/atlas/${this.props.params.aid}` 51 | let slider = this.state.showSlider ? 52 | <SliderContainer start={this.state.sliderStart} images={this.state.images} onBackButtonClick={this.removeSlider.bind(this)} /> : '' 53 | 54 | return ( 55 | <div style={mainStyle}> 56 | <ImgsWrap images={this.state.images} linkPrefix={linkPrefix} onImgClick={this.showSlider.bind(this)} /> 57 | {slider} 58 | </div> 59 | ) 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /js/destination/atlas/Atlascontent.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import ReactDOM from 'react-dom' 3 | import Image from '../Image' 4 | import Slider from './Slider' 5 | 6 | export class ImgsWrap extends Component { 7 | static get defaultProps() { 8 | return { 9 | images: [], 10 | onClick: function() { 11 | 12 | } 13 | } 14 | } 15 | 16 | render() { 17 | let imgItemWrap = { 18 | width:'32.83%', 19 | float:'left', 20 | padding:'.25%' 21 | } 22 | 23 | return ( 24 | <ul> 25 | {this.props.images.map((image, i) => { 26 | return ( 27 | <li style={imgItemWrap} data-index={i} onClick={this.props.onImgClick} key={Math.random()}> 28 | <Image 29 | imgRatio="100%" 30 | imgSrc={image} /> 31 | </li> 32 | ) 33 | })} 34 | </ul> 35 | ) 36 | } 37 | } 38 | export class SliderContainer extends Component { 39 | static get defaultProps() { 40 | return { 41 | start: 0, 42 | images: [] 43 | } 44 | } 45 | 46 | constructor(props) { 47 | super(props) 48 | } 49 | 50 | render() { 51 | let imgCoverStyle = { 52 | position: 'fixed', 53 | width: '100%', 54 | height: '100%', 55 | background: 'rgba(0, 0, 0, .8)', 56 | zIndex: '999', 57 | top: '0', 58 | left: '0' 59 | } 60 | let backStyle = { 61 | background: 'url(../image/leftarrow.png) no-repeat 3% center', 62 | backgroundSize:'26px', 63 | color: '#fff', 64 | fontSize: '18px', 65 | textIndent: '26px', 66 | padding:'3%' 67 | } 68 | return ( 69 | <div style={imgCoverStyle} id="hide" > 70 | <div style={backStyle} onClick={this.props.onBackButtonClick}>返回</div> 71 | <Slider start={this.props.start} images={this.props.images}/> 72 | </div> 73 | ) 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /js/destination/atlas/Slider.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import Image from '../Image' 3 | import ReactSwipe from 'react-swipe' 4 | 5 | export default class Slider extends Component { 6 | static get defaultProps() { 7 | return { 8 | start: 0, 9 | images: [] 10 | } 11 | } 12 | 13 | constructor(props) { 14 | super(props) 15 | 16 | this.state = { 17 | curIndex: this.props.start 18 | } 19 | } 20 | 21 | componentWillReceiveProps(nextProps) { 22 | console.log('next',nextProps); 23 | } 24 | 25 | onSlider(index) { 26 | this.setState({ 27 | curIndex: index 28 | }) 29 | } 30 | next() { 31 | this.refs.reactSwipe.next() 32 | } 33 | 34 | prev() { 35 | this.refs.reactSwipe.prev() 36 | } 37 | render() { 38 | 39 | let sliderStyle = { 40 | width: '100%', 41 | height: '100%' 42 | } 43 | let swipeOptions = { 44 | continuous: true, 45 | startSlide: this.state.curIndex, 46 | callback: this.onSlider.bind(this) 47 | } 48 | let imgWrapStyle = { 49 | width: '80%', 50 | position: 'absolute', 51 | left:'50%', 52 | top: '50%', 53 | WebkitTransform: 'translate(-50%,-50%)' 54 | } 55 | // arrow style 56 | let arrowWrap = { 57 | width: '100%', 58 | position: 'absolute', 59 | top: '50%', 60 | transform:'translateY(-50%)' 61 | } 62 | let arrowLeft = { 63 | position: 'absolute', 64 | left: '10px', 65 | width: '80px', 66 | height: '80px', 67 | background: 'url(../image/leftarrow.png) no-repeat center center', 68 | backgroundSize: '70%' 69 | } 70 | let arrowRight = { 71 | position: 'absolute', 72 | right: '10px', 73 | width: '80px', 74 | height: '80px', 75 | background: 'url(../image/rightarrow.png) no-repeat center center', 76 | backgroundSize: '70%' 77 | } 78 | 79 | 80 | let images = this.props.images.map((image,i) => { 81 | return ( 82 | <div key={i}> 83 | <Image imgRatio="100%" imgSrc={image} key={i} /> 84 | </div> 85 | ) 86 | }) 87 | 88 | return ( 89 | <div style={sliderStyle}> 90 | <div style={imgWrapStyle}> 91 | <ReactSwipe ref="reactSwipe" className="carousel" swipeOptions={swipeOptions} key={this.props.images.length}> 92 | {images} 93 | </ReactSwipe> 94 | </div> 95 | 96 | <div style={arrowWrap}> 97 | <div style={arrowLeft} data-type="LEFT" onClick={this.prev.bind(this)}> 98 | </div> 99 | <div style={arrowRight} data-type="RIGHT" onClick={this.next.bind(this)}> 100 | </div> 101 | </div> 102 | 103 | <SliderIndex curIndex={this.state.curIndex + 1} allNum={this.props.images.length}/> 104 | </div> 105 | ) 106 | } 107 | } 108 | 109 | class SliderIndex extends Component { 110 | static get defaultProps() { 111 | return { 112 | curIndex: 0, 113 | allNum: 0 114 | } 115 | } 116 | 117 | render() { 118 | let indexWrap = { 119 | position: 'absolute', 120 | bottom: '70px', 121 | color: '#fff', 122 | left: '50%', 123 | transform: 'translateX(-50%)' 124 | } 125 | return ( 126 | <div style={indexWrap}> 127 | {this.props.curIndex} / {this.props.allNum} 128 | </div> 129 | ) 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /js/destination/city/CityContainer.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import RecommendTypeTab from './RecommendTypeTab' 3 | import RecommendTypeList from './RecommendTypeList' 4 | import config from '../../../commonConfig' 5 | import Loading from '../../util/loading' 6 | import fetch from 'isomorphic-fetch' 7 | 8 | export default class CityContainer extends Component { 9 | static get defaultProps() { 10 | return { 11 | } 12 | } 13 | 14 | constructor() { 15 | super() 16 | this.state = { 17 | code: 1, 18 | data: [], 19 | ifLoading:true 20 | } 21 | } 22 | 23 | componentDidMount() { 24 | this.fetch(this.props.params.cid, this.props.params.tid) 25 | 26 | } 27 | 28 | fetch(cid, tid) { 29 | fetch(config.FETCH_URL+`api/1/discovery/${cid}/${tid}/`) 30 | .then(response => response.json()) 31 | .then(json => this.setStateByCode(json)) 32 | .catch(e => console.log("Oops,error", e)) 33 | } 34 | 35 | componentWillReceiveProps(nextProps) { 36 | this.setState({ 37 | data: [] 38 | }) 39 | if(nextProps.params.tid){ 40 | this.fetch(nextProps.params.cid, nextProps.params.tid) 41 | } 42 | if (!nextProps.params.aid && !nextProps.params.sid ) { 43 | window.store.title = window.store.city 44 | } 45 | } 46 | 47 | setStateByCode(json) { 48 | if(json.code != 0) { 49 | return 50 | } 51 | 52 | let atlasList = {} 53 | 54 | json.data.forEach(city => { 55 | atlasList[city.id] = city 56 | }) 57 | 58 | window.store.atlasList = atlasList 59 | 60 | this.setState({ 61 | code: json.code, 62 | data: json.data, 63 | ifLoading:false 64 | }) 65 | } 66 | 67 | render() { 68 | let linkPrefix = `/city/${this.props.params.cid}` 69 | let container = ( 70 | <div> 71 | <Loading ifLoading={ this.state.ifLoading } /> 72 | <RecommendTypeTab linkPrefix={linkPrefix} currentTab={this.props.params.tid}/> 73 | <RecommendTypeList cid={this.props.params.cid} tid={this.props.params.tid} data={this.state.data}/> 74 | </div> 75 | ) 76 | 77 | if (this.props.params.aid) { 78 | container = ( 79 | <div> 80 | {this.props.children} 81 | </div> 82 | ) 83 | } 84 | 85 | if (this.props.params.sid) { 86 | container = ( 87 | <div> 88 | {this.props.children} 89 | </div> 90 | ) 91 | } 92 | // todo 93 | console.log('children',this.props.children) 94 | return ( 95 | <div> 96 | {container} 97 | </div> 98 | ) 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /js/destination/city/RecommendTypeTab.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import { Link } from 'react-router' 3 | 4 | export default class RecommendTypeTab extends Component { 5 | 6 | static get defaultProps() { 7 | return { 8 | linkPrefix: '/city/0', 9 | currentTab: 'food', 10 | tabs: [ 11 | { 12 | tab: 'foods', 13 | name: '好吃的', 14 | imgUrl: '../image/des-navfood-g.png', 15 | curImgUrl: '../image/des-navfood.png' 16 | }, 17 | { 18 | tab: 'sceneries', 19 | name: '好玩的', 20 | imgUrl: '../image/des-navscenic-g.png', 21 | curImgUrl: '../image/des-navscenic.png' 22 | }, 23 | { 24 | tab: 'shopping', 25 | name: '值得买', 26 | imgUrl: '../image/des-navshopping-g.png', 27 | curImgUrl: '../image/des-navshopping.png' 28 | } 29 | ] 30 | } 31 | } 32 | render() { 33 | let navWrapStyle = { 34 | width: '100%', 35 | display: '-webkit-flex', 36 | padding: '15px 0 10px 0', 37 | borderBottom:'1px solid #e1e0dc' 38 | } 39 | let navListStyle = { 40 | width: '100%' 41 | } 42 | let currentTab = this.props.currentTab 43 | let linkPrefix = this.props.linkPrefix 44 | 45 | const navs = this.props.tabs.map(function(tabItem, i) { 46 | let linkTo = `${linkPrefix}/tab/${tabItem.tab}` 47 | return ( 48 | <li style={navListStyle} key={tabItem.tab}> 49 | <Link to={linkTo} > 50 | <NavItem 51 | selected={tabItem.tab == currentTab} 52 | imgUrl={tabItem.tab == currentTab ? tabItem.curImgUrl : tabItem.imgUrl} 53 | navTitle={tabItem.name} 54 | /> 55 | </Link> 56 | </li> 57 | ) 58 | }) 59 | 60 | return ( 61 | <ul style={navWrapStyle}> 62 | {navs} 63 | </ul> 64 | ) 65 | } 66 | } 67 | 68 | class NavItem extends Component { 69 | static get defaultProps() { 70 | return { 71 | selected: false 72 | } 73 | } 74 | 75 | render() { 76 | let contentStyle = { 77 | width:'120px', 78 | margin:'0 auto' 79 | } 80 | 81 | let imgStyle = { 82 | width:'28px', 83 | height:'28px', 84 | verticalAlign:'middle' 85 | } 86 | let wordStyle = { 87 | fontSize:'18px', 88 | color:this.props.selected? '#d93600' : '#5d5d5d', 89 | paddingLeft:'28px', 90 | verticalAlign:'middle' 91 | } 92 | let navItemStyle = { 93 | WebkitFlex:'1', 94 | borderLeft:'1px solid #d1d0ce' 95 | } 96 | let curNavItemStyle = { 97 | WebkitFlex:'1', 98 | borderLeft:'1px solid #d1d0ce' 99 | } 100 | 101 | let underLineStyle = { 102 | position: 'relative', 103 | width: '100%', 104 | height: '2px', 105 | backgroundColor: '#d93600', 106 | top:'10px' 107 | } 108 | 109 | return ( 110 | <div style={this.props.currentTabtype == this.propstabtype? curNavItemStyle : navItemStyle}> 111 | <div style={contentStyle}> 112 | <img style={imgStyle} src={this.props.imgUrl} /> 113 | <span style={wordStyle}>{this.props.navTitle}</span> 114 | </div> 115 | {this.props.selected ? <div style={underLineStyle}></div> : ''} 116 | </div> 117 | ) 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /js/destination/destination.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | require('../../less/destination/destination') 3 | import HomeContainer from './home/HomeContainer' 4 | import Footer from './Footer' 5 | import Header from './Header' 6 | import NavigationBar from '../util/navigationBar' 7 | 8 | export default class Destionation extends Component { 9 | constructor() { 10 | super() 11 | this.state = { 12 | code: 1, 13 | data: {}, 14 | selectCity: false, 15 | prev: '/', 16 | now: '/' 17 | } 18 | } 19 | 20 | componentWillReceiveProps(nextProps) { 21 | if (!nextProps.params.cid) { 22 | window.store.title = '目的地' 23 | } 24 | } 25 | 26 | render() { 27 | let allStyle = { 28 | height: '100%' 29 | } 30 | let wrapperStyle = { 31 | minHeight: '100%' 32 | } 33 | let mainStyle = { 34 | paddingBottom: '82px' 35 | } 36 | let container = ( 37 | <div> 38 | <HomeContainer /> 39 | </div> 40 | ) 41 | 42 | if (this.props.params.cid) { 43 | container = ( 44 | <div> 45 | {this.props.children} 46 | </div> 47 | ) 48 | } 49 | 50 | return ( 51 | <div style={allStyle}> 52 | <div style={wrapperStyle}> 53 | <div style={mainStyle}> 54 | <NavigationBar /> 55 | <Header params={this.props.params} /> 56 | {container} 57 | </div> 58 | </div> 59 | <Footer /> 60 | </div> 61 | ) 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /js/destination/home/FocusContainer.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import Image from '../Image' 3 | import { Link } from 'react-router' 4 | import SwitchCity from '../SwitchCity' 5 | import config from '../../../commonConfig' 6 | import fetch from 'isomorphic-fetch' 7 | let $ = window.jQuery 8 | // 搜索—————— 9 | export default class FocusContainer extends Component { 10 | 11 | constructor(props) { 12 | super(props) 13 | 14 | this.state = { 15 | showSelectCity: false, 16 | code: 1, 17 | data: [] 18 | } 19 | } 20 | 21 | onInputClick() { 22 | this.setState({ 23 | showSelectCity: true 24 | }) 25 | } 26 | 27 | onSwitchCityClose() { 28 | this.setState({ 29 | showSelectCity: false 30 | }) 31 | } 32 | componentDidMount() { 33 | fetch(config.DISCOVERY_CITIES) 34 | .then(response => response.json()) 35 | .then(json => this.setStateByCode(json)) 36 | .catch(e => console.log("Oops,error", e)) 37 | } 38 | 39 | setStateByCode(json) { 40 | if(json.code != 0) { 41 | console.log("Oops,error", json.message) 42 | return 43 | } 44 | 45 | this.setState({ 46 | code: json.code, 47 | data: json.data 48 | }) 49 | } 50 | render() { 51 | let wrapStyle = { 52 | width:'100%', 53 | height:'33.23vw', 54 | backgroundSize:'100%', 55 | position:'relative' 56 | } 57 | let focusImg = this.state.data.cover_url 58 | return ( 59 | 60 | <div style={wrapStyle}> 61 | <Image 62 | imgRatio="33.23%" 63 | imgSrc={focusImg} 64 | /> 65 | <Search onInputClick={this.onInputClick.bind(this)} recommends={this.state.data.hot_city} /> 66 | {this.state.showSelectCity ? <SwitchCity onClose={this.onSwitchCityClose.bind(this)} /> : ''} 67 | </div> 68 | ) 69 | 70 | } 71 | } 72 | FocusContainer.defaultProps = { 73 | focusImgInfo:[ 74 | { 75 | cover_image: '../image/food1.jpg' 76 | } 77 | ] 78 | } 79 | class Search extends Component { 80 | static get defaultProps() { 81 | return { 82 | recommends: [] 83 | } 84 | } 85 | constructor(props) { 86 | super(props) 87 | } 88 | 89 | render() { 90 | let containerStyle = { 91 | color:'#fff', 92 | backgroundColor:'rgba(0,0,0,.4)', 93 | position:'absolute', 94 | top:'60%', 95 | left:'50%', 96 | WebkitTransform:'translate(-50%,-50%)', 97 | padding:'14px 44px 8px 44px' 98 | } 99 | 100 | return ( 101 | <div style={containerStyle}> 102 | <SearchTitle title="世界那么大,我想去看看"/> 103 | <InputBox onClick={this.props.onInputClick} /> 104 | <SearchRecommend recommends={this.props.recommends} /> 105 | </div> 106 | ) 107 | } 108 | } 109 | 110 | class SearchTitle extends Component { 111 | render() { 112 | let titleStyle = { 113 | fontSize:'18px' } 114 | return ( 115 | <p style = {titleStyle}>{this.props.title}</p> 116 | ) 117 | } 118 | } 119 | 120 | class SearchRecommend extends Component { 121 | 122 | render() { 123 | let recomentListStyle = { 124 | display: 'inline-block' 125 | } 126 | const recommends = this.props.recommends.map(function(recommend, i) { 127 | let LinkTo = `/city/${recommend.id}/tab/foods/` 128 | return ( 129 | <li style={recomentListStyle} key={Math.random()} > 130 | <Link to={LinkTo} > 131 | <RecomCityItem name = {recommend.name}/> 132 | </Link> 133 | </li> 134 | ) 135 | }) 136 | return ( 137 | <ul>热门城市: 138 | {recommends} 139 | </ul> 140 | ) 141 | } 142 | } 143 | class RecomCityItem extends Component { 144 | static get defaultProps() { 145 | return { 146 | name: {} 147 | } 148 | } 149 | onClick(event) { 150 | window.store.title = this.props.name 151 | window.store.city = this.props.name 152 | 153 | this.props.onClick(event) 154 | } 155 | render() { 156 | let recomCityItemStyle = { 157 | display: 'inline-block', 158 | color: '#fff', 159 | padding: '0 6px' 160 | } 161 | 162 | return ( 163 | <div style = {recomCityItemStyle} onClick = {this.onClick.bind(this)}> 164 | {this.props.name} 165 | </div> 166 | ) 167 | } 168 | } 169 | 170 | class InputBox extends Component { 171 | render() { 172 | let inputBoxStyle = { 173 | position: 'relative' 174 | } 175 | let inputStyle = { 176 | width:'410px', 177 | height:'56px', 178 | margin:'12px 0', 179 | borderRadius:'5px', 180 | fontSize:'18px', 181 | paddingLeft:'15px' 182 | 183 | } 184 | let searchIconStyle = { 185 | position:'absolute', 186 | width: '34px', 187 | height: '34px', 188 | top:'22px', 189 | left:'380px' 190 | } 191 | let imgStyle = { 192 | width: '100%' 193 | } 194 | return ( 195 | <div style={inputBoxStyle} onClick={this.props.onClick}> 196 | <input type="text" style = {inputStyle} placeholder="我想去..." /> 197 | <div style={searchIconStyle}> 198 | <img style={imgStyle} src="../image/searchicon.png" alt="" /> 199 | </div> 200 | </div> 201 | ) 202 | } 203 | } 204 | -------------------------------------------------------------------------------- /js/destination/home/HomeContainer.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import FocusContainer from './FocusContainer' 3 | import CityRecommend from './CityRecommend' 4 | 5 | 6 | export default class HomeContainer extends Component { 7 | constructor() { 8 | super() 9 | this.state = { 10 | code: 1, 11 | data: [] 12 | } 13 | } 14 | 15 | static get defaultProps() { 16 | return { 17 | 18 | } 19 | } 20 | 21 | render() { 22 | return ( 23 | <div> 24 | <FocusContainer focusInfo={this.props.focusInfo}/> 25 | <CityRecommend /> 26 | </div> 27 | ) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /js/destination/strategy/StrategyContainer.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import config from '../../../commonConfig' 3 | import fetch from 'isomorphic-fetch' 4 | 5 | 6 | export default class StrategyContainer extends Component { 7 | static get defaultProps() { 8 | return { 9 | cid: 1, 10 | sid: 1 11 | } 12 | } 13 | constructor(props) { 14 | super(props) 15 | this.state = { 16 | code: 1, 17 | data: [], 18 | image_urls:[] 19 | } 20 | } 21 | componentDidMount() { 22 | fetch(config.FETCH_URL+`api/1/discovery/${this.props.cid}/strategies/${this.props.sid}/`) 23 | .then(response => response.json()) 24 | .then(json => this.setStateByCode(json)) 25 | .catch(e => console.log('Oops,error', e)) 26 | } 27 | setStateByCode(json) { 28 | if(json.code != 0) { 29 | return 30 | } 31 | 32 | window.store.title = json.data.title 33 | this.setState({ 34 | code: json.code, 35 | data: json.data, 36 | image_urls:json.data.image_urls 37 | }) 38 | } 39 | 40 | render() { 41 | let mainStyle={ 42 | width: '96%', 43 | padding: '20px 0', 44 | margin: '0 auto' 45 | } 46 | let sourceStyle = { 47 | fontSize: '14px', 48 | color:'#999', 49 | textAlign: 'center', 50 | padding:'20px 0 30px 0' 51 | } 52 | let forewordWrap = { 53 | color: '#484949', 54 | backgroundImage: 'url(../image/dashedcut.png)', 55 | backgroundRepeat: 'no-repeat', 56 | backgroundPosition: 'center center', 57 | backgroundSize: '90%', 58 | backgroundColor:'#fff' 59 | } 60 | let forewordFix = { 61 | fontSize: '22px', 62 | paddingLeft: '15px' 63 | } 64 | let forewordContent = { 65 | fontSize: '14px', 66 | lineHeight: '3', 67 | background: '#fff', 68 | padding: '0 10px', 69 | zIndex: '999' 70 | } 71 | let articleStyle = { 72 | fontSize: '16px', 73 | color: '#484949', 74 | textIndent: '20px' 75 | } 76 | let imgWrapStyle = { 77 | textAlign: 'center', 78 | margin: '25px 0' 79 | } 80 | let timeStyle = { 81 | textIndent: '6px', 82 | display: 'inline-block' 83 | } 84 | const images = this.state.image_urls.map((img, i) => { 85 | return ( 86 | <img src={img} key={i} /> 87 | ) 88 | }) 89 | 90 | return ( 91 | <div style={mainStyle}> 92 | <p style={sourceStyle}> 93 | <span>{this.state.data.author}</span> 94 | <span style={timeStyle}>{this.state.data.create_time}</span> 95 | 96 | </p> 97 | <div style={forewordWrap}> 98 | <span style={forewordFix}>前言</span> 99 | <span style={forewordContent}>{this.state.data.abstract}</span> 100 | </div> 101 | <div style={imgWrapStyle}> 102 | {images} 103 | </div> 104 | <p style={articleStyle}>{this.state.data.content}</p> 105 | </div> 106 | ) 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /js/ecommerce/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import { Link } from 'react-router' 3 | import config from '../../commonConfig' 4 | 5 | export default class App extends Component { 6 | 7 | render() { 8 | return ( 9 | <div> 10 | <Header /> 11 | {this.props.children ? 12 | this.props.children: 13 | <Yimi /> 14 | } 15 | </div> 16 | ) 17 | } 18 | } 19 | 20 | 21 | class Header extends Component { 22 | constructor(props) { 23 | super(props) 24 | this.state = { 25 | showSelectCity: false 26 | } 27 | } 28 | 29 | onLocationClick() { 30 | this.setState({ 31 | showSelectCity: true 32 | }) 33 | } 34 | 35 | render() { 36 | let headerStyle = { 37 | padding:'24px 24px 20px 24px', 38 | display:'-webkit-flex', 39 | WebkitJustifyContent: 'space-between', 40 | justifyContent: 'space-between', 41 | borderBottom:'2px solid #d93600' 42 | } 43 | return ( 44 | <div style={headerStyle}> 45 | <HeaderTitle backiconUrl="../image/backicon.png" 46 | iconUrl="../image/ecommerce_icon.png" 47 | headerTitle="空中电商" 48 | /> 49 | </div> 50 | ) 51 | } 52 | } 53 | 54 | 55 | class HeaderTitle extends Component { 56 | handleClick() { 57 | window.history.go(-1) 58 | } 59 | render() { 60 | 61 | let backStyle = { 62 | width: '20px', 63 | height: '30px', 64 | display: 'inline-block' 65 | } 66 | let iconStyle = { 67 | width: '100%', 68 | height: '100%', 69 | verticalAlign:'middle' 70 | } 71 | let destinationiconStyle = { 72 | width:'38px', 73 | height: '28px', 74 | display: 'inline-block', 75 | margin:'0 18px' 76 | } 77 | let titleStyle = { 78 | fontSize: '22px', 79 | color: '#D93600', 80 | verticalAlign:'middle' 81 | } 82 | return ( 83 | <div> 84 | <span style={backStyle} onClick={this.handleClick}> 85 | <img style={iconStyle} src={this.props.backiconUrl} /> 86 | </span> 87 | <span style={destinationiconStyle}> 88 | <img style={iconStyle} src={this.props.iconUrl} /> 89 | </span> 90 | 91 | <span style={titleStyle}>{this.props.headerTitle}</span> 92 | </div> 93 | ) 94 | } 95 | } 96 | 97 | 98 | export class Yimi extends Component { 99 | render() { 100 | let divStyle = { 101 | width: '100%', 102 | margin: '0 auto' 103 | } 104 | let iframeStyle = { 105 | height: 1000, 106 | minWidth: '100%', 107 | border: 0 108 | } 109 | return ( 110 | <div style={divStyle}> 111 | <iframe style={iframeStyle} scrolling='no' src={config.ECOMMERCE} > 112 | </iframe> 113 | </div> 114 | ) 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /js/eyesonworld/Eyesonworld.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | require('../../less/eyesonworld/eyesonworld') 3 | import NavigationBar from '../util/navigationBar' 4 | import Header from './Header' 5 | import EyesContainer from './home/EyesContainer' 6 | import Footer from './Footer' 7 | import EyesDetail from './detail/EyesDetail' 8 | export default class Eyesonworld extends Component { 9 | constructor() { 10 | super() 11 | this.state = { 12 | headerTitle:'丽眼看世界' 13 | } 14 | } 15 | componentDidMount(){ 16 | } 17 | headerTitle(title){ 18 | this.setState({ 19 | headerTitle: title 20 | }) 21 | } 22 | render() { 23 | let allStyle = { 24 | height: '100%' 25 | } 26 | let wrapperStyle = { 27 | minHeight: '100%', 28 | backgroundColor: '#f3f2f0' 29 | } 30 | let mainStyle = { 31 | paddingBottom: '82px' 32 | } 33 | let container = ( 34 | <EyesContainer headerTitle={this.headerTitle.bind(this)}/> 35 | ) 36 | if (this.props.params.cid) { 37 | container = ( 38 | <div> 39 | <EyesDetail cid={this.props.params.cid} headerTitle={this.headerTitle.bind(this)}/> 40 | </div> 41 | ) 42 | } 43 | return ( 44 | <div style={allStyle}> 45 | <div style={wrapperStyle}> 46 | <div style={mainStyle}> 47 | <Header headerTitle={this.state.headerTitle}/> 48 | {container} 49 | </div> 50 | </div> 51 | <Footer /> 52 | </div> 53 | ) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /js/eyesonworld/Footer.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | 3 | // Footer—————— 4 | export default class Footer extends Component { 5 | render() { 6 | let wrapStyle = { 7 | paddingLeft:'80px', 8 | backgroundColor:'#000', 9 | marginTop: '-95px' 10 | } 11 | let titleStyle = { 12 | fontSize:'24px', 13 | color:'#fff', 14 | padding:'18px 0' 15 | } 16 | let stateStyle = { 17 | fontSize:'12px', 18 | color:'#fff', 19 | paddingBottom:'12px' 20 | } 21 | return ( 22 | <div style={wrapStyle}> 23 | <div style={titleStyle}>风筝·云图联合出品</div> 24 | <div style={stateStyle}>互联网违法和不良信息举报方式 电话:010 826771035 邮箱:buliang@shenzhenair.com</div> 25 | </div> 26 | ) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /js/eyesonworld/Header.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | 3 | // Header—————— 4 | export default class Header extends Component { 5 | static get defaultProps() { 6 | return { 7 | headerTitle: '丽眼看世界' 8 | } 9 | } 10 | componentDidMount() { 11 | } 12 | 13 | render() { 14 | let headerStyle = { 15 | padding:'24px 24px 20px 24px', 16 | display:'-webkit-flex', 17 | WebkitJustifyContent: 'space-between', 18 | justifyContent: 'space-between', 19 | borderBottom:'2px solid #d93600' 20 | } 21 | return ( 22 | <div style={headerStyle}> 23 | <HeaderTitle backiconUrl="../image/backicon.png" 24 | iconUrl="../image/eyesonworldicon.png" 25 | headerTitle={this.props.headerTitle} 26 | /> 27 | </div> 28 | ) 29 | } 30 | } 31 | 32 | class HeaderTitle extends Component { 33 | static get defaultProps() { 34 | return { 35 | headerTitle: '丽眼看世界' 36 | } 37 | } 38 | handleClick() { 39 | window.history.go(-1) 40 | } 41 | 42 | render() { 43 | let backStyle = { 44 | width: '20px', 45 | height: '30px', 46 | display: 'inline-block' 47 | } 48 | let iconStyle = { 49 | width: '100%', 50 | height: '100%', 51 | display: 'inline-block', 52 | verticalAlign:'middle' 53 | } 54 | let destinationiconStyle = { 55 | width:'38px', 56 | height: '28px', 57 | display: 'inline-block', 58 | margin:'0 18px' 59 | } 60 | let titleStyle = { 61 | fontSize: '22px', 62 | color: '#D93600', 63 | verticalAlign:'middle' 64 | } 65 | 66 | return ( 67 | <div> 68 | <span style={backStyle} onClick={this.handleClick}> 69 | <img style={iconStyle} src={this.props.backiconUrl} /> 70 | </span> 71 | <span style={destinationiconStyle}> 72 | <img style={iconStyle} src={this.props.iconUrl} /> 73 | </span> 74 | 75 | <span style={titleStyle}> 76 | {this.props.headerTitle} 77 | </span> 78 | </div> 79 | ) 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /js/eyesonworld/Image.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | 3 | export default class Image extends Component { 4 | static get defaultProps() { 5 | return { 6 | imgRatio: '56.25%' 7 | } 8 | } 9 | 10 | render() { 11 | let imgWrapStyle = { 12 | width: '100%', 13 | position: 'relative', 14 | paddingBottom: this.props.imgRatio 15 | } 16 | 17 | let imgStyle = { 18 | width:'100%', 19 | height: '100%', 20 | position: 'absolute', 21 | display:'block' 22 | } 23 | 24 | return ( 25 | <div style={imgWrapStyle}> 26 | <img style={imgStyle} src={this.props.imgSrc} /> 27 | <ImgWord imgTitle={this.props.imgTitle} /> 28 | </div> 29 | ) 30 | } 31 | } 32 | class ImgWord extends Component { 33 | static get defaultProps() { 34 | return { 35 | imgTitle: '' 36 | } 37 | } 38 | render() { 39 | let imgTitleBoxStyle = { 40 | width:'100%', 41 | height: '30%', 42 | background:'linear-gradient(to top, rgba(0,0,0,.5) ,rgba(0,0,0,0))', 43 | position:'absolute', 44 | left:'0', 45 | bottom:'0', 46 | zIndex: '0' 47 | } 48 | let ImgTitleStyle = { 49 | color: '#fff', 50 | fontSize: '18px', 51 | lineHeight: '1.3', 52 | display: 'inline-block', 53 | padding: '8px 8px' 54 | } 55 | return ( 56 | <div style={imgTitleBoxStyle}> 57 | <span style={ImgTitleStyle}>{this.props.imgTitle}</span> 58 | </div> 59 | ) 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /js/eyesonworld/LinkImg.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import { Link } from 'react-router' 3 | import Image from './Image' 4 | export default class LinkImg extends Component { 5 | static get defaultProps() { 6 | return { 7 | url: '/', 8 | onClick: function() {} 9 | } 10 | } 11 | 12 | render() { 13 | return ( 14 | <div> 15 | <Link to={this.props.url}> 16 | <Image 17 | {...this.props} 18 | /> 19 | </Link> 20 | </div> 21 | ) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /js/game/index.js: -------------------------------------------------------------------------------- 1 | import fetch from 'isomorphic-fetch' 2 | import React, { Component, PropTypes } from 'react' 3 | import { Link } from 'react-router' 4 | import Swiper from '../util/swiper' 5 | import '../../less/index/swiper-3.3.1.min' 6 | import Loading from '../util/loading' 7 | import config from '../../commonConfig' 8 | 9 | 10 | export default class App extends Component { 11 | constructor() { 12 | super() 13 | this.state = { 14 | code: 1, 15 | data: { 16 | focus_pic: [], 17 | recommend: [] 18 | } 19 | } 20 | this._gid = undefined 21 | this._fgid = undefined 22 | } 23 | 24 | componentDidMount() { 25 | fetch(config.API_GAME).then(response => response.json()) 26 | .then(json => { 27 | if (json.code == 0) { 28 | this.setState({ 29 | code: 0, 30 | data: json.data 31 | }) 32 | } 33 | }) 34 | .catch(e => console.log('Oop error', e)) 35 | } 36 | 37 | componentWillReceiveProps(nextProps) { 38 | console.log('[APP componentWillReceiveProps]', nextProps.params) 39 | this._gid = nextProps.params.gid 40 | this._fgid = nextProps.params.fgid 41 | } 42 | 43 | get selectedGameUrl() { 44 | let url = undefined 45 | if (this._gid) { 46 | url = this.state.data.recommend.find(d => d.gid == this._gid).install_url 47 | } 48 | else if (this._fgid) { 49 | url = this.state.data.focus_pic.find(d => d.cid == this._fgid).target_link 50 | } 51 | // console.log('[App selectedGameUrl]', url) 52 | return url 53 | } 54 | 55 | render() { 56 | return ( 57 | <div> 58 | <Header /> 59 | <Loading ifLoading={ true } /> 60 | {this.props.children ? 61 | <Game installUrl={this.selectedGameUrl} />: 62 | <div> 63 | <ShowSlider silderImage={ this.state.data.focus_pic }/> 64 | <Content games={ this.state.data.recommend } /> 65 | </div> 66 | } 67 | </div> 68 | ) 69 | } 70 | } 71 | 72 | 73 | class Header extends Component { 74 | 75 | render() { 76 | let headerStyle = { 77 | padding:'24px 24px 20px 24px', 78 | display:'-webkit-flex', 79 | WebkitJustifyContent: 'space-between', 80 | justifyContent: 'space-between', 81 | borderBottom:'2px solid #d93600' 82 | } 83 | return ( 84 | <div style={headerStyle}> 85 | <HeaderTitle backiconUrl="../image/backicon.png" 86 | iconUrl="../image/game_icon.png" 87 | headerTitle="游戏" 88 | /> 89 | </div> 90 | ) 91 | } 92 | } 93 | 94 | 95 | class HeaderTitle extends Component { 96 | handleClick() { 97 | window.history.go(-1) 98 | } 99 | render() { 100 | 101 | let backStyle = { 102 | width: '20px', 103 | height: '30px', 104 | display: 'inline-block' 105 | } 106 | let iconStyle = { 107 | width: '100%', 108 | height: '100%', 109 | verticalAlign:'middle' 110 | } 111 | let destinationiconStyle = { 112 | width:'38px', 113 | height: '28px', 114 | display: 'inline-block', 115 | margin:'0 18px' 116 | } 117 | let titleStyle = { 118 | fontSize: '22px', 119 | color: '#D93600', 120 | verticalAlign:'middle' 121 | } 122 | return ( 123 | <div> 124 | <span style={backStyle} onClick={this.handleClick}> 125 | <img style={iconStyle} src={this.props.backiconUrl} /> 126 | </span> 127 | <span style={destinationiconStyle}> 128 | <img style={iconStyle} src={this.props.iconUrl} /> 129 | </span> 130 | 131 | <span style={titleStyle}>{this.props.headerTitle}</span> 132 | </div> 133 | ) 134 | } 135 | } 136 | 137 | class ShowSlider extends Component { 138 | constructor(props) { 139 | super(props) 140 | } 141 | 142 | componentDidMount() { 143 | setTimeout(function(){ 144 | new Swiper('.swiper-container', { 145 | autoplay : 1000, 146 | pagination: '.swiper-pagination', 147 | paginationElement : 'li', 148 | autoplayStopOnLast : false 149 | }) 150 | }, 300) 151 | } 152 | 153 | render() { 154 | return ( 155 | <div className="swiper-container"> 156 | <div className="swiper-wrapper"> 157 | { 158 | this.props.silderImage.map((item, i) => { 159 | return ( 160 | <div className="swiper-slide" key={i}> 161 | <Link to={`focus/${item.cid}`}> 162 | <img style={{width: '100%'}} src={item.cover_image.url} /> 163 | </Link> 164 | </div> 165 | ) 166 | }) 167 | } 168 | </div> 169 | <div className="swiper-pagination"></div> 170 | </div> 171 | ) 172 | } 173 | } 174 | 175 | 176 | class Content extends Component { 177 | commonFlex(val) { 178 | return { 179 | MozBoxFlex: val, 180 | WebkitBoxFlex: val, 181 | OBoxFlex: val, 182 | MsFlex: val, 183 | flex: val 184 | } 185 | } 186 | 187 | get commonDisplayFlex() { 188 | return { 189 | display: 'flex' 190 | } 191 | } 192 | 193 | render() { 194 | const itemStyle = { 195 | borderBottom: '1px solid #BBBBBB', 196 | margin: '10px 30px' 197 | } 198 | const aStyle = { 199 | textDecoration: 'none', 200 | color: '#000' 201 | } 202 | const spanNameStyle = { 203 | fontSize: 21, 204 | color: '#484949' 205 | } 206 | const spanTypeStyle = { 207 | fontSize: 14, 208 | color: '#999999' 209 | } 210 | const spanTypeValStyle = { 211 | fontSize: 14, 212 | color: '#484949' 213 | } 214 | const itemBottomStyle = { 215 | marginBottom: 21 216 | } 217 | const games = this.props.games.map((data, i) => { 218 | return ( 219 | <Link to={`/${data.gid}`} style={aStyle} key={i}> 220 | <div style={{...itemStyle, ...this.commonDisplayFlex}}> 221 | <div style={ this.commonFlex(1) }> 222 | <img style={{marginRight:20, width: '50%', float: 'right'}} src={data.image.url} /> 223 | </div> 224 | <div style={ {...this.commonFlex(4), ...itemBottomStyle} }> 225 | <div> 226 | <span style={spanNameStyle}>{ data.title }</span> 227 | </div> 228 | <div style={{display: 'flex', marginTop: 8}}> 229 | <div style={ {display: 'inline-block', flex: 1} }> 230 | <span style={ spanTypeStyle }>类型: </span> 231 | <span style={ spanTypeValStyle }>{ data.type }</span> 232 | </div> 233 | </div> 234 | <div style={{marginTop: 10}}> 235 | <span style={{display: 'block', color: '#999999', fontSize: 14, marginBottom: 2}}>简介: </span> 236 | <span style={ spanTypeValStyle }>{ data.abstract }</span> 237 | </div> 238 | </div> 239 | </div> 240 | </Link> 241 | ) 242 | }) 243 | 244 | return ( 245 | <div style={{marginTop: 40}}> 246 | {games} 247 | </div> 248 | ) 249 | } 250 | } 251 | 252 | 253 | export class Game extends Component { 254 | render() { 255 | let divStyle = { 256 | width: '100%', 257 | margin: '0 auto' 258 | } 259 | let iframeStyle = { 260 | height: 800, 261 | minWidth: '100%', 262 | border: 0 263 | } 264 | // console.log("[Game render]", this.props.installUrl) 265 | return ( 266 | <div style={divStyle}> 267 | <iframe style={iframeStyle} scrolling='no' src={this.props.installUrl} > 268 | </iframe> 269 | </div> 270 | ) 271 | } 272 | } 273 | -------------------------------------------------------------------------------- /js/media/cartoon.js: -------------------------------------------------------------------------------- 1 | import { render } from 'react-dom'; 2 | import React, { Component, PropTypes } from 'react'; 3 | import { Router,Route, hashHistory,Link} from 'react-router'; 4 | import '../../less/media/cartoon'; 5 | import VideoColumn from './videoColumn' 6 | 7 | export default class Cartoon extends Component { 8 | componentDidMount(){ 9 | var mySwiper = new Swiper('.cartoon-swiper',{ 10 | autoplay : 1000, 11 | pagination: '.swiper-pagination', 12 | paginationElement : 'li', 13 | autoplayStopOnLast : false, 14 | }); 15 | } 16 | render(){ 17 | return ( 18 | <div className="cartoon"> 19 | <div className="swiper-container cartoon-swiper"> 20 | <div className="swiper-wrapper"> 21 | <div className="swiper-slide"> 22 | <img src="../image/test1.jpg" /> 23 | </div> 24 | <div className="swiper-slide"> 25 | <img src="../image/test1.jpg" /> 26 | </div> 27 | </div> 28 | <div className="swiper-pagination"></div> 29 | </div> 30 | <div className="cartoon-kind"> 31 | <VideoColumn message="人气动画" /> 32 | <ul className="cartoon-list"> 33 | <li> 34 | <img src="../image/test4.jpg" /> 35 | <div>夕阳天使</div> 36 | </li> 37 | <li> 38 | <img src="../image/test4.jpg" /> 39 | <div>夕阳天使</div> 40 | </li> 41 | <li> 42 | <img src="../image/test4.jpg" /> 43 | <div>夕阳天使</div> 44 | </li> 45 | <li> 46 | <img src="../image/test4.jpg" /> 47 | <div>夕阳天使</div> 48 | </li> 49 | </ul> 50 | <img src="../image/dashedcut.png" className="cutting-line"/> 51 | <VideoColumn message="最火推荐" classnames="hotcartoon"/> 52 | <ul className="cartoon-list"> 53 | <li> 54 | <img src="../image/test4.jpg" /> 55 | <div>绝色武器</div> 56 | </li> 57 | <li> 58 | <img src="../image/test4.jpg" /> 59 | <div>绝色武器</div> 60 | </li> 61 | <li> 62 | <img src="../image/test4.jpg" /> 63 | <div>绝色武器</div> 64 | </li> 65 | <li> 66 | <img src="../image/test4.jpg" /> 67 | <div>绝色武器</div> 68 | </li> 69 | </ul> 70 | </div> 71 | 72 | </div> 73 | ) 74 | } 75 | } -------------------------------------------------------------------------------- /js/media/hotPlay.js: -------------------------------------------------------------------------------- 1 | import { render } from 'react-dom' 2 | import React, { Component, PropTypes } from 'react' 3 | import { Router,Route, hashHistory,Link} from 'react-router' 4 | import '../../less/media/hotPlay' 5 | import VideoColumn from './videoColumn' 6 | 7 | export default class HotPlay extends Component { 8 | componentDidMount(){ 9 | var mySwiper = new Swiper('.swiper-container',{ 10 | autoplay : 1000, 11 | pagination: '.swiper-pagination', 12 | paginationElement : 'li', 13 | autoplayStopOnLast : false, 14 | }); 15 | } 16 | jumpNextLink(link) { 17 | const { history } = this.props; 18 | const { router } = this.context; 19 | console.log(this.context) 20 | router.push({ pathname: '/play/2', state: {aa:231} }); 21 | console.log(this.props) 22 | 23 | } 24 | render(){ 25 | return ( 26 | <div className="hot-wapper"> 27 | <div className="hot-play"> 28 | <div className="swiper-container"> 29 | <div className="swiper-wrapper"> 30 | <div className="swiper-slide"> 31 | <img src="../image/test1.jpg" /> 32 | </div> 33 | <div className="swiper-slide"> 34 | <img src="../image/test1.jpg" onClick={this.jumpNextLink.bind(this)}/> 35 | </div> 36 | </div> 37 | <div className="swiper-pagination"></div> 38 | </div> 39 | <div className="hot-play-right"> 40 | <div className="right-top"> 41 | <div> 42 | <img src="../image/test2.jpg" /> 43 | <section className="shad-show2 sh-show"> 44 | <span>全14集</span> 45 | </section> 46 | </div> 47 | <div> 48 | <img src="../image/test2.jpg" /> 49 | <section className="shad-show2 sh-show"> 50 | <span>全14集</span> 51 | </section> 52 | </div> 53 | </div> 54 | <div className="right-bottom"> 55 | <div> 56 | <img src="../image/test2.jpg" /> 57 | <section className="shad-show2 sh-show2"> 58 | <span>全14集</span> 59 | </section> 60 | </div> 61 | <div> 62 | <img src="../image/test2.jpg" /> 63 | <section className="shad-show2 sh-show2"> 64 | <span>全14集</span> 65 | </section> 66 | </div> 67 | </div> 68 | </div> 69 | </div> 70 | <VideoColumn message='人气新剧'/> 71 | <ul className="new-drama"> 72 | <li> 73 | <img src="../image/test2.jpg" /> 74 | <section className="shad-show2"> 75 | <span>全14集</span> 76 | </section> 77 | <div className="new-video-name">完美世界</div> 78 | </li> 79 | <li> 80 | <img src="../image/test2.jpg" /> 81 | <section className="shad-show2"> 82 | <span>全14集</span> 83 | </section> 84 | <div className="new-video-name">完美世界</div> 85 | </li> 86 | <li> 87 | <img src="../image/test2.jpg" /> 88 | <section className="shad-show2"> 89 | <span>全14集</span> 90 | </section> 91 | <div className="new-video-name">完美世界</div> 92 | </li> 93 | <li> 94 | <img src="../image/test2.jpg" /> 95 | <section className="shad-show2"> 96 | <span>全14集</span> 97 | </section> 98 | <div className="new-video-name">完美世界</div> 99 | </li> 100 | </ul> 101 | <img src="../image/dashedcut.png" className="cutting-line"/> 102 | <VideoColumn message='合作品牌'/> 103 | <ul className="work-together"> 104 | <li> 105 | <img src="../image/youku.png" /> 106 | </li> 107 | <li> 108 | <img src="../image/sohu.png" /> 109 | </li> 110 | <li> 111 | <img src="../image/huoxing.png" /> 112 | </li> 113 | <li> 114 | <img src="../image/kaola.png" /> 115 | </li> 116 | <li> 117 | <img src="../image/maige.png" /> 118 | </li> 119 | <li> 120 | <img src="../image/beiwawang.png" /> 121 | </li> 122 | <li> 123 | <img src="../image/landi.png" /> 124 | </li> 125 | </ul> 126 | </div> 127 | ) 128 | } 129 | } 130 | HotPlay.contextTypes = { 131 | router: React.PropTypes.object.isRequired 132 | }; -------------------------------------------------------------------------------- /js/media/kmplayer.js: -------------------------------------------------------------------------------- 1 | import { render } from 'react-dom'; 2 | import React, { Component, PropTypes } from 'react'; 3 | import { Router,Route, hashHistory,Link} from 'react-router'; 4 | import '../../less/media/kmplayer'; 5 | import VideoColumn from './videoColumn' 6 | 7 | export default class Kmplayer extends Component { 8 | componentDidMount(){ 9 | var mySwiper = new Swiper('.kmplayer-swiper',{ 10 | autoplay : 1000, 11 | pagination: '.swiper-pagination', 12 | paginationElement : 'li', 13 | autoplayStopOnLast : false, 14 | }); 15 | } 16 | render(){ 17 | return ( 18 | <div className="kmplayer"> 19 | <div className="swiper-container kmplayer-swiper"> 20 | <div className="swiper-wrapper"> 21 | <div className="swiper-slide"> 22 | <img src="../image/test1.jpg" /> 23 | </div> 24 | <div className="swiper-slide"> 25 | <img src="../image/test1.jpg" /> 26 | </div> 27 | </div> 28 | <div className="swiper-pagination"></div> 29 | </div> 30 | <div className="recommend"> 31 | <VideoColumn message='为我推荐'/> 32 | <ul className="recommend-list"> 33 | <li> 34 | <img src="../image/test3.jpg" /> 35 | <div>七月半之恐怖</div> 36 | </li> 37 | <li> 38 | <img src="../image/test3.jpg" /> 39 | <div>七月半之恐怖</div> 40 | </li> 41 | <li> 42 | <img src="../image/test3.jpg" /> 43 | <div>七月半之恐怖</div> 44 | </li> 45 | <li> 46 | <img src="../image/test3.jpg" /> 47 | <div>七月半之恐怖</div> 48 | </li> 49 | <li> 50 | <img src="../image/test3.jpg" /> 51 | <div>七月半之恐怖</div> 52 | </li> 53 | <li> 54 | <img src="../image/test3.jpg" /> 55 | <div>七月半之恐怖</div> 56 | </li> 57 | </ul> 58 | </div> 59 | </div> 60 | ) 61 | } 62 | } -------------------------------------------------------------------------------- /js/media/mainMedia.js: -------------------------------------------------------------------------------- 1 | import { render } from 'react-dom' 2 | import React, { Component, PropTypes } from 'react' 3 | import { Router,Route, hashHistory,Link} from 'react-router' 4 | import '../../less/media/index' 5 | import '../../less/index/swiper-3.3.1.min' 6 | import Swiper from '../util/swiper' 7 | 8 | //let CLAudioPlayer = require('react-cl-audio-player'); 9 | 10 | class MediaHeader extends Component { 11 | constructor(args) { 12 | super(args); 13 | this.state = { 14 | 15 | } 16 | 17 | } 18 | 19 | componentDidMount(){ 20 | var that = this; 21 | let mediaItem = this.refs.media_Item; 22 | var mediaItems = document.getElementsByName('mediaItems'); 23 | mediaItem.onclick = function(ev){ 24 | var ev = ev || window.event; 25 | var target = ev.target || ev.srcElement; 26 | if(target.nodeName.toLowerCase() == "li" || target.nodeName.toLowerCase() == "div" || target.nodeName.toLowerCase() == "a"){ 27 | switch(Number(target.getAttribute('data-id'))){ 28 | case 1: 29 | that.refs.yingyin.className = 'video-yingyin'; 30 | that.refs.yinyue.className = 'video-yinyue'; 31 | that.refs.donghua.className = 'video-donghua'; 32 | that.refs.hot.className = 'video-hot hot-choice'; 33 | that.refs.icon_hot_choice.className = 'icon_con_choice icon_con'; 34 | that.refs.icon_ying_choice.className = ' icon_con'; 35 | that.refs.icon_yin_choice.className = ' icon_con'; 36 | that.refs.icon_dong_choice.className = ' icon_con'; 37 | break; 38 | case 2: 39 | that.refs.yinyue.className = 'video-yinyue'; 40 | that.refs.donghua.className = 'video-donghua'; 41 | that.refs.hot.className = 'video-hot'; 42 | that.refs.yingyin.className = 'video-yingyin yingyin-choice'; 43 | that.refs.icon_ying_choice.className = 'icon_con_choice icon_con'; 44 | that.refs.icon_hot_choice.className = 'icon_con'; 45 | that.refs.icon_yin_choice.className = ' icon_con'; 46 | that.refs.icon_dong_choice.className = ' icon_con'; 47 | break; 48 | case 3: 49 | that.refs.donghua.className = 'video-donghua'; 50 | that.refs.hot.className = 'video-hot'; 51 | that.refs.yingyin.className = 'video-yingyin'; 52 | that.refs.yinyue.className = 'video-yinyue yinyue-choice'; 53 | that.refs.icon_yin_choice.className = 'icon_con_choice icon_con'; 54 | that.refs.icon_hot_choice.className = 'icon_con'; 55 | that.refs.icon_ying_choice.className = ' icon_con'; 56 | that.refs.icon_dong_choice.className = ' icon_con'; 57 | break; 58 | case 4: 59 | that.refs.hot.className = 'video-hot'; 60 | that.refs.yingyin.className = 'video-yingyin'; 61 | that.refs.yinyue.className = 'video-yinyue'; 62 | that.refs.donghua.className = 'video-donghua donghua-choice'; 63 | that.refs.icon_dong_choice.className = 'icon_con_choice icon_con'; 64 | that.refs.icon_hot_choice.className = 'icon_con'; 65 | that.refs.icon_ying_choice.className = ' icon_con'; 66 | that.refs.icon_yin_choice.className = ' icon_con'; 67 | break; 68 | default: 69 | break; 70 | } 71 | } 72 | } 73 | } 74 | render(){ 75 | return ( 76 | <div className='media-header'> 77 | <div className="media-header-left"> 78 | <img src='../image/backicon.png' /> 79 | <img src="../image/yingyin.png" /> 80 | <span>影音视频</span> 81 | </div> 82 | <div className="media-header-right" ref="media_Item"> 83 | <ul className="media-kind-list"> 84 | <li data-id="1"> 85 | <Link to="/hotplay" data-id="1"> 86 | <div className="video-hot hot-choice" data-id="1" ref="hot"></div> 87 | <div name="mediaItems" ref="icon_hot_choice" className="icon_con_choice icon_con" data-id="1">热播</div> 88 | </Link> 89 | </li> 90 | <li data-id="2"> 91 | <Link to="/kmplayer" data-id="2"> 92 | <div className="video-yingyin" data-id="2" ref="yingyin"></div> 93 | <div name="mediaItems" ref="icon_ying_choice" className="icon_con" data-id="2">影音</div> 94 | </Link> 95 | </li> 96 | <li data-id="3"> 97 | <Link to="/musicplay" data-id="3"> 98 | <div className="video-yinyue" data-id="3" ref="yinyue"></div> 99 | <div name="mediaItems" ref="icon_yin_choice" className="icon_con" data-id="3">音乐电台</div> 100 | </Link> 101 | </li> 102 | <li data-id="4"> 103 | <Link to="/cartoon" data-id="4"> 104 | <div className="video-donghua" data-id="4" ref="donghua"></div> 105 | <div name="mediaItems" ref="icon_dong_choice" className="icon_con" data-id="4">动画片</div> 106 | </Link> 107 | </li> 108 | </ul> 109 | </div> 110 | </div> 111 | ) 112 | } 113 | } 114 | export default class MainMedia extends Component { 115 | constructor(args) { 116 | super(args) 117 | } 118 | render() { 119 | return ( 120 | <div> 121 | <MediaHeader /> 122 | {this.props.children} 123 | </div> 124 | ) 125 | } 126 | } -------------------------------------------------------------------------------- /js/media/musicplayer.js: -------------------------------------------------------------------------------- 1 | import { render } from 'react-dom'; 2 | import React, { Component, PropTypes } from 'react'; 3 | import { Router,Route, hashHistory,Link} from 'react-router'; 4 | import '../../less/media/musicplay'; 5 | let CLAudioPlayer = require('react-cl-audio-player'); 6 | class Player extends Component { 7 | constructor(args) { 8 | super(args) 9 | this.state = { 10 | songs:[ 11 | { 12 | url: '../image/music.mp3', 13 | cover: '../image/test5.jpg', 14 | artist: { 15 | name: 'Redfoo', 16 | song: '--New Thang', 17 | fromsource:'/来源:考拉电台', 18 | currentTime:'00', 19 | allTime:'00' 20 | } 21 | } 22 | ] 23 | } 24 | } 25 | render() { 26 | return ( 27 | <CLAudioPlayer songs={this.state.songs} /> 28 | ) 29 | } 30 | } 31 | class Radio extends Component { 32 | constructor(args) { 33 | super(args) 34 | } 35 | render(){ 36 | return ( 37 | <div className="radio-content"> 38 | <div className="radio-title"> 39 | <img src="../image/kaolasmall.png" /> 40 | <img src="../image/dashedcut.png" /> 41 | </div> 42 | <ul className="radio-content-list"> 43 | <li> 44 | <div> 45 | <img src="../image/Ticket1.png" /> 46 | <img src="../image/test5.jpg" className="author-header"/> 47 | </div> 48 | <p className="radio-list-name">北京欢乐时光</p> 49 | <p className="radio-list-author">当前主播:刘德华</p> 50 | </li> 51 | <li> 52 | <div> 53 | <img src="../image/Ticket2.png" /> 54 | <img src="../image/test5.jpg" className="author-header"/> 55 | </div> 56 | <p className="radio-list-name">北京欢乐时光</p> 57 | <p className="radio-list-author">当前主播:刘德华</p> 58 | </li> 59 | <li> 60 | <div> 61 | <img src="../image/Ticket3.png" /> 62 | <img src="../image/test5.jpg" className="author-header"/> 63 | </div> 64 | <p className="radio-list-name">北京欢乐时光</p> 65 | <p className="radio-list-author">当前主播:刘德华</p> 66 | </li> 67 | <li> 68 | <div> 69 | <img src="../image/Ticket4.png" /> 70 | <img src="../image/test5.jpg" className="author-header"/> 71 | </div> 72 | <p className="radio-list-name">北京欢乐时光</p> 73 | <p className="radio-list-author">当前主播:刘德华</p> 74 | </li> 75 | <li> 76 | <div> 77 | <img src="../image/Ticket5.png" /> 78 | <img src="../image/test5.jpg" className="author-header"/> 79 | </div> 80 | <p className="radio-list-name">北京欢乐时光</p> 81 | <p className="radio-list-author">当前主播:刘德华</p> 82 | </li> 83 | <li> 84 | <div> 85 | <img src="../image/Ticket6.png" /> 86 | <img src="../image/test5.jpg" className="author-header"/> 87 | </div> 88 | <p className="radio-list-name">北京欢乐时光</p> 89 | <p className="radio-list-author">当前主播:刘德华</p> 90 | </li> 91 | </ul> 92 | </div> 93 | ) 94 | } 95 | } 96 | export default class MusicPlay extends Component { 97 | render(){ 98 | return ( 99 | <div className="musicplayer"> 100 | <div className="music-header"> 101 | <div className="music-animation"> 102 | <img src="../image/musicJiaoPianTou.png" className="tou_ying"/> 103 | <img src="../image/musicJiaoPian.png" className="jiaopian"/> 104 | <img src="../image/musicSunLine.png" className="sun-line" /> 105 | <img src="../image/musicTiaoZhen.png" className="tiao-zhen" /> 106 | <div className="current-music"> 107 | 108 | </div> 109 | <div className="player-content"> 110 | <p>幸福别来无恙  第89期</p> 111 | <p>当前主播:刘德华</p> 112 | </div> 113 | </div> 114 | </div> 115 | <Radio /> 116 | <Player /> 117 | </div> 118 | ) 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /js/media/videoColumn.js: -------------------------------------------------------------------------------- 1 | import { render } from 'react-dom' 2 | import React, { Component, PropTypes } from 'react' 3 | import { Router,Route, hashHistory,Link} from 'react-router' 4 | import '../../less/media/videocolumn' 5 | 6 | export default class VideoColumn extends Component { 7 | constructor(args) { 8 | super(args); 9 | } 10 | render(){ 11 | return ( 12 | <div className="video-column"> 13 | <span className={this.props.classnames}></span> 14 | <span>{this.props.message == undefined ? '人气新剧' : this.props.message}</span> 15 | </div> 16 | ) 17 | } 18 | } -------------------------------------------------------------------------------- /js/news/content.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import { Link } from 'react-router' 3 | import TimeAgo from 'react-timeago' 4 | import Detail from './detail' 5 | 6 | 7 | export default class Content extends Component { 8 | render() { 9 | const newsItems = this.props.newsByCate.map(data => { 10 | if (data.image_urls.length == 1) { 11 | return <ItemOneImg key={data.nid} news={data} cid={this.props.cid} /> 12 | } 13 | return <ItemMultiImg key={data.nid} news={data} cid={this.props.cid} /> 14 | }) 15 | return ( 16 | <div className='items'> 17 | {newsItems} 18 | </div> 19 | ) 20 | } 21 | } 22 | 23 | 24 | class ItemMultiImg extends Component { 25 | render() { 26 | const data = this.props.news 27 | let t = new Date( data.publish_time ) 28 | let imgs = data.image_urls.map((img, i)=> { 29 | if (i < 4) { 30 | return ( 31 | <li key={i}> 32 | <img key={i} src={img.url} /> 33 | </li> 34 | ) 35 | } 36 | }) 37 | return ( 38 | <div className='item'> 39 | <Link to={`/detail/${data.nid}?cid=${this.props.cid}`}> 40 | <div className='item-title'> 41 | <span>{data.title}</span> 42 | </div> 43 | <div className='item-multi-img'> 44 | <ul>{imgs}</ul> 45 | </div> 46 | <div className='item-src-time'> 47 | <span>{data.src}</span> 48 | <span><TimeAgo date={t} /></span> 49 | </div> 50 | <div className='item-abstract'> 51 | <span>{data.abstract}</span> 52 | </div> 53 | </Link> 54 | </div> 55 | ) 56 | } 57 | } 58 | 59 | 60 | class ItemOneImg extends Component { 61 | render() { 62 | const data = this.props.news 63 | let t = new Date( data.publish_time ) 64 | let img_url = data.image_urls[0].url 65 | return ( 66 | <div className='item-one-img'> 67 | <Link to={`/detail/${data.nid}?cid=${this.props.cid}`}> 68 | <div className='item-one-img-left'> 69 | <div className='item-title'> 70 | <span>{data.title}</span> 71 | </div> 72 | <div className='item-src-time'> 73 | <span>{data.src} / <TimeAgo date={t} /></span> 74 | </div> 75 | <div className='item-abstract'> 76 | <span>{data.abstract}</span> 77 | </div> 78 | </div> 79 | <div className='item-one-img-right'> 80 | <img src={img_url} /> 81 | </div> 82 | </Link> 83 | </div> 84 | ) 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /js/news/detail.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import { Link } from 'react-router' 3 | 4 | 5 | export default class Detail extends Component { 6 | render() { 7 | const data = this.props.detailInfo 8 | let h = {__html: data.content} 9 | let t = new Date( data.publish_time ) 10 | let formatted = `${t.getFullYear()}-${t.getMonth()}-${t.getDay()}` 11 | return ( 12 | <div className='detail'> 13 | <div className='detail-left'> 14 | <Link to={`/category/${this.props.cid}`}> 15 | <span><img src="../image/news_detail_back.png" /></span> 16 | </Link> 17 | </div> 18 | <div className='detail-center'> 19 | <div className='detail-top'> 20 | <span>{data.src}</span> 21 | <span>{formatted}</span> 22 | </div> 23 | <div className='detail-title'> 24 | <span>{data.title}</span> 25 | </div> 26 | <div className='detail-content'> 27 | <div dangerouslySetInnerHTML={h} /> 28 | </div> 29 | <div className='detail-readermore'> 30 | 31 | </div> 32 | </div> 33 | <div className='detail-right'> 34 | </div> 35 | </div> 36 | ) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /js/news/header.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import ReactDOM from 'react-dom' 3 | import { Link } from 'react-router' 4 | 5 | 6 | 7 | export default class Header extends Component { 8 | constructor() { 9 | super() 10 | 11 | this.defaultDivCategorysHeight = null 12 | this._curCategory = null 13 | } 14 | 15 | handleMove(e) { 16 | e.preventDefault() 17 | let ulCategorys = this.refs.ul_categorys 18 | let divCategorys = this.refs.div_categorys 19 | if (this.defaultDivCategorysHeight == null) { 20 | this.defaultDivCategorysHeight = $(divCategorys).height() 21 | } 22 | 23 | let divCategorysHeight = $(divCategorys).height() 24 | let ulCategorysHeight = $(ulCategorys).height() 25 | 26 | if (divCategorysHeight < ulCategorysHeight) { 27 | $(divCategorys).animate({ 28 | height: ulCategorysHeight 29 | }, 500) 30 | } 31 | else { 32 | $(divCategorys).animate({ 33 | height: this.defaultDivCategorysHeight 34 | }, 500) 35 | } 36 | } 37 | 38 | render() { 39 | let selectedCategory = this.props.selectedCategory 40 | const categorys = this.props.categorys.map(function(data, i) { 41 | let linkTo = `/category/${data.cid}` 42 | let focusStyle = {} 43 | if (selectedCategory == data.cid) { 44 | focusStyle = { 45 | color: '#D93600', 46 | borderBottom: '2px solid #D93600' 47 | } 48 | } 49 | return <li key={data.cid}> 50 | <Link to={linkTo}> 51 | <span style={focusStyle}> 52 | {data.name} 53 | </span> 54 | </Link> 55 | </li> 56 | }) 57 | 58 | return ( 59 | <div className='header-container'> 60 | <div className='header-left'> 61 | <span className='header-left-back'> 62 | <a href='/'> 63 | <img src='../image/backicon.png' /> 64 | </a> 65 | </span> 66 | <span className='header-left-icon'> 67 | <img src='../image/icon_news.png' /> 68 | </span> 69 | <span className='header-left-name'>资讯头条</span> 70 | </div> 71 | <div className='header-right' ref='div_categorys'> 72 | <ul ref='ul_categorys'> 73 | {categorys} 74 | </ul> 75 | </div> 76 | <div className='header-more'> 77 | <span> 78 | <img src='../image/news_more_r.png' onClick={this.handleMove.bind(this)} /> 79 | </span> 80 | </div> 81 | </div> 82 | ) 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /js/news/index.js: -------------------------------------------------------------------------------- 1 | import fetch from 'isomorphic-fetch' 2 | import React, { Component, PropTypes } from 'react' 3 | import { Link } from 'react-router' 4 | import config from '../../commonConfig' 5 | import Header from './header' 6 | import Content from './content' 7 | import Detail from './detail' 8 | import Loading from '../util/loading' 9 | import NavigationBar from '../util/navigationBar' 10 | import '../../less/news/index' 11 | 12 | 13 | class App extends Component { 14 | constructor() { 15 | super() 16 | 17 | this.state = { 18 | code: 1, 19 | data: [] 20 | } 21 | } 22 | 23 | componentDidMount() { 24 | console.log('[app] componentDidMount') 25 | let url = config.API_NEWS_CATEGORYS 26 | fetch(url).then(response => response.json()) 27 | .then(json => this.setStateByCode(json)) 28 | .catch(e => console.log('Oops, error', e)) 29 | } 30 | 31 | setStateByCode(json) { 32 | console.log('[APP] setStateByCode') 33 | if (json.code != 0) { 34 | // # TODO 35 | console.log('Oops, error', json.message) 36 | } 37 | else { 38 | this.setState({ 39 | code: json.code, 40 | data: json.data.nav 41 | }) 42 | } 43 | } 44 | 45 | componentWillReceiveProps(nextProps) { 46 | console.log('[APP] componentWillReceiveProps nextProps', nextProps.params.cid) 47 | } 48 | 49 | shouldComponentUpdate(nextProps, nextState) { 50 | console.log('[APP] shouldComponentUpdate', nextProps.params.cid) 51 | if (this.state != nextState) { 52 | return true 53 | } 54 | 55 | if (this.props.params.cid == nextProps.params.cid) { 56 | return false 57 | } 58 | 59 | return true 60 | } 61 | 62 | render() { 63 | console.log('[APP] render', 'nid is', this.props.params.nid, 'cid is', this.props.params.cid) 64 | let ret = ( 65 | <div> 66 | Loading..... 67 | </div> 68 | ) 69 | if (this.props.params.nid != undefined) { 70 | ret = ( 71 | <div> 72 | {this.props.children} 73 | </div> 74 | ) 75 | } 76 | else { 77 | ret = ( 78 | <div> 79 | <Header categorys={this.state.data} selectedCategory={this.props.params.cid} /> 80 | {this.props.children} 81 | </div> 82 | ) 83 | } 84 | 85 | return ret 86 | } 87 | } 88 | 89 | 90 | class NewsList extends Component { 91 | constructor() { 92 | console.log('[NewsList] constructor') 93 | super() 94 | this.state = { 95 | code: 1, 96 | data: [], 97 | ifLoading: true 98 | } 99 | } 100 | 101 | fetchMore() { 102 | console.log('[NewsList] fetchMore') 103 | if($(document).scrollTop() >= $(document).height() - $(window).height()) { 104 | let i = this.state.data.length - 1 105 | let data = this.state.data[i] 106 | if (data) 107 | this.fetchByCategory(this.props.params.cid, config.PAGE_SIZE, data.nid) 108 | } 109 | } 110 | 111 | componentDidMount() { 112 | console.log('[NewsList] componentDidMount', this.props.params.cid) 113 | this.fetchByCategory(this.props.params.cid) 114 | } 115 | 116 | componentWillUnmount() { 117 | console.log('[NewsList] componentWillUnmount') 118 | } 119 | 120 | componentWillReceiveProps(nextProps) { 121 | console.log('[NewsList] componentWillReceiveProps', nextProps.params.cid) 122 | if (nextProps.params.cid != this.props.params.cid) { 123 | this.fetchByCategory(nextProps.params.cid) 124 | } 125 | } 126 | 127 | fetchByCategory(category, pageSize=config.PAGE_SIZE, startIndex=0) { 128 | let url = `${config.API_NEWS}?cid=${category}&page_size=${pageSize}&start_index=${startIndex}` 129 | fetch(url).then(response => response.json()) 130 | .then(json => this.setStateByCode(json)) 131 | .catch(e => { 132 | console.log('Oops, error', e) 133 | this.setState({ 134 | ifLoading: false 135 | }) 136 | }) 137 | } 138 | 139 | setStateByCode(json) { 140 | if (json.code == 0) { 141 | let data = this.state.data 142 | if (data.length == 0 || data[0].cid != json.data[0].cid) { 143 | data = json.data 144 | } 145 | else { 146 | data = data.concat(json.data) 147 | } 148 | this.setState({ 149 | code: json.code, 150 | data: data, 151 | ifLoading: false 152 | }) 153 | } 154 | else { 155 | console.log('Oops, error', json.code, json.message) 156 | } 157 | } 158 | 159 | render() { 160 | console.log('[NewsList] render', this.state.data) 161 | return ( 162 | <div> 163 | <NavigationBar srollCallback={ this.fetchMore.bind(this) } /> 164 | <Loading ifLoading={ this.state.ifLoading } /> 165 | <Content newsByCate={ this.state.data } cid={ this.props.params.cid } /> 166 | </div> 167 | ) 168 | } 169 | } 170 | 171 | 172 | class DetailIndex extends Component { 173 | constructor() { 174 | super() 175 | 176 | this.state = { 177 | code: 1, 178 | data: [], 179 | ifLoading: true 180 | } 181 | } 182 | 183 | fetchByNewsId(cid, nid) { 184 | let url = `${config.API_NEWS_DETAIL}${cid}/${nid}/` 185 | fetch(url).then(response => response.json()) 186 | .then(json => this.setStateByCode(json)) 187 | .catch(e => { 188 | console.log('Oops, error', e) 189 | this.setState({ 190 | ifLoading: false 191 | }) 192 | }) 193 | } 194 | 195 | setStateByCode(json) { 196 | console.log('[Detail] setStateByCode') 197 | if (json.code != 0) { 198 | // # TODO 199 | console.log('Oops, error', json.message) 200 | this.setState({ 201 | ifLoading: false 202 | }) 203 | } 204 | else { 205 | this.setState({ 206 | code: json.code, 207 | data: json.data, 208 | ifLoading: false 209 | }) 210 | } 211 | } 212 | 213 | componentDidMount() { 214 | console.log('[Detail] componentDidMount', this.props) 215 | this.fetchByNewsId(this.props.location.query.cid, this.props.params.nid) 216 | } 217 | 218 | render() { 219 | console.log('[Detail] render', this.props.params.nid) 220 | return ( 221 | <div> 222 | <NavigationBar /> 223 | <Loading ifLoading={ this.state.ifLoading } /> 224 | <Detail detailInfo={ this.state.data } cid={ this.props.location.query.cid } /> 225 | </div> 226 | ) 227 | } 228 | } 229 | 230 | 231 | export { App, NewsList, DetailIndex } 232 | -------------------------------------------------------------------------------- /js/social/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import { Link } from 'react-router' 3 | import config from '../../commonConfig' 4 | 5 | export default class App extends Component { 6 | 7 | render() { 8 | let ulStyle = { 9 | display: 'flex', 10 | margin: '200px' 11 | } 12 | let liStyel = { 13 | flex: 2, 14 | listStyleType:'none' 15 | } 16 | let liStyel1 = { 17 | flex: 1, 18 | listStyleType:'none' 19 | } 20 | let spanForImgStyle = { 21 | width:'100px', 22 | height: '100px', 23 | display: 'block' 24 | } 25 | let iconStyle = { 26 | width: '100%', 27 | height: '100%', 28 | verticalAlign:'middle' 29 | } 30 | let lineStyle = { 31 | height: '100px', 32 | width: '1px', 33 | borderLeft: '1px #9E9E9E solid' 34 | } 35 | return ( 36 | <div> 37 | <Header /> 38 | {this.props.children ? 39 | this.props.children: 40 | <ul style={ulStyle}> 41 | <li style={liStyel}> 42 | <Link to='/weibo'> 43 | <span style={spanForImgStyle}> 44 | <img src='../image/weibo_icon.png' style={iconStyle} /> 45 | </span> 46 | </Link> 47 | </li> 48 | <li style={liStyel1}> 49 | <div style={lineStyle}></div> 50 | </li> 51 | <li style={liStyel}> 52 | <span style={spanForImgStyle}> 53 | <img src='../image/wx_icon.png' style={iconStyle} /> 54 | </span> 55 | </li> 56 | <li style={liStyel1}> 57 | <div style={lineStyle}></div> 58 | </li> 59 | <li style={liStyel}> 60 | <span style={spanForImgStyle}> 61 | <img src='../image/qq_icon.png' style={iconStyle} /> 62 | </span> 63 | </li> 64 | </ul> 65 | } 66 | </div> 67 | ) 68 | } 69 | } 70 | 71 | 72 | class Header extends Component { 73 | constructor(props) { 74 | super(props) 75 | this.state = { 76 | showSelectCity: false 77 | } 78 | } 79 | 80 | onLocationClick() { 81 | this.setState({ 82 | showSelectCity: true 83 | }) 84 | } 85 | 86 | render() { 87 | let headerStyle = { 88 | padding:'24px 24px 20px 24px', 89 | display:'-webkit-flex', 90 | WebkitJustifyContent: 'space-between', 91 | justifyContent: 'space-between', 92 | borderBottom:'2px solid #d93600' 93 | } 94 | return ( 95 | <div style={headerStyle}> 96 | <HeaderTitle backiconUrl="../image/backicon.png" 97 | iconUrl="../image/social_icon.png" 98 | headerTitle="社交" 99 | /> 100 | </div> 101 | ) 102 | } 103 | } 104 | 105 | 106 | class HeaderTitle extends Component { 107 | handleClick() { 108 | window.history.go(-1) 109 | } 110 | render() { 111 | 112 | let backStyle = { 113 | width: '20px', 114 | height: '30px', 115 | display: 'inline-block' 116 | } 117 | let iconStyle = { 118 | width: '100%', 119 | height: '100%', 120 | verticalAlign:'middle' 121 | } 122 | let destinationiconStyle = { 123 | width:'38px', 124 | height: '28px', 125 | display: 'inline-block', 126 | margin:'0 18px' 127 | } 128 | let titleStyle = { 129 | fontSize: '22px', 130 | color: '#D93600', 131 | verticalAlign:'middle' 132 | } 133 | return ( 134 | <div> 135 | <span style={backStyle} onClick={this.handleClick}> 136 | <img style={iconStyle} src={this.props.backiconUrl} /> 137 | </span> 138 | <span style={destinationiconStyle}> 139 | <img style={iconStyle} src={this.props.iconUrl} /> 140 | </span> 141 | 142 | <span style={titleStyle}>{this.props.headerTitle}</span> 143 | </div> 144 | ) 145 | } 146 | } 147 | 148 | 149 | class Weibo extends Component { 150 | render() { 151 | let divStyle = { 152 | width: '100%', 153 | margin: '0 auto' 154 | } 155 | let iframeStyle = { 156 | height: 800, 157 | minWidth: '100%', 158 | border: 0 159 | } 160 | return ( 161 | <div style={divStyle}> 162 | <iframe style={iframeStyle} scrolling='no' src={config.WEIBO} > 163 | </iframe> 164 | </div> 165 | ) 166 | } 167 | } 168 | 169 | 170 | export { Weibo } 171 | -------------------------------------------------------------------------------- /js/stock/stocks.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import ReactDOM from 'react-dom' 3 | import '../../less/stock/stock' 4 | import { Link } from 'react-router' 5 | 6 | class StockDetails extends Component { 7 | constructor(args) { 8 | super(args); 9 | } 10 | render(){ 11 | let stock_id = this.props.stockid; 12 | return ( 13 | <div className='stocks-details'> 14 | <iframe className="stockDeta" scrolling="no" src={'http://m.jrj.com.cn/share/pad/stock.shtml?stockcode='+stock_id}> 15 | </iframe> 16 | </div> 17 | ) 18 | } 19 | } 20 | class StockHeader extends Component { 21 | constructor(args) { 22 | super(args); 23 | this.state = { 24 | 25 | }; 26 | } 27 | search(){ 28 | let ifShow = { 29 | flagIndex:false, 30 | stock_num:this.refs.stockNumber.value 31 | } 32 | this.props.showDetail(ifShow); 33 | } 34 | backfun(){ 35 | let ifShow = { 36 | flagIndex:true, 37 | } 38 | this.refs.stockNumber.value = ''; 39 | this.props.showDetail(ifShow); 40 | } 41 | render(){ 42 | return ( 43 | <div className="stock-header"> 44 | <div className="stock-header-left" onClick={this.backfun.bind(this)}> 45 | <img src='../image/backicon.png' /> 46 | <span>股票行情</span> 47 | </div> 48 | <div className="stock-header-right"> 49 | <div> 50 | <input type="text" placeholder="请输入股票代码" ref='stockNumber' /> 51 | <span className="search" onClick={this.search.bind(this)}> 52 | <img src='../image/white_search.png' /> 53 | </span> 54 | </div> 55 | </div> 56 | </div> 57 | ) 58 | } 59 | } 60 | class MainStocks extends Component { 61 | constructor(args) { 62 | super(args) 63 | } 64 | render(){ 65 | return ( 66 | <div className='stocks-detail'> 67 | <iframe scrolling="no" src='http://m.jrj.com.cn/share/pad/index.shtml?indexcode=000001'> 68 | </iframe> 69 | <iframe scrolling="no" src='http://m.jrj.com.cn/share/pad/index.shtml?indexcode=399001'> 70 | </iframe> 71 | </div> 72 | ) 73 | } 74 | } 75 | export default class Stock extends Component { 76 | constructor(props) { 77 | super(props) 78 | this.state = { 79 | flagIndex:true 80 | } 81 | } 82 | IfshowDetail(data){ 83 | console.log(data); 84 | this.setState({ 85 | flagIndex:data.flagIndex, 86 | stock_num:data.stock_num 87 | }); 88 | } 89 | render(){ 90 | let mai_data; 91 | let detail_data; 92 | if(this.state.flagIndex){ 93 | mai_data = <MainStocks />; 94 | detail_data = ''; 95 | }else{ 96 | mai_data = ''; 97 | detail_data = <StockDetails stockid={this.state.stock_num} />; 98 | } 99 | return ( 100 | <div className='stocks'> 101 | <StockHeader showDetail = {this.IfshowDetail.bind(this)} /> 102 | { mai_data } 103 | { detail_data } 104 | </div> 105 | ) 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /js/util/loading.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import ReactDOM from 'react-dom' 3 | export default class Loading extends Component{ 4 | constructor(props) { 5 | super(props); 6 | this.state = { 7 | ifLoading:true 8 | }; 9 | } 10 | componentWillReceiveProps(nextProps){ 11 | this.setState({ 12 | ifLoading:nextProps.ifLoading 13 | }) 14 | } 15 | render(){ 16 | return ( 17 | <div className={this.state.ifLoading == true?'loader':'loader dn'}> 18 | <div className="loader-inner ball-spin-fade-loader"> 19 | <div></div> 20 | <div></div> 21 | <div></div> 22 | <div></div> 23 | <div></div> 24 | <div></div> 25 | <div></div> 26 | <div></div> 27 | </div> 28 | </div> 29 | ) 30 | } 31 | } -------------------------------------------------------------------------------- /js/util/navigationBar.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import ReactDOM from 'react-dom' 3 | var Img = require('../../image/navigation_logo.png'); 4 | export default class NavigationBar extends Component{ 5 | constructor(props) { 6 | super(props); 7 | this.state = { 8 | 9 | } 10 | } 11 | getClientHeight(){ 12 | let clientHeight = 0; 13 | if(document.body.clientHeight && document.documentElement.clientHeight){ 14 | clientHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight:document.documentElement.clientHeight; 15 | }else{ 16 | clientHeight = (document.body.clientHeight > document.documentElement.clientHeight) ? document.body.clientHeight:document.documentElement.clientHeight; 17 | } 18 | return clientHeight; 19 | } 20 | componentDidMount(){ 21 | var that =this; 22 | let top_navigation = this.refs.topNavigation; 23 | var allNavigation = document.getElementsByName('topNavigation-Item'); 24 | top_navigation.onclick = function(ev){ 25 | var ev = ev || window.event; 26 | var target = ev.target || ev.srcElement; 27 | if(target.nodeName.toLowerCase() == "li"){ 28 | for(let i=0;i<allNavigation.length;i++){ 29 | allNavigation[i].className = ''; 30 | } 31 | target.className = 'activity_focus'; 32 | switch(Number(target.getAttribute('data-id'))){ 33 | case 1: 34 | window.location.href = '../index.html'; 35 | break; 36 | case 2: 37 | window.location.href = '/html/news.html'; 38 | break; 39 | case 3: 40 | window.location.href = '/html/destination.html'; 41 | break; 42 | case 4: 43 | window.location.href = '/html/social.html'; 44 | break; 45 | case 5: 46 | 47 | break; 48 | case 6: 49 | window.location.href = '/html/media.html#/hotplay'; 50 | break; 51 | case 7: 52 | window.location.href = '/html/stocks.html'; 53 | break; 54 | case 8: 55 | window.location.href = '/html/airport_pickup.html'; 56 | break; 57 | case 9: 58 | window.location.href = '/html/game.html'; 59 | break; 60 | case 10: 61 | window.location.href = '/html/eyesonworld.html'; 62 | break; 63 | case 11: 64 | window.location.href = '/html/about.html'; 65 | break; 66 | default: 67 | break; 68 | 69 | } 70 | } 71 | } 72 | window.onscroll = function (){ 73 | if(document.body.scrollTop > (that.getClientHeight()/2+200)){ 74 | that.setState({ 75 | ifFixed:true 76 | }); 77 | }else{ 78 | that.setState({ 79 | ifFixed:false 80 | }); 81 | } 82 | 83 | if (that.props.srollCallback != undefined) { 84 | that.props.srollCallback() 85 | } 86 | } 87 | } 88 | 89 | render(){ 90 | return ( 91 | <div className={this.state.ifFixed == true ? 'navigation-bar':'navigation-bar dn'}> 92 | <div className="navigation-left-logo"> 93 | <img src={Img} /> 94 | </div> 95 | <ul className="navigation-right" ref="topNavigation"> 96 | <li className="activity_focus" name="topNavigation-Item" data-id='1'>首页</li> 97 | <li name="topNavigation-Item" data-id='2'>资讯头条</li> 98 | <li name="topNavigation-Item" data-id='3'>目的地</li> 99 | <li name="topNavigation-Item" data-id='4'>社交</li> 100 | <li name="topNavigation-Item" data-id='5'>空中电商</li> 101 | <li name="topNavigation-Item" data-id='6'>影音娱乐</li> 102 | <li name="topNavigation-Item" data-id='7'>股票行情</li> 103 | <li name="topNavigation-Item" data-id='8'>接送机</li> 104 | <li name="topNavigation-Item" data-id='9'>游戏</li> 105 | <li name="topNavigation-Item" data-id='10'>深航女孩</li> 106 | <li name="topNavigation-Item" data-id='11'>关于深航</li> 107 | </ul> 108 | </div> 109 | ) 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /js/util/pushMessage.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | import config from '../../commonConfig' 3 | import '../../less/common' 4 | 5 | 6 | export default class PushMessage extends Component { 7 | constructor() { 8 | super() 9 | this._client = require('./mqttws31') 10 | } 11 | 12 | getPushMessage(env_id) { 13 | const height = 'cic/flight/status/height' 14 | const speed = 'cic/flight/status/speed' 15 | const latlong = 'cic/flight/status/latlong' 16 | const three_g = 'cic/flight/status/3g' 17 | const wow = 'cic/flight/status/wow' 18 | const pa = 'cic/flight/pa' 19 | const ku = 'cic/flight/ku' 20 | const topic = 'cic/topic' 21 | const activity = 'cic/flight/status/activity' 22 | 23 | // called when the this._client connects 24 | function onConnect() { 25 | // Once a connection has been made, make a subscription and send a message. 26 | //console.log('onConnect') 27 | this._client.subscribe('hello') 28 | this._client.subscribe(height,{qos:0}) 29 | this._client.subscribe(speed,{qos:0}) 30 | this._client.subscribe(latlong,{qos:0}) 31 | this._client.subscribe(three_g,{qos:0}) 32 | this._client.subscribe(wow,{qos:2}) 33 | this._client.subscribe(pa,{qos:2}) 34 | this._client.subscribe(ku,{qos:2}) 35 | this._client.subscribe(topic,{qos:0}) 36 | this._client.subscribe(activity,{qos:1}) 37 | } 38 | // called when the this._client loses its connection 39 | function onConnectionLost(responseObject) { 40 | if (responseObject.errorCode !== 0) { 41 | console.log('onConnectionLost:'+responseObject.errorMessage) 42 | //this._client.connect({onSuccess:onConnect}) 43 | } 44 | } 45 | // called when a message arrives 46 | function onMessageArrived(message) { 47 | console.log(message) 48 | //alert(message.destinationName) 49 | //alert('playloadString='+message.payloadString) 50 | if(message.destinationName == 'cic/topic'){ 51 | var flag = (locationStorages.getItem('currentItem') == 'content_six')? true:false 52 | if(!flag){ 53 | $('.newmessages').removeClass('dn') 54 | } 55 | } 56 | if(message.destinationName == 'cic/flight/pa'){ 57 | var showpamessage = (message.payloadString == '1')?true:false 58 | if(showpamessage){ 59 | $('.pazhezaoceng').removeClass('dn') 60 | }else{ 61 | $('.pazhezaoceng').addClass('dn') 62 | } 63 | } 64 | 65 | } 66 | //kiteapp.cicaero.com configs.currentHostName 67 | if(env_id == 1) { 68 | this._client = new window.Paho.MQTT.this._client(config.PA_HOST, config.PA_PORT, new Date().getTime()) 69 | this._client.onConnectionLost = onConnectionLost 70 | this._client.onMessageArrived = onMessageArrived 71 | // connect the this._client 72 | this._client.connect({onSuccess:onConnect}) 73 | } 74 | } 75 | 76 | render() { 77 | return ( 78 | <div className='pazhezaoceng dn'> 79 | <img src='../../image/pacut.png' /> 80 | </div> 81 | ) 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /less/about/about.less: -------------------------------------------------------------------------------- 1 | @import url('../common'); 2 | .pwrap p{ 3 | fontSize: 18px; 4 | color: #484949; 5 | line-height: 1.4; 6 | padding-bottom: 30px; 7 | } 8 | html,body{ 9 | height: 100%; 10 | } 11 | p img{ 12 | width: 100%; 13 | display: block; 14 | padding:0; 15 | margin:0; 16 | } 17 | -------------------------------------------------------------------------------- /less/common.less: -------------------------------------------------------------------------------- 1 | html{ 2 | font-family:"STHeitiSC-Light"; 3 | } 4 | 5 | body{ 6 | margin: 0; 7 | padding: 0; 8 | background: #fff; 9 | border: 0; 10 | } 11 | 12 | div,p,select,li,form,td,section,ul,a,input,button,h1,h2,h3,h4,h5,header,footer,article,img,span{ 13 | padding: 0; 14 | margin: 0; 15 | border: 0; 16 | } 17 | 18 | .dn{ 19 | display: none !important; 20 | } 21 | 22 | a{ 23 | text-decoration: none; 24 | color: #000; 25 | } 26 | 27 | .dn{ 28 | display: none !important; 29 | } 30 | 31 | li{ 32 | list-style-type:none; 33 | } 34 | 35 | /**loading style**/ 36 | .loader{ 37 | position: absolute; 38 | top: 50%; 39 | left: 50%; 40 | 41 | } 42 | @-webkit-keyframes ball-spin-fade-loader { 43 | 50% { 44 | opacity: 0.3; 45 | -webkit-transform: scale(0.4); 46 | transform: scale(0.4); 47 | } 48 | 49 | 100% { 50 | opacity: 1; 51 | -webkit-transform: scale(1); 52 | transform: scale(1); 53 | } 54 | } 55 | 56 | @keyframes ball-spin-fade-loader { 57 | 50% { 58 | opacity: 0.3; 59 | -webkit-transform: scale(0.4); 60 | transform: scale(0.4); 61 | } 62 | 63 | 100% { 64 | opacity: 1; 65 | -webkit-transform: scale(1); 66 | transform: scale(1); 67 | } 68 | } 69 | 70 | .ball-spin-fade-loader { 71 | position: relative; 72 | } 73 | .ball-spin-fade-loader > div:nth-child(1) { 74 | top: 25px; 75 | left: 0; 76 | -webkit-animation: ball-spin-fade-loader 1s 0s infinite linear; 77 | animation: ball-spin-fade-loader 1s 0s infinite linear; 78 | } 79 | .ball-spin-fade-loader > div:nth-child(2) { 80 | top: 17.04545px; 81 | left: 17.04545px; 82 | -webkit-animation: ball-spin-fade-loader 1s 0.12s infinite linear; 83 | animation: ball-spin-fade-loader 1s 0.12s infinite linear; 84 | } 85 | .ball-spin-fade-loader > div:nth-child(3) { 86 | top: 0; 87 | left: 25px; 88 | -webkit-animation: ball-spin-fade-loader 1s 0.24s infinite linear; 89 | animation: ball-spin-fade-loader 1s 0.24s infinite linear; 90 | } 91 | .ball-spin-fade-loader > div:nth-child(4) { 92 | top: -17.04545px; 93 | left: 17.04545px; 94 | -webkit-animation: ball-spin-fade-loader 1s 0.36s infinite linear; 95 | animation: ball-spin-fade-loader 1s 0.36s infinite linear; 96 | } 97 | .ball-spin-fade-loader > div:nth-child(5) { 98 | top: -25px; 99 | left: 0; 100 | -webkit-animation: ball-spin-fade-loader 1s 0.48s infinite linear; 101 | animation: ball-spin-fade-loader 1s 0.48s infinite linear; 102 | } 103 | .ball-spin-fade-loader > div:nth-child(6) { 104 | top: -17.04545px; 105 | left: -17.04545px; 106 | -webkit-animation: ball-spin-fade-loader 1s 0.6s infinite linear; 107 | animation: ball-spin-fade-loader 1s 0.6s infinite linear; 108 | } 109 | .ball-spin-fade-loader > div:nth-child(7) { 110 | top: 0; 111 | left: -25px; 112 | -webkit-animation: ball-spin-fade-loader 1s 0.72s infinite linear; 113 | animation: ball-spin-fade-loader 1s 0.72s infinite linear; 114 | } 115 | .ball-spin-fade-loader > div:nth-child(8) { 116 | top: 17.04545px; 117 | left: -17.04545px; 118 | -webkit-animation: ball-spin-fade-loader 1s 0.84s infinite linear; 119 | animation: ball-spin-fade-loader 1s 0.84s infinite linear; 120 | } 121 | .ball-spin-fade-loader > div { 122 | background-color: #5c4127; 123 | width: 15px; 124 | height: 15px; 125 | border-radius: 100%; 126 | margin: 2px; 127 | -webkit-animation-fill-mode: both; 128 | animation-fill-mode: both; 129 | position: absolute; 130 | } 131 | 132 | @-webkit-keyframes ball-spin-loader { 133 | 75% { 134 | opacity: 0.2; 135 | } 136 | 100% { 137 | opacity: 1; 138 | } 139 | } 140 | 141 | @keyframes ball-spin-loader { 142 | 75% { 143 | opacity: 0.2; 144 | } 145 | 100% { 146 | opacity: 1; 147 | } 148 | } 149 | 150 | .ball-spin-loader { 151 | position: relative; 152 | } 153 | .ball-spin-loader > span:nth-child(1) { 154 | top: 45px; 155 | left: 0; 156 | -webkit-animation: ball-spin-loader 2s 0.9s infinite linear; 157 | animation: ball-spin-loader 2s 0.9s infinite linear; 158 | } 159 | .ball-spin-loader > span:nth-child(2) { 160 | top: 30.68182px; 161 | left: 30.68182px; 162 | -webkit-animation: ball-spin-loader 2s 1.8s infinite linear; 163 | animation: ball-spin-loader 2s 1.8s infinite linear; 164 | } 165 | .ball-spin-loader > span:nth-child(3) { 166 | top: 0; 167 | left: 45px; 168 | -webkit-animation: ball-spin-loader 2s 2.7s infinite linear; 169 | animation: ball-spin-loader 2s 2.7s infinite linear; 170 | } 171 | .ball-spin-loader > span:nth-child(4) { 172 | top: -30.68182px; 173 | left: 30.68182px; 174 | -webkit-animation: ball-spin-loader 2s 3.6s infinite linear; 175 | animation: ball-spin-loader 2s 3.6s infinite linear; 176 | } 177 | .ball-spin-loader > span:nth-child(5) { 178 | top: -45px; 179 | left: 0; 180 | -webkit-animation: ball-spin-loader 2s 4.5s infinite linear; 181 | animation: ball-spin-loader 2s 4.5s infinite linear; 182 | } 183 | .ball-spin-loader > span:nth-child(6) { 184 | top: -30.68182px; 185 | left: -30.68182px; 186 | -webkit-animation: ball-spin-loader 2s 5.4s infinite linear; 187 | animation: ball-spin-loader 2s 5.4s infinite linear; 188 | } 189 | .ball-spin-loader > span:nth-child(7) { 190 | top: 0; 191 | left: -45px; 192 | -webkit-animation: ball-spin-loader 2s 6.3s infinite linear; 193 | animation: ball-spin-loader 2s 6.3s infinite linear; 194 | } 195 | .ball-spin-loader > span:nth-child(8) { 196 | top: 30.68182px; 197 | left: -30.68182px; 198 | -webkit-animation: ball-spin-loader 2s 7.2s infinite linear; 199 | animation: ball-spin-loader 2s 7.2s infinite linear; 200 | } 201 | .ball-spin-loader > div { 202 | -webkit-animation-fill-mode: both; 203 | animation-fill-mode: both; 204 | position: absolute; 205 | width: 15px; 206 | height: 15px; 207 | border-radius: 100%; 208 | background: green; 209 | } 210 | /**end**/ 211 | 212 | /**navigation bar style**/ 213 | .navigation-bar{ 214 | height: 70px; 215 | position: fixed; 216 | top: 0; 217 | left: 0; 218 | width: 100%; 219 | background: #fff; 220 | z-index: 1000; 221 | display: flex; 222 | display: -webkit-flex; 223 | display: -moz-flex; 224 | flex-flow: row; 225 | justify-content:space-around; 226 | .navigation-left-logo{ 227 | flex:1; 228 | img{ 229 | position: absolute; 230 | height: 82px; 231 | } 232 | } 233 | .navigation-right{ 234 | flex:4; 235 | overflow: hidden; 236 | height: 37px; 237 | line-height: 35px; 238 | position: relative; 239 | top: 17.5px; 240 | li{ 241 | font-family: "PingFang-SC-Regular"; 242 | margin-left: 1.1%; 243 | text-align: center; 244 | color: #666; 245 | font-size: 14px; 246 | float: left; 247 | } 248 | .activity_focus{ 249 | background: #242527; 250 | color: #F7E09F; 251 | border-radius: 18px; 252 | padding: 1px 15px; 253 | } 254 | } 255 | } 256 | 257 | .masked() { 258 | background: rgba(0, 0, 0, 0.6); 259 | z-index: 1000; 260 | display: -moz-box; 261 | display: -ms-flexbox; 262 | display: -webkit-box; 263 | display: -webkit-flex; 264 | display: flex; 265 | -webkit-box-pack: center; 266 | -moz-box-pack: center; 267 | -ms-flex-pack: center; 268 | -webkit-justify-content: center; 269 | justify-content: center; 270 | -webkit-box-align: center; 271 | -moz-box-align: center; 272 | -ms-flex-align: center; 273 | -webkit-align-items: center; 274 | align-items: center; 275 | position: fixed; 276 | top: 0; 277 | bottom: 0; 278 | left: 0; 279 | right: 0; 280 | } 281 | 282 | .pazhezaoceng { 283 | .masked; 284 | z-index: 9999; 285 | img { 286 | width: 50%; 287 | } 288 | } 289 | /**end**/ 290 | -------------------------------------------------------------------------------- /less/destination/destination.less: -------------------------------------------------------------------------------- 1 | @import url('../common'); 2 | html,body{ 3 | height:100%; 4 | } 5 | -------------------------------------------------------------------------------- /less/eyesonworld/eyesonworld.less: -------------------------------------------------------------------------------- 1 | @import url('../common'); 2 | html,body{ 3 | height: 100%; 4 | } 5 | h2{ 6 | font-size: 20px; 7 | text-align: center; 8 | line-height: 3; 9 | background: url(../../image/titlecut.png) no-repeat center bottom; 10 | background-size:20%; 11 | padding-bottom:10px; 12 | } 13 | p{ 14 | font-size: 16px; 15 | color: #4c4c4c; 16 | list-height: 2; 17 | padding: 15px 0; 18 | } 19 | img{ 20 | display: block; 21 | width: 75%; 22 | margin: auto; 23 | } 24 | h1{ 25 | font-size:22px; 26 | } 27 | i{ 28 | width:100%; 29 | height:20px; 30 | display:block; 31 | background:url(../../image/dashedcut.png) no-repeat center center; 32 | } 33 | -------------------------------------------------------------------------------- /less/media/cartoon.less: -------------------------------------------------------------------------------- 1 | .cartoon-swiper{ 2 | height: 294px; 3 | overflow: hidden; 4 | margin-bottom: 12px; 5 | img{ 6 | width: 100%; 7 | } 8 | } 9 | .cartoon-kind{ 10 | width: 96%; 11 | margin: 0 auto; 12 | .cartoon-list{ 13 | overflow: hidden; 14 | margin-top: 11px; 15 | img{ 16 | width: 100%; 17 | } 18 | li{ 19 | float: left; 20 | width: 24.4%; 21 | margin-left: 0.8%; 22 | height: 0; 23 | padding-bottom: 18.5%; 24 | overflow: hidden; 25 | div{ 26 | font-family: 'STHeitiSC-Light'; 27 | font-size: 18px; 28 | color:#666; 29 | margin-top: 11px; 30 | } 31 | } 32 | li:nth-child(1){ 33 | margin-left: 0; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /less/media/hotPlay.less: -------------------------------------------------------------------------------- 1 | @import url('../common'); 2 | 3 | .hot-wapper{ 4 | width: 98%; 5 | margin: 0 auto; 6 | } 7 | .flexbox(@direction:row){ 8 | display: -webkit-box; 9 | display: -moz-box; 10 | display: -ms-flexbox; 11 | display: -webkit-flex; 12 | display: -moz-flex; 13 | flex-flow: @direction; 14 | -webkit-flex-flow:@direction; 15 | } 16 | .flexvalue(@flexval:1){ 17 | flex:@flexval; 18 | -moz-box-flex: @flexval; 19 | -webkit-flex: @flexval; 20 | -ms-flex: @flexval; 21 | flex: @flexval; 22 | } 23 | .hot-play{ 24 | .flexbox; 25 | padding-top: 9px; 26 | img{ 27 | width: 100%; 28 | } 29 | .swiper-container{ 30 | .flexvalue; 31 | height: 0; 32 | overflow: hidden; 33 | padding-bottom: 29%; 34 | margin-right: 1%; 35 | } 36 | .hot-play-right{ 37 | .flexvalue; 38 | .flexbox(column); 39 | .right-top{ 40 | .flexvalue; 41 | .flexbox; 42 | div:nth-child(1){ 43 | .flexvalue; 44 | height: 0; 45 | overflow: hidden; 46 | padding-bottom: 30.5%; 47 | position: relative; 48 | } 49 | div:nth-child(2){ 50 | .flexvalue; 51 | margin-left: 2%; 52 | height: 0; 53 | overflow: hidden; 54 | padding-bottom: 30.5%; 55 | position: relative; 56 | } 57 | } 58 | .right-bottom{ 59 | .flexvalue; 60 | .flexbox; 61 | div:nth-child(1){ 62 | .flexvalue; 63 | height: 0; 64 | overflow: hidden; 65 | padding-bottom: 28%; 66 | position: relative; 67 | } 68 | div:nth-child(2){ 69 | .flexvalue; 70 | margin-left: 2%; 71 | height: 0; 72 | overflow: hidden; 73 | padding-bottom: 28%; 74 | position: relative; 75 | } 76 | } 77 | } 78 | } 79 | .new-drama{ 80 | overflow: hidden; 81 | margin-top: 11px; 82 | img{ 83 | width: 100%; 84 | } 85 | li{ 86 | float: left; 87 | width: 24.2%; 88 | margin-left: 1%; 89 | position: relative; 90 | .new-video-name{ 91 | margin-top: 11px; 92 | font-family: 'STHeitiSC-Light'; 93 | color:#666; 94 | font-size: 18px; 95 | } 96 | } 97 | li:nth-child(1){ 98 | margin-left: 0; 99 | } 100 | } 101 | .cutting-line{ 102 | width: 100%; 103 | margin-top: 41px; 104 | } 105 | .work-together{ 106 | img{ 107 | width: 100%; 108 | } 109 | overflow: hidden; 110 | li{ 111 | float: left; 112 | width: 20%; 113 | } 114 | } 115 | .shad-show2{ 116 | height: 40px; 117 | line-height: 40px; 118 | position: absolute; 119 | bottom: 35px; 120 | left: 0; 121 | width: 100%; 122 | background: url('../../image/shadow2.png'); 123 | background-repeat: repeat-x; 124 | z-index: 3; 125 | color: #fff; 126 | background-size: contain; 127 | span{ 128 | padding-left: 10px; 129 | } 130 | } 131 | .sh-show{ 132 | bottom: 11px; 133 | } 134 | .sh-show2{ 135 | bottom: 2px; 136 | } 137 | .swiper-pagination-bullet-active{ 138 | opacity: 1 !important; 139 | background: #fff !important; 140 | } 141 | .swiper-pagination-bullet{ 142 | width: 9px !important; 143 | height: 9px !important; 144 | display: inline-block; 145 | background: #fff; 146 | border-radius: 0 !important; 147 | opacity: .6; 148 | } 149 | .swiper-container-horizontal>.swiper-pagination-bullets, .swiper-pagination-custom, .swiper-pagination-fraction{ 150 | width: 22% !important; 151 | left: inherit !important; 152 | right: 0; 153 | } -------------------------------------------------------------------------------- /less/media/index.less: -------------------------------------------------------------------------------- 1 | @import url('../common'); 2 | .media-header{ 3 | height: 75px; 4 | overflow: hidden; 5 | border-bottom: 1px solid #D93600; 6 | border-top: 1px solid #999; 7 | .media-header-left{ 8 | float: left; 9 | line-height: 75px; 10 | margin-left: 1%; 11 | img:nth-child(1){ 12 | width: 19px; 13 | vertical-align: middle; 14 | } 15 | img:nth-child(2){ 16 | width: 29px; 17 | vertical-align: middle; 18 | padding: 0 7%; 19 | } 20 | span{ 21 | font-size: 1.2rem; 22 | color:#D93600; 23 | font-family: 'HiraginoSansGB-W3'; 24 | } 25 | } 26 | .media-header-right{ 27 | float: right; 28 | width: 36%; 29 | } 30 | .media-kind-list{ 31 | //overflow: hidden; 32 | margin-top: 14px; 33 | li{ 34 | float: left; 35 | width: 25%; 36 | text-align: center; 37 | font-family: 'PingFang-SC-Light'; 38 | .icon_con{ 39 | margin-top: 3px; 40 | } 41 | .video-all-icon(@x,@y){ 42 | background: url('../../image/result.png'); 43 | background-position: @x @y; 44 | background-repeat: no-repeat; 45 | background-size: cover; 46 | width: 30px; 47 | height: 30px; 48 | //position: relative; 49 | //left: 28px; 50 | position: relative; 51 | left: 50%; 52 | margin-left: -15px; 53 | 54 | } 55 | .video-hot{ 56 | .video-all-icon(0px,-3px); 57 | } 58 | .hot-choice{ 59 | .video-all-icon(0px,-75px); 60 | } 61 | .video-yingyin{ 62 | .video-all-icon(0px,-110px); 63 | } 64 | .yingyin-choice{ 65 | .video-all-icon(0px,-183px); 66 | } 67 | .video-yinyue{ 68 | .video-all-icon(0px,-221px); 69 | } 70 | .yinyue-choice{ 71 | .video-all-icon(0px,-256px); 72 | } 73 | .video-donghua{ 74 | .video-all-icon(0px,-38px); 75 | } 76 | .donghua-choice{ 77 | .video-all-icon(0px,-146px); 78 | } 79 | .icon_con_choice{ 80 | color:#D93600; 81 | border-bottom: 4px solid #D93600; 82 | padding-bottom: 7px; 83 | } 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /less/media/kmplayer.less: -------------------------------------------------------------------------------- 1 | .kmplayer-swiper{ 2 | height: 294px; 3 | overflow: hidden; 4 | margin-bottom: 24px; 5 | img{ 6 | width: 100%; 7 | } 8 | } 9 | .recommend{ 10 | width: 96%; 11 | margin: 0 auto; 12 | .recommend-list{ 13 | overflow: hidden; 14 | padding-top: 10px; 15 | img{ 16 | width: 100%; 17 | display: block; 18 | } 19 | li{ 20 | float: left; 21 | width: 16%; 22 | margin-left: 0.8%; 23 | height: 0; 24 | padding-bottom: 28.5%; 25 | overflow: hidden; 26 | div{ 27 | font-family: 'STHeitiSC-Light'; 28 | font-size: 18px; 29 | color:#666; 30 | margin-top: 14px; 31 | } 32 | } 33 | li:nth-child(1){ 34 | margin-left: 0; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /less/media/videocolumn.less: -------------------------------------------------------------------------------- 1 | .video-column{ 2 | margin-top: 19px; 3 | span:nth-child(1){ 4 | display: inline-block; 5 | background: #F88856; 6 | width: 5px; 7 | height: 22px; 8 | } 9 | span:nth-child(2){ 10 | font-family: 'HiraginoSansGB-W3'; 11 | color:#666; 12 | font-size: 20px; 13 | position: relative; 14 | top: -3px; 15 | left: 15px; 16 | } 17 | .hotcartoon{ 18 | background: #FF497F !important; 19 | } 20 | } -------------------------------------------------------------------------------- /less/news/index.less: -------------------------------------------------------------------------------- 1 | @import url('../common'); 2 | 3 | 4 | .common-display-flex { 5 | display: flex; 6 | display: -webkit-flex; 7 | display: -moz-flex; 8 | display: -ms-flexbox; 9 | } 10 | 11 | .common-flex(@val: 1) { 12 | -moz-box-flex: @val; 13 | -webkit-box-flex: @val; 14 | -o-box-flex: @val; 15 | -ms-flex: @val; 16 | flex: @val; 17 | } 18 | 19 | 20 | .common-justify (@content: space-between) { 21 | webkit-justify-content: @content; 22 | justify-content: @content; 23 | } 24 | 25 | 26 | .header-container { 27 | .common-display-flex; 28 | .common-justify; 29 | // padding: 24px 24px 10px 24px; 30 | border-bottom: 2px solid #BBBBBB; 31 | } 32 | 33 | 34 | .header-left { 35 | width: 30%; 36 | margin: 12px 0px 6px 12px; 37 | img { 38 | width: 100%; 39 | height: 100%; 40 | vertical-align: middle; 41 | } 42 | } 43 | 44 | .header-right { 45 | width: 60%; 46 | height: 36px; 47 | margin: 10px 0px 0px 0px; 48 | overflow: hidden; 49 | ul { 50 | .common-display-flex; 51 | flex-flow: row wrap; 52 | li { 53 | padding: 2px; 54 | margin: 10px 12px; 55 | span { 56 | font-size: 18px; 57 | color: #4A4A4A; 58 | // display: inline-block; 59 | width: 50px; 60 | } 61 | } 62 | } 63 | } 64 | 65 | .header-more { 66 | margin: 10px 10px 0px 0px; 67 | span { 68 | width: 36px; 69 | height: 36px; 70 | display: inline-block; 71 | img { 72 | width: 100%; 73 | height: 100%; 74 | vertical-align: middle; 75 | } 76 | } 77 | } 78 | 79 | .header-left-back { 80 | width: 20px; 81 | height: 30px; 82 | margin-left: 8px; 83 | display: inline-block; 84 | } 85 | 86 | .header-left-icon { 87 | width: 38px; 88 | height: 38px; 89 | margin-left: 12px; 90 | display: inline-block; 91 | } 92 | 93 | .header-left-name { 94 | font-size: 22px; 95 | color: #D93600; 96 | vertical-align: middle; 97 | margin-left: 12px; 98 | } 99 | 100 | 101 | .items { 102 | // background: #F6F6F6; 103 | } 104 | 105 | .item-common { 106 | border-bottom: 1px solid #BBBBBB; 107 | margin: 10px 30px; 108 | } 109 | 110 | .item { 111 | .item-common; 112 | } 113 | 114 | .item-title { 115 | margin: 16px 0px; 116 | span { 117 | font-size: 24px; 118 | color: #404040; 119 | } 120 | } 121 | 122 | .item-src-time { 123 | .common-display-flex; 124 | .common-justify(); 125 | margin: 16px 0px; 126 | span { 127 | font-size: 12px; 128 | color: #8C8C8C; 129 | } 130 | } 131 | 132 | .item-abstract { 133 | margin: 10px 0px; 134 | span { 135 | font-size: 18px; 136 | color: #8C8C8C; 137 | } 138 | } 139 | 140 | .item-multi-img { 141 | ul { 142 | .common-display-flex; 143 | li { 144 | margin-right: 8px; 145 | } 146 | } 147 | } 148 | 149 | .item-one-img { 150 | .item-common; 151 | a { 152 | .common-display-flex; 153 | .common-justify(); 154 | } 155 | } 156 | 157 | .item-one-img-left { 158 | .common-flex(3); 159 | margin-right: 6px; 160 | } 161 | 162 | .item-one-img-right { 163 | .common-display-flex; 164 | .common-justify(center); 165 | align-items: center; 166 | } 167 | 168 | .detail { 169 | .common-display-flex; 170 | background-color: #F6F6F6; 171 | } 172 | 173 | 174 | .detail-left { 175 | .common-display-flex; 176 | .common-justify(center); 177 | align-items: flex-end; 178 | width: 12%; 179 | span { 180 | width: 60px; 181 | height: 60px; 182 | display: inline-block; 183 | img { 184 | width: 100%; 185 | height: 100%; 186 | vertical-align: middle; 187 | } 188 | } 189 | } 190 | 191 | .detail-center { 192 | width: 76%; 193 | } 194 | 195 | 196 | .detail-right { 197 | width: 12%; 198 | } 199 | 200 | .detail-top { 201 | .common-display-flex; 202 | .common-justify; 203 | padding: 24px 0px 8px 0px; 204 | border-bottom: 1px solid #979797; 205 | margin: 0px auto; 206 | span { 207 | font-size: 12px; 208 | color: #666666; 209 | } 210 | } 211 | 212 | .detail-title { 213 | .common-display-flex; 214 | .common-justify(center); 215 | margin: 30px auto; 216 | span { 217 | font-family: "STHeitiSC-Medium"; 218 | font-size: 32px; 219 | color: #3E4045; 220 | } 221 | } 222 | 223 | .detail-content { 224 | margin: 0px auto; 225 | p { 226 | font-size: 18px; 227 | color: #8C8C8C; 228 | line-height: 24px; 229 | } 230 | img { 231 | display: block; 232 | margin: 15px auto; 233 | } 234 | } -------------------------------------------------------------------------------- /less/stock/stock.less: -------------------------------------------------------------------------------- 1 | @import url('../common'); 2 | 3 | .stocks{ 4 | .stock-header{ 5 | height: 74.5px; 6 | border-bottom: 1.5px solid #D93600; 7 | margin-bottom: 15px; 8 | display: -webkit-box; 9 | display: -moz-box; 10 | display: -ms-flexbox; 11 | display: -webkit-flex; 12 | display: -moz-flex; 13 | flex-flow: row; 14 | .stock-header-left{ 15 | flex:1; 16 | -moz-box-flex: 1; 17 | -webkit-flex: 1; 18 | -ms-flex: 1; 19 | flex: 1; 20 | margin-left: 1.5%; 21 | span{ 22 | color:#D93600; 23 | font-size: 22px; 24 | position: relative; 25 | top: 20px; 26 | left:9px; 27 | } 28 | img{ 29 | width: 22px; 30 | position: relative; 31 | top: 29px; 32 | } 33 | } 34 | .stock-header-right{ 35 | flex:5; 36 | -webkit-box-flex: 5; 37 | -moz-box-flex: 5; 38 | -webkit-flex: 5; 39 | -ms-flex: 5; 40 | flex: 5; 41 | div{ 42 | height: 44px; 43 | border: 1px solid #D93600; 44 | background: #fff; 45 | border-radius: 5px; 46 | position: relative; 47 | top: 17px; 48 | margin-right: 1.5%; 49 | input{ 50 | height: 44px; 51 | text-align: center; 52 | border: none; 53 | width: 100px; 54 | margin: 0 auto; 55 | display: block; 56 | outline: none; 57 | } 58 | .search{ 59 | display: inline-block; 60 | width: 90px; 61 | height: 44px; 62 | background: #D93600; 63 | position: absolute; 64 | right: 0; 65 | top: 0; 66 | text-align: center; 67 | line-height: 44px; 68 | img{ 69 | width: 33px; 70 | vertical-align: middle; 71 | } 72 | } 73 | } 74 | } 75 | } 76 | .stocks-details{ 77 | width: 98%; 78 | margin: 0 auto; 79 | .stockDeta{ 80 | min-width: 100%; 81 | width: 100px; 82 | border: 0; 83 | height: 660px; 84 | } 85 | } 86 | .stocks-detail{ 87 | width: 98%; 88 | margin: 0 auto; 89 | iframe{ 90 | min-width: 100%; 91 | width: 100px; 92 | border: 0; 93 | height: 660px; 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "redux-async-example", 3 | "version": "0.0.0", 4 | "description": "Redux async example", 5 | "scripts": { 6 | "start": "webpack-dev-server --hot --quiet", 7 | "dev": "DEBUG=true node server.js", 8 | "test": "ONLINE=true webpack -p" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "" 13 | }, 14 | "keywords": [ 15 | "react", 16 | "reactjs", 17 | "hot", 18 | "reload", 19 | "hmr", 20 | "live", 21 | "edit", 22 | "webpack", 23 | "flux" 24 | ], 25 | "license": "MIT", 26 | "bugs": { 27 | "url": "" 28 | }, 29 | "homepage": "", 30 | "dependencies": { 31 | "isomorphic-fetch": "^2.1.1", 32 | "rc-select": "^6.2.3", 33 | "react": "^0.14.0", 34 | "react-cl-audio-player": "^1.0.0", 35 | "react-dom": "^0.14.0", 36 | "react-redux": "^4.0.0", 37 | "react-router": "^2.0.1", 38 | "react-router-redux": "^4.0.0", 39 | "react-swipe": "^5.0.3", 40 | "redux": "^3.3.1", 41 | "redux-logger": "^2.0.2", 42 | "redux-thunk": "^0.1.0", 43 | "redux-undo": "^0.6.1", 44 | "swipe-js-iso": "^2.0.3" 45 | }, 46 | "devDependencies": { 47 | "babel-core": "^5.6.18", 48 | "babel-loader": "^5.1.4", 49 | "babel-plugin-react-transform": "^1.1.0", 50 | "babel-preset-es2015": "^6.6.0", 51 | "babel-preset-stage-2": "^6.5.0", 52 | "css-loader": "^0.23.1", 53 | "eslint": "^2.8.0", 54 | "eslint-plugin-react": "^4.3.0", 55 | "expect": "^1.6.0", 56 | "express": "^4.13.3", 57 | "file-loader": "^0.8.5", 58 | "json-loader": "^0.5.4", 59 | "less": "^2.6.1", 60 | "less-loader": "^2.2.3", 61 | "node-libs-browser": "^0.5.2", 62 | "react-hot-loader": "^1.3.0", 63 | "react-timeago": "^2.2.1", 64 | "react-transform-hmr": "^1.0.0", 65 | "redux-devtools": "^3.1.1", 66 | "redux-devtools-dock-monitor": "^1.1.0", 67 | "redux-devtools-log-monitor": "^1.0.5", 68 | "redux-immutable-state-invariant": "^1.2.2", 69 | "style-loader": "^0.13.1", 70 | "url-loader": "^0.5.7", 71 | "webpack": "^1.9.11", 72 | "webpack-dev-middleware": "^1.2.0", 73 | "webpack-dev-server": "^1.14.1", 74 | "webpack-hot-middleware": "^2.2.0" 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | var webpack = require('webpack'); 2 | var WebpackDevServer = require('webpack-dev-server'); 3 | var config = require('./webpack.config'); 4 | 5 | new WebpackDevServer(webpack(config), { 6 | publicPath: config.output.publicPath, 7 | hot: true, 8 | historyApiFallback: true 9 | }).listen(8080, '0.0.0.0', function (err, result) { 10 | if (err) console.log(err); 11 | console.log('Listening at localhost:8080'); 12 | }); 13 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var webpack = require('webpack'); 3 | var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js'); 4 | var config_option; 5 | if(!process.env.ONLINE){ 6 | config_option = { 7 | index:[ 8 | 'webpack-dev-server/client?http://0.0.0.0:8080', 9 | 'webpack/hot/only-dev-server', 10 | './entry/index' 11 | ], 12 | news:[ 13 | 'webpack-dev-server/client?http://0.0.0.0:8080', 14 | 'webpack/hot/only-dev-server', 15 | './entry/news' 16 | ], 17 | destination:[ 18 | 'webpack-dev-server/client?http://0.0.0.0:8080', 19 | 'webpack/hot/only-dev-server', 20 | './entry/destination' 21 | ], 22 | social:[ 23 | 'webpack-dev-server/client?http://0.0.0.0:8080', 24 | 'webpack/hot/only-dev-server', 25 | './entry/social' 26 | ], 27 | airport_pickup:[ 28 | 'webpack-dev-server/client?http://0.0.0.0:8080', 29 | 'webpack/hot/only-dev-server', 30 | './entry/airport_pickup' 31 | ], 32 | stock:[ 33 | 'webpack-dev-server/client?http://0.0.0.0:8080', 34 | 'webpack/hot/only-dev-server', 35 | './entry/stocks' 36 | ], 37 | about:[ 38 | 'webpack-dev-server/client?http://0.0.0.0:8080', 39 | 'webpack/hot/only-dev-server', 40 | './entry/about' 41 | ], 42 | media:[ 43 | 'webpack-dev-server/client?http://0.0.0.0:8080', 44 | 'webpack/hot/only-dev-server', 45 | './entry/media' 46 | ], 47 | game:[ 48 | 'webpack-dev-server/client?http://0.0.0.0:8080', 49 | 'webpack/hot/only-dev-server', 50 | './entry/game' 51 | ], 52 | eyesonworld:[ 53 | 'webpack-dev-server/client?http://0.0.0.0:8080', 54 | 'webpack/hot/only-dev-server', 55 | './entry/eyesonworld' 56 | ], 57 | ecommerce:[ 58 | 'webpack-dev-server/client?http://0.0.0.0:8080', 59 | 'webpack/hot/only-dev-server', 60 | './entry/ecommerce' 61 | ] 62 | } 63 | }else{ 64 | config_option = { 65 | index: './entry/index', 66 | news: './entry/news', 67 | destination: './entry/destination', 68 | social: './entry/social', 69 | airport_pickup: './entry/airport_pickup', 70 | stock: './entry/stocks', 71 | about: './entry/about', 72 | media: './entry/media', 73 | game: './entry/game', 74 | eyesonworld: './entry/eyesonworld', 75 | ecommerce: './entry/ecommerce' 76 | } 77 | } 78 | module.exports = { 79 | entry:config_option, 80 | 81 | output: { 82 | path: path.join(__dirname, 'assets'), 83 | filename: '[name].js', 84 | publicPath: '/assets/' 85 | }, 86 | resolve: { 87 | extensions: ['', '.coffee','.json', '.js','.css','.less','.jpg','.png','.gif'] 88 | }, 89 | plugins: [ 90 | new webpack.optimize.OccurenceOrderPlugin(), 91 | new webpack.HotModuleReplacementPlugin(), 92 | new webpack.NoErrorsPlugin(), 93 | commonsPlugin 94 | // new webpack.DefinePlugin({ 95 | // __DEVTOOLS__: !!process.env.DEBUG 96 | // }) 97 | ], 98 | module: { 99 | loaders: [ 100 | { 101 | test: /\.js$/, 102 | loaders: ['babel'], 103 | exclude: /node_modules/, 104 | include: __dirname 105 | }, 106 | { 107 | test: /\.less/, 108 | loader: 'style-loader!css-loader!less-loader' 109 | }, 110 | { 111 | test: /\.json/, 112 | loader: 'json-loader' 113 | }, 114 | { 115 | test: /\.(css)$/, 116 | loader: 'style-loader!css-loader' 117 | }, 118 | { 119 | test: /\.(png|jpg)$/, 120 | loader: 'url-loader?limit=8192' 121 | } 122 | ] 123 | } 124 | } 125 | 126 | 127 | // When inside Redux repo, prefer src to compiled version. 128 | // You can safely delete these lines in your project. 129 | // var reduxSrc = path.join(__dirname, '..', '..', 'src') 130 | // var reduxNodeModules = path.join(__dirname, '..', '..', 'node_modules') 131 | // var fs = require('fs') 132 | // if (fs.existsSync(reduxSrc) && fs.existsSync(reduxNodeModules)) { 133 | // // Resolve Redux to source 134 | // module.exports.resolve = { alias: { 'redux': reduxSrc } } 135 | // // Compile Redux from source 136 | // module.exports.module.loaders.push({ 137 | // test: /\.js$/, 138 | // loaders: ['babel'], 139 | // include: reduxSrc 140 | // }) 141 | // } 142 | --------------------------------------------------------------------------------