From 59d8ce6b4e59d95dac4d02c3320bd1544b620739 Mon Sep 17 00:00:00 2001 From: yehaia1 Date: Sun, 28 Mar 2021 20:44:40 +0800 Subject: [PATCH] Update index.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 获取时间拼接字符串的常量-->变量 --- cloudfunctions-aliyun/send/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloudfunctions-aliyun/send/index.js b/cloudfunctions-aliyun/send/index.js index c1d7aae..b85c734 100644 --- a/cloudfunctions-aliyun/send/index.js +++ b/cloudfunctions-aliyun/send/index.js @@ -5,8 +5,8 @@ function getFormatDate(ms) { let date = new Date(); date.setTime(date.getTime() + ms); const year = date.getFullYear(); - const month = date.getMonth() + 1; - const strDate = date.getDate(); + let month = date.getMonth() + 1; + let strDate = date.getDate(); if (month >= 1 && month <= 9) { month = '0' + month; } @@ -96,4 +96,4 @@ exports.main = async (event, context) => { }); return Promise.all(sendPromises) -}; \ No newline at end of file +};