import 'css/bootstrap.less'; import 'bootstrap/dist/js/bootstrap.js'; import 'css/newMenu/public.css'; import 'css/newMenu/header.css' import 'css/newMenu/index.css'; import 'css/inded.css'; //import 'js/banner.js'; import 'js/public.js'; (function(){ "use strict"; init(); function init(){ banner(); }; //轮播 navTop(); function navTop() { $(window).scroll(function(){ var scrolltop=$(document).scrollTop(); if(scrolltop>0){ $('.topNav').addClass('navFix') }else{ $('.topNav').removeClass('navFix'); } }); } function banner(){ $('#myCarousel').carousel({ interval: 4000 }) }; //搜索框上面栏目的选择 $(".jumpType li").click(function(){ $(this).addClass("active"); $(this).siblings().removeClass("active"); }) //搜索功能 $(".searchImg").click(function(){ //var seachon=$(".jumpType li.active").index(); var key=$('.demandSearch').val(); sessionStorage.setItem("name",key); window.open(globalConfig.context + `/portal/search.html`); // switch(seachon){ // case 0:window.open(globalConfig.context + `/portal/technologyTrading/achievementList.html?name=${key}`);break; // case 1:window.open(globalConfig.context + `/portal/technologyTrading/demandList.html?name=${key}`);break; // case 2:window.open(globalConfig.context + `/portal/service/patentList?name=${key}`);break; // case 3:window.open(globalConfig.context + `/portal/thinkTank/policyList?name=${key}`);break; // case 4:window.open(globalConfig.context + `/portal/service/serviceList?name=${key}`);break; // default :break; // } }) function task(){ if($(".brands>div>img:nth-child(1)").hasClass("active")){ $(".brands>div>img:nth-child(3)").css("opacity","0"); $(".brands>div>img").removeClass("bni").removeClass("ani").removeClass("active"); $(".brands>div>img:nth-child(2)").addClass("ani").addClass("active"); }else if($(".brands>div>img:nth-child(2)").hasClass("active")){ $(".brands>div>img:nth-child(1)").css("opacity","0"); $(".brands>div>img").removeClass("bni").removeClass("ani").removeClass("active"); $(".brands>div>img:nth-child(3)").addClass("ani").addClass("active"); }else if($(".brands>div>img:nth-child(3)").hasClass("active")){ $(".brands>div>img:nth-child(2)").css("opacity","0"); $(".brands>div>img").removeClass("bni").removeClass("ani").removeClass("active"); $(".brands>div>img:nth-child(1)").addClass("ani").addClass("active"); } } setInterval(task,4000); }())