$(function () { $(document).on('click','.faq_item_t',function () { $(this).parents(".faq_item").toggleClass("on").siblings().removeClass("on") }) $(".wechat").hover(function () { console.log("111") $(this).find(".sec-wechat-code").show() },function () { $(this).find(".sec-wechat-code").hide() }) if($(window).width()>767){ var h_max = 0; $('.performance dl').each(function() { var h = $(this).height(); h_max = h > h_max ? h : h_max; }); $('.performance dl').height(h_max); } // 微信服务 $(".wx_service").click(function () { $(this).find(".hover_code").toggleClass("on") }) if ($(".text1").length > 0) { $(".text1").mCustomScrollbar({ mouseWheelPixels:500, autoDraggerLength:false }); } // 登陆 $(".remember").click(function () { $(this).toggleClass("on") }) MemberEye() //登陆小眼睛 newadd() //微信登陆 check() //多选框 monicheckbox(); forget() //忘记密码 select1() //下拉 // 内容页 var worth_swiper = new Swiper('.worth_swiper .swiper-container',{ slidesPerView: 4, slidesPerGroup : 1, spaceBetween: 0, // noSwiping : true, prevButton:'.worth_swiper .swiper-button-prev', nextButton:'.worth_swiper .swiper-button-next', breakpoints:{ 1024: { slidesPerView: 3, // direction: 'horizontal', noSwiping : false, }, 767: { slidesPerView: 1, // direction: 'horizontal', noSwiping : false, } } }) inp03() // ===== $(document).on("click",".modify_close",function(){ $("body").removeClass("lightbox-noscrol"); $(this).parents(".modifyCon").removeClass("show") }); $(document).on("click",".changeProfile span",function(e){ $("body").addClass("lightbox-noscrol"); $(".modifyCon").addClass("show") }) $(document).on("click",".modifyCon .mask",function(){ $("body").removeClass("lightbox-noscrol"); $(".modifyCon").removeClass("show") }) $(document).on("click",".cancel",function(){ $("body").removeClass("lightbox-noscrol"); $(".modifyCon").removeClass("show") }) if ($(".modif_info .formCon").length > 0) { $(".modif_info .formCon").mCustomScrollbar({ mouseWheelPixels:500, autoDraggerLength:false }); } // =========== //获取验证码 $("#btnSendCode01").click(function () { sendMessage01() }) }) function MemberEye(){ $(document).on("click",".eye_box",function(){ $(this).toggleClass("cur"); if($(this).hasClass("cur")){ $(this).siblings("input").attr("type","text") }else{ $(this).siblings("input").attr("type","password") } }) } //首页切换下面的图片轮播 function inp03(){ var inp03Swiper = new Swiper('.index-part03 .swiper-container',{ slidesPerView : 4, slidesPerGroup : 1, spaceBetween : 20, prevButton:'.index-part03 .swiper-button-prev', nextButton:'.index-part03 .swiper-button-next', breakpoints: { 1024: { slidesPerView: 3, }, 767: { slidesPerView: 1, spaceBetween: 0 } } }) } function select1(){ $(".pub_select").each(function (i) { $(this).find("dt").click(function (e) { if($(this).hasClass('on_o')){ $(this).removeClass('on_o'); }else{ $(this).addClass('on_o'); } e.preventDefault(); e.stopPropagation() $(".pub_select").eq(i).find("dd a").each(function (x) { $(this).click(function () { $(".pub_select").removeClass("on"); $(".pub_select").eq(i).find("dd a").removeClass("on") $(this).addClass("on") $(".pub_select").eq(i).find("dt p").text($(this).text()); // $(".pub_select").eq(i).find("dt").attr({"data-val":$(this).data("val")}); //choose var index=$(this).index() $(".choose_box").eq(index).show().siblings().hide() var dd=$(this).data("dd") if(dd==22){ $(".choose_item.no").hide() }else{ $(".choose_item.no").show() } }) }) }) }) $(document).click(function () { $(".pub_select dd").slideUp(); $(".pub_select dt").removeClass('on_o'); }) $(".pub_select dt").on("click", function(e){ $(".layui-laydate").hide(); if($(this).siblings(".pub_select dd").is(":hidden")){ $(this).siblings(".pub_select dd").slideDown(); $(this).parents(".pub_select").siblings(".pub_select").children(".pub_select dd").slideUp(); $(this).parents(".confk li").siblings().find(".pub_select dd").slideUp(); }else{ $(this).siblings(".pub_select dd").slideUp(); } }); } //模拟多选下拉checkbox var text_ function check(){ $(".check-box").each(function (i) { $(this).find("dt").click(function (e) { text_=$(this).find("a").text() e.preventDefault(); e.stopPropagation(); var el = $(this).parent(".check-box"); if(el.hasClass('open')){ el.removeClass('open'); }else{ el.addClass('open'); el.parents("li").siblings("li").find(".check-box").removeClass('open'); el.parents("li").siblings("li").find(".select-box").removeClass('open'); } }) $(this).find("dd").click(function (e) { e.stopPropagation(); }) $(".check-box").eq(i).find("dd a").each(function (x) { $(this).click(function () { var el = $(".check-box.open"); el.next(".select-hidden").val($(this).attr("data-val")); var values=""; var checkBoxs = $(this).parents(".check-box").find("[type=checkbox]"); for(var i =0;i 0){ el.find("dt a").html(values.substring(0, values.length - 1)); el.next("input").val(values.substring(0, values.length - 1)); }else{ el.find("dt a").text(text_); el.next("input").val(); } }) }) //页面多选重置按钮 $(".app-reset").click(function () { $(this).parents("ul").find(".check-box dt a").html("请选择"); $(this).parents("ul").find(".check-box dd a label").removeClass("on"); $(this).parents("ul").find(".check-box dd a label").find("[type=checkbox]").removeAttr("checked"); $(this).parents("ul").find(".check-box").removeClass("open"); }) }) $(document).click(function () { $(".check-box.open").removeClass("open"); }) } //end //模拟多选 function monicheckbox(){ $(document).on("change", ".label-checkbox input", function () { if ($(this).prop("checked")) { $(this).parent().addClass("on") } else { $(this).parent().removeClass("on") } }); $(".label-checkbox").each(function () { if ($(this).find("input").prop("checked")) { $(this).addClass("on") } }); } //202101-27 new add function newadd() { $(document).on("click",".xcx_close",function(){ $("body").removeClass("lightbox-noscrol"); $(this).parents(".xcx_modal").removeClass("show") }); $(document).on("click",".wxlog",function(e){ $("body").addClass("lightbox-noscrol"); $(".xcx_modal").addClass("show") }) $(document).on("click",".xcx_modal .mask",function(){ $("body").removeClass("lightbox-noscrol"); $(".xcx_modal").removeClass("show") }) } //忘记密码 function forget() { $(".login_form>ul>li").click(function () { var index=$(this).index() $(this).addClass("on").siblings("li").removeClass("on") $(".backAll .backItem").eq(index).addClass("on").siblings(".backItem").removeClass("on") }) //$(".stepOne_btn").click(function () { // $(this).parents(".stepOne").hide() // $(this).parents(".stepOne").siblings(".stepTwo").show() //}) //$(".stepTwo_btn").click(function () { // $(this).parents(".stepTwo").hide() // $(this).parents(".stepTwo").siblings(".stepThree").show() //}) $(document).on("click",".forget_close",function(){ $("body").removeClass("lightbox-noscrol"); $(this).parents(".forget_modal").removeClass("show") }); $(document).on("click",".forget_pass",function(e){ $("body").addClass("lightbox-noscrol"); $(".forget_modal").addClass("show") }) $(document).on("click",".forget_modal .mask",function(){ $("body").removeClass("lightbox-noscrol"); $(".forget_modal").removeClass("show") }) }