Authored by 于良

Merge branch 'local' into develop

... ... @@ -31,7 +31,7 @@ export default class SlicedImage extends React.Component {
.replace('{height}', height);
}
__DEV__ && console.log(newSrc);
// __DEV__ && console.log(newSrc);
return newSrc;
}
... ...
... ... @@ -37,21 +37,18 @@ export default class LikeList extends React.Component {
}
_renderRow(rowData, sectionID, rowID, highlightRow) {
let {postId, user} = rowData.toJS();
let data = rowData.toJS();
return (
<TouchableOpacity
activeOpacity={1}
onPress={() => {
this.props.onPressPost && this.props.onPressPost(postId);
}}
style={styles.row}
>
<UserBrief
containerStyle={styles.userBrief}
avatar={user.avatar}
name={user.nickName}
avatar={data.avatar}
name={data.nickName}
onPressAvatar={() => {
this.props.onPressAvatar && this.props.onPressAvatar(user.uid);
this.props.onPressAvatar && this.props.onPressAvatar(data.uid);
}}
/>
</TouchableOpacity>
... ...
... ... @@ -67,23 +67,42 @@ export default class SPLikeCell extends React.Component {
<View style={styles.rightLikeContainer}>
<Text style={styles.browseText}>{browse + '人看过'}</Text>
</View>
<View style={styles.topLine}/>
<View style={styles.bottomLine}/>
</View>
</TouchableOpacity>
);
}
}
let {width, height} = Dimensions.get('window');
let lineWidth = width - 30;
let styles = StyleSheet.create({
container: {
backgroundColor: 'white',
height: 50,
borderColor: '#a0a0a0',
borderTopWidth: 0.5,
borderBottomWidth: 0.5,
marginLeft: 15,
marginRight: 15,
flexDirection: 'row',
justifyContent: 'space-between',
flex: 1,
},
topLine: {
position: 'absolute',
left: 0,
top: 0,
width: lineWidth,
height: 0.5,
backgroundColor: '#a0a0a0',
},
bottomLine: {
position: 'absolute',
left: 0,
bottom: 0,
width: lineWidth,
height: 0.5,
backgroundColor: '#a0a0a0',
},
leftLikeContainer: {
flex: 1,
... ...
... ... @@ -49,7 +49,6 @@ class LikeMessageContainer extends React.Component {
constructor(props) {
super(props);
this._onPressPost = this._onPressPost.bind(this);
this._onPressAvatar = this._onPressAvatar.bind(this);
this._onEndReached = this._onEndReached.bind(this);
... ... @@ -68,10 +67,6 @@ class LikeMessageContainer extends React.Component {
this.props.actions.likeListClean(this.sid);
}
_onPressPost(id) {
// this.props.actions.goToPost(id);
}
_onPressAvatar(uid) {
this.props.actions.goToUserOrMe(uid);
}
... ... @@ -95,7 +90,6 @@ class LikeMessageContainer extends React.Component {
endReached={endReached}
isLoadingMore={isFetching}
onEndReached={this._onEndReached}
onPressPost={this._onPressPost}
onPressAvatar={this._onPressAvatar}
/>
</View>
... ...
... ... @@ -75,18 +75,14 @@ function parseLikeList(json) {
total = total ? total : 0;
let likes = [];
list && list.map((item, i) => {
let postId = item.postsId ? item.postsId : 0;
let user = {};
let {userInfo} = item;
if (userInfo) {
let nickName = userInfo.nickName ? userInfo.nickName : '';
let avatar = userInfo.headIcon ? userInfo.headIcon : '';
let uid = userInfo.uid ? userInfo.uid : 0;
let sign = userInfo.signature ? userInfo.signature : '';
let backgroundImage = userInfo.bgPic ? userInfo.bgPic : '';
user = {
let like = {};
if (item) {
let nickName = item.nickName ? item.nickName : '';
let avatar = item.headIcon ? item.headIcon : '';
let uid = item.uid ? item.uid : 0;
let sign = item.signature ? item.signature : '';
let backgroundImage = item.bgPic ? item.bgPic : '';
like = {
nickName,
avatar,
uid,
... ... @@ -94,12 +90,6 @@ function parseLikeList(json) {
backgroundImage,
};
}
let like = {
postId,
user,
};
likes.push(like);
});
... ...