...
|
...
|
@@ -20,14 +20,31 @@ export default class ContentFansListCell extends Component { |
|
|
let sliceCount = width <= 320 ? 6 : 10;
|
|
|
let userName = data.userName.length > sliceCount ? data.userName.slice(0,sliceCount)+'...' : data.userName;
|
|
|
|
|
|
let showIcon = (data.authGroupId === 3 || data.authGroupId === 5 || data.authGroupId === 7) ? true : false;
|
|
|
|
|
|
let source;
|
|
|
switch (data.authGroupId) {
|
|
|
case 3:
|
|
|
source = require('../../images/GF_big_ic.png');
|
|
|
break;
|
|
|
case 5:
|
|
|
source = require('../../images/PP_big_ic.png');
|
|
|
break;
|
|
|
case 7:
|
|
|
source = require('../../images/KING_big_ic.png');
|
|
|
break;
|
|
|
default:
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
<View>
|
|
|
<View style={styles.headerBackground}>
|
|
|
<TouchableOpacity activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(data)}>
|
|
|
<YH_Image style={styles.headIcon} url={data.headIco} circle={true}/>
|
|
|
<Image style={styles.iconImage} resizeMode="contain" source={source}/>
|
|
|
</TouchableOpacity>
|
|
|
|
|
|
<View style={styles.textView}>
|
|
|
<View style={[styles.textView, {marginLeft:showIcon?20:15}]}>
|
|
|
<TouchableOpacity style={styles.toubleView} activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(data)}>
|
|
|
<Text style={styles.nicknameText} numberOfLines={1}>{userName}</Text>
|
|
|
<Text style={styles.defaultReplyText}>关注了你</Text>
|
...
|
...
|
@@ -59,10 +76,16 @@ let styles = StyleSheet.create({ |
|
|
height: 50,
|
|
|
marginLeft: 15,
|
|
|
marginTop: 15,
|
|
|
marginRight:15,
|
|
|
overflow: 'hidden',
|
|
|
borderRadius: 25,
|
|
|
},
|
|
|
iconImage: {
|
|
|
width: 25,
|
|
|
height: 25,
|
|
|
position: 'absolute',
|
|
|
top: 42,
|
|
|
left: 52,
|
|
|
},
|
|
|
textView: {
|
|
|
flexDirection: 'column',
|
|
|
justifyContent: 'space-between',
|
...
|
...
|
|