浏览代码

首页 活动弹窗

wangshan 5 年之前
父节点
当前提交
f79f6117a7
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      src/jfw/front/swordfish.go
  2. 2 2
      src/web/templates/pc/index.html

+ 1 - 1
src/jfw/front/swordfish.go

@@ -120,7 +120,7 @@ func (m *Front) NewSordfish() error {
 			return m.SetBody([]byte(ret.(string)))
 		} else {
 			m.T["live_Preheat_Start"] = config.ActiveConfig.Live_Preheat_Start
-			m.T["live_Preheat_End"] = config.ActiveConfig.Live_Preheat_End
+			m.T["live_Active_End"] = config.ActiveConfig.Live_Active_End
 			content, _ := m.Render4Cache("/pc/index.html", &m.T)
 			redis.Put("other", "jypcindex", string(content), 60*60*2)
 			return m.SetBody(content)

+ 2 - 2
src/web/templates/pc/index.html

@@ -204,7 +204,7 @@
 // 弹窗
 var times = new Date().getTime();
 var live_Preheat_Start = {{.T.live_Preheat_Start}};
-var live_Preheat_End = {{.T.live_Preheat_End}};
+var live_Active_End = {{.T.live_Active_End}};
 var live_preheat_day_count = localStorage.live_preheat_day_count;
 var day = new Date().getDay();
 var live_preheat_day = day;
@@ -217,7 +217,7 @@ if(live_preheat_day_count!=null&&live_preheat_day_count!=undefined){
   }
 }
 if(sessionStorage.live_preheat_flag!="1"){
-  if(live_preheat_count<2&&times>=live_Preheat_Start*1000&&times<=live_Preheat_End*1000){
+  if(live_preheat_count<2&&times>=live_Preheat_Start*1000&&times<=live_Active_End*1000){
     sessionStorage.live_preheat_flag = "1";
     localStorage.live_preheat_day_count = day+"_"+(live_preheat_count+1);
     $(".live_preheat").fadeIn("normal",function(){