cbaf76f5 by 任超

refactor:新闻动态

1 parent 0afd5a2d
......@@ -30,7 +30,6 @@
</div>
</div>
</div>
<!-- 头部搜索区域 -->
<div class="head-search">
<div class="head-contentBox">
<img class="logo-img" src="/staticImages/logo.png" alt="不动产">
......@@ -97,23 +96,45 @@
<div class="news-module-box">
<img class="news-img" src="/staticImages/default-news.png" />
<ul class="news-title">
<li class="hot-focus">
<li class="hot-focus item-title news-active" data-id="1">
<img src="/staticImages/redian.png" />
热点聚焦
</li>
<li>
<li class="item-title" data-id="2">
新闻动态
</li>
<li class="see-more">
<a>查看全部</a>
<a href="/staticViews/newsList/1.html">查看全部</a>
<img src="/staticImages/more.png" />
</li>
</ul>
<ul class="hotspot-list">
<!-- 热点聚焦内容 -->
<ul class="hotspot-list item-list">
<li>
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconzuixin"></use>
</svg>
<a class="newest" href="">创新技术体系引领事业发展事实预计创新技术体系引领事业发展事实预计</a>
<span>2020-06-19</span>
</li>
<li>
<a href="">创新技术体系引领事业发展事实预计创新技术体系引领事业发展事实预计</a>
<span>2020-06-19</span>
</li>
</ul>
<ul class="news-information-list">
<!-- 新闻动态内容 -->
<ul class="news-information-list item-list">
<li>
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconzuixin"></use>
</svg>
<a class="newest" href="">1创新技术体系引领事业发展事实预计创新技术体系引领事业发展事实预计</a>
<span>2020-06-19</span>
</li>
<li>
<a href="">1创新技术体系引领事业发展事实预计创新技术体系引领事业发展事实预计</a>
<span>2020-06-19</span>
</li>
</ul>
</div>
</div>
......
......@@ -633,13 +633,20 @@ div.c_five ul li a img {
color: #4A4A4A;
cursor: pointer;
}
.news-title .item-title {
position: relative;
}
.news-title .hot-focus {
margin-right: 100px;
position: relative;
}
.news-title .hot-focus::after {
/* 选中样式 */
.news-active {
font-size: 24px!important;
font-weight: 700;
}
.news-active::after {
position: absolute;
width: 124px;
width: 100%;
height: 1px;
background-color: #006CFF;
content: "";
......@@ -667,3 +674,54 @@ div.c_five ul li a img {
width: 6px;
height: 12px;
}
.item-list {
float: right;
width: 496px;
}
.news-information-list {
display: none;
}
.item-list li{
font-size: 18px;
font-weight: 400;
color: #4A4A4A;
line-height: 45px;
overflow: hidden;
}
.item-list li .icon {
height: 26px;
width: 10%!important;
float: left;
margin-top: 9px;
margin-left: -5px;
}
.item-list li a {
display: inline-block;
float: left;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
width: 373px;
text-align: left;
position: relative;
padding-left: 10px;
}
.item-list li .newest {
width: 325px;
}
.item-list li a::before {
position: absolute;
width: 4px;
height: 4px;
border-radius: 4px;
background-color: #4a4a4a;
content: "";
left: 2px;
top: 20px;
}
.item-list li span {
font-size: 16px;
color: #9B9B9B;
float: right;
}
\ No newline at end of file
......
......@@ -4,7 +4,6 @@ var pos = curWwwPath.indexOf(pathName);
var localhostPaht = curWwwPath.substring(0, pos);
document.writeln("<!DOCTYPE html>");
document.writeln("<html lang=\'en\'>");
document.writeln("");
document.writeln("<head>");
document.writeln(" <meta charset=\'UTF-8\'>");
document.writeln(" <meta name=\'copyright\' content=\' &reg 技术支持 All Rights Reserved\' />");
......@@ -21,51 +20,76 @@ document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/sta
document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticJs/common.js\'></script>");
document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticJs/header.js\'></script>");
document.writeln("</head>");
document.writeln("");
document.writeln("<div class='home-sticky'>");
document.writeln("<div class=\'home-sticky\'>");
document.writeln(" <div class=\'top-logo\'>");
document.writeln(" <div class=\'top_logo_content\'>");
document.writeln(" <h1><a href=\'" + localhostPaht + "/index.html\'><img src=\'" + localhostPaht + "/staticImages/logo.png\' alt=\'西安市不动产登记平台\' /></a></h1>");
document.writeln("");
document.writeln(" <div class=\'top_logo_search\'>");
document.writeln(" <input type=\'text\' name=\'title\' required lay-verify=\'required\' placeholder=\'请输入关键字搜索\' autocomplete=\'off\'");
document.writeln(" class=\'layui-input\'>");
document.writeln(" <img class=\'search_img\' src=\'" + localhostPaht + "/staticImages/search.png\'>");
document.writeln(" <div class=\'head-time\'>今天是2021年1月19日 星期二</div>");
document.writeln(" <ul class=\'login layui-nav login-con\'>");
document.writeln(" <span class=\'loginButton\' id=\'login\'>登录</span>");
document.writeln(" <p class=\'loginButton register\' id=\'register\'><a href=\'/staticViews/register.html\'>注册</a></p>");
document.writeln(" </ul>");
document.writeln(" </div>");
document.writeln(" </div>");
document.writeln(" </div>");
document.writeln(" <ul class='login layui-nav login-con'>");
document.writeln(" <span class='loginButton' id='login'>登录</span>");
document.writeln(" <p class='loginButton register' id='register'><a href=\'" + localhostPaht + "/staticViews/register.html\'>注册</a></p>");
document.writeln(" <div class=\'head-search\'>");
document.writeln(" <div class=\'head-contentBox\'>");
document.writeln(" <img class=\'logo-img\' src=\'/staticImages/logo.png\' alt=\'不动产\'>");
document.writeln(" <div class=\'content-search\'>");
document.writeln(" <input type=\'text\' placeholder=\'请输入关键字搜索\' class=\'layui-input head-search-input\'>");
document.writeln(" <p class=\'search-button\'>");
document.writeln(" <img src=\'/staticImages/search.png\' />");
document.writeln(" 一键查询");
document.writeln(" </p>");
document.writeln(" <ul class=\'search-hint\'>");
document.writeln(" <li class=\'hot-search\'>");
document.writeln(" <img src=\'/staticImages/remen.png\' />");
document.writeln(" 热门搜索");
document.writeln(" </li>");
document.writeln(" <li>");
document.writeln(" 在线预约");
document.writeln(" </li>");
document.writeln(" <li>");
document.writeln(" 网上申请");
document.writeln(" </li>");
document.writeln(" <li>");
document.writeln(" 办事指南");
document.writeln(" </li>");
document.writeln(" <li>");
document.writeln(" 档案查询");
document.writeln(" </li>");
document.writeln(" </ul>");
document.writeln(" </div>");
document.writeln(" </div>");
document.writeln(" <div class=\'navigation\'>");
document.writeln(" <ul class=\'layui-nav layui-bg-blue\' lay-filter=\'\'>");
document.writeln(" <li id='index' class=\'layui-nav-item\'><a href=\'" + localhostPaht + "/index.html\' title=\'首页\'>首页</a></li>");
document.writeln(" <li id='news' class=\'layui-nav-item\'><a href=\'" + localhostPaht + "/staticViews/newsList/1.html\' title=\'新闻动态\'>新闻动态</a></li>");
document.writeln(" <li id='zwgk' class=\'layui-nav-item\'>");
document.writeln(" </div>");
document.writeln(" <div class=\'layui-nav navigation layui-bg-blue\'>");
document.writeln(" <ul class=\'navigation-content\'>");
document.writeln(" <li id=\'index\' class=\'layui-nav-item\'><a href=\'/index.html\' title=\'首页\'>首页</a></li>");
document.writeln(" <li id=\'news\' class=\'layui-nav-item\'><a href=\'/staticViews/newsList/1.html\' title=\'新闻动态\'>新闻动态</a></li>");
document.writeln(" <li id=\'zwgk\' class=\'layui-nav-item\'>");
document.writeln(" <a href=\'javascript:;\'>政务公开</a>");
document.writeln(" <dl class=\'layui-nav-child\'>");
document.writeln(" <dd><a href=\'" + localhostPaht + "/staticViews/policyList/1.html\'>相应政策</a></dd>");
document.writeln(" <dd><a href=\'" + localhostPaht + "/staticViews/lawList/1.html\'>法律法规</a></dd>");
document.writeln(" <dd><a href=\'" + localhostPaht + "/staticViews/gsgg.html\'>公示公告</a></dd>");
document.writeln(" <dd><a href=\'/staticViews/policyList/1.html\'>相应政策</a></dd>");
document.writeln(" <dd><a href=\'/staticViews/lawList/1.html\'>法律法规</a></dd>");
document.writeln(" <dd><a href=\'/staticViews/gsgg.html\'>公示公告</a></dd>");
document.writeln(" </dl>");
document.writeln(" </li>");
document.writeln(" <li id='bszn' class=\'layui-nav-item\'><a href=\'" + localhostPaht + "/staticViews/bszn.html\' title=\'办事指南\'>办事指南</a></li>");
document.writeln(" <li id='wssq' class=\'layui-nav-item\'><a href=\'" + localhostPaht + "/staticViews/wssq.html\' title=\'网上申请\'>网上申请</a></li>");
document.writeln(" <li id=\'bszn\' class=\'layui-nav-item\'><a href=\'/staticViews/bszn.html\' title=\'办事指南\'>办事指南</a></li>");
document.writeln(" <li id=\'wssq\' class=\'layui-nav-item\'><a href=\'/staticViews/wssq.html\' title=\'网上申请\'>网上申请</a></li>");
document.writeln(" <li class=\'layui-nav-item\'>");
document.writeln(" <a href=\'javascript:;\'>查验中心</a>");
document.writeln(" <dl class=\'layui-nav-child\'>");
document.writeln(" <!-- 二级菜单 -->");
document.writeln(" <dd><a href=\'" + localhostPaht + "/staticViews/convenienceService/fileQuery.html\'>档案查询</a></dd>");
document.writeln(" <dd><a href=\'" + localhostPaht + "/staticViews/convenienceService/recordInquiry.html\'>合同备案查询</a></dd>");
document.writeln(" <dd><a href=\'" + localhostPaht + "/staticViews/convenienceService/certificateVerification.html\'>证书核验</a></dd>");
document.writeln(" <dd><a href=\'/staticViews/convenienceService/fileQuery.html\'>档案查询</a></dd>");
document.writeln(" <dd><a href=\'/staticViews/convenienceService/recordInquiry.html\'>合同备案查询</a>");
document.writeln(" </dd>");
document.writeln(" <dd><a href=\'/staticViews/convenienceService/certificateVerification.html\'>证书核验</a>");
document.writeln(" </dd>");
document.writeln(" </dl>");
document.writeln(" </li>");
document.writeln(" <li id='zxjf' class=\'layui-nav-item\'><a href=\'" + localhostPaht + "/staticViews/zxjf.html\'>在线缴费</a></li>");
document.writeln(" <li id='evaluate' class=\'layui-nav-item\'><a href=\'" + localhostPaht + "/staticViews/evaluate.html\'>好差评</a></li>");
document.writeln(" <li id=\'zxjf\' class=\'layui-nav-item\'><a href=\'/staticViews/zxjf.html\'>在线缴费</a></li>");
document.writeln(" <li id=\'evaluate\' class=\'layui-nav-item\'><a href=\'/staticViews/evaluate.html\'>好差评</a></li>");
document.writeln(" </ul>");
document.writeln(" </div> ");
document.writeln(" </div> ");
document.writeln(" </div>");
document.writeln("</html>");
document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticLib/layui/layui.js\'></script>");
document.writeln("<script type='text/javascript' src=\'" + localhostPaht + "/staticJs/login.js\'></script>");
......
......@@ -51,6 +51,18 @@ function initData() {
window.open('./staticViews/wdyy.html', '_self')
}
})
// 新闻头部切换
$('.news-title .item-title').click (function() {
$('.news-title .item-title').removeClass('news-active');
$(this).addClass('news-active');
let indexId = $(this).attr('data-id');
$('.item-list').hide();
if (indexId =='1') {
$('.hotspot-list').show();
}else {
$('.news-information-list').show();
}
})
}
// 获取汉字长度
function strLength(str) {
......