...
|
...
|
@@ -37,25 +37,44 @@ export default class OutletPageListView extends Component { |
|
|
this._onRefresh = this._onRefresh.bind(this);
|
|
|
this.setActivityFliter = this.setActivityFliter.bind(this);
|
|
|
this._onPressFilter = this._onPressFilter.bind(this);
|
|
|
this._onPressProductListProduct = this._onPressProductListProduct.bind(this);
|
|
|
this._onPressProduct = this._onPressProduct.bind(this);
|
|
|
|
|
|
}
|
|
|
|
|
|
componentDidMount() {
|
|
|
this._onRefresh && this._onRefresh(false);
|
|
|
}
|
|
|
|
|
|
_onPressProduct (url,rowId,sectionId,templateName,template_id){
|
|
|
let {
|
|
|
tabLabel,
|
|
|
} = this.props;
|
|
|
this.props.onPressProduct && this.props.onPressProduct(url,tabLabel,rowId,sectionId,templateName,template_id)
|
|
|
}
|
|
|
|
|
|
|
|
|
_onPressProductListProduct(product,rowId=0) {
|
|
|
let {
|
|
|
tabLabel,
|
|
|
} = this.props;
|
|
|
|
|
|
this.props.onPressProductListProduct && this.props.onPressProductListProduct(product,rowId,tabLabel)
|
|
|
}
|
|
|
|
|
|
_onRefresh(ptr) {
|
|
|
let {
|
|
|
resource,
|
|
|
tabLabel,
|
|
|
} = this.props;
|
|
|
|
|
|
if (resource.get('sort_name')=='即将开始') {
|
|
|
this.props.getOutletActivityList && this.props.getOutletActivityList(resource.get('content_code'),resource.get('yh_channel'),resource.get('type'));
|
|
|
this.props.getOutletActivityList && this.props.getOutletActivityList(resource.get('content_code'),resource.get('yh_channel'),resource.get('type'),tabLabel);
|
|
|
}else if (resource.get('sort_name') == '即将结束') {
|
|
|
this.props.getOutletActivityList && this.props.getOutletActivityList(resource.get('content_code'),resource.get('yh_channel'),resource.get('type'));
|
|
|
this.props.getOutletActivityList && this.props.getOutletActivityList(resource.get('content_code'),resource.get('yh_channel'),resource.get('type'),tabLabel);
|
|
|
}else {
|
|
|
this.props.getOutletHomeResource && this.props.getOutletHomeResource(resource.get('content_code'),ptr);
|
|
|
this.props.getOutletActivityList && this.props.getOutletActivityList(resource.get('content_code'),resource.get('yh_channel'),resource.get('type'));
|
|
|
this.props.getOutletActivityList && this.props.getOutletActivityList(resource.get('content_code'),resource.get('yh_channel'),resource.get('type'),tabLabel);
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -104,22 +123,22 @@ export default class OutletPageListView extends Component { |
|
|
renderRow(rowData, sectionID, rowID, highlightRow) {
|
|
|
if (sectionID == 'outletHomeReource') {
|
|
|
if (rowData.get('template_name') == 'NL2R') {
|
|
|
return(<OutletThreeImage resource={rowData} onPressProduct={this.props.onPressProduct}/>);
|
|
|
return(<OutletThreeImage resource={rowData} row_ID={rowID} onPressProduct={this._onPressProduct}/>);
|
|
|
}else if (rowData.get('template_name') == 'focus') {
|
|
|
return(<OutletSwiper resource={rowData} onPressProduct={this.props.onPressProduct}/>);
|
|
|
return(<OutletSwiper resource={rowData} row_ID={rowID} onPressProduct={this._onPressProduct}/>);
|
|
|
}else if (rowData.get('template_name') == 'single_image') {
|
|
|
return(<OutletSingleImage resource={rowData} onPressProduct={this.props.onPressProduct}/>);
|
|
|
return(<OutletSingleImage resource={rowData} row_ID={rowID} onPressProduct={this._onPressProduct}/>);
|
|
|
}else if (rowData.get('template_name') == 'small_pic') {
|
|
|
return(<OutletDoubleImage resource={rowData} onPressProduct={this.props.onPressProduct}/>);
|
|
|
return(<OutletDoubleImage resource={rowData} row_ID={rowID} onPressProduct={this._onPressProduct}/>);
|
|
|
}else if (rowData.get('template_name') == 'recommend_content_five') {
|
|
|
return(<OutletRecommendFive resource={rowData} onPressProduct={this.props.onPressProduct}/>);
|
|
|
return(<OutletRecommendFive resource={rowData} row_ID={rowID} onPressProduct={this._onPressProduct}/>);
|
|
|
}else if (rowData.get('template_name') == 'app_hot_brands') {
|
|
|
return(<OutletRecommendFive resource={rowData} onPressProduct={this.props.onPressProduct}/>);
|
|
|
return(<OutletRecommendFive resource={rowData} row_ID={rowID} onPressProduct={this._onPressProduct}/>);
|
|
|
}else if (rowData.get('template_name') == '文字广告') {
|
|
|
// return(<TripleImage resource={rowData} onPressProduct={this.props.onPressProduct}/>);
|
|
|
}
|
|
|
}else if (sectionID == 'activityList') {
|
|
|
return(<ActivityCell resource={rowData} key = {rowID + 'activityList'} showToast={this.props.showToast} onPressProduct={this.props.onPressProduct}/>);
|
|
|
return(<ActivityCell resource={rowData} key = {rowID + 'activityList'} showToast={this.props.showToast} row_ID={rowID} onPressProduct={this._onPressProduct}/>);
|
|
|
}else if (sectionID == 'activityMore') {
|
|
|
if (rowData == 'more') {
|
|
|
let sourceIcon = require('../../../brandStore/image/filter/brandstore_filter_arrow_down_normal.png');
|
...
|
...
|
@@ -142,7 +161,7 @@ export default class OutletPageListView extends Component { |
|
|
key={'row' + rowID}
|
|
|
rowID={rowID}
|
|
|
data={rowData}
|
|
|
onPressProduct={this.props.onPressProductListProduct}/>
|
|
|
onPressProduct={this._onPressProductListProduct}/>
|
|
|
);
|
|
|
}
|
|
|
return null;
|
...
|
...
|
|