Authored by 孙凯

添加 跳转 review by 张丽霞

... ... @@ -22,12 +22,18 @@ export default class AllBrandListCell extends React.Component {
let name = this.props.rowData.brand_name;
let is_hot = this.props.rowData.is_hot;
let is_show_new = this.props.rowData.is_show_new;
let brand_id = this.props.rowData.id;
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.brand","params":{"brand_id":"${brand_id}"}}`;
return(
<View style={styles.rowTitle}>
<Text style={styles.rowText}>{name}</Text>
{is_show_new=='Y'?<View style={styles.new}><Text style={styles.text}>NEW</Text></View>:null}
{is_hot=='Y'?<View style={styles.hot}><Text style={styles.text}>HOT</Text></View>:null}
</View>
<TouchableOpacity activeOpacity={0.5} onPress={() => {
this.props.onPressSlideItem && this.props.onPressSlideItem(url);
}}>
<View style={styles.rowTitle}>
<Text style={styles.rowText}>{name}</Text>
{is_show_new=='Y'?<View style={styles.new}><Text style={styles.text}>NEW</Text></View>:null}
{is_hot=='Y'?<View style={styles.hot}><Text style={styles.text}>HOT</Text></View>:null}
</View>
</TouchableOpacity>
);
}
};
... ...
... ... @@ -24,16 +24,12 @@ export default class BannerReourceList extends React.Component {
});
}
_pressRow(rowData){
this.props.onPressBrandItem(rowData.url)
}
renderRow(rowData,sectionID,rowID,highlightRow) {
let newSrc = getSlicedUrl(rowData.src, itemWidth, itemWidth, 1);
return (
<TouchableOpacity activeOpacity={0.5} onPress={() => {
this.props.onPressBrandItem && this.props.onPressBrandItem(rowData.url);
this.props.onPressSlideItem && this.props.onPressSlideItem(rowData.url);
}}>
<View style={styles.row}>
<View style={{width: itemWidth, height: itemWidth}}>
... ...
... ... @@ -86,11 +86,11 @@ export default class Brand extends Component {
renderRow(rowData, sectionID, rowID, highlightRow) {
if (this.props.brandFliter == 0) {
return (
<AllBrandListCell rowData={rowData}/>
<AllBrandListCell rowData={rowData} onPressSlideItem={this.props.onPressSlideItem}/>
);
}else {
return (
<NewHotBannerListCell rowData={rowData}/>
<NewHotBannerListCell rowData={rowData} onPressSlideItem={this.props.onPressSlideItem}/>
);
}
}
... ...
... ... @@ -22,9 +22,12 @@ export default class NewHotBannerListCell extends React.Component {
render() {
let rowData = this.props.rowData;
let newSrc = getSlicedUrl(rowData.brand_ico, width, height, 1);
let brand_id = rowData.id;
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.brand","params":{"brand_id":"${brand_id}"}}`;
return (
<TouchableOpacity activeOpacity={0.5} onPress={() => {
// this.props.onPressRecommendItem && this.props.onPressRecommendItem(rowData.get('url'));
this.props.onPressSlideItem && this.props.onPressSlideItem(url);
}}>
<View style={styles.rowContainer}>
<Image
... ...
... ... @@ -63,7 +63,7 @@ class BrandContainer extends Component {
}
_onPressSlideItem(url){
console.log('aaa');
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
}
_onPressFilter(value){
... ...