作者 anyv
1 个管道 的构建 通过 耗费 0 秒

s

... ... @@ -149,120 +149,117 @@
});
}
}*/
$(function(){
$('.pro_btn').click(function(){
$('.pro_right_txt').removeClass('pro_height');
})
$(document).ready(function(){
$('.ce1'+{$category}).trigger('click');
$('.ce1'+{$category}).children('h2').css({color:"red"});
$('.ce'+{$category}).parent().parent().prev().trigger('click');
$('.ce'+{$category}).children('h3').css({color:"red"});
$('.pro_btn').click(function(){
$('.pro_right_txt').removeClass('pro_height');
})
//点击产品中心
function chanpin(id){
$(document).ready(function(){
$('.ce1_title').children('h2').css({color:""});
$('.ce1_2_Li_title').children('h3').css({color:""});
$('.ce1'+{$category}).trigger('click');
$('.ce1'+{$category}).children('h2').css({color:"red"});
$('.ce'+{$category}).parent().parent().prev().trigger('click');
$('.ce'+{$category}).children('h3').css({color:"red"});
})
$.post("{:url('Product/chanpins')}", {:}, function(data) {
shuju = JSON.parse(data);
$('.biaoti').text(shuju.post_title);
$('.zhaiyao').text(shuju.post_excerpt);
$('.pro_right_txt').html(shuju.post_content);
});
//点击产品中心
function chanpin(id){
}
$('.ce1_title').children('h2').css({color:""});
$('.ce1_2_Li_title').children('h3').css({color:""});
$.post("{:url('Product/chanpins')}", {:}, function(data) {
shuju = JSON.parse(data);
$('.biaoti').text(shuju.post_title);
$('.zhaiyao').text(shuju.post_excerpt);
$('.pro_right_txt').html(shuju.post_content);
});
}
//点击查询单个文章
function neiro(id){
$('.ce1'+{$category}).children('h2').css({color:""});
$('.ce1_2_Li_title').children('h3').css({color:""});
$('.ce'+id).children('h3').css({color:"red"});
$.post("{:url('Product/danwz')}", {id:id}, function(data) {
shuju = JSON.parse(data);
$('.biaoti').text(shuju.post_title);
$('.zhaiyao').text(shuju.post_excerpt);
$('.pro_right_txt').html(shuju.post_content);
/* $('.pro_btn').remove();
$('.pro_right_txt').after("<div class='pro_btn'>显示更多</div>");*/
$('.aside_son').remove();
//点击查询单个文章
function neiro(id){
$('.ce1'+{$category}).children('h2').css({color:""});
$('.ce1_2_Li_title').children('h3').css({color:""});
$('.ce'+id).children('h3').css({color:"red"});
$.post("{:url('Product/commps')}", {id:id}, function(data) {
coa = JSON.parse(data);
for (var i = 0; i <coa.length; i++) {
if(coa[i].fenlei == 1){
$('.aside').append("<a href='{:url('Product/commp')}?id="+coa[i].id+"' class='aside_son'><div class='aside_1'><img src='__TMPL__/public/assets/images/aicon13.png'><p>说明书</p></div></a>");
}
if(coa[i].fenlei == 2){
$('.aside').append("<a href='{:url('Product/commp')}?id="+coa[i].id+"' class='aside_son'><div class='aside_1'><img src='__TMPL__/public/assets/images/aicon14.png'><p>文献</p></div></a>");
}
if(coa[i].fenlei == 3){
$('.aside').append("<a href='{:url('Product/commp')}?id="+coa[i].id+"' class='aside_son'><div class='aside_1'><img src='__TMPL__/public/assets/images/aicon15.png'><p>COA</p></div></a>");
}
$.post("{:url('Product/danwz')}", {id:id}, function(data) {
shuju = JSON.parse(data);
$('.biaoti').text(shuju.post_title);
$('.zhaiyao').text(shuju.post_excerpt);
$('.pro_right_txt').html(shuju.post_content);
}
});
/* $('.pro_btn').remove();
$('.pro_right_txt').after("<div class='pro_btn'>显示更多</div>");*/
$('.aside_son').remove();
});
$.post("{:url('Product/commps')}", {id:id}, function(data) {
coa = JSON.parse(data);
for (var i = 0; i <coa.length; i++) {
if(coa[i].fenlei == 1){
$('.aside').append("<a href='{:url('Product/commp')}?id="+coa[i].id+"' class='aside_son'><div class='aside_1'><img src='__TMPL__/public/assets/images/aicon13.png'><p>说明书</p></div></a>");
}
if(coa[i].fenlei == 2){
$('.aside').append("<a href='{:url('Product/commp')}?id="+coa[i].id+"' class='aside_son'><div class='aside_1'><img src='__TMPL__/public/assets/images/aicon14.png'><p>文献</p></div></a>");
}
if(coa[i].fenlei == 3){
$('.aside').append("<a href='{:url('Product/commp')}?id="+coa[i].id+"' class='aside_son'><div class='aside_1'><img src='__TMPL__/public/assets/images/aicon15.png'><p>COA</p></div></a>");
}
}
});
}
});
//跳转到详细页面
function tiaozhuan(id){
window.location.href = "{:url('Product/details')}?id="+id;
}
}
// 头部下拉
$('.header2_box>ul>li').each(function () {
$(this).mouseover(function () {
$(this).children('.header2_box2').show();
}).mouseout(function () {
$(this).children('.header2_box2').hide();
})
});
//左侧列表下拉
$('.ce1_title').each(function () {
$(this).click(function () {
if($(this).children('img').attr('src') == "__TMPL__/public/assets/images/aicon09.png"){
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon10.png')
$(this).next('.ce1_2').slideToggle();
}else {
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon09.png');
$(this).next('.ce1_2').slideToggle();
}
})
});
$('.ce1_2_Li_title').each(function () {
$(this).click(function () {
if($(this).children('img').attr('src') == "__TMPL__/public/assets/images/aicon09.png"){
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon10.png')
$(this).next('.ce1_3').slideToggle();
}else {
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon09.png');
$(this).next('.ce1_3').slideToggle();
}
})
})
$('.cel_3_Li').each(function () {
$(this).click(function () {
$(this).addClass('cel_3_Li_act').siblings().removeClass('cel_3_Li_act');
})
})
//跳转到详细页面
function tiaozhuan(id){
window.location.href = "{:url('Product/details')}?id="+id;
}
// 头部下拉
$('.header2_box>ul>li').each(function () {
$(this).mouseover(function () {
$(this).children('.header2_box2').show();
console.log(11)
}).mouseout(function () {
$(this).children('.header2_box2').hide();
})
});
//左侧列表下拉
$('.ce1_title').each(function () {
$(this).click(function () {
if($(this).children('img').attr('src') == "__TMPL__/public/assets/images/aicon09.png"){
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon10.png')
$(this).next('.ce1_2').slideToggle();
}else {
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon09.png');
$(this).next('.ce1_2').slideToggle();
}
})
});
$('.ce1_2_Li_title').each(function () {
$(this).click(function () {
if($(this).children('img').attr('src') == "__TMPL__/public/assets/images/aicon09.png"){
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon10.png')
$(this).next('.ce1_3').slideToggle();
}else {
$(this).children('img').attr('src','__TMPL__/public/assets/images/aicon09.png');
$(this).next('.ce1_3').slideToggle();
}
})
})
$('.cel_3_Li').each(function () {
$(this).click(function () {
$(this).addClass('cel_3_Li_act').siblings().removeClass('cel_3_Li_act');
})
})
</script>
</body>
</html>
\ No newline at end of file
... ...