123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377 |
- $(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, '<br>');
- myli += `<li class='list-group-item'>
- <div>
- <span class="salary">查看详情</span>
- <h4>${list[i].jobName}</h4>
- <div class="info-labels">
- <span class="com-location">${list[i].locationName}</span>
- <span class="com-years">${list[i].experienceName}</span>
- <span class="com-education">${list[i].degreeName}</span>
- </div>
- <div class="info_desc">
- <div>${html}</div>
- <div><button class="btn btn-primary btn-lg join_btn" data-toggle="modal" data-target="#join">立即申请</button></div>
- </div>
- </div>
- </li>`
- }
- $('.list-group').html(myli);
- listClick();
- joinBtn();
- } else {
- layer.msg(data.message);
- }
- },
- error: function () {},
- });
- }
- })
- // setTimeout(function () {
- // $("body,html").animate({
- // scrollTop: 860
- // }, 1000);
- // }, 3500)
- $(window).scroll(function () {
- if ($(document).scrollTop() < 880) {
- $('.img1').show();
- $('.img2').hide();
- $('.header.active').css('background', '#000')
- $('.header .header_link .header_title').css("color", "#fff")
- $('.header .header_link.active .header_title').css("color", "#0052D9")
- } else {
- $('.img1').hide();
- $('.img2').show();
- $('.header.active').css('background', '#fff')
- $('.header .header_link .header_title').css("color", "#434343")
- $('.header .header_link.active .header_title').css("color", "#0052D9")
- }
- });
- // $(window).scroll(function () {
- // if ($(document).scrollTop() < 20) {
- // $('.about_desc_list_wrap').css('display', 'none');
- // } else {
- // $('.about_desc_list_wrap').css('display', 'block');
- // }
- // });
- // var video = document.querySelector('video');
- // video.addEventListener('canplay', function () {
- // this.width = this.videoWidth;
- // this.height = this.videoHeight;
- // console.log(this.videoWidth, this.videoHeight)
- // })
- // var videoH = $('.about-video').height() + 60;
- // $('.head_bg').css("height", videoH + "px");
- // console.log($('.head_bg').height(), 'div高度')
- // $(window).resize(function () {
- // var h = $('.about-video').height();
- // console.log(h, '视频高度')
- // $('.head_bg').css("height", h + "px");
- // console.log($('.head_bg').height(), '变化中div高度')
- // var w = $(window).width();
- // console.log(w, '')
- // });
- var h = $(window).height();
- $('.head_bg').css("height", h + "px");
- $(window).resize(function () {
- var vh = $(window).height();
- $('.head_bg').css("height", vh + "px");
- // var h = $('.about-video').height();
- // console.log(h, '视频高度')
- // $('.head_bg').css("height", h + "px");
- // console.log($('.head_bg').height(), '变化中div高度')
- });
- })
- // http://39.106.74.84:8045
- // 获取职位列表
- function getJobList() {
- $.ajax({
- type: 'get',
- url: "https://www.cestong.com/cecf/wapi/zpjob/wjd/boss/b6f2ee03f7e80a7c1HF_3di6FVE~?sbid=b6f2ee03f7e80a7c1HF_3di6FVE~&aid=",
- dataType: 'json',
- async: false,
- success: function (data) {
- var list = [];
- list = list.concat(data.zpData.data.otherJobList)
- console.log(list, 'aaaa')
- if (data.code == '0') {
- var myli = '';
- for (var i = 0; i < list.length; i++) {
- var html = list[i].postDescription.replace(/\n/g, '<br>');
- myli += `<li class='list-group-item'>
- <div>
- <span class="salary">查看详情</span>
- <h4>${list[i].jobName}</h4>
- <div class="info-labels">
- <span class="com-location">${list[i].locationName}</span>
- <span class="com-years">${list[i].experienceName}</span>
- <span class="com-education">${list[i].degreeName}</span>
- </div>
- <div class="info_desc">
- <div>${html}</div>
- <div><button class="btn btn-primary btn-lg join_btn" data-toggle="modal" data-target="#join">立即申请</button></div>
- </div>
- </div>
- </li>`
- }
- $('.list-group').html(myli);
- list = JSON.stringify(list)
- sessionStorage.setItem('jobList', list)
- } else {
- layer.msg(data.message);
- }
- },
- error: function () {},
- });
- // $('#join').on('shown.bs.modal', function () {
- // var $this = $(this);
- // var $modal_dialog = $this.find('.modal-dialog');
- // var m_top = ($(window).height() - $modal_dialog.height()) / 2;
- // $modal_dialog.css({
- // 'margin': m_top + 'px auto'
- // });
- // });
- }
- function listClick() {
- $(".list-group-item").on("click", function (event) {
- // event = event || window.event;
- // if (event && event.stopPropagation) {
- // event.stopPropagation();
- // } else {
- // event.cancelBubble = true;
- // }
- $(".list-group-item").find('.info_desc').slideUp();
- if ($(this).find('.info_desc').css('display') == 'none') {
- $(this).find('.info_desc').slideDown()
- } else {
- $(this).find('.info_desc').slideUp()
- }
- });
- }
- function joinBtn() {
- $('.join_btn').click(function (event) {
- console.log(this)
- event = event || window.event;
- if (event && event.stopPropagation) {
- event.stopPropagation();
- } else {
- event.cancelBubble = true;
- }
- $('#join').modal('show')
- });
- }
|