Commit 6bc7ce46 by gongyang

Merge remote-tracking branch 'origin/feature/20251222/notice' into feature/20251222/notice

parents 3fc9533e c4a76a30
Showing with 16 additions and 4 deletions
...@@ -20,18 +20,27 @@ layui.use([], function () { ...@@ -20,18 +20,27 @@ layui.use([], function () {
} }
const css = ` const css = `
.nrtx{line-height:38px;} .nrtx{line-height:38px;}
.noticeitemxo{margin-right:30px;cursor: pointer;} .noticeitemxo{margin-right:30px;cursor: pointer;}
#ann_box{position:fixed;top:0;left:${left}px;right:400px;height:50px;line-height:50px;background:rgba(0,0,0,0);color:#333;overflow:hidden;z-index:9999;font-size:14px;} .fbggank{position:fixed;top:0;right:365px;z-index:9999;top:9px;}
#ann_box{position:fixed;top:0;left:${left}px;right:450px;height:50px;line-height:50px;background:rgba(0,0,0,0);color:#333;overflow:hidden;z-index:9999;font-size:14px;}
#ann_txt{white-space:nowrap;display:inline-block;padding-left:100%;animation:ann_scroll 200s linear infinite;} #ann_txt{white-space:nowrap;display:inline-block;padding-left:100%;animation:ann_scroll 200s linear infinite;}
@keyframes ann_scroll{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}`; @keyframes ann_scroll{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}`;
const html = `<div id="ann_box"><div id="ann_txt"></div></div>`; const html = `<div id="ann_box"><div id="ann_txt"></div></div><a class="layui-btn layui-btn-sm fbggank" href="http://message.ichunt.net/manage/businessNotice" target="_blank">发布公告</a>`;
document.head.insertAdjacentHTML('beforeend', `<style>${css}</style>`); document.head.insertAdjacentHTML('beforeend', `<style>${css}</style>`);
document.body.insertAdjacentHTML('afterbegin', html); document.body.insertAdjacentHTML('afterbegin', html);
pageS.getList() pageS.getList()
}, },
getList: function () { getList: function () {
var domains_='http://message.liexin.net'
if(window.location.origin.indexOf("liexindev.")!=-1){
domains_='http://message.liexindev.net'
}
if(window.location.origin.indexOf("ichunt.")!=-1){
domains_='http://message.ichunt.net'
}
$.ajax({ $.ajax({
url: 'http://message.liexin.net' + '/sync/businessNoticeList', url: domains_ + '/sync/businessNoticeList',
type: 'get', type: 'get',
data: { data: {
limit: 20, limit: 20,
...@@ -42,6 +51,9 @@ layui.use([], function () { ...@@ -42,6 +51,9 @@ layui.use([], function () {
if(res.code==0){ if(res.code==0){
var renderList=[] var renderList=[]
pageS.noticeList=res.data.data||[] pageS.noticeList=res.data.data||[]
if(pageS.noticeList.length==0){
return
}
pageS.noticeList.forEach(item=>{ pageS.noticeList.forEach(item=>{
renderList.push(`<span class="noticeitemxo" business_notice_id="${item.business_notice_id}">【${item.type_cn}】&nbsp;&nbsp;${item.title}&nbsp;&nbsp;&nbsp;&nbsp;发布人:${item.create_name}&nbsp;&nbsp;&nbsp;&nbsp;发布时间:${item.create_time_cn}</span>`) renderList.push(`<span class="noticeitemxo" business_notice_id="${item.business_notice_id}">【${item.type_cn}】&nbsp;&nbsp;${item.title}&nbsp;&nbsp;&nbsp;&nbsp;发布人:${item.create_name}&nbsp;&nbsp;&nbsp;&nbsp;发布时间:${item.create_time_cn}</span>`)
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment