getTime(nowTime) { if (nowTime) { var date = new Date(nowTime); } else { var date = new Date(); } let y = date.getFullYear(); let m = (date.getMonth() + 1).toString().padStart(2, "0"); let r = date.getDate().toString().padStart(2, "0"); let hh = date.getHours().toString().padStart(2, "0"); let mm = date.getMinutes().toString().padStart(2, "0"); let ss = date.getSeconds().toString().padStart(2, "0"); let week = date.getDay(); //星期 let weeks = ["日", "一", "二", "三", "四", "五", "六"]; //判断星期几 let getWeek = "星期" + weeks[week]; return `${y} / ${m} / ${r} (${getWeek}) ${hh}:${mm}:${ss}`; },