tradingIndex.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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/tradingIndex.css';
  6. import 'js/public.js';
  7. $(function(){
  8. navTop();
  9. banner();
  10. jump();
  11. function navTop() {
  12. $(window).scroll(function(){
  13. var scrolltop=$(document).scrollTop();
  14. if(scrolltop>0){
  15. $('.topNav').addClass('navFix')
  16. }else{
  17. $('.topNav').removeClass('navFix');
  18. }
  19. });
  20. }
  21. function banner(){
  22. $('#myCarousel').carousel({
  23. interval: 4000
  24. })
  25. };
  26. //在线评估跳转
  27. function jump(){
  28. $('.trandPg span').click(function(){
  29. let loginTxt=$('.head_login')[0];
  30. if(loginTxt&&($(loginTxt).text())=='登录'){
  31. $('.head_login').click();
  32. window.location.hash='jump';
  33. return false;
  34. }else{
  35. window.location.href= globalConfig.context+'/user/account/index.html#/evaluate';
  36. }
  37. })
  38. $('.hasAchievement,.relAchievement').click(function(){
  39. let loginTxt=$('.head_login')[0];
  40. if(loginTxt&&($(loginTxt).text())=='登录'){
  41. $('.head_login').click();
  42. window.location.hash='jump';
  43. return false;
  44. }else{
  45. window.location.href= globalConfig.context+'/user/account/index.html#/achievement';
  46. }
  47. })
  48. $('.hasDemand,.relDemand').click(function(){
  49. let loginTxt=$('.head_login')[0];
  50. if(loginTxt&&($(loginTxt).text())=='登录'){
  51. $('.head_login').click();
  52. window.location.hash='jump';
  53. return false;
  54. }else{
  55. window.location.href= globalConfig.context+'/user/account/index.html#/demand';
  56. }
  57. })
  58. }
  59. })