Authored by 孙凯

修改 跳转brand的bug review by hongmo

... ... @@ -35,7 +35,7 @@ export default class AllBrandListCell extends React.Component {
return (
<TouchableOpacity activeOpacity={0.5} onPress={() => {
this.props.onPressSlideItem && this.props.onPressSlideItem(this.props.rowData.toJS());
this.props.onPressBrandItem && this.props.onPressBrandItem(this.props.rowData.toJS());
}}>
<View style={styles.rowTitle}>
<Text style={styles.rowText}>{name}</Text>
... ...
... ... @@ -39,7 +39,7 @@ export default class BannerReourceList extends React.Component {
let newSrc = getSlicedUrl(rowData.src, 140, 100, 2);
return (
<TouchableOpacity activeOpacity={0.5} onPress={() => {
this.props.onPressSlideItem && this.props.onPressSlideItem(rowData);
this.props.onPressBrandItem && this.props.onPressBrandItem(rowData);
}}>
<View style={styles.row}>
<View style={styles.thumbnailV}>
... ...
... ... @@ -97,6 +97,7 @@ export default class Brand extends Component {
reourceForKid={this.props.reourceForKid}
reourceForLifeStyle={this.props.reourceForLifeStyle}
onPressSlideItem= {this.props.onPressSlideItem}
onPressBrandItem={this.props.onPressBrandItem}
onPressFilter= {this.props.onPressFilter}
brandFliter={this.props.brandFliter}
/>
... ... @@ -116,11 +117,11 @@ export default class Brand extends Component {
renderRow(rowData, sectionID, rowID, highlightRow) {
if (this.props.brandFliter == 0) {
return (
<AllBrandListCell rowData={rowData} onPressSlideItem={this.props.onPressSlideItem}/>
<AllBrandListCell rowData={rowData} onPressBrandItem={this.props.onPressBrandItem}/>
);
} else {
return (
<NewHotBannerListCell rowData={rowData} onPressSlideItem={this.props.onPressSlideItem}/>
<NewHotBannerListCell rowData={rowData} onPressBrandItem={this.props.onPressBrandItem}/>
);
}
}
... ...
... ... @@ -42,7 +42,7 @@ export default class BrandHeader extends React.Component {
return (
<View style={styles.header}>
<BrandSwiper resource={data} onPressSlideItem={this.props.onPressSlideItem}/>
<BannerReourceList resource={data} onPressSlideItem={this.props.onPressSlideItem}/>
<BannerReourceList resource={data} onPressBrandItem={this.props.onPressBrandItem}/>
<BrandFliter resource={data} selectID={brandFliter} onPressFilter={this.props.onPressFilter}/>
</View>
);
... ...
... ... @@ -36,7 +36,7 @@ export default class NewHotBannerListCell extends React.Component {
return (
<TouchableOpacity activeOpacity={0.5} onPress={() => {
this.props.onPressSlideItem && this.props.onPressSlideItem(rowData.toJS());
this.props.onPressBrandItem && this.props.onPressBrandItem(rowData.toJS());
}}>
<View style={styles.rowContainer}>
<Image
... ...
... ... @@ -58,6 +58,7 @@ class BrandContainer extends Component {
this._onPressBrandSearchItem = this._onPressBrandSearchItem.bind(this);
this._setBrandData = this._setBrandData.bind(this);
this._setInitialListSize = this._setInitialListSize.bind(this);
this._onPressBrandItem = this._onPressBrandItem.bind(this);
this.subscription = NativeAppEventEmitter.addListener(
... ... @@ -80,10 +81,14 @@ class BrandContainer extends Component {
this.subscription && this.subscription.remove();
}
_onPressSlideItem(data){
_onPressBrandItem(data){
ReactNative.NativeModules.YH_CommonHelper.pushBrandVC(data);
}
_onPressSlideItem(url) {
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
_onPressFilter(value) {
this.props.actions.setBrandFilter(value);
}
... ... @@ -209,6 +214,7 @@ class BrandContainer extends Component {
onPressBrandSearchItem={this._onPressBrandSearchItem}
setBrandData={this._setBrandData}
setInitialListSize={this._setInitialListSize}
onPressBrandItem={this._onPressBrandItem}
/>
</View>
);
... ...