From 1cb780b1762c62751c7f5f26132f3a7aa4ef3e2f Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期四, 23 三月 2023 16:45:30 +0800 Subject: [PATCH] 微信登录修改,呼叫客服功能(完成) --- utils/util.js | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/utils/util.js b/utils/util.js index f5e9768..f9b67d7 100644 --- a/utils/util.js +++ b/utils/util.js @@ -1,7 +1,16 @@ -export function todayDate(){ +export function todayDate(arg){ let date = new Date() let year = date.getFullYear() let month = date.getMonth() + 1; let day = date.getDate() - return year + '-' + month + '-' + day + let hour = date.getHours() + let minutes = date.getMinutes() + let seconds = date.getSeconds() + console.log(arg,'鏃堕棿'); + if(arg == 'hms'){ + hour = hour < 10 ? '0' + hour : hour + minutes = minutes < 10 ? '0' + minutes : minutes + seconds = seconds < 10 ? '0' + seconds : seconds + return hour+':'+minutes+':' + seconds + } } \ No newline at end of file -- Gitblit v1.9.1