Merge pull request '优化日期显示' (#31) from tongChong/forgeplus-react:pre_develop_dev into pre_develop_dev
This commit is contained in:
commit
8adf7f8de6
|
@ -107,7 +107,7 @@ export function timeAgo(backDate) {
|
||||||
try {
|
try {
|
||||||
moment(backDate);
|
moment(backDate);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return;
|
return '刚刚';
|
||||||
}
|
}
|
||||||
if(typeof backDate ==='number'){
|
if(typeof backDate ==='number'){
|
||||||
backDate=backDate*1000
|
backDate=backDate*1000
|
||||||
|
@ -134,4 +134,5 @@ export function timeAgo(backDate) {
|
||||||
if (seconds) {
|
if (seconds) {
|
||||||
return seconds + "秒前";
|
return seconds + "秒前";
|
||||||
}
|
}
|
||||||
|
return "刚刚";
|
||||||
}
|
}
|
Loading…
Reference in New Issue