demandDetail.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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/demandDetail.css';
  8. (function(){
  9. $(".fine").on('click', 'div.pointer', function () {
  10. var theId = $(this).children("p.demandId").html();
  11. var thetype=$(this).children("p.demandTyp").html();
  12. window.open(globalConfig.context + '/portal/technologyTrading/demandDetail?id=' + theId+'&type='+thetype );
  13. });
  14. $(".main_introduce ul").on("click","li",function(){
  15. var theId = $(this).children("div").children("p.demandId").html();
  16. var thetype=$(this).children("div").children("p.demandTyp").html();
  17. window.open(globalConfig.context + '/portal/technologyTrading/demandDetail?id=' + theId+'&type='+thetype );
  18. })
  19. //点击感兴趣
  20. var t=0;
  21. $('.basic .loves').click(function(){
  22. var theId=$(".loves input").attr("val");
  23. if($(this).find('span:first-child').hasClass('box_love')){
  24. t=$('.dem_number').text();
  25. $('.dem_number').text(parseInt(t)+1);
  26. $(this).find('span:first-child').addClass('bj_love').removeClass('box_love');
  27. $.ajax({
  28. method: "post",
  29. dataType: "json",
  30. url: globalConfig.context + "/api/user/portal/achievementInterest",
  31. data: {
  32. id:theId
  33. },
  34. success: function (data) {
  35. }
  36. });
  37. return false;
  38. }
  39. if($(this).find('span:first-child').hasClass('bj_love')){
  40. t=$('.dem_number').text();
  41. $('.dem_number').text(parseInt(t)-1)
  42. $(this).find('span:first-child').addClass('box_love').removeClass('bj_love')
  43. $.ajax({
  44. method: "post",
  45. dataType: "json",
  46. url: globalConfig.context + "/api/user/portal/achievementCancelInterest",
  47. data: {
  48. id:theId
  49. },
  50. success: function (data) {
  51. }
  52. });
  53. }
  54. })
  55. })();