...
|
...
|
@@ -28,6 +28,7 @@ export default class Seckill extends Component { |
|
|
this.renderRow = this.renderRow.bind(this);
|
|
|
this.renderSectionHeader = this.renderSectionHeader.bind(this);
|
|
|
this._renderSeparator = this._renderSeparator.bind(this);
|
|
|
this._onPressTimeItem=this._onPressTimeItem.bind(this);
|
|
|
this.dataSource = new ListView.DataSource({
|
|
|
rowHasChanged: (r1, r2) => !Immutable.is(r1, r2),
|
|
|
sectionHeaderHasChanged: (s1, s2) => !Immutable.is(s1, s2),
|
...
|
...
|
@@ -59,6 +60,13 @@ export default class Seckill extends Component { |
|
|
if (nextProps.tipMessage && nextProps.tipMessage !== '') {
|
|
|
this._showToast && this._showToast(nextProps.tipMessage);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
_onPressTimeItem(activity) {
|
|
|
this.props.onPressTimeItem(activity);
|
|
|
if( Platform.OS === 'android'){
|
|
|
this.props.onRefresh && this.props.onRefresh();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
_showToast = (message) => {
|
...
|
...
|
@@ -86,7 +94,7 @@ export default class Seckill extends Component { |
|
|
return (
|
|
|
<TimeListView
|
|
|
resource={this.queryActivityInfo.secKillProductVoList.toArray()}
|
|
|
onPressTimeItem={this.props.onPressTimeItem}
|
|
|
onPressTimeItem={this._onPressTimeItem}
|
|
|
onFocusToCurStartedActivity={this.props.onFocusToCurStartedActivity}
|
|
|
curActivity = {this.props.curActivity}
|
|
|
diff={diff}
|
...
|
...
|
@@ -146,6 +154,7 @@ export default class Seckill extends Component { |
|
|
ActivityProductList: queryProductList ? queryProductList : [{}],
|
|
|
};
|
|
|
let isPullToRefresh = ptr && isFetching;
|
|
|
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
{
|
...
|
...
|
@@ -180,7 +189,7 @@ export default class Seckill extends Component { |
|
|
}}
|
|
|
refreshControl={
|
|
|
<RefreshControl
|
|
|
refreshing={false}
|
|
|
refreshing={isPullToRefresh}
|
|
|
onRefresh={() => {
|
|
|
//强制刷新数据
|
|
|
this.props.onRefresh && this.props.onRefresh();
|
...
|
...
|
|