achievementDetail.js 3.3 KB

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