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 { @@ -130,6 +130,10 @@ export default class MessageList extends Component {
130 onLongPressListItem={(itemData) =>{ 130 onLongPressListItem={(itemData) =>{
131 this.onLongPressListItem(itemData, rowID); 131 this.onLongPressListItem(itemData, rowID);
132 }} 132 }}
  133 + onPressListItem={(itemData) =>{
  134 + this.setState({showToolTips: false});
  135 + }
  136 + }
133 /> 137 />
134 ); 138 );
135 } 139 }
@@ -33,6 +33,9 @@ export default class MessageListBigIconCell extends Component { @@ -33,6 +33,9 @@ export default class MessageListBigIconCell extends Component {
33 onLongPress={() =>{ 33 onLongPress={() =>{
34 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData); 34 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
35 }} 35 }}
  36 + onPress={() =>{
  37 + this.props.onPressListItem && this.props.onPressListItem(itemData);
  38 + }}
36 > 39 >
37 <View style={styles.titleContainer}> 40 <View style={styles.titleContainer}>
38 <Text 41 <Text
@@ -31,6 +31,9 @@ export default class MessageListOrderCell extends Component { @@ -31,6 +31,9 @@ export default class MessageListOrderCell extends Component {
31 onLongPress={() =>{ 31 onLongPress={() =>{
32 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData); 32 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
33 }} 33 }}
  34 + onPress={() =>{
  35 + this.props.onPressListItem && this.props.onPressListItem(itemData);
  36 + }}
34 > 37 >
35 <View style={styles.contentContainer}> 38 <View style={styles.contentContainer}>
36 <Text 39 <Text
@@ -34,6 +34,9 @@ export default class MessageListSmallIconCell extends Component { @@ -34,6 +34,9 @@ export default class MessageListSmallIconCell extends Component {
34 onLongPress={() =>{ 34 onLongPress={() =>{
35 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData); 35 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
36 }} 36 }}
  37 + onPress={() =>{
  38 + this.props.onPressListItem && this.props.onPressListItem(itemData);
  39 + }}
37 > 40 >
38 <View style={styles.contentContainer}> 41 <View style={styles.contentContainer}>
39 <Text 42 <Text
@@ -26,6 +26,9 @@ export default class MessageListTextCell extends Component { @@ -26,6 +26,9 @@ export default class MessageListTextCell extends Component {
26 onLongPress={() =>{ 26 onLongPress={() =>{
27 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData); 27 this.props.onLongPressListItem && this.props.onLongPressListItem(itemData);
28 }} 28 }}
  29 + onPress={() =>{
  30 + this.props.onPressListItem && this.props.onPressListItem(itemData);
  31 + }}
29 > 32 >
30 <View style={styles.container}> 33 <View style={styles.container}>
31 <Text 34 <Text
@@ -30,11 +30,17 @@ export default class ProductListCell extends Component { @@ -30,11 +30,17 @@ export default class ProductListCell extends Component {
30 let browse = data.get('browse'); 30 let browse = data.get('browse');
31 let src = data.get('src'); 31 let src = data.get('src');
32 let article_id = data.get('id'); 32 let article_id = data.get('id');
  33 + let show10K = false;
33 34
34 if (browse>10000) { 35 if (browse>10000) {
35 browse = browse/10000.0; 36 browse = browse/10000.0;
  37 + if (browse >= 100) {
  38 + browse = Math.round(browse);
  39 + } else {
36 browse = Math.round(browse*10)/10; 40 browse = Math.round(browse*10)/10;
37 } 41 }
  42 + show10K = true;
  43 + }
38 src = src.replace('{width}', rowWidth*2).replace('{height}',Math.ceil(214*width/750)*2).replace('{mode}',2); 44 src = src.replace('{width}', rowWidth*2).replace('{height}',Math.ceil(214*width/750)*2).replace('{mode}',2);
39 45
40 return ( 46 return (
@@ -55,7 +61,7 @@ export default class ProductListCell extends Component { @@ -55,7 +61,7 @@ export default class ProductListCell extends Component {
55 <Image style={styles.clockImage} source={require('../../image/time_ic.png')}/> 61 <Image style={styles.clockImage} source={require('../../image/time_ic.png')}/>
56 <Text style={styles.text}>{publish_time}</Text> 62 <Text style={styles.text}>{publish_time}</Text>
57 <Image style={styles.eyeImage} source={require('../../image/eye_ic.png')}/> 63 <Image style={styles.eyeImage} source={require('../../image/eye_ic.png')}/>
58 - <Text style={styles.text}>{browse}</Text> 64 + <Text style={styles.text}>{browse}{show10K?'万':''}</Text>
59 </View> 65 </View>
60 </View> 66 </View>
61 67
@@ -38,7 +38,7 @@ export default class ProductListCell extends Component { @@ -38,7 +38,7 @@ export default class ProductListCell extends Component {
38 style={[styles.container, style]} 38 style={[styles.container, style]}
39 activeOpacity={1} 39 activeOpacity={1}
40 onPress={() => { 40 onPress={() => {
41 - this.props.onPressProduct && this.props.onPressProduct(data, rowID); 41 + this.props.onPressShop && this.props.onPressShop(data, rowID);
42 }} 42 }}
43 > 43 >
44 <View style={{flex:1}}> 44 <View style={{flex:1}}>
@@ -52,9 +52,7 @@ export default class ProductListCell extends Component { @@ -52,9 +52,7 @@ export default class ProductListCell extends Component {
52 人收藏 52 人收藏
53 </Text> 53 </Text>
54 <View style={styles.tag}> 54 <View style={styles.tag}>
55 - <TouchableOpacity style={styles.button} onPress={()=>{this.props.onPressShop && this.props.onPressShop(data,rowID);}}>  
56 <Text style={styles.tagName}>进入店铺</Text> 55 <Text style={styles.tagName}>进入店铺</Text>
57 - </TouchableOpacity>  
58 </View> 56 </View>
59 </View> 57 </View>
60 58