From 0d7b45b5e6cb8ef9fd7325be2a6f6a8ab0f9c71d Mon Sep 17 00:00:00 2001
From: liyuetong
Date: Fri, 17 Sep 2021 15:44:15 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=8A=E6=97=A5=E5=92=8C=E6=9C=AC=E6=9C=88?=
=?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=98=A8=E6=97=A5=EF=BC=8C=E9=BB=98=E8=AE=A4?=
=?UTF-8?q?=E6=98=A8=E6=97=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/js/utils/getBeforeDate.js | 37 ++++++
.../ebiz/laurelClub/ExclusivePosters.vue | 7 +-
src/views/ebiz/laurelClub/LaurelData.vue | 124 ++++++++++--------
3 files changed, 107 insertions(+), 61 deletions(-)
diff --git a/src/assets/js/utils/getBeforeDate.js b/src/assets/js/utils/getBeforeDate.js
index 58fd58b1c..445e82daf 100644
--- a/src/assets/js/utils/getBeforeDate.js
+++ b/src/assets/js/utils/getBeforeDate.js
@@ -13,5 +13,42 @@ export default {
//获取“多少天数”之前的时间 例如28天前 即days=28
let currentTime = new Date().getTime()
return new Date(currentTime - 1000 * 60 * 60 * 24 * days)
+ },
+ /**
+ * 获取上个月
+ */
+ getLastMonth:function(){
+ var nowDate = new Date();
+ var year = nowDate.getFullYear();
+ var month = nowDate.getMonth();
+ if(month == 0){
+ month = 12;
+ year = year - 1;
+ }
+ if (month <= 9) {
+ month = '0' + month
+ }
+ var yyyyMM = year+"-"+month;
+ console.log(yyyyMM);
+ return yyyyMM
+ },
+ /**
+ * 获取上个月月底日期
+ */
+ getLastMonthAndDay:function(){
+ var nowDate = new Date();
+ var year = nowDate.getFullYear();
+ var month = nowDate.getMonth();
+ if(month == 0){
+ month = 12;
+ year = year - 1;
+ }
+ if (month <= 9) {
+ month = '0' + month
+ }
+ var lastDay = new Date(year,month,0);
+ var yyyyMMdd = year+"-"+month+"-"+lastDay.getDate();
+ console.log(yyyyMMdd);
+ return yyyyMMdd
}
}
diff --git a/src/views/ebiz/laurelClub/ExclusivePosters.vue b/src/views/ebiz/laurelClub/ExclusivePosters.vue
index a36394e73..587823fb1 100644
--- a/src/views/ebiz/laurelClub/ExclusivePosters.vue
+++ b/src/views/ebiz/laurelClub/ExclusivePosters.vue
@@ -4,7 +4,7 @@