/**
* Created by zack on 2018/5/2.
*/
import {
View,
Text,
StyleSheet,
Image,
TouchableOpacity,
FlatList
} from 'react-native'
import React, {Component} from 'react'
import {NavigationBarHeight, TabBarHeight, ScreenDimensions} from '../../../utils/DimensionsTools'
import FollowingItem from './View/FollowingItem'
import HttpTools from '../../../network/HttpTools'
import {auth, question, comment} from '../../../network/API'
export default class FollowPageView extends Component {
constructor(props) {
super(props)
this.state = {
dataSources: ['a'],
}
}
componentDidMount() {
// const param = {
// page: 1,
// limit: 10,
// }
// HttpTools.get('my/focus', param, (response) => {
// console.log(response)
// }, (error) => {
// console.log(error)
// })
}
renderItem(item) {
return(
)
}
render() {
if (this.state.dataSources.length) {
return(
this.renderItem(item)}
keyExtractor = {(item,index) =>{
return 'key' + item.key + index
}}
ListFooterComponent = {() => {
return(
)
}}
/>
)
}else {
return(
{'关注的人更新动态会出现在这里'}
{
this.props.didClickFollowButton()
}} style={styles.FollowButton}>
{"关注感兴趣的人"}
)
}
}
}
const styles = StyleSheet.create({
View: {
width: ScreenDimensions.width,
height: ScreenDimensions.height,
backgroundColor: '#ffffff',
alignItems: 'center',
},
ListView: {
width: ScreenDimensions.width,
height: ScreenDimensions.height - NavigationBarHeight.height - TabBarHeight.height,
},
BlankImageView: {
marginTop: NavigationBarHeight.height + 80,
width: 175,
height: 143,
},
TitleText: {
fontSize: 17,
color: '#05120b',
marginTop: 45,
},
FollowButton: {
marginTop: 25,
width: 230,
height: 46,
backgroundColor: '#ffffff',
borderWidth: 1.0,
borderColor: '#fc4747',
borderRadius: 23,
justifyContent: 'center',
alignItems: 'center'
},
FollowButtonText: {
fontSize: 17,
color: '#fc4747',
}
})