From ea6e99ff5feba8db0f3d714dd774ed323cb4ffa6 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 31 Oct 2017 11:44:51 +0800 Subject: [PATCH] Fix safari invalid date --- mock/api.js | 8 ++++---- mock/rule.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mock/api.js b/mock/api.js index 4683ea92..e6f3b67d 100644 --- a/mock/api.js +++ b/mock/api.js @@ -125,7 +125,7 @@ export const getNotice = [ title: titles[1], logo: avatars[1], description: '希望是一个好东西,也许是最好的,好东西是不会消亡的', - updatedAt: new Date('2017-07-24 11:00:00'), + updatedAt: new Date('2017-07-24'), member: '全组都是吴彦祖', href: '', memberLink: '', @@ -145,7 +145,7 @@ export const getNotice = [ title: titles[3], logo: avatars[3], description: '那时候我只会想自己想要什么,从不想自己拥有什么', - updatedAt: new Date('2017-07-23 06:23:00'), + updatedAt: new Date('2017-07-23'), member: '程序员日常', href: '', memberLink: '', @@ -155,7 +155,7 @@ export const getNotice = [ title: titles[4], logo: avatars[4], description: '凛冬将至', - updatedAt: new Date('2017-07-23 06:23:00'), + updatedAt: new Date('2017-07-23'), member: '高逼格设计天团', href: '', memberLink: '', @@ -165,7 +165,7 @@ export const getNotice = [ title: titles[5], logo: avatars[5], description: '生命就像一盒巧克力,结果往往出人意料', - updatedAt: new Date('2017-07-23 06:23:00'), + updatedAt: new Date('2017-07-23'), member: '骗你来学计算机', href: '', memberLink: '', diff --git a/mock/rule.js b/mock/rule.js index ad046b80..4a1a4dab 100644 --- a/mock/rule.js +++ b/mock/rule.js @@ -14,8 +14,8 @@ for (let i = 0; i < 46; i += 1) { description: '这是一段描述', callNo: Math.floor(Math.random() * 1000), status: Math.floor(Math.random() * 10) % 4, - updatedAt: new Date(`2017-07-${Math.floor(i / 2) + 1} ${Math.floor(i / 2) + 1}:00:00`), - createdAt: new Date(`2017-07-${Math.floor(i / 2) + 1} ${Math.floor(i / 2) + 1}:00:00`), + updatedAt: new Date(`2017-07-${Math.floor(i / 2) + 1}`), + createdAt: new Date(`2017-07-${Math.floor(i / 2) + 1}`), progress: Math.ceil(Math.random() * 100), }); } -- GitLab