Commit 1a6f5dd2 by 张晓玮

Merge branch 'zhangxw_dev_3.0' into 'v3.0'

1

See merge request !116
2 parents b7e07a5b 2f8988df
......@@ -54,7 +54,7 @@ export function commentTime(dateTimeStamp) {
let weektTime = dayTime * 7
let monthTime = dayTime * 30
let yearTime = dayTime * 365
if (timeDifference / yearTime > 1 && Math.floor(timeDifference / yearTime) >= 1) {
if (Math.floor(timeDifference / yearTime) >= 1) {
result = Math.floor(timeDifference / yearTime) + '年前'
} else if (Math.floor(timeDifference / monthTime) >= 1) {
result = Math.floor(timeDifference / monthTime) + '月前'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!