index.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import 'css/bootstrap.less';
  2. import 'bootstrap/dist/js/bootstrap.js';
  3. import 'css/newMenu/public.css';
  4. import 'css/newMenu/header.css'
  5. import 'css/newMenu/index.css';
  6. import 'js/public.js';
  7. (function(){
  8. "use strict";
  9. init();
  10. function init(){
  11. banner();
  12. };
  13. //轮播
  14. function banner(){
  15. $('#myCarousel').carousel({
  16. interval: 4000
  17. })
  18. };
  19. //搜索框上面栏目的选择
  20. $(".jumpType li").click(function(){
  21. $(this).addClass("active");
  22. $(this).siblings().removeClass("active");
  23. })
  24. //搜索功能
  25. $(".searchBtn").click(function(){
  26. var seachon=$(".jumpType li.active").index();
  27. var key=$('.demandSearch').val();
  28. switch(seachon){
  29. case 0:window.open(globalConfig.context + `/portal/technologyTrading/achievementList.html?name=${key}`);break;
  30. case 1:window.open(globalConfig.context + `/portal/technologyTrading/demandList.html?name=${key}`);break;
  31. case 2:window.open(globalConfig.context + `/portal/thinkTank/policyList?name=${key}`);break;
  32. case 3:window.open(globalConfig.context + `/portal/thinkTank/policyList?name=${key}`);break;
  33. default :break;
  34. }
  35. })
  36. }())