projectDetails.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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/service/projectDetails.css';
  8. (function(){
  9. $(".fine").on('click', 'div.pointer', function () {
  10. var theId = $(this).children("input").attr("isinterester");
  11. window.open(globalConfig.context + '/portal/service/projectDetails?id=' + theId );
  12. });
  13. //点击感兴趣
  14. var t=0;
  15. $('.guanzhu .loves').click(function(){
  16. var theId=$("#demand_id").attr("value");
  17. var islogin=$("#isLogin").attr("islogin");
  18. var theIn=$("#isInterester").attr("isInterester");
  19. if(islogin=="true"){
  20. $(".head_login").click();
  21. }
  22. if($(this).find('span:first-child').hasClass('box_love')&&islogin=="false"){
  23. t=$('.dem_number').text();
  24. $('.dem_number').text(parseInt(t)+1);
  25. $(this).find('span:first-child').addClass('bj_love').removeClass('box_love');
  26. $.ajax({
  27. method: "get",
  28. dataType: "json",
  29. url: globalConfig.context + "/portal/app/services/interest",
  30. data: {
  31. id:theId,
  32. interest:theIn
  33. },
  34. success: function (data) {
  35. $("#isInterester").attr("isInterester","1")
  36. }
  37. });
  38. return false;
  39. }
  40. if($(this).find('span:first-child').hasClass('bj_love')&&islogin=="false"){
  41. t=$('.dem_number').text();
  42. $('.dem_number').text(parseInt(t)-1)
  43. $(this).find('span:first-child').addClass('box_love').removeClass('bj_love')
  44. $.ajax({
  45. method: "get",
  46. dataType: "json",
  47. url: globalConfig.context + "/portal/app/services/interest",
  48. data: {
  49. id:theId,
  50. interest:theIn
  51. },
  52. success: function (data) {
  53. $("#isInterester").attr("isInterester","0")
  54. }
  55. });
  56. }
  57. })
  58. //点击服务
  59. $(".fuwu").click(function(){
  60. var islogin=$("#isLogin").attr("islogin");
  61. var theId=$("#demand_id").attr("value");
  62. if(islogin=="true"){
  63. $(".head_login").click();
  64. }else{
  65. window.open(globalConfig.context + '/portal/service/purpose?commodityId=' + theId+'&commodityType='+"0" );
  66. }
  67. })
  68. //点击电话
  69. $(".dianhua").click(function(){
  70. $(".ret_top>li:nth-child(2)>a").click();
  71. })
  72. })()