$(document).ready(function () {
var certifySwiper = new Swiper('.safeCon .swiper-container', {
watchSlidesProgress: true,
slidesPerView: 'auto',
centeredSlides: true,
loop: true,
loopedSlides: 9,
autoplay: true,
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
pagination: {
el: '.swiper-pagination',
clickable: true,
},
on: {
progress: function (progress) {
for (i = 0; i < this.slides.length; i++) {
var slide = this.slides.eq(i);
var slideProgress = this.slides[i].progress;
modify = 1;
if (Math.abs(slideProgress) > 1) {
modify = (Math.abs(slideProgress) - 1) * 0.4 + 1;
}
translate = slideProgress * modify * 328 + 'px';
scale = 1 - Math.abs(slideProgress) / 9;
zIndex = 999 - Math.abs(Math.round(10 * slideProgress));
slide.transform('translateX(' + translate + ') scale(' + scale + ')');
slide.css('zIndex', zIndex);
slide.css('opacity', 1);
if (Math.abs(slideProgress) > 3) {
slide.css('opacity', 0);
}
}
},
setTransition: function (transition) {
for (var i = 0; i < this.slides.length; i++) {
var slide = this.slides.eq(i)
slide.transition(transition);
}
}
}
})
var certifySwiper = new Swiper('.safeCon1 .swiper-container', {
watchSlidesProgress: true,
slidesPerView: 'auto',
centeredSlides: true,
loop: true,
loopedSlides: 5,
autoplay: true,
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
pagination: {
el: '.swiper-pagination',
clickable: true,
},
on: {
progress: function (progress) {
for (i = 0; i < this.slides.length; i++) {
var slide = this.slides.eq(i);
var slideProgress = this.slides[i].progress;
modify = 1;
if (Math.abs(slideProgress) > 1) {
modify = (Math.abs(slideProgress) - 1) * 0.4 + 1;
}
translate = slideProgress * modify * 90 + 'px';
scale = 1 - Math.abs(slideProgress) / 5;
zIndex = 999 - Math.abs(Math.round(10 * slideProgress));
slide.transform('translateX(' + translate + ') scale(' + scale + ')');
slide.css('zIndex', zIndex);
slide.css('opacity', 1);
if (Math.abs(slideProgress) > 3) {
slide.css('opacity', 0);
}
}
},
setTransition: function (transition) {
for (var i = 0; i < this.slides.length; i++) {
var slide = this.slides.eq(i)
slide.transition(transition);
}
}
}
})
$('#myTab a:first').tab('show');
$('#myTab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
})
$('.panel-group').on('hide.bs.collapse', '.panel-collapse', function (e) {
var $this = $(this)
console.log(e)
// $this.prev().find("span").toggleClass("icon-xiangxiajiantou");
if (e.type == 'hide') {
$this.prev().find("span").css('transform', 'rotate(0deg)')
} else {
$this.prev().find("span").css('transform', 'rotate(-180deg)');
}
// if ($('.panel-collapse').hasClass('in')) {
// $this.prev().find("span").css('transform', 'rotate(-180deg)');
// } else {
// $this.prev().find("span").css('transform', 'rotate(0deg)');
// }
})
$('.panel-group').on('show.bs.collapse', '.panel-collapse', function (e) {
console.log(e)
var $this = $(this)
$this.prev().find("span").css('transform', 'rotate(-180deg)');
if (e.type == 'show') {
$this.prev().find("span").css('transform', 'rotate(-180deg)');
} else {
$this.prev().find("span").css('transform', 'rotate(0deg)')
}
})
if ($('.panel-collapse').hasClass('in')) {
console.log($('.panel-collapse').hasClass('in'))
$(this).parents('panel-group').prev().find("span").css('transform', 'rotate(-180deg)');
console.log($(this).parent().parent('.panel-group').find("span"))
} else {
$('.panel-group').prev().find("span").css('transform', 'rotate(0deg)');
}
// $('.dropdown-menu li').click(function() {
// $(this).siblings('li').removeClass('cur');
// $(this).addClass('cur');
// })
$('#example-navbar-collapse .dropdow_menu a').click(function (e) {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
console.log(target);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top - 40
}, 900);
return false;
}
}
});
$(document).off('click.bs.dropdown.data-api');
$('.top').click(function (e) {
e.preventDefault();
$("body,html").animate({
scrollTop: 0
}, 500);
});
$('.about-video').trigger('play');
//boss 招聘好了,这个打开
// getJobList();
listClick();
joinBtn();
var num = 1;
var list = [];
$('.loadmore').click(function () {
++num;
console.log(num)
if (num > 3) {
$(this).css('display', 'none')
} else {
$.ajax({
type: 'get',
url: "https://www.cestong.com/cecf/wapi/zpjob/wjd/more/job?sbid=b6f2ee03f7e80a7c1HF_3di6FVE~&page=" + num,
dataType: 'json',
async: false,
success: function (data) {
var arr = sessionStorage.getItem('jobList');
list = list.concat(JSON.parse(arr));
list = list.concat(data.zpData.jobList);
// list = list.concat(data.zpData.jobList)
if (data.code == '0') {
var myli = '';
for (var i = 0; i < list.length; i++) {
var html = list[i].postDescription.replace(/\n/g, '
');
myli += `