achievementDetail.js 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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/main_banner.css';
  6. import '../../js/public.js';
  7. import '../../js/main_banner.js';
  8. import '../../css/technologyTrading/achievementDetail.css';
  9. (function(){
  10. $(".small_img img").hover(function(e){
  11. var smallsrc=$(this).attr("src");
  12. $(".big_img img").attr("src",smallsrc);
  13. })
  14. $(".fine").on('click', 'div.pointer', function () {
  15. var theId = $(this).children("p.demandId").html();
  16. var thetype=$(this).children("p.demandTyp").html();
  17. window.open(globalConfig.context + '/portal/technologyTrading/achievementDetail?id=' + theId+'&type='+thetype );
  18. });
  19. $(".main_introduce ul").on("click","li",function(){
  20. var theId = $(this).children("div").children("p.likeId").html();
  21. var thetype=$(this).children("div").children("p.likeType").html();
  22. window.open(globalConfig.context + '/portal/technologyTrading/achievementDetail?id=' + theId+'&type='+thetype );
  23. });
  24. $(".detail_btn_").click(function(){
  25. var isLogin=$("#isLogin").attr("islogin");
  26. if(isLogin=="false"){
  27. var theId = $("#Id_").attr('val');
  28. var thetype=$("#ownerType_").attr('typ');
  29. window.open(globalConfig.context + '/portal/technologyTrading/achievementOrder?id=' + theId+'&type='+thetype );
  30. }else{
  31. $(".head_login").click();
  32. }
  33. });
  34. //点击感兴趣
  35. var t=0;
  36. $('.basic .loves').click(function(){
  37. var theId=$("#demand_id").attr("val");
  38. var islogin=$("#isLogin").attr("islogin");
  39. if(islogin=="true"){
  40. $(".head_login").click();
  41. }
  42. if($(this).find('span:first-child').hasClass('box_love')&&islogin=="false"){
  43. t=$('.dem_number').text();
  44. $('.dem_number').text(parseInt(t)+1);
  45. $(this).find('span:first-child').addClass('bj_love').removeClass('box_love');
  46. $.ajax({
  47. method: "post",
  48. dataType: "json",
  49. url: globalConfig.context + "/api/user/portal/achievementInterest",
  50. data: {
  51. id:theId
  52. },
  53. success: function (data) {
  54. }
  55. });
  56. return false;
  57. }
  58. if($(this).find('span:first-child').hasClass('bj_love')&&islogin=="false"){
  59. t=$('.dem_number').text();
  60. $('.dem_number').text(parseInt(t)-1)
  61. $(this).find('span:first-child').addClass('box_love').removeClass('bj_love')
  62. $.ajax({
  63. method: "post",
  64. dataType: "json",
  65. url: globalConfig.context + "/api/user/portal/demandCancelInterest",
  66. data: {
  67. id:theId
  68. },
  69. success: function (data) {
  70. }
  71. });
  72. }
  73. })
  74. $("#purchase").click(function(){
  75. var isLogin=$("#isLogin").attr("islogin");
  76. var theId = $("#Id_").attr('val');
  77. var thetype=$("#ownerType_").attr('typ');
  78. if(isLogin=="false"){
  79. window.open(globalConfig.context + '/portal/technologyTrading/achievementOrder?id=' + theId+'&type='+thetype );
  80. }else{
  81. $(".head_login").click();
  82. }
  83. });
  84. })();