修复消息列表和消息详情时间显示不对问题 review by yewanwan
Showing
2 changed files
with
2 additions
and
2 deletions
@@ -56,7 +56,7 @@ export default class Meassage extends Component { | @@ -56,7 +56,7 @@ export default class Meassage extends Component { | ||
56 | 56 | ||
57 | renderItem(item, sectionID, rowID) { | 57 | renderItem(item, sectionID, rowID) { |
58 | 58 | ||
59 | - let date = moment(item.get('createTime')).format('YYYY-M-D'); | 59 | + let date = moment(item.get('createTime'), 'X').format('YYYY-M-D'); |
60 | return ( | 60 | return ( |
61 | <TouchableOpacity activeOpacity={0.5} onPress={() => this.props.onPressItem(rowID)}> | 61 | <TouchableOpacity activeOpacity={0.5} onPress={() => this.props.onPressItem(rowID)}> |
62 | <View style={styles.row}> | 62 | <View style={styles.row}> |
@@ -71,7 +71,7 @@ export default class MessageDetailContainer extends Component { | @@ -71,7 +71,7 @@ export default class MessageDetailContainer extends Component { | ||
71 | } | 71 | } |
72 | 72 | ||
73 | render() { | 73 | render() { |
74 | - let date = moment(this.detail.get('createTime')).format('YYYY年M月D日'); | 74 | + let date = moment(this.detail.get('createTime'), 'X').format('YYYY年M月D日'); |
75 | return ( | 75 | return ( |
76 | <View style={styles.container}> | 76 | <View style={styles.container}> |
77 | <MessageDetail | 77 | <MessageDetail |
-
Please register or login to post a comment