├── .gitignore ├── testChange.txt ├── src ├── js │ ├── testData │ │ ├── indexTestRequest.json │ │ ├── user │ │ │ └── userMenuData.js │ │ ├── live │ │ │ ├── liveBannerData.js │ │ │ └── liveLayoutData.js │ │ ├── indexBannerData.js │ │ ├── ranking │ │ │ └── rankingNavData.js │ │ ├── channel │ │ │ └── channelContentData.js │ │ ├── mainContainerBoxData.js │ │ └── indexContentData.js │ ├── plugs │ │ ├── setRootFontsize.js │ │ ├── createScriptJsonp.js │ │ ├── toTop.js │ │ ├── ajaxRequest.js │ │ ├── navRoll.js │ │ ├── appLinkShow.js │ │ ├── imgLazyLoad.js │ │ └── slideTouch.js │ ├── components │ │ ├── RankingContent │ │ │ ├── RankingTitle.js │ │ │ ├── RankingNav.js │ │ │ ├── RankingList.js │ │ │ └── RankingContent.js │ │ ├── LoadCover.js │ │ ├── LiveContent │ │ │ ├── LiveContent.js │ │ │ └── LiveSection.js │ │ ├── Header.js │ │ ├── VideoContent │ │ │ ├── VideoOption.js │ │ │ ├── RecommendComment │ │ │ │ ├── RecommendComment.js │ │ │ │ ├── Recommend.js │ │ │ │ └── Comment.js │ │ │ ├── VideoTag.js │ │ │ ├── VideoContent.js │ │ │ ├── VideoPart.js │ │ │ └── VideoIntro.js │ │ ├── AppLink.js │ │ ├── Nav.js │ │ ├── InitialSearch │ │ │ ├── HotSearch.js │ │ │ ├── HistorySearch.js │ │ │ ├── SearchSuggest.js │ │ │ ├── SearchOperation.js │ │ │ └── InitialSearch.js │ │ ├── Footer.js │ │ ├── SearchContent │ │ │ ├── SearchFilterOrder.js │ │ │ ├── SearchFilterChannel.js │ │ │ ├── SearchResult │ │ │ │ ├── SearchResult.js │ │ │ │ ├── UpuserResult.js │ │ │ │ ├── BangumiSpecialResult.js │ │ │ │ └── ComprehensiveResult.js │ │ │ ├── SearchNav.js │ │ │ └── SearchContent.js │ │ ├── ChannelContent │ │ │ ├── ChannelList.js │ │ │ └── ChannelContent.js │ │ ├── UserContent │ │ │ └── UserContent.js │ │ ├── IndexContent │ │ │ ├── BangumiVideoContainer.js │ │ │ ├── LiveVideoContainer.js │ │ │ ├── DefaultVideoContainer.js │ │ │ ├── RecommendVideoContainer.js │ │ │ └── IndexContent.js │ │ └── Banner.js │ ├── user.js │ ├── videoPlay.js │ ├── ranking.js │ ├── search.js │ ├── channel.js │ ├── index.js │ └── live.js ├── image │ ├── logo.png │ ├── ui_2.png │ ├── ui_3@2x.png │ ├── index@2x.png │ ├── live │ │ ├── ui_2.png │ │ ├── movie.png │ │ └── banner │ │ │ ├── banner_01.jpg │ │ │ ├── banner_02.jpg │ │ │ ├── banner_03.jpg │ │ │ ├── banner_04.jpg │ │ │ └── banner_05.jpg │ ├── app_logo.v3.png │ ├── close_icon.png │ ├── img_loading.png │ ├── index_guoman.png │ ├── ranking │ │ ├── back.png │ │ ├── ico_up.png │ │ ├── ico_danmu.png │ │ ├── ico_play.png │ │ ├── rank_icon.png │ │ └── tri_rank.png │ ├── banner │ │ ├── banner_01.jpg │ │ ├── banner_02.jpg │ │ ├── banner_03.jpg │ │ ├── banner_04.jpg │ │ ├── banner_05.jpg │ │ ├── banner_06.jpg │ │ └── banner_07.jpg │ ├── liveFace │ │ └── face_01.jpg │ ├── videoCover │ │ └── cover_01.jpg │ ├── videoPlayer │ │ └── loading.gif │ └── channel │ │ ├── channel_ent@2x.png │ │ ├── channel_life@2x.png │ │ ├── channel_guoman@2x.png │ │ └── channel_advertise@2x.png └── style │ ├── live.scss │ ├── channel.scss │ ├── user.scss │ ├── search.scss │ └── ranking.scss ├── dist ├── image │ ├── ui_2.png │ ├── index@2x.png │ ├── ui_3@2x.png │ └── rank_icon.png ├── style │ ├── user.css │ ├── search.css │ └── live.css ├── live.js ├── main.js ├── user.js ├── channel.js └── search.js ├── index.html ├── live.html ├── user.html ├── channel.html ├── ranking.html ├── video.html ├── search.html ├── package.json ├── README.md └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules -------------------------------------------------------------------------------- /testChange.txt: -------------------------------------------------------------------------------- 1 | 测试改动文件 2 | --测试分支新建与合并 3 | -------------------------------------------------------------------------------- /src/js/testData/indexTestRequest.json: -------------------------------------------------------------------------------- 1 | { 2 | "ok": "ok" 3 | } -------------------------------------------------------------------------------- /src/image/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/logo.png -------------------------------------------------------------------------------- /src/image/ui_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/ui_2.png -------------------------------------------------------------------------------- /dist/image/ui_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/dist/image/ui_2.png -------------------------------------------------------------------------------- /src/image/ui_3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/ui_3@2x.png -------------------------------------------------------------------------------- /dist/image/index@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/dist/image/index@2x.png -------------------------------------------------------------------------------- /dist/image/ui_3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/dist/image/ui_3@2x.png -------------------------------------------------------------------------------- /src/image/index@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/index@2x.png -------------------------------------------------------------------------------- /src/image/live/ui_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/live/ui_2.png -------------------------------------------------------------------------------- /dist/image/rank_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/dist/image/rank_icon.png -------------------------------------------------------------------------------- /src/image/app_logo.v3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/app_logo.v3.png -------------------------------------------------------------------------------- /src/image/close_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/close_icon.png -------------------------------------------------------------------------------- /src/image/img_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/img_loading.png -------------------------------------------------------------------------------- /src/image/index_guoman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/index_guoman.png -------------------------------------------------------------------------------- /src/image/live/movie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/live/movie.png -------------------------------------------------------------------------------- /src/image/ranking/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/ranking/back.png -------------------------------------------------------------------------------- /src/image/ranking/ico_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/ranking/ico_up.png -------------------------------------------------------------------------------- /src/image/banner/banner_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/banner/banner_01.jpg -------------------------------------------------------------------------------- /src/image/banner/banner_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/banner/banner_02.jpg -------------------------------------------------------------------------------- /src/image/banner/banner_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/banner/banner_03.jpg -------------------------------------------------------------------------------- /src/image/banner/banner_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/banner/banner_04.jpg -------------------------------------------------------------------------------- /src/image/banner/banner_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/banner/banner_05.jpg -------------------------------------------------------------------------------- /src/image/banner/banner_06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/banner/banner_06.jpg -------------------------------------------------------------------------------- /src/image/banner/banner_07.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/banner/banner_07.jpg -------------------------------------------------------------------------------- /src/image/liveFace/face_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/liveFace/face_01.jpg -------------------------------------------------------------------------------- /src/image/ranking/ico_danmu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/ranking/ico_danmu.png -------------------------------------------------------------------------------- /src/image/ranking/ico_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/ranking/ico_play.png -------------------------------------------------------------------------------- /src/image/ranking/rank_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/ranking/rank_icon.png -------------------------------------------------------------------------------- /src/image/ranking/tri_rank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/ranking/tri_rank.png -------------------------------------------------------------------------------- /src/image/videoCover/cover_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/videoCover/cover_01.jpg -------------------------------------------------------------------------------- /src/image/videoPlayer/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/videoPlayer/loading.gif -------------------------------------------------------------------------------- /src/image/channel/channel_ent@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/channel/channel_ent@2x.png -------------------------------------------------------------------------------- /src/image/live/banner/banner_01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/live/banner/banner_01.jpg -------------------------------------------------------------------------------- /src/image/live/banner/banner_02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/live/banner/banner_02.jpg -------------------------------------------------------------------------------- /src/image/live/banner/banner_03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/live/banner/banner_03.jpg -------------------------------------------------------------------------------- /src/image/live/banner/banner_04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/live/banner/banner_04.jpg -------------------------------------------------------------------------------- /src/image/live/banner/banner_05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/live/banner/banner_05.jpg -------------------------------------------------------------------------------- /src/image/channel/channel_life@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/channel/channel_life@2x.png -------------------------------------------------------------------------------- /src/image/channel/channel_guoman@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/channel/channel_guoman@2x.png -------------------------------------------------------------------------------- /src/image/channel/channel_advertise@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Wzijie/bilibili/HEAD/src/image/channel/channel_advertise@2x.png -------------------------------------------------------------------------------- /src/js/testData/user/userMenuData.js: -------------------------------------------------------------------------------- 1 | 2 | const userMenuData = [ 3 | { title: '我的收藏', iconClass: 'fav' }, 4 | { title: '我的投稿', iconClass: 'upload' }, 5 | { title: '历史记录', iconClass: 'history' } 6 | ] 7 | 8 | export default userMenuData; -------------------------------------------------------------------------------- /src/js/plugs/setRootFontsize.js: -------------------------------------------------------------------------------- 1 | 2 | // 根据屏幕宽度改变根节点的fontsize值 3 | function setRootFontsize(){ 4 | var deviceWidth = document.documentElement.clientWidth; 5 | console.log(deviceWidth); 6 | document.documentElement.style.fontSize = deviceWidth / 3.75 + 'px'; 7 | } 8 | 9 | export default setRootFontsize; 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/js/plugs/createScriptJsonp.js: -------------------------------------------------------------------------------- 1 | 2 | function createScriptJsonp(src){ 3 | var scriptEle = document.createElement('script'); 4 | scriptEle.src = src; 5 | try{ 6 | return document.body.appendChild(scriptEle); 7 | }catch(error){ 8 | console.log(error,'createScriptJsonp'); 9 | } 10 | 11 | } 12 | 13 | export default createScriptJsonp; -------------------------------------------------------------------------------- /src/js/components/RankingContent/RankingTitle.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react'; 3 | 4 | var RankingTitle = React.createClass({ 5 | render: function(){ 6 | return
7 | 8 | 9 | 10 |

