Authored by 于良

Merge branch '5.4' of http://git.yoho.cn/mobile/YH_RNComponent into 5.4

... ... @@ -130,6 +130,10 @@ export default class MessageList extends Component {
onLongPressListItem={(itemData) =>{
this.onLongPressListItem(itemData, rowID);
}}
onPressListItem={(itemData) =>{
this.setState({showToolTips: false});
}
}
/>
);
}
... ... @@ -189,7 +193,7 @@ export default class MessageList extends Component {
render() {
let {isFetching, endReached, list, listId, shouldShowEmpty} = this.props.data;
let isLoadingMore = list.size != 0 && isFetching;
if (shouldShowEmpty) {
return (
<View style={styles.container}>
... ...
... ... @@ -33,6 +33,9 @@ export default class MessageListBigIconCell extends Component {
onLongPress={() =>{
this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
}}
onPress={() =>{
this.props.onPressListItem && this.props.onPressListItem(itemData);
}}
>
<View style={styles.titleContainer}>
<Text
... ...
... ... @@ -31,6 +31,9 @@ export default class MessageListOrderCell extends Component {
onLongPress={() =>{
this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
}}
onPress={() =>{
this.props.onPressListItem && this.props.onPressListItem(itemData);
}}
>
<View style={styles.contentContainer}>
<Text
... ...
... ... @@ -26,7 +26,7 @@ export default class MessageListSmallIconCell extends Component {
let imageUri = body ? body.get('img_url','www.yohobuy.com') : 'www.yohobuy.com';
let content = body ? body.get('content','') : '';
imageUri = SlicedImage.getSlicedUrl(imageUri, 50, 50, 2);
return(
<View style={styles.container}>
<TouchableOpacity
... ... @@ -34,6 +34,9 @@ export default class MessageListSmallIconCell extends Component {
onLongPress={() =>{
this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
}}
onPress={() =>{
this.props.onPressListItem && this.props.onPressListItem(itemData);
}}
>
<View style={styles.contentContainer}>
<Text
... ...
... ... @@ -26,6 +26,9 @@ export default class MessageListTextCell extends Component {
onLongPress={() =>{
this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
}}
onPress={() =>{
this.props.onPressListItem && this.props.onPressListItem(itemData);
}}
>
<View style={styles.container}>
<Text
... ...
... ... @@ -30,10 +30,16 @@ 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;
if (browse >= 100) {
browse = Math.round(browse);
} else {
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 +61,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>
... ...