fix:更新已知bug,优化代码
This commit is contained in:
58
app/index/view/user/viewMessage.html
Normal file
58
app/index/view/user/viewMessage.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>查看消息</title>
|
||||
<include file="public:header"/>
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
|
||||
h1 {
|
||||
font-family: "helvetica neue", PingFangSC-Light, arial, "hiragino sans gb", "microsoft yahei ui", "microsoft yahei", simsun, sans-serif;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.layui-card-header {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.layui-text {
|
||||
padding: 10px!important;
|
||||
text-indent: 2em;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.layui-text p {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="layui-fluid">
|
||||
<div id="unread" data-count="{$unread|default='0'}"></div>
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<h1>{$info.title}</h1>
|
||||
<p style="color: #3464ff">{$info.nickname|default='系统'} 于 {$info.create_time}</p>
|
||||
</div>
|
||||
<div class="layui-card-body layui-text">
|
||||
{$info.content|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.use('jquery', function () {
|
||||
let $ = layui.jquery;
|
||||
let unread = $('#unread').data('count');
|
||||
if (!unread) {
|
||||
top.layui.$('#notice').find('.layui-badge-dot').hide();
|
||||
top.layui.$('#notice').find('.fa-bell').removeClass('fa-bell').addClass('fa-bell-o');
|
||||
}
|
||||
|
||||
// 更新消息数量
|
||||
bellMessage(unread);
|
||||
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user