排行榜

11 |
12 | } 13 | }); 14 | 15 | export default RankingTitle; -------------------------------------------------------------------------------- /src/js/components/LoadCover.js: -------------------------------------------------------------------------------- 1 | // 加载loading页面 2 | var React = require('react'); 3 | 4 | var LoadCover = React.createClass({ 5 | render: function(){ 6 | var loading = this.props.loading; 7 | return
8 |
(´・ω・`)正在加载...
9 |
10 | } 11 | }); 12 | 13 | export default LoadCover; -------------------------------------------------------------------------------- /src/js/testData/live/liveBannerData.js: -------------------------------------------------------------------------------- 1 | 2 | // live banner数据 3 | var liveBannerImg = [ 4 | 'live/banner/banner_01.jpg', 5 | 'live/banner/banner_02.jpg', 6 | 'live/banner/banner_03.jpg', 7 | 'live/banner/banner_04.jpg', 8 | 'live/banner/banner_05.jpg', 9 | ] 10 | 11 | // 将数组打乱然后随机返回3~5张图片 12 | var liveBannerData = liveBannerImg.sort(() => { 13 | return Math.random()-0.5; 14 | }).slice(0, Math.floor( Math.random() * (6-3) + 3 )); 15 | 16 | export default liveBannerData; -------------------------------------------------------------------------------- /src/js/testData/indexBannerData.js: -------------------------------------------------------------------------------- 1 | // index banner数据 2 | var indexBannerImg = [ 3 | 'banner/banner_01.jpg', 4 | 'banner/banner_02.jpg', 5 | 'banner/banner_03.jpg', 6 | 'banner/banner_04.jpg', 7 | 'banner/banner_05.jpg', 8 | 'banner/banner_06.jpg', 9 | 'banner/banner_07.jpg' 10 | ] 11 | 12 | // 将数组打乱然后随机返回3~5张图片 13 | var indexBannerData = indexBannerImg.sort(() => { 14 | return Math.random()-0.5; 15 | }).slice(0, Math.floor( Math.random() * (6-3) + 3 )); 16 | 17 | export default indexBannerData; -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 哔哩哔哩移动版 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/js/plugs/toTop.js: -------------------------------------------------------------------------------- 1 | // 返回顶部 2 | 3 | function toTop(clickEleSelector){ 4 | var clickEle = document.querySelector(clickEleSelector); 5 | var intervalId = null; 6 | clickEle.addEventListener('click', () => { 7 | intervalId = setInterval( () => { 8 | var rootNode = document.body.scrollTop === 0 ? document.documentElement : document.body; 9 | rootNode.scrollTop = rootNode.scrollTop - rootNode.scrollTop * 0.1; 10 | if(rootNode.scrollTop <= 0){ 11 | clearInterval(intervalId); 12 | } 13 | }, 10); 14 | } ); 15 | } 16 | 17 | export default toTop; -------------------------------------------------------------------------------- /live.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 哔哩哔哩直播 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /user.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 哔哩哔哩移动版 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /channel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 哔哩哔哩视频导航 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ranking.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 哔哩哔哩排行榜 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /video.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | bilibili_mobile 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/js/testData/ranking/rankingNavData.js: -------------------------------------------------------------------------------- 1 | 2 | const rankingNavData = [ 3 | { name: '全站', dataType: 'all' }, 4 | { name: '动画', dataType: 'douga' }, 5 | { name: '音乐', dataType: 'music' }, 6 | { name: '舞蹈', dataType: 'dance' }, 7 | { name: '游戏', dataType: 'game' }, 8 | { name: '科技', dataType: 'technology' }, 9 | { name: '生活', dataType: 'life' }, 10 | { name: '娱乐', dataType: 'ent' }, 11 | { name: '电影', dataType: 'movie' }, 12 | { name: '鬼畜', dataType: 'kichiku' }, 13 | { name: '时尚', dataType: 'fashion' }, 14 | { name: '电视剧', dataType: 'teleplay' }, 15 | ]; 16 | 17 | export default rankingNavData; -------------------------------------------------------------------------------- /src/js/components/LiveContent/LiveContent.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react'; 3 | import LiveSection from './LiveSection.js'; 4 | 5 | // 主要内容 6 | var LiveContent = React.createClass({ 7 | componentDidMount: function(){ 8 | this.props.loadingChange(); 9 | }, 10 | render: function(){ 11 | 12 | var liveData = this.props.liveData; 13 | 14 | return
15 | { 16 | liveData.map((liveSectionData, index) => { 17 | return 18 | }) 19 | } 20 |
21 | } 22 | }); 23 | 24 | export default LiveContent; -------------------------------------------------------------------------------- /search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 哔哩哔哩搜索 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/js/components/Header.js: -------------------------------------------------------------------------------- 1 | // Header 2 | var React = require('react'); 3 | 4 | var Header = React.createClass({ 5 | render: function(){ 6 | 7 | // 切换搜索面板是否显示方法 8 | var toggleInitialSearch = this.props.toggleInitialSearch; 9 | 10 | return
11 | 12 |
13 | 14 | 15 |
16 |
17 | } 18 | }); 19 | 20 | export default Header; -------------------------------------------------------------------------------- /src/js/components/VideoContent/VideoOption.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react'; 3 | 4 | var VideoOption = React.createClass({ 5 | render: function(){ 6 | return
7 |
8 | 9 |

分享

10 |
11 |
12 | 13 |

收藏

14 |
15 |
16 | 17 |

下载

18 |
19 | 用客户端打开 20 |
21 | } 22 | }); 23 | 24 | export default VideoOption; -------------------------------------------------------------------------------- /src/js/components/AppLink.js: -------------------------------------------------------------------------------- 1 | // AppLink底部悬浮窗口 2 | var React = require('react'); 3 | import appLinkShow from '../plugs/appLinkShow.js'; // 底部悬浮窗口显示隐藏appLinkShow.js 4 | 5 | var AppLink = React.createClass({ 6 | componentDidMount: function(){ 7 | appLinkShow('.app-link', '.app-link .close-btn'); 8 | }, 9 | render: function(){ 10 | return
11 |
12 |
13 |

上bilibili客户端

14 |

高清视频 离线观看 新番电影一览无余

15 |
16 | 下载 17 |
18 |
19 | } 20 | }); 21 | 22 | export default AppLink; -------------------------------------------------------------------------------- /src/js/testData/live/liveLayoutData.js: -------------------------------------------------------------------------------- 1 | 2 | function createData(title, iconClass, dataType){ 3 | return { 4 | 'title': title, 5 | 'iconClass': iconClass, 6 | 'dataType': dataType, 7 | 'data': null 8 | } 9 | }; 10 | 11 | const liveLayoutData = [ 12 | createData('热门直播', 'hot', 'hot'), 13 | createData('最新开播', 'newest', 'newest'), 14 | createData('手机直播', 'mobile', 'mobile'), 15 | createData('唱见舞见', 'sing-dance', 'sing-dance'), 16 | createData('生活娱乐', 'ent-life', 'ent-life'), 17 | createData('绘画专区', 'draw', 'draw'), 18 | createData('御宅文化', 'otaku', 'otaku'), 19 | createData('单机联机', 'single', 'single'), 20 | createData('网络游戏', 'online', 'online'), 21 | createData('电子竞技', 'e-sports', 'e-sports'), 22 | createData('手游直播', 'mobile-game', 'mobile-game') 23 | ]; 24 | 25 | export default liveLayoutData; -------------------------------------------------------------------------------- /src/js/components/Nav.js: -------------------------------------------------------------------------------- 1 | // Nav 2 | var React = require('react'); 3 | var Nav = React.createClass({ 4 | render: function(){ 5 | var pageActive = this.props.pageActive; 6 | return 15 | } 16 | }); 17 | 18 | export default Nav; -------------------------------------------------------------------------------- /src/js/components/InitialSearch/HotSearch.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react'; 3 | 4 | var HotSearch = React.createClass({ 5 | render: function(){ 6 | 7 | var hotSearchData = this.props.hotSearchData; 8 | 9 | return
10 |

热门搜索

11 | { 12 | hotSearchData === null 13 | ?

正在加载...

14 | : 27 | } 28 |
29 | } 30 | }); 31 | 32 | export default HotSearch; -------------------------------------------------------------------------------- /src/js/components/RankingContent/RankingNav.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react'; 3 | import navRoll from '../../plugs/navRoll.js'; 4 | 5 | var RankingNav = React.createClass({ 6 | componentDidMount: function(){ 7 | navRoll('.roll-list'); 8 | }, 9 | render: function(){ 10 | 11 | var navData = this.props.navData; 12 | 13 | // 请求并设置排行榜数据方法 14 | var requestRankData = this.props.requestRankData; 15 | 16 | function navClickHandler(dataName){ 17 | return () => { 18 | requestRankData(dataName); 19 | } 20 | } 21 | 22 | return 37 | } 38 | }); 39 | 40 | export default RankingNav; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bilibili_mobile_web", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "webpack-dev-server --inline --hot" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "babel-core": "^6.18.2", 14 | "babel-loader": "^6.2.8", 15 | "babel-polyfill": "^6.16.0", 16 | "babel-preset-es2015": "^6.18.0", 17 | "babel-preset-react": "^6.16.0", 18 | "babel-preset-stage-0": "^6.16.0", 19 | "bell-on-bundler-error-plugin": "^1.0.8", 20 | "css-loader": "^0.26.1", 21 | "extract-text-webpack-plugin": "^1.0.1", 22 | "file-loader": "^0.9.0", 23 | "node-sass": "^3.13.0", 24 | "sass-loader": "^4.0.2", 25 | "style-loader": "^0.13.1", 26 | "url-loader": "^0.5.7", 27 | "webpack": "^1.14.0", 28 | "webpack-dev-server": "^1.16.2" 29 | }, 30 | "dependencies": { 31 | "react": "^15.4.1", 32 | "react-dom": "^15.4.1" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/js/components/Footer.js: -------------------------------------------------------------------------------- 1 | // Footer 2 | var React = require('react'); 3 | import toTop from '../plugs/toTop.js'; // 返回顶部toTop.js 4 | var Footer = React.createClass({ 5 | componentDidMount: function(){ 6 | toTop('.to-top'); 7 | }, 8 | render: function(){ 9 | return 33 | } 34 | }); 35 | 36 | export default Footer; -------------------------------------------------------------------------------- /src/js/testData/channel/channelContentData.js: -------------------------------------------------------------------------------- 1 | 2 | function createData(name, iconClass, num = null){ 3 | return { 4 | 'name': name, 5 | 'iconClass': iconClass, 6 | 'num': num 7 | } 8 | } 9 | 10 | const channelContentData = [ 11 | createData('直播', 'live'), 12 | createData('番剧', 'bangumi', Math.ceil(Math.random()*200)), 13 | createData('动画', 'douga', Math.ceil(Math.random()*200)), 14 | createData('音乐', 'music', Math.ceil(Math.random()*200)), 15 | createData('舞蹈', 'dance', Math.ceil(Math.random()*200)), 16 | createData('游戏', 'game', Math.ceil(Math.random()*200)), 17 | createData('科技', 'tech', Math.ceil(Math.random()*200)), 18 | createData('生活', 'life', Math.ceil(Math.random()*200)), 19 | createData('鬼畜', 'kichiku', Math.ceil(Math.random()*200)), 20 | createData('娱乐', 'ent', Math.ceil(Math.random()*200)), 21 | createData('电影', 'movie', Math.ceil(Math.random()*200)), 22 | createData('电视剧', 'tv', Math.ceil(Math.random()*200)), 23 | createData('时尚', 'fashion', Math.ceil(Math.random()*200)), 24 | createData('广告', 'advertise', Math.ceil(Math.random()*200)) 25 | ]; 26 | 27 | export default channelContentData; -------------------------------------------------------------------------------- /src/js/components/InitialSearch/HistorySearch.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react'; 3 | 4 | var HistorySearch = React.createClass({ 5 | render: function(){ 6 | 7 | // 历史搜索数据 8 | var historySearchData = this.props.historySearchData; 9 | // 是否有历史搜索数据 10 | var noHistorySearch = historySearchData.length === 0 ? true : false; 11 | // 删除历史搜索数据方法 12 | var removeHistorySearch = this.props.removeHistorySearch; 13 | 14 | return
15 |

历史搜索

16 | { 17 | noHistorySearch 18 | ?

暂无历史搜索

19 | : 30 | } 31 |
32 | } 33 | }); 34 | 35 | export default HistorySearch; -------------------------------------------------------------------------------- /src/js/components/InitialSearch/SearchSuggest.js: -------------------------------------------------------------------------------- 1 | 2 | import React from 'react'; 3 | 4 | var SearchSuggest = React.createClass({ 5 | render: function(){ 6 | var searchSuggestData = this.props.searchSuggestData; 7 | return