更改后端返回的时间格式,对字符串时间格式化
// 格式化日期 封装函数 FormatDate(date, str) { //参数是时间、格式//年月日时分秒 str = str.split("yyyy").join(date.getFullYear()) str = str.split("MM").join(date.getMonth() + 1 < 10 ? '0' + '' + (date.getMonth() + 1) : date.getMonth()); str = str.spli.
原创
2022-03-18 19:38:23 ·
1128 阅读 ·
0 评论