list.html 10.9 KB
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>产品中心</title>

    <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
    <style>
        .ce1_2,.ce1_3{
            display: none;
        }
    </style>
</head>
<body class="pro_box">
    <div class="aside">
        <!-- <a href="{:url('Product/commp',array('id'=>38))}">
            <div class="aside_1">
                <img src="__TMPL__/public/assets/images/aicon13.png" alt="">
                <p>说明书</p>
            </div>
        </a>
        <a href="{:url('Product/commp',array('id'=>39))}">
            <div class="aside_1">
                <img src="__TMPL__/public/assets/images/aicon14.png" alt="">
                <p>文献</p>
            </div>
        </a>
        <a href="{:url('Product/commp',array('id'=>40))}">
            <div class="aside_1">
                <img src="__TMPL__/public/assets/images/aicon15.png" alt="">
                <p>COA</p>
            </div>
        </a> -->
        <volist name="cos_data" id="vo">
          <a href="{:url('Product/commp',array('id'=>$vo.id))}" class="aside_son">
              <div class="aside_1">


                  <if condition="$vo.fenlei eq 1">
                      <img src="__TMPL__/public/assets/images/aicon13.png" alt="">
                  </if>
                  <if condition="$vo.fenlei eq 2">
                      <img src="__TMPL__/public/assets/images/aicon14.png" alt="">
                  </if>
                  <if condition="$vo.fenlei eq 3">
                      <img src="__TMPL__/public/assets/images/aicon15.png" alt="">
                  </if>

                  <if condition="$vo.fenlei eq 1">
                      <p>说明书</p>
                  </if>
                  <if condition="$vo.fenlei eq 2">
                      <p>文献</p>
                  </if>
                  <if condition="$vo.fenlei eq 3">
                      <p>COA</p>
                  </if>
              </div>
          </a>
        </volist>
    </div>
    <include file="public@nav"/>
    <div class="product_main">
        <div class="prp_tit">
            <a href="">首页</a>
            <img src="__TMPL__/public/assets/images/aicon09.png" alt="">
            <a href="">产品中心</a>
            <!--<img src="img/aicon09.png" alt="">-->
            <!--<a href="">诊断产品</a>-->
        </div>
        <div class="product_mainBox">

            <div class="pro_left">
                <!-- <h1 class="proTitle" onclick="chanpin()" >产品中心</h1> -->







            <volist name="jdata" id="vo">
                <div class="ce1">
                    <div class="ce1_title ce1{$vo.id}" onclick="erji({$vo.id})" >
                        <img src="__TMPL__/public/assets/images/aicon09.png" alt="">
                        <h2>{$vo.name}</h2>
                    </div>
                    <div class="ce1_2" style="margin-top: 28px;">
                        <div class="ce1_2_Ul">
                            <volist name="vo.son" id="v">
                                <div class="ce1_2_Li_title ce{$v.id}" onclick="neiro({$v.id})">

                                    <h3>{$v.name}</h3>
                                </div>

                              <!--   <div class="ce1_3 tj{$v.id}">


                              </div> -->

                            </volist>
                        </div>


                    </div>
                </div>
            </volist>


            </div>
            <div class="pro_right">
                <div class="pro_right_tit">
                    <!-- <p class="biaoti">{$zuixin.post_title}</p> -->
                    <p class="zhaiyao"> {$zuixin.post_excerpt}</p>
                </div>

                <div class="pro_right_txt pro_height">
             {$zuixin.post_content}
                </div>

            </div>
        </div>
    </div>

    <include file="public@footer" />


    <script type="text/javascript" src="__TMPL__/public/assets/js/jquery.js"></script>
    <script>

        //点击查询类下的所有文章
       /*     function dianji(id){

               cunza = $('div').hasClass('cel'+id);

               if(cunza){
                    $('.cel'+id).remove();
               }else{
                     $.post("{:url('Product/wenzhang')}", {id:id}, function(data) {
                                    $shuju = JSON.parse(data);
                                    for (var i = 0; i < $shuju.length; i++) {
                                        $('.tj'+id).append("<div class='cel_3_Li cel"+id+"' onclick='neiro("+$shuju[i].id+")'><h4>"+$shuju[i].post_title+"</h4><img src='__TMPL__/public/assets/images/aicon03.png' alt=''></div>");
                                    }
                                });
               }
            }*/

            $('.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"});

            })*/


            $(function(){

                $('.ce1'+{$category}).children('h2').css({color:"red"});
                //$('.ce1'+{$category}).children('img').attr('src',"__TMPL__/public/assets/images/aicon10.png");
                $('.ce'+{$category}).parent().parent().prev().next('.ce1_2').slideDown();
                $('.ce'+{$category}).parent().parent().prev().children('img').attr('src',"__TMPL__/public/assets/images/aicon10.png");
                $('.ce'+{$category}).children('h3').css({color:"red"});
            })

            //点击产品中心
            function chanpin(){

                $('.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 erji(id){

                $('.ce1_title').children('h2').css({color:""});
                $('.ce1_2_Li_title').children('h3').css({color:""});
                $('.ce1'+id).children('h2').css({color:"red"});
                $.post("{:url('Product/erji')}",{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);
                });

            }



            //点击查询单个文章
            function neiro(id){
               //$('.ce1'+{$category}).children('h2').css({color:""});
                $('.ce1_title').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();

                    $.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();
                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>