...
|
...
|
@@ -10,7 +10,6 @@ import LoadMoreIndicator from '../../../common/components/LoadMoreIndicator'; |
|
|
|
|
|
import ContentMessageTabView from "./ContentMessageTabView";
|
|
|
import ContentMessageCell from "./ContentMessageCell";
|
|
|
import ContentEmptyView from './ContentEmptyView'
|
|
|
import Prompt from '../../../common/components/Prompt';
|
|
|
|
|
|
export default class ContentMessageView extends Component {
|
...
|
...
|
@@ -39,7 +38,7 @@ export default class ContentMessageView extends Component { |
|
|
|
|
|
_renderHeader() {
|
|
|
let showStatus = this.props.contentTipFlag==='0' ? true : false;
|
|
|
let tabStatus = this.props.tabButtons.length===0 ? false : true;
|
|
|
let tabStatus = this.props.commentList.length===0 ? false : true;
|
|
|
|
|
|
function onNotifyPress() {
|
|
|
NativeModules.YH_CommonHelper.jumpToUpdateNotificationStatus();
|
...
|
...
|
@@ -74,25 +73,28 @@ export default class ContentMessageView extends Component { |
|
|
)
|
|
|
}
|
|
|
|
|
|
_renderFooter(){
|
|
|
_renderFooter() {
|
|
|
let emptyViewShow = this.props.commentList.length===0 ? true : false;
|
|
|
return (
|
|
|
<View style={[{height: 50}, {backgroundColor: 'white'}, {justifyContent:'center'}]}>
|
|
|
</View>
|
|
|
<View>
|
|
|
|
|
|
{ emptyViewShow && this.props.isFetching === false ?
|
|
|
<View style={styles.emptyView}>
|
|
|
<Image
|
|
|
style={styles.iconStyle}
|
|
|
source={require('../../images/message_empty_ic.png')}
|
|
|
/>
|
|
|
<Text style={styles.textStyle}>暂无更新的消息</Text>
|
|
|
</View>
|
|
|
:
|
|
|
<View style={[{height: 50}, {backgroundColor: 'white'}, {justifyContent:'center'}]}/> }
|
|
|
|
|
|
</View>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
let {commentList, isPullToRefresh, shouldShowEmpty, tipMessage} = this.props;
|
|
|
|
|
|
if (shouldShowEmpty) {
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
<ContentEmptyView
|
|
|
listId={4}
|
|
|
/>
|
|
|
</View>
|
|
|
);
|
|
|
}
|
|
|
let {commentList, isPullToRefresh, tipMessage} = this.props;
|
|
|
|
|
|
return (
|
|
|
<View style={styles.container}>
|
...
|
...
|
@@ -165,6 +167,7 @@ export default class ContentMessageView extends Component { |
|
|
|
|
|
let {width} = Dimensions.get('window');
|
|
|
const ROW_COLUMN = 3
|
|
|
let scale = (width/375.0);
|
|
|
|
|
|
let styles = StyleSheet.create({
|
|
|
container: {
|
...
|
...
|
@@ -244,4 +247,23 @@ let styles = StyleSheet.create({ |
|
|
height: 10
|
|
|
},
|
|
|
|
|
|
emptyView: {
|
|
|
flex: 1,
|
|
|
flexDirection: 'column',
|
|
|
justifyContent: 'center',
|
|
|
alignItems: 'center',
|
|
|
},
|
|
|
iconStyle: {
|
|
|
marginTop: Math.ceil(82*scale),
|
|
|
width: Math.ceil(96*scale),
|
|
|
height: Math.ceil(70*scale),
|
|
|
backgroundColor: 'transparent',
|
|
|
},
|
|
|
textStyle: {
|
|
|
marginTop: Math.ceil(28*scale),
|
|
|
color: '#444444',
|
|
|
backgroundColor: 'transparent',
|
|
|
fontSize: 15,
|
|
|
},
|
|
|
|
|
|
}) |
...
|
...
|
|