|
@@ -432,8 +432,6 @@ helper.generateSign = function(map, appSecret) {
|
|
|
|
|
|
|
|
|
|
helper.getDate7DaysBefore = function(dateString, inputFormat, outputFormat) {
|
|
helper.getDate7DaysBefore = function(dateString, inputFormat, outputFormat) {
|
|
- const inputDate = new Date(dateString);
|
|
|
|
- return inputDate
|
|
|
|
if (isNaN(inputDate.getTime())) {
|
|
if (isNaN(inputDate.getTime())) {
|
|
// 如果默认解析失败,尝试手动解析
|
|
// 如果默认解析失败,尝试手动解析
|
|
// 这里可以添加更多格式的解析逻辑
|
|
// 这里可以添加更多格式的解析逻辑
|
|
@@ -441,7 +439,7 @@ helper.getDate7DaysBefore = function(dateString, inputFormat, outputFormat) {
|
|
}
|
|
}
|
|
|
|
|
|
const date7DaysBefore = new Date(inputDate);
|
|
const date7DaysBefore = new Date(inputDate);
|
|
- date7DaysBefore.setDate(date7DaysBefore.getDate() + 7);
|
|
|
|
|
|
+ date7DaysBefore.setDate(date7DaysBefore.getDate() + 0);
|
|
|
|
|
|
// 简单格式化函数
|
|
// 简单格式化函数
|
|
function formatDate(date, format) {
|
|
function formatDate(date, format) {
|