-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from 2remote/dev
dev已经基本稳定了
- Loading branch information
Showing
31 changed files
with
1,038 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ CircleCI | |
- master、dev 是保护分支,不能强制 push,只能用 pull request 的方式合并,且必须同时满足以下两个条件 | ||
- 至少一个管理员审核 | ||
- ci 显示为 pass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "yaopai-mobile", | ||
"description": "mobile web app for PR real test", | ||
"scripts": {}, | ||
"env": { | ||
"NPM_CONFIG_PRODUCTION": "false" | ||
}, | ||
"addons": [ | ||
"papertrail" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Created by zoey on 2015/11/28. | ||
*/ | ||
import { findDOMNode } from 'react-dom'; | ||
|
||
var AutoLoadPageMixin = { | ||
componentDidMount: function() { | ||
window.addEventListener('scroll', this.onWindowScroll); | ||
window.addEventListener('resize', this.onWindowScroll); | ||
}, | ||
onWindowScroll : function () { | ||
const bounds = findDOMNode(this).getBoundingClientRect(); | ||
const scrollTop = window.pageYOffset; | ||
const top = bounds.top + scrollTop; | ||
const height = bounds.bottom - bounds.top; | ||
if (scrollTop > 0 && height - scrollTop < window.screen.height) { | ||
this.onNext(); | ||
} | ||
}, | ||
onNext : function() { | ||
var pageIndex = this.state.pageIndex + 1; | ||
this.setState({pageIndex :pageIndex }); | ||
this.onChangePage(pageIndex) | ||
if(this.state.pageCount != 0 && this.state.pageCount <= this.state.pageIndex){ | ||
window.removeEventListener('scroll', this.onWindowScroll); | ||
window.removeEventListener('resize', this.onWindowScroll); | ||
} | ||
}, | ||
componentWillUnmount: function() { | ||
window.removeEventListener('scroll', this.onWindowScroll); | ||
window.removeEventListener('resize', this.onWindowScroll); | ||
} | ||
}; | ||
|
||
module.exports = AutoLoadPageMixin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.