Authored by 盖剑秋

Support load more for discount products section of second kill page.

... ... @@ -187,6 +187,9 @@ export default class Seckill extends Component {
renderSectionHeader={this.renderSectionHeader}
stickySectionHeadersEnabled={false}
onRefreshData={() => this.props.onRefresh && this.props.onRefresh()}
onEndReached={() => {
this.props.onEndReached && this.props.onEndReached();
}}
sections={[
{title: null, type: SECTION_TYPE_SECKILL, data: queryProductList ? queryProductList : []},
{
... ...
... ... @@ -44,6 +44,7 @@ class SeckillContainer extends Component {
this._onClearTipMessage = this._onClearTipMessage.bind(this);
this._onFocusToCurStartedActivity = this._onFocusToCurStartedActivity.bind(this);
this._onFetchDiscountProductList = this._onFetchDiscountProductList.bind(this);
this._onEndReached = this._onEndReached.bind(this);
}
_onPressTimeItem(activity) {
... ... @@ -84,6 +85,9 @@ class SeckillContainer extends Component {
this.props.actions.getDiscountProductList()
}
_onEndReached() {
this.props.actions.getDiscountProductList()
}
render() {
... ... @@ -120,6 +124,7 @@ class SeckillContainer extends Component {
onPressRemindBtn={this._onPressRemindBtn}
onPressGuangShopWithURL={this._onPressGuangShopWithURL}
onRefresh={this._onRefresh}
onEndReached={this._onEndReached}
onFetchDiscountProductList={this._onFetchDiscountProductList}
onClearTipMessage={this._onClearTipMessage}
onFocusToCurStartedActivity={this._onFocusToCurStartedActivity}
... ...
... ... @@ -7,10 +7,8 @@ export default class SeckillService {
constructor (host) {
console.log(host);
let baseURL = 'http://apigray.yoho.cn';
if(host){
console.log('lalalallala lalalla ');
let baseURL = 'http://api.yoho.cn';
if(host){
baseURL = host;
}
... ...