浏览代码

入口显示时间

panhui 2 年之前
父节点
当前提交
e179134a3f
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      src/views/Home.vue

+ 7 - 2
src/views/Home.vue

@@ -407,8 +407,13 @@ export default {
             this.showTips().then(() => {
                 let showMMC = window.sessionStorage.getItem('showMMC');
                 if (!showMMC) {
-                    this.$http.get('sysConfig/get/MMC_video_url,MMC_show').then(res => {
-                        if (res.MMC_show) {
+                    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 (res.MMC_video_url) {