Authored by yoho-js001

Fix a crash on new arrival.

... ... @@ -155,7 +155,7 @@ export default class NewArrival extends Component {
if (recommend_type == 'hotShop') {
return (
<ShopCell style={[styles.listContainer, customStyle]} data={data} onPressShop={this.props.onPressProductListShop}/>
<ShopCell style={[styles.listContainer, customStyle]} data={data} rowID={rowID} onPressShop={this.props.onPressProductListShop}/>
)
}
if (recommend_type == 'fashionArticle') {
... ...
'use strict';
'use strict';
import React, {Component} from 'react';
import ReactNative, {
... ... @@ -25,7 +25,7 @@ export default class RecommendCell extends Component {
this._renderRow = this._renderRow.bind(this);
}
_renderRow(rowData, rowID) {
_renderRow(rowData, sectionID, rowID) {
return (
<BrandCell index={rowID} data={rowData} onPressShop={this.props.onPressShop}/>
)
... ...
... ... @@ -52,7 +52,7 @@ export default class ProductListCell extends Component {
人收藏
</Text>
<View style={styles.tag}>
<TouchableOpacity style={styles.button} onPress={()=>{this.props.onPressShop && this.props.onPressShop(data,);}}>
<TouchableOpacity style={styles.button} onPress={()=>{this.props.onPressShop && this.props.onPressShop(data,rowID);}}>
<Text style={styles.tagName}>进入店铺</Text>
</TouchableOpacity>
</View>
... ...
... ... @@ -310,8 +310,6 @@ class NewArrivalContainer extends Component {
if (!shops_id||!shop_name) {
return;
}
console.log('aaaaaaaaa');
console.log(data.toJS());
let url = `http://m.yohobuy.com?openby:yohobuy={"action":"go.shop","params":{"shop_id":"${shops_id}","shop_template_type":"${shop_template_type}","shop_name":"${shop_name}"}}`;
ReactNative.NativeModules.YH_CommonHelper.jumpWithUrl(url);
... ...