You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
137 lines
6.0 KiB
137 lines
6.0 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<!-- 通用 -->
|
|
{include file="common/head" /}
|
|
<!-- 当前 -->
|
|
<link rel="stylesheet" href="__TMPL__/static/css/mixin.css" />
|
|
<!-- <link rel="stylesheet" href="__TMPL__/static/css/information.css"> -->
|
|
<link rel="stylesheet" href="__TMPL__/static/scss/information.css" />
|
|
</head>
|
|
|
|
<body>
|
|
<!-- header start -->
|
|
{include file="common/header" /}
|
|
<!-- header end -->
|
|
<div class="bannerList">
|
|
<div class="img">
|
|
<img src="__TMPL__/static/images/yanjiuyuan/banner2.jpg" alt="" />
|
|
</div>
|
|
<div class="w1280">
|
|
<div class="bannerTitle">研究资讯</div>
|
|
</div>
|
|
</div>
|
|
<div class="pageListNav">
|
|
<div class="w1280">
|
|
{hcTaglib:subcategory pid="76" item="vo" field="id,title" sort="sort asc"}
|
|
<a href="javascript:;" class="{:request()->param('type')==$vo.id?'on':''}" data-id="{$vo.id}">{$vo.title}</a>
|
|
{/hcTaglib:subcategory}
|
|
</div>
|
|
</div>
|
|
<div class="informationBlock">
|
|
<div class="w1280">
|
|
<div class="left">
|
|
<ul>
|
|
{hcTaglib:subcategory pid="76" field="id,title" sort="sort asc" }
|
|
<li class="{:request()->param('type') == $vo.id ? 'on' : ''}">
|
|
<div class="tit" data-id="{$vo.id}">
|
|
<img src="/themes/website/1/zh/dongya-web/static/images/informationImg.png" alt="">
|
|
<p>{$vo.title}</p>
|
|
</div>
|
|
<div class="list">
|
|
{hcTaglib:subcategory pid="82" field="id,title" item="v1" sort="sort asc" }
|
|
<a href="javascript:;" data-id="{$v1.id}" class="{:request()->param('type') == $vo.id && request()->param('breed') == $v1.id ? 'on' : ''}">{$v1.title}</a>
|
|
{/hcTaglib:subcategory}
|
|
</div>
|
|
</li>
|
|
{/hcTaglib:subcategory}
|
|
</ul>
|
|
</div>
|
|
<div class="mobPageNav">
|
|
{hcTaglib:subcategory pid="82" field="id,title" sort="sort asc" }
|
|
<a href="javascript:;" class="{:request()->param('breed') == $vo.id ? 'on' : ''}" data-id="{$vo.id}">{$vo.title}</a>
|
|
{/hcTaglib:subcategory}
|
|
</div>
|
|
<div class="right">
|
|
<div class="tit">
|
|
{$breed_title|default=''}
|
|
</div>
|
|
<div class="content">
|
|
{hcTaglib:contentPage cid="41" module="7" name="articleList" subField="id,field" limit="10"}
|
|
<a href="{:hcUrl('detail/index',['id'=>$vo['id'],'cid'=>$vo['category_id']])}" class="list">
|
|
<div class="{:empty($vo.main_content.file.url) == false && strpos($vo.main_content.file.url,'.pdf') != false ? 'left' : '' }">
|
|
{$vo.title}
|
|
</div>
|
|
<div class="time">{$vo.publish_time|date='Y.m.d'}</div>
|
|
</a>
|
|
{/hcTaglib:contentPage}
|
|
</div>
|
|
<!-- 翻页 -->
|
|
{$articleList->render()|raw}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- footer start-->
|
|
{include file="common/footer" /}
|
|
<!-- footer end -->
|
|
{include file="common/foot" /}
|
|
<!-- 当前 -->
|
|
<script>
|
|
$('.informationBlock .w1280 > .left ul li').each(function(){
|
|
if($(this).hasClass('on')){
|
|
let thisListHeight = $(this).children('.list').children('a').length * $(this).children('.list').children('a').outerHeight(true)
|
|
$(this).children('.list').css('height',thisListHeight)
|
|
}
|
|
})
|
|
// 获取url参数
|
|
function getUrlParam(name) {
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
|
|
var r = window.location.search.substr(1).match(reg); //匹配目标参数
|
|
if (r != null) return decodeURI(r[2]); return null; //返回参数值
|
|
}
|
|
// 左侧下拉
|
|
$('.informationBlock .w1280 > .left ul li .tit').click(function(){
|
|
let thisListHeight2 = $(this).siblings('.list').children('a').length *$(this).siblings('.list').children('a').outerHeight(true)
|
|
if($(this).parent().hasClass('on')){
|
|
return
|
|
}
|
|
$(this).parent().siblings().removeClass('on')
|
|
$(this).parent().siblings().children('.list').stop().animate({'height':0})
|
|
$(this).parent().addClass('on')
|
|
$(this).siblings().stop().animate({'height':thisListHeight2})
|
|
})
|
|
// 筛选
|
|
$('.informationBlock .w1280 > .left ul li .list a').click(function(){
|
|
let thisID = $(this).data('id')
|
|
let thisParentID = $(this).parent().siblings().data('id')
|
|
window.location.href = '?breed=' + thisID + '&type=' + thisParentID
|
|
})
|
|
// 移动端筛选
|
|
let pageType = getUrlParam('type')
|
|
let pageBreed = getUrlParam('breed')
|
|
console.log(pageType,pageBreed)
|
|
$('.pageListNav .w1280 a').click(function(){
|
|
pageType = $(this).data('id')
|
|
window.location.href = '?breed=' + pageBreed + '&type=' + pageType
|
|
})
|
|
$('.informationBlock .w1280 .mobPageNav a').click(function(){
|
|
pageBreed = $(this).data('id')
|
|
window.location.href = '?breed=' + pageBreed + '&type=' + pageType
|
|
})
|
|
// 移动端子栏目定位
|
|
let pageListNav2 = $('.mobPageNav').html()
|
|
if(pageListNav){
|
|
let pageListNavOffset2 = $('.mobPageNav a.on').offset().left
|
|
$('.mobPageNav').scrollLeft(pageListNavOffset2 - $('.mobPageNav').offset().left)
|
|
}else{
|
|
pageListNav2 = 0
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|