Browse Source

更改多公告

tags/v1.22.1.4^2
wangjr 3 years ago
parent
commit
ee46a3122e
1 changed files with 17 additions and 5 deletions
  1. +17
    -5
      templates/base/head.tmpl

+ 17
- 5
templates/base/head.tmpl View File

@@ -201,12 +201,15 @@ var _hmt = _hmt || [];
{{template "base/head_navbar" .}}
</div><!-- end bar -->
<!-- {{if not .IsCourse}} -->
<div class="notic_content" id ="notic_content" style="display: none;">
<div class="notic_content" id ="notic_content" style="display: block;">
<marquee behavior="scroll" direction="left">
<a href={{.notice.Link}} class="a_width">
<i class="ri-arrow-right-s-line"></i>
{{.notice.Title}}
{{range .notices.Notices}}
<i class="ri-arrow-right-s-line"></i>
{{.Title}}
{{end}}
</a>
</marquee>
@@ -236,7 +239,16 @@ var _hmt = _hmt || [];
}else{
isNewNotice=false;
}
if (JSON.parse("{{.notice.Visible}}")){
let isShowNoticeTag = false;
let notices= "{{.notices.Notices}}"
for (i =0;i<notices.length;i++){
if (notices[i].Visible==1){
isShowNoticeTag =true;
break;
}
}
// if (JSON.parse("{{.notice.Visible}}")){
if (isShowNoticeTag){
if(isNewNotice){
document.getElementById("notic_content").style.display='block'
}else{
@@ -253,6 +265,6 @@ var _hmt = _hmt || [];
}
}
if(!("{{.IsCourse}}" == true || "{{.IsCourse}}" =='true')) {
isShowNotice();
// isShowNotice();
}
</script>

Loading…
Cancel
Save