Przeglądaj źródła

Merge branch 'MMC' of xiongzhu/raex_front into dev

panhui 2 lat temu
rodzic
commit
20cd3edda1
1 zmienionych plików z 16 dodań i 16 usunięć
  1. 16 16
      src/views/Home.vue

+ 16 - 16
src/views/Home.vue

@@ -406,23 +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);
-                        let date2 = dayjs(res.MMC_show_time.value).add(1, 'days');
-                        if (date1.isSameOrBefore(dayjs(), 'day') && date2.isAfter(dayjs(), 'day')) {
-                            this.showMMC = true;
+                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;
+                            }
+                        } else if (res.MMC_show) {
+                            this.showMMC = res.MMC_show.value === '1';
                         }
-                    } 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);
-                });
-                // }
+                        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 => {