From d027d67e08ada9330f74585d70044e5a26901c86 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 2 Mar 2022 08:25:38 +0800 Subject: [PATCH] =?UTF-8?q?pref:=20=E5=80=92=E8=AE=A1=E6=97=B6=E5=88=9A?= =?UTF-8?q?=E5=88=B0=E5=88=B0=E8=BE=BE0=E6=97=B6=E4=BC=9A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=87=AA=E5=AE=9A=E4=B9=89=E6=89=8D=E7=BB=A7=E7=BB=AD?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=AE=A1=E6=97=B6=EF=BC=8C=E4=B8=94=E6=9C=AA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=B6=85=E6=97=B6=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/functions/web.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/functions/web.js b/resources/assets/js/functions/web.js index c4dbc5b6..ae01631c 100755 --- a/resources/assets/js/functions/web.js +++ b/resources/assets/js/functions/web.js @@ -157,8 +157,10 @@ let time = Math.round(this.Date(date).getTime() / 1000) - nowTime; if (time < 86400 * 7 && time > 0 ) { return this.formatSeconds(time); - } else if (time <= 0) { + } else if (time < 0) { return '-' + this.formatSeconds(time * -1); + } else if (time == 0) { + return 0; } return this.formatTime(date) },