Authored by 张文文

社区认证用户添加图标 reviewd by aozhe.zhu

... ... @@ -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',
... ...
... ... @@ -25,14 +25,31 @@ export default class ContentLikedListCell extends Component {
let subName = rowData.businessType === 1000 ? '赞了你' : '收藏了你';
let showIcon = (rowData.authGroupId === 3 || rowData.authGroupId === 5 || rowData.authGroupId === 7) ? true : false;
let source;
switch (rowData.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(rowData)}>
<YH_Image style={styles.headIcon} url={rowData.headIco} circle={true}/>
<Image style={styles.iconImage} resizeMode="contain" source={source}/>
</TouchableOpacity>
<View style={styles.textView}>
<View style={[styles.textView, {marginLeft:showIcon?15:10}]}>
<TouchableOpacity activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(rowData)}>
<Text style={styles.nicknameText} numberOfLines={1}>{userName}</Text>
</TouchableOpacity>
... ... @@ -94,10 +111,16 @@ let styles = StyleSheet.create({
height: 40,
marginLeft: 15,
marginTop: 15,
marginRight:10,
overflow: 'hidden',
borderRadius: 20,
},
iconImage: {
width: 25,
height: 25,
position: 'absolute',
top: 35,
left: 40,
},
textView: {
flexDirection: 'column',
justifyContent: 'space-between',
... ...
... ... @@ -27,14 +27,31 @@ export default class ContentMessageCell extends Component {
let subName = rowData.businessType === 1002 ? '评论了你' : '回复了你';
let showIcon = (rowData.authGroupId === 3 || rowData.authGroupId === 5 || rowData.authGroupId === 7) ? true : false;
let source;
switch (rowData.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(rowData)}>
<YH_Image style={styles.headIcon} url={rowData.headIco} circle={true}/>
<Image style={styles.iconImage} resizeMode="contain" source={source}/>
</TouchableOpacity>
<View style={styles.textView}>
<View style={[styles.textView, {marginLeft:showIcon?15:10}]}>
<TouchableOpacity activeOpacity={1} onPress={()=> this.props.jumpToPersonalGrassPage && this.props.jumpToPersonalGrassPage(rowData)}>
<Text style={styles.nicknameText} numberOfLines={1}>{userName}</Text>
</TouchableOpacity>
... ... @@ -117,10 +134,16 @@ let styles = StyleSheet.create({
height: 40,
marginLeft: 15,
marginTop: 15,
marginRight:10,
overflow: 'hidden',
borderRadius: 20,
},
iconImage: {
width: 25,
height: 25,
position: 'absolute',
top: 35,
left: 40,
},
textView: {
flexDirection: 'column',
justifyContent: 'space-between',
... ...