Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
李洋
/
消息系统
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
00c32add
authored
Dec 23, 2025
by
gongyang
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge remote-tracking branch 'origin/feature/20251222/notice' into feature/20251222/notice
parents
303dffc9
80c850e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
142 additions
and
2 deletions
public/js/Message/MessageList.js
public/js/public_notice.js
public/js/Message/MessageList.js
View file @
00c32add
...
@@ -313,7 +313,7 @@ layui.use(['form', 'table', 'laydate', 'layedit'], function () {
...
@@ -313,7 +313,7 @@ layui.use(['form', 'table', 'laydate', 'layedit'], function () {
offset
:
'250px'
,
offset
:
'250px'
,
move
:
false
move
:
false
},
function
(
i
)
{
},
function
(
i
)
{
Request
(
'/msgapi/
delBusinessNotice'
,
'POST'
,
{
business_notice_id
:
data
.
business_notice_id
,
is_del
:
1
},
function
(
res
)
{
Request
(
'/msgapi/
showBusinessNotice'
,
'POST'
,
{
business_notice_id
:
data
.
business_notice_id
,
show_status
:
data
.
show_status
==
1
?
0
:
1
},
function
(
res
)
{
if
(
res
.
errcode
==
0
)
{
if
(
res
.
errcode
==
0
)
{
layer
.
msg
(
'操作成功'
,
{
shift
:
0
,
time
:
2000
},
function
()
{
layer
.
msg
(
'操作成功'
,
{
shift
:
0
,
time
:
2000
},
function
()
{
layer
.
closeAll
();
layer
.
closeAll
();
...
@@ -335,7 +335,7 @@ layui.use(['form', 'table', 'laydate', 'layedit'], function () {
...
@@ -335,7 +335,7 @@ layui.use(['form', 'table', 'laydate', 'layedit'], function () {
offset
:
'250px'
,
offset
:
'250px'
,
move
:
false
move
:
false
},
function
(
i
)
{
},
function
(
i
)
{
Request
(
'/msgapi/
showBusinessNotice'
,
'POST'
,
{
business_notice_id
:
data
.
business_notice_id
,
show_status
:
data
.
show_status
==
1
?
0
:
1
},
function
(
res
)
{
Request
(
'/msgapi/
delBusinessNotice'
,
'POST'
,
{
business_notice_id
:
data
.
business_notice_id
,
is_del
:
1
},
function
(
res
)
{
if
(
res
.
errcode
==
0
)
{
if
(
res
.
errcode
==
0
)
{
layer
.
msg
(
'操作成功'
,
{
shift
:
0
,
time
:
2000
},
function
()
{
layer
.
msg
(
'操作成功'
,
{
shift
:
0
,
time
:
2000
},
function
()
{
layer
.
closeAll
();
layer
.
closeAll
();
...
@@ -345,6 +345,7 @@ layui.use(['form', 'table', 'laydate', 'layedit'], function () {
...
@@ -345,6 +345,7 @@ layui.use(['form', 'table', 'laydate', 'layedit'], function () {
layer
.
msg
(
res
.
errmsg
);
layer
.
msg
(
res
.
errmsg
);
}
}
});
});
});
});
}
}
if
(
obj
.
event
===
'top'
)
{
if
(
obj
.
event
===
'top'
)
{
...
...
public/js/public_notice.js
0 → 100644
View file @
00c32add
// / 系统公告滚动
// *
// *放在JQ layui 之后 直接引入
// */time:2025/12/13 by : xiaokang
layui
.
use
([],
function
()
{
var
pageS
=
{
init
:
function
()
{
pageS
.
render
()
pageS
.
handle
()
},
render
:
function
(
list
)
{
let
left
=
400
if
(
$
(
".layui-layout.layui-layout-admin"
).
hasClass
(
"admin-nav-mini"
))
{
left
=
240
}
const
css
=
`
.nrtx{line-height:38px;}
.noticeitemxo{margin-right:30px;cursor: pointer;}
#ann_box{position:fixed;top:0;left:
${
left
}
px;right:400px;height:50px;line-height:50px;background:rgba(255,255,255,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 300s linear infinite;}
@keyframes ann_scroll{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}`
;
const
html
=
`<div id="ann_box"><div id="ann_txt"></div></div>`
;
document
.
head
.
insertAdjacentHTML
(
'beforeend'
,
`<style>
${
css
}
</style>`
);
document
.
body
.
insertAdjacentHTML
(
'afterbegin'
,
html
);
pageS
.
getList
()
},
getList
:
function
()
{
setTimeout
(()
=>
{
// 模拟
pageS
.
scrollList
([
'<span class="noticeitemxo">【20个人消息】《账期的申请,调整和临时额度的使用》培训通知 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【19个人消息】《账期的申请,调整和临时额度的使用》培训通知 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【18个人消息】《账期的申请,调整和临时额度的使用》培训通知 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【17个人消息】《账期的申请,调整和临时额度的使用》培训通知 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【16个人消息】《账期的申请,调整和临时额度的使用》培训通知 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【15个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【14个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【13个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【12个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【11个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【10个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【9个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【8个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【7个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【6个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【5个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【4个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【3个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【2个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
'<span class="noticeitemxo">【1个人消息】《账期的申请,调整和临时额度的使用》培训通 发布人:xxx 发布时间:2025-12-12 12:12:12</span>'
,
]);
},
200
);
return
$
.
ajax
({
url
:
'http://message.liexin.net'
+
'/sync/businessNoticeList'
,
type
:
'get'
,
data
:
{
limit
:
20
,
},
dataType
:
'json'
,
timeout
:
10000
,
success
:
function
(
res
)
{
},
error
:
function
(
res
)
{
}
});
},
scrollList
:
function
(
list
)
{
const
node
=
document
.
getElementById
(
'ann_txt'
);
node
.
innerHTML
=
list
.
join
(
''
);
node
.
innerHTML
+=
node
.
innerHTML
;
// 复制一份,无缝
node
.
style
.
animation
=
'none'
;
node
.
offsetWidth
;
// reflow
node
.
style
.
animation
=
''
;
},
handle
:
function
()
{
document
.
getElementById
(
'ann_box'
).
addEventListener
(
'mouseenter'
,
()
=>
{
document
.
getElementById
(
'ann_txt'
).
style
.
animationPlayState
=
'paused'
;
});
document
.
getElementById
(
'ann_box'
).
addEventListener
(
'mouseleave'
,
()
=>
{
document
.
getElementById
(
'ann_txt'
).
style
.
animationPlayState
=
'running'
;
});
$
(
"body"
).
on
(
"click"
,
".noticeitemxo"
,
function
()
{
let
conHtml_
=
`
<div style="padding:20px;">
<div class="layui-form-item " style="margin-bottom:0px;">
<div class="layui-inline">
<label class="layui-form-label required">公告标题</label>
<div class="layui-input-inline" style="width:900px;">
<div class="nrtx">阿萨大大实打实大苏打撒大苏打</div>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label required">公告类型</label>
<div class="layui-input-inline">
<div class="nrtx">最新补货</div>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label required">公告状态</label>
<div class="layui-input-inline">
<div class="nrtx">隐藏</div>
</div>
</div>
</div>
<div style="padding-left:39px;">公告详情</div>
<div class="noticedetailcs" style="padding-left:39px;padding-top:15px;width:1060px;overflow-x: auto;"></div>
</div>
`
layer
.
open
({
type
:
1
,
title
:
'公告详情'
,
offset
:
'50px'
,
area
:
[
'1100px'
,
'450'
],
shadeClose
:
false
,
resize
:
false
,
move
:
false
,
skin
:
'logSkin'
,
content
:
conHtml_
,
success
:
function
(
layero
,
dIndex
)
{
}
});
})
}
}
pageS
.
init
();
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment