فهرست منبع

Merge branch 'MMC' of xiongzhu/raex_front into dev

panhui 2 سال پیش
والد
کامیت
9430e7c3e1
1فایلهای تغییر یافته به همراه16 افزوده شده و 15 حذف شده
  1. 16 15
      src/views/Home.vue

+ 16 - 15
src/views/Home.vue

@@ -406,22 +406,23 @@ export default {
         setTimeout(() => {
             this.showTips().then(() => {
                 let showMMC = window.sessionStorage.getItem('showMMC');
-                if (!showMMC) {
-                    this.$http.get('sysConfig/get/MMC_video_url,MMC_show,MMC_show_time').then(res => {
-                        if (res.MMC_show_time) {
-                            let date1 = dayjs(res.MMC_show_time.value).add(1, 'days');
-                            if (date1.isAfter(dayjs(), 'day')) {
-                                this.showMMC = true;
-                            }
-                        } else if (res.MMC_show) {
-                            this.showMMC = res.MMC_show.value === '1';
+                // if (!showMMC) {
+                this.$http.get('sysConfig/get/MMC_video_url,MMC_show,MMC_show_time').then(res => {
+                    if (res.MMC_show_time) {
+                        let date1 = dayjs(res.MMC_show_time.value);
+                        let date2 = dayjs(res.MMC_show_time.value).add(1, 'days');
+                        if (date1.isSameOrBefore(dayjs(), 'day') && date2.isAfter(dayjs(), 'day')) {
+                            this.showMMC = true;
                         }
-                        if (res.MMC_video_url) {
-                            this.MMCUrl = res.MMC_video_url.value;
-                        }
-                        window.sessionStorage.setItem('showMMC', true);
-                    });
-                }
+                    } else if (res.MMC_show) {
+                        this.showMMC = res.MMC_show.value === '1';
+                    }
+                    if (res.MMC_video_url) {
+                        this.MMCUrl = res.MMC_video_url.value;
+                    }
+                    window.sessionStorage.setItem('showMMC', true);
+                });
+                // }
             });
         }, 500);
         this.$http.get('sysConfig/get/fu_startTime').then(res => {