var mySwiper = new Swiper('.swiper-containe_exp', { slidesPerView: 3, centeredSlides: true, loop: true, speed:500, autoplay: { delay: 5000, //5秒切换一次 }, }) var mySwiper2 = new Swiper('.swiper-containe_hp', { slidesPerView: 2.1, spaceBetween: 12, pagination: { el: '.swiper-pagination_hp', }, autoplay: { delay: 5000, //5秒切换一次 }, }) $(".btnCon,.copyBtn").click(function(){ $(".yxd_mask").fadeIn(); }) $('.close').click(function () { $('.yxd_mask').fadeOut(); }) $('.testBox .testBtn').click(function () { $(this).addClass('ac').siblings().removeClass('ac'); setTimeout(() => { $(".next_btn").click(); }, 100); }) var cur_t = 0, tamp_t = 0, test_item_len = $(".testMain .mainBox").length - 1; $(".next_btn").click(function () { if (tamp_t < test_item_len) { if ($(".mainBox").eq(tamp_t).find('.testBtn.ac').length > 0) { console.log(tamp_t); cur_t++; tamp_t++; $(".mainBox").eq(tamp_t).addClass('ac').siblings().removeClass('ac'); } } else { $('.csAction').hide(); $('.testDone').show(); localStorage.setItem('ggy2done2222', '1'); } }); $(".prev_btn").click(function () { if (tamp_t > 0) { $(".mainBox").eq(--tamp_t).addClass('ac').siblings().removeClass('ac'); } }) testDone(); function testDone() { var doneBool = localStorage.getItem('ggy2done2222'); if (doneBool) { $('.csAction').hide(); $('.testDone').show(); } } var ho9_swiper = new Swiper('.ho9_swiper', { loop: true, loopedSlides: 2, slidesPerView : 1.1, spaceBetween : -14, centeredSlides : false, pagination: { el: '.ho9_pag', }, }); $(".input_sex span").click(function(){ $(this).addClass('active').siblings().removeClass('active'); }); $(".close").click(function(){ $(".yxd_mask").fadeOut(); }); $(".btn_li").click(function(){ $(".yxd_mask").fadeIn(); }) var channelCS = '921c2dc40d0b979c2910298d2f880152'; var use = new Submit('.yxd_con', { channel_code: channelCS, name: function () { return $("input[name = realname]").val(); }, gender: function (){ return $(".input_sex .active").attr('value'); }, telphone: function () { return $('input[name = mobile]').val() }, sms_code: function () { return $("input[name = verify_code]").val() }, is_validate_sms: 1 }, [{ data: 'name', text: '请输入您的姓名' }, { data: 'telphone' }, ], { is_show: 1, is_use_captcha_code: 1 }, { success_msg: '您的咨询预约已提交成功,我们会安排情感分析师在24小时内和您电话沟通,请注意手机来电哦~', //提交成功显示文字 error_msg: '提交失败', //提交失败显示文字 btn_msg: '好的,我知道了', //弹窗按钮显示文字 popup: '.popup', //显示的通知窗口 popupHind: '.popup-hind', //弹窗消息内容 popupBtn: '.popup-btn', //弹窗关闭按钮 code: '.code-btn', //验证码按钮 submit: '.submin_btn', //提交按钮 submitSuccess: function (data) { //提交成功 $("input[name = realname]").val(''); $(".input_sex .active").attr('value'); $('input[name = mobile]').val(''); $("input[name = verify_code]").val(''); $(".yxd_mask").fadeOut(); }, submitError: function (data) { //提交失败 }, getCode: function (data) { //验证码获取成功 }, popupEnd: function () { // 弹窗点击隐藏 }, }); var ulan = true; $('.header .navBtn').on('click', function () { if (ulan) { ulan = false; $(".side_bg").animate({ height: '100%' }, 800); } else { ulan = true; $(".side_bg").animate({ height: '0' }, 800); } }); $(".side_top img").click(function () { ulan = true; $(".side_bg").animate({ height: '0' }, 800); });