index.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // 旅居城市 插件
  2. var mySwiper = new Swiper('.js_autumnztList_main',{
  3. loop : true,
  4. slidesPerView: 1.2,
  5. slidesPerGroup :1,
  6. autoplay : 5000,
  7. spaceBetween : 20,
  8. pagination : '.js_autumnztList .swiper-pagination',
  9. })
  10. var mySwiper = new Swiper('.js_autumnztList_main2',{
  11. loop : true,
  12. slidesPerView: 1.2,
  13. slidesPerGroup :1,
  14. autoplay : 5000,
  15. spaceBetween : 20,
  16. pagination : '.js_autumnztList2 .swiper-pagination',
  17. })
  18. $('body').on('click','.js_buttomBm',function(){
  19. var _bmHid=$(this).attr('data-hid');
  20. var _bmSource=$(this).attr('data-source');
  21. $('.bmSina').find('input[name="hid"]').val(_bmHid)
  22. $('.bmSina').find('input[name="source"]').val(_bmSource)
  23. $('.bmSina,.bmSina_bg').show();
  24. })
  25. $('.bmSina_bg,.bmSina_gb a').on('click',function(){
  26. $('.bmSina,.bmSina_bg').hide();
  27. })
  28. PublicAction.AjaxSend(
  29. {
  30. CORID:'js_buttom_tj',
  31. }
  32. );
  33. $('.submit_area .js_buttom_tj').on('click',function(){
  34. setTimeout(function(){
  35. var _html = $('.alert-container .alert-content').html();
  36. if(_html == '提交成功'){
  37. $('.bmSina_bg').click();
  38. $('input[type="text"]').val('')
  39. }
  40. },1000)
  41. })
  42. // 处理资讯详情页面的底部一个月的有效日期
  43. var myDate = new Date;
  44. var year = myDate.getFullYear(); //获取当前时间年份
  45. var yue = myDate.getMonth()+1;//获取当前时间月份
  46. if (yue<10) {
  47. yue= '0' + yue;
  48. }else if(yue == 13){
  49. yue = '01';
  50. };
  51. // 返回下个月有多少天数
  52. function mGetDate(yue){     
  53. var date = new Date();     
  54. var year = date.getFullYear();     
  55. var d = new Date(year,parseInt(yue), 0);
  56. return d.getDate();
  57. }
  58. var whtmltimes = year + '.'+ yue + '.' + mGetDate(yue);
  59. $('.js_timeBox').html('有效期至:'+whtmltimes);