Authored by 于良

bug fix http://jira.yoho.cn:8888/browse/YH-3284 review by 盖剑秋

... ... @@ -14,7 +14,6 @@ import {
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {Map} from 'immutable';
import timeago from 'timeago.js';
import Immutable, {List, Record} from 'immutable';
import {Actions} from 'react-native-router-flux';
... ... @@ -24,6 +23,7 @@ import * as subjectPostActions from '../reducers/subject/subjectPostActions';
import * as homeActions from '../reducers/home/homeActions';
import * as appActions from '../reducers/app/appActions';
import {number10KFormater} from '../utils/numberFormater';
import timeago from '../utils/timeago';
const actions = [
subjectPostActions,
... ... @@ -197,7 +197,7 @@ class SubjectPostContainer extends Component {
render() {
let item = this.props.subject.items.get(this.sid);
let {headIcon,nickName,uid} = item.authorInfo;
let timeagoStr = timeago().format(item.createTime, 'zh_CN');
let timeagoStr = timeago(item.createTime);
let header = {
uid,
headIcon,
... ...
... ... @@ -267,8 +267,13 @@ export function doReport(sid, params) {
export function requestPostContent(sid, postsId) {
return (dispatch, getState) => {
let {subject, user} = getState();
let item = subject.items.get(sid);
if (!item) {
return;
}
dispatch(doRequestContent(sid));
let {user} = getState();
let uid = user.profile.uid;
let params = {postsId, uid};
new PostingService().getPostContent(params)
... ...