Authored by 张丽霞

fix bug in 新品到着,review by 孙凯

... ... @@ -30,10 +30,12 @@ export default class ProductListCell extends Component {
let browse = data.get('browse');
let src = data.get('src');
let article_id = data.get('id');
let show10K = false;
if (browse>10000) {
browse = browse/10000.0;
browse = Math.round(browse*10)/10;
show10K = true;
}
src = src.replace('{width}', rowWidth*2).replace('{height}',Math.ceil(214*width/750)*2).replace('{mode}',2);
... ... @@ -55,7 +57,7 @@ export default class ProductListCell extends Component {
<Image style={styles.clockImage} source={require('../../image/time_ic.png')}/>
<Text style={styles.text}>{publish_time}</Text>
<Image style={styles.eyeImage} source={require('../../image/eye_ic.png')}/>
<Text style={styles.text}>{browse}</Text>
<Text style={styles.text}>{browse}{show10K?'万':''}</Text>
</View>
</View>
... ...
... ... @@ -38,7 +38,7 @@ export default class ProductListCell extends Component {
style={[styles.container, style]}
activeOpacity={1}
onPress={() => {
this.props.onPressProduct && this.props.onPressProduct(data, rowID);
this.props.onPressShop && this.props.onPressShop(data, rowID);
}}
>
<View style={{flex:1}}>
... ... @@ -52,9 +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,rowID);}}>
<Text style={styles.tagName}>进入店铺</Text>
</TouchableOpacity>
<Text style={styles.tagName}>进入店铺</Text>
</View>
</View>
... ...