office.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. $(function(){
  2. var mySwiper = new Swiper('.js_officeLise_list', {
  3. autoplay: 8000,//可选选项,自动滑动
  4. slidesPerView : 1,
  5. slidesPerGroup : 1,
  6. pagination : '.swiper-pagination',
  7. paginationClickable :true,
  8. })
  9. setTimeout(function(){
  10. var mySwiperadv = new Swiper(".js_officeHot_list",{
  11. loop : true,
  12. autoplay: 8000,//可选选项,自动滑动
  13. slidesPerView : 'auto',
  14. slidesPerGroup : 1,
  15. pagination : '.officeHot_list_main .swiper-pagination',
  16. paginationClickable :true,
  17. onSetTranslate: function(swiper,translate){
  18. //自定义事件
  19. if(swiper.translate < 0 && swiper.realIndex > 0) {
  20. // console.log(swiper.realIndex)
  21. var TR=swiper.translate
  22. $(".js_officeHot_list ul").css({
  23. 'transform': 'translate3d('+(TR+20)+'px, 0px, 0px)'
  24. })
  25. }
  26. },
  27. });
  28. },2000)
  29. $('.js_buttomBm').on('click',function(){
  30. var _hid=$(this).attr('data-hid')
  31. $('.officeAppen').show(20);
  32. $('.officeAppen_bg').show();
  33. })
  34. $('.officeAppen_bg,.officeAppen_gb').on('click',function(){
  35. _clickHide();
  36. })
  37. function _clickHide(){
  38. $('.officeAppen').hide();
  39. $('.officeAppen_bg').hide();
  40. }
  41. //报名验证提交的调用 底下报名
  42. PublicAction.AjaxSend({CORID:'js_submitBox'/*操作ID*/});
  43. $('.submit_area .js_submitBox').on('click',function(){
  44. setTimeout(function(){
  45. var _html = $('.alert-container .alert-content').html();
  46. if(_html == '提交成功'){
  47. $('input[type="text"]').val('');
  48. _clickHide()
  49. }
  50. },500)
  51. })
  52. // 时间加1个自然月有效日期
  53. var myDate = new Date;
  54. var year = myDate.getFullYear(); //获取当前时间年份
  55. var yue = myDate.getMonth()+1;//获取当前时间月份
  56. if (yue<10) {
  57. yue= '0' + yue;
  58. }else if(yue == 13){
  59. yue = '01';
  60. };
  61. // 返回下个月有多少天数
  62. function mGetDate(yue){     
  63. var date = new Date();     
  64. var year = date.getFullYear();     
  65. var d = new Date(year,parseInt(yue), 0);
  66. return d.getDate();
  67. }
  68. var htmltime = year + '/'+ yue + '/' +'01'+'-'+ year + '/'+ yue + '/' + mGetDate(yue);
  69. $('.time_mian em').html('活动时间:'+ htmltime );
  70. })