csrftoken.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /**
  2. * Created by xiaofeng on 2017/8/9.
  3. */
  4. csrfToken = $('meta[name=csrf-token]').prop('content');
  5. function ReturnInfo(info) {
  6. if(info != null){
  7. var strmsg = '';
  8. if(typeof info == 'string'){
  9. return info;
  10. }
  11. $.each(info,function (kk,vv) {
  12. strmsg +=vv[0]+'<br>';
  13. })
  14. if(typeof strmsg == 'string'){
  15. return strmsg;
  16. }
  17. }
  18. }
  19. var feng_cityTel;
  20. //电话图标
  21. $('body').on('click','.y_call',function(){
  22. //获取楼盘首页 电话号码
  23. var y_call=$('.y_housetel span').text();
  24. if (typeof y_call === 'string' && y_call != '') {
  25. return window.location.href = 'tel:'+y_call;
  26. }
  27. $.ajax({
  28. url:'/index/telrand',
  29. dataType:"json",
  30. type:'POST',
  31. data:{city:feng_cityTel},
  32. success:function(data){
  33. if(data.code == 200){
  34. return window.location.href = 'tel:'+data.data.tel;
  35. }
  36. },
  37. error:function(){
  38. }
  39. });
  40. })
  41. // $(function(){
  42. // // ������һ��������
  43. // $('.y_lpleft').on('click',function(){
  44. // history.back(-1);
  45. // })
  46. //
  47. // // 解决百度APP底部拔打电话
  48. // var ido,idi;
  49. //
  50. // var _html ='<div class="y_puicfoot">';
  51. // _html +='<div class="y_puicfoot_main c">';
  52. // _html +='<div class="y_centxq y_centxq2"><a href="javascript:;" rel="nofollow" onclick="'+"$53click();"+'">在线咨询</a></div>';
  53. // _html +='<div class="y_centxq"><a href="/public/findroom">帮您找房</a></div>';
  54. // _html +='<div class="y_call"><a href="javascript:;"><img src="/image/ico_callfoot.gif" alt=""></a></div></div>';
  55. // _html +='</div>';
  56. //
  57. //
  58. // idi = setInterval(function(){
  59. // ido = $('.y_puicfoot').html();
  60. // // 公共底部,判断页面是否存在,不存在添加
  61. // if(!ido){
  62. // $('body').append(_html);
  63. // // clearTimeout(idi);
  64. // }
  65. // },1000);
  66. //
  67. //
  68. //
  69. //
  70. // })