Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
fix(*): 修复帖子发帖时间显示有时差的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Aug 20, 2018
1 parent e27a277 commit 4c13a20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/FeedCard/FeedCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ import { mapState } from "vuex";
import FeedImage from "./FeedImage.vue";
import FeedVideo from "./FeedVideo.vue";
import CommentItem from "./CommentItem.vue";
import { time2txt } from "@/filters.js";
import { time2txt, timeOffset } from "@/filters.js";
import * as api from "@/api/feeds.js";
export default {
Expand Down Expand Up @@ -184,7 +184,8 @@ export default {
return this.feed.feed_view_count || 0;
},
time() {
return this.feed.created_at || "";
const time = new Date(this.feed.created_at).getTime() - timeOffset;
return new Date(time) || "";
},
user() {
const user = this.feed.user;
Expand Down

0 comments on commit 4c13a20

Please sign in to comment.