From ef48e4b7a4d34e63ffd2cb23c406f4da6eb72ed7 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 14 五月 2024 13:42:26 +0800
Subject: [PATCH] 优化消息管理,标准库管理

---
 src/components/view/index-index.vue |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/components/view/index-index.vue b/src/components/view/index-index.vue
index 9c462d6..f1b2499 100644
--- a/src/components/view/index-index.vue
+++ b/src/components/view/index-index.vue
@@ -281,7 +281,7 @@
             </div>
             <div class="mun">
               <p style="font-size: 20px;">254</p>
-              <p style="font-size: 14px;margin-bottom: 10px;">鎴戠殑浠e姙</p>
+              <p style="font-size: 14px;margin-bottom: 10px;">鎴戠殑寰呭姙</p>
             </div>
           </div>
           <div class="right-1-item">
@@ -439,7 +439,8 @@
         pageSize: 8, // 涓�椤�7鏉�
         total: null,
         listLoading: true, // 缁勪欢loading鐨勫睍绀�,榛樿涓簍rue
-        finishLoding: false // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+        finishLoding: false, // 鍔犺浇瀹屾垚锛屾樉绀哄凡缁忔病鏈夋洿澶氫簡
+        timer:null
 			}
 		},
     watch:{
@@ -458,12 +459,20 @@
 			setInterval(() => {
 				this.nowTime()
 			}, 1000)
-      this.init();
       this.weekdays = this.getWeekdaysForNextWeek()
-      this.getScheduleByMe()
+      this.init();
       this.currentPage = 1;
       this.list = [];
       this.getList();
+      this.getScheduleByMe()
+      this.timer&&clearInterval(this.timer)
+      this.timer = setInterval(() => {
+        this.init();
+        this.currentPage = 1;
+        this.list = [];
+        this.getList();
+        this.getScheduleByMe()
+      },1000*60*10)
 		},
 		methods: {
       getList(){
@@ -623,10 +632,11 @@
         let weekdays = [];
         for (let i = 0; i < 7; i++) {
           let date = new Date();
-          date.setDate(date.getDate() + i); // 浠婂ぉ涔嬪悗鐨勬棩瀛�
+          date.setDate(date.getDate() - i); // 浠婂ぉ涔嬪悗鐨勬棩瀛�
           let day = date.getDay(); // 0-6 浠h〃鏄熸湡鏃ュ埌鏄熸湡鍏�
           weekdays.push(day);
         }
+        weekdays.reverse()
         weekdays = weekdays.map(m=>{
           let day =''
           switch (m) {
@@ -691,5 +701,8 @@
       })
     },
 		},
+    deactivated(){
+      this.timer&&clearInterval(this.timer)
+    }
 	}
 </script>

--
Gitblit v1.9.3