function GetQueryString(name)
{
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]); return null;
}

<!--    头部导航点击事件-->
$(".navblock").mouseenter(function(){


    $(this).addClass("navblockactive");
    $(this).siblings(".navblock").removeClass("navblockactive");
    $(this).parents(".navbox").siblings(".navbox").children(".navblock").removeClass("navblockactive");
    let id=$(this).attr("data-id");

    if(id!=1){
        $(this).children(".navleftitembox").css("display","block");
        $(this).siblings(".navblock").children(".navleftitembox").css("display","none")
        $(this).parents(".navbox").siblings(".navbox").children(".navblock").children(".navleftitembox").css("display","none");
    }


});
$(".navblock").mouseleave(function(){
    $(this).children(".navleftitembox").css("display","none");
})

$(".navblock").click(function(){


    window.event.stopPropagation()


    $(this).addClass("navblockactive");
    $(this).siblings(".navblock").removeClass("navblockactive");
    $(this).parents(".navbox").siblings(".navbox").children(".navblock").removeClass("navblockactive");
    let id=$(this).attr("data-id");
    console.log(id)
    if(id!=1){
        $(this).children(".navleftitembox").css("display","block");
        $(this).siblings(".navblock").children(".navleftitembox").css("display","none")
        $(this).parents(".navbox").siblings(".navbox").children(".navblock").children(".navleftitembox").css("display","none");
    }

    if(id==1){
        window.location.href="index.html?id="+1
    }else{
        $(".yinxiang").show();
        $(".box").hide();
        if(id==2){

            window.location.href="tongfuyinxiang.html?typeid="+1

        }else if(id==3){

            window.location.href='tongfuchanye.html?typeid='+2

        }else if(id==4){

            window.location.href="tongfurongyu.html?typeid="+3

        }else if(id==5){
            window.location.href='news.html?typeid='+4

        }else if(id==6){

            window.location.href='connectus.html?typeid='+5
        }else if(id==7){
            window.location.href='https://tongfushipin.tmall.com/?spm=a1z10.3-b-s.1997427721.d4918089.181c21b4kVhsHP'
        }
    }
});
//头部导航一级跳转

$(".navleftitemboxitem").mouseenter(function(){

    $(this).addClass("navleftitemnameactive");
    $(this).siblings(".navleftitemboxitem").removeClass("navleftitemnameactive");
    $(this).children(".navboxitem").css("display","block");
    $(this).siblings(".navleftitemboxitem").children(".navboxitem").css("display","none");

});

$(".navleftitemboxitem").click(function(){

    window.event.stopPropagation()

    $(this).addClass("navleftitemnameactive");
    $(this).siblings(".navleftitemboxitem").removeClass("navleftitemnameactive");
    $(this).children(".navboxitem").css("display","block");
    $(this).siblings(".navleftitemboxitem").children(".navboxitem").css("display","none");
    var id=$(this).attr("data-id");
    var type=$(this).attr("data-type");
    console.log(id);
    console.log(type)

    if(type==1){
        if(id==1){
            window.location.href='tongfurongyu.html?id='+1
        }else if(id==2){
            window.location.href='tongfurongyu.html?id='+2
        }
    }else if(type==2){

        var len=$(".newsdongtai")

        if(id==1){
            window.location.href='news.html?id='+1
        }else if(id==2){
            window.location.href='news.html?id='+2
        }else if(id==3){
            window.location.href='news.html?id='+3
        }
    }else if(type==3){
        var len=$(".connectour");

        if(id==1){
            window.location.href='connectus.html?id='+1

        }else if(id==2){
            window.location.href='connectus.html?id='+2

        }else if(id==3){
            window.location.href='connectus.html?id='+3
        }
    }else if(type==4){

        console.log('同福印象')
        if(id==1){
           window.location.href='tongfuyinxiang.html?id='+1
        }else if(id==2){
            window.location.href='tongfuyinxiang.html?id='+2
        }else if(id==3){
            window.location.href='tongfuyinxiang.html?id='+3
        }
    }else if(type==5){
        if(id==1){
           window.location.href='tongfuchanye.html?id='+1

        }else if(id==2){
            window.location.href='tongfuchanye.html?id='+2
        }else if(id==3){
            window.location.href='tongfuchanye.html?id='+3
        }else if(id==4){
            window.location.href='tongfuchanye.html?id='+4
        }
    }
});



$(".navboxitemitem").mouseenter(function(){
    window.event.stopPropagation()
    console.log(4289895)
    $(this).addClass("navboxitemitemactive");
    $(this).siblings('.navboxitemitem').removeClass("navboxitemitemactive")
})

//头部导航二级跳转

$(".navboxitemitem").click(function(){
    console.log(78224487)
    window.event.stopPropagation()
    $(this).addClass("navboxitemitemactive");
    $(this).siblings(".navboxitemitem").removeClass("navboxitemitemactive");
    let id=$(this).attr("data-id");
    let type=$(this).attr("data-type");
    console.log(type);
    console.log(id)
    if(type==1){
        if(id==1){
            window.location.href='tongfuyinxiang.html?type='+1
        }else{
            window.location.href='tongfuyinxiang.html?type='+2
        }
    }

    else if(type==2) {

        if (id == 1) {

            window.location.href = 'tongfuyinxiang.html?wentype=' + 1
        } else if (id == 2) {
            window.location.href = 'tongfuyinxiang.html?wentype=' + 2


        } else if (id == 3) {
            window.location.href = 'tongfuyinxiang.html?wentype=' + 3

        } else if (id == 4) {
            window.location.href = 'tongfuyinxiang.html?wentype=' + 4

        }



    }else if(type==3){


        if(id==1){
            window.location.href='tongfuyinxiang.html?kejitype='+1


        }else if(id==2){
            window.location.href='tongfuyinxiang.html?kejitype='+2


        }else if(id==3){
            window.location.href='tongfuyinxiang.html?kejitype='+3

        }else if(id==4){
            window.location.href='tongfuyinxiang.html?kejitype='+4

        }else if(id==5){
            window.location.href='tongfuyinxiang.html?kejitype='+5

        }
    }

       else if(type==4){
        if(id==1){

            window.location.href='tongfuchanye.html?chantype='+4+'&chanid='+1
        }else if(id==2){
            window.location.href='tongfuchanye.html?chantype='+4+'&chanid='+2
        }else if(id==3){
            window.location.href='tongfuchanye.html?chantype='+4+'&chanid='+3
        }else if(id==4){
            window.location.href='tongfuchanye.html?chantype='+4+'&chanid='+4
        }else if(id==5){
            window.location.href='tongfuchanye.html?chantype='+4+'&chanid='+5
        }else if(id==6){
            window.location.href='tongfuchanye.html?chantype='+4+'&chanid='+6
        }

    }else if(type==5){
        if(id==1){
            window.location.href='tongfuchanye.html?chantype='+5+'&chanid='+1
        }else if(id==2){
            window.location.href='tongfuchanye.html?chantype='+5+'&chanid='+2

        }else if(id==3){
            window.location.href='tongfuchanye.html?chantype='+5+'&chanid='+3
        }
    }

    else if(type==6){
        if(id==1){
            window.location.href='tongfuchanye.html?chantype='+6+'&chanid='+1
        }else if(id==2){
            window.location.href='tongfuchanye.html?chantype='+6+'&chanid='+2
        }else if(id==3){
            window.location.href='tongfuchanye.html?chantype='+6+'&chanid='+3
        }else if(id==4){
            window.location.href='tongfuchanye.html?chantype='+6+'&chanid='+4
        }
    }else if(type=7) {



        if (id == 1) {
            window.location.href = 'tongfuchanye.html?chantype=' + 7 + '&chanid=' + 1

        } else if (id == 2) {
            window.location.href = 'tongfuchanye.html?chantype=' + 7 + '&chanid=' + 2
        } else if (id == 3) {
            window.location.href = 'tongfuchanye.html?chantype=' + 7 + '&chanid=' + 3

        }
    }




});