// banner轮播
var swiper = new swiper('.bannerbg', {
autoplay: 5000,
speed: 2000,
loop: true,
autoplaydisableoninteraction: false,
navigation: {
nextel: '.bannernext',
prevel: '.bannerprev',
},
pagination: {
el: '.bannerbtn',
clickable: true,
}
});
// 留言左侧轮播
var swiperly = new swiper('.liuyanleft', {
autoplay: 5000,
speed: 2000,
loop: true,
autoplaydisableoninteraction: false,
pagination: {
el: '.pagebox',
type: 'fraction',
renderfraction: function (currentclass, totalclass) {
return '' +
' / ' +
'';
},
},
});
// 获取留言左侧高度并赋值给右侧留言
$(window).load(function() {
let _height = $('.liuyanleftlist').height()
$('.liuyanright').css('height', _height + 'px');
});
$(document).ready(function() {
$(".mianji").click(function() {
$(".mianji_xia").slidedown("slow");
});
// 面积下拉显示
$(".changsuo").click(function() {
$(".changsuo_xia").slidedown("slow");
});
// 场所下拉显示
$(".changsuo_xia p").click(function() {
var title = $(this).text() //获取点击值
console.log(title);
$(".changsuo .wosh").text(title)
$("#changsuo").val(title);
$(".changsuo_xia").slideup("slow");
});
$(".mianji_xia p").click(function() {
var title = $(this).text() //获取点击值
console.log(title);
$(".mianji .wosh").text(title)
$("#mianji").val(title);
$(".mianji_xia").slideup("slow");
});
});
$(function() {
//验证表单
$("#form1").validate({
rules: {
xingming: {
required: true
},
dianhua: {
required: true
},
dizhi: {
required: true
},
changsuo: {
required: true
},
mianji: {
required: true
},
},
messages: {
xingming: {
required: '*'
},
dianhua: {
required: '*'
},
dizhi: {
required: '*'
},
changsuo: {
required: '*'
},
mianji: {
required: '*'
},
}
});
//提交表单
$("#btnsendform1").click(function() {
var b = $("#form1").valid();
if (b) {
var data = $("#form1").serializearray();
$.post("/viewsiteapi/handle/saveform", {
data: json.stringify(data)
}, function(res) {
if (res.result == 1) {
alert("提交成功!");
location.href = location.href.replace(/#/g, "");
} else {
alert("提交失败!" + (res.message != "" ? ("\n" + res.message) : ""));
}
});
}
});
});
// 解决方案鼠标经过
$(".solutiontop li").removeclass("solutiontoplist1").eq(0).addclass("solutiontoplist1");
$(".solutiondingwei").hide().eq(0).show();
$(".solutiontoplist").hover(function() {
var num = $(this).index();
$(".solutiontop li").removeclass("solutiontoplist1").eq(num).addclass("solutiontoplist1");
$(".solutiondingwei").hide().eq(num).show();
});
// 案例左侧轮播
var swipercase = new swiper('.caselistleftbox', {
autoplay: 5000,
speed: 2000,
loop: true,
autoplaydisableoninteraction: false,
pagination: {
el: '.bannerbtncase',
clickable: true,
}
});
// 案例右侧鼠标经过
$(".casetitle a").removeclass("casetitleaa").eq(0).addclass("casetitleaa");
$(".caselistright .casepro").hide().eq(0).show();
$(".casetitle a").hover(function() {
var num = $(this).index();
$(".casetitle a").removeclass("casetitleaa").eq(num).addclass("casetitleaa");
$(".caselistright .casepro").hide().eq(num).show();
});
// 关于我们左侧轮播
var swiperabout = new swiper('.aboutleftbox', {
autoplay: 5000,
speed: 2000,
loop: true,
autoplaydisableoninteraction: false,
pagination: {
el: '.bannerbtnabout',
clickable: true,
}
});
$(window).load(function() {
let _height = $('.aboutnavli1').height()
console.log(_height);
$('.aboutnavli a h4').css('line-height', _height + 'px');
console.log(_height);
});
// 优势鼠标经过
$(".youishibottom li").removeclass("youishibottomclick").eq(0).addclass("youishibottomclick");
$(".youishibtn span").removeclass("youishibtnclick").eq(0).addclass("youishibtnclick");
$(".youshitext li").hide().eq(0).show();
$(".youishibottom li").click(function() {
var num = $(this).index();
$(".youishibottom li").removeclass("youishibottomclick").eq(num).addclass("youishibottomclick");
$(".youishibtn span").removeclass("youishibtnclick").eq(num).addclass("youishibtnclick");
$(".youshitext li").hide().eq(num).show();
});
$(".youishibtn span").click(function() {
var num = $(this).index();
$(".youishibottom li").removeclass("youishibottomclick").eq(num).addclass("youishibottomclick");
$(".youishibtn span").removeclass("youishibtnclick").eq(num).addclass("youishibtnclick");
$(".youshitext li").hide().eq(num).show();
});
// 新闻右侧轮播
var swipernews = new swiper('.newslistrightbox', {
autoplay: 5000,
speed: 2000,
loop: true,
autoplaydisableoninteraction: false,
pagination: {
el: '.newslistrightbtn',
clickable: true,
}
});
// 新闻鼠标经过
$(".newsbtn a").removeclass("newsbtnhover").eq(0).addclass("newsbtnhover");
$(".newslist .newslistbox").hide().eq(0).show();
$(".newsbtn a").hover(function() {
var num = $(this).index();
$(".newsbtn a").removeclass("newsbtnhover").eq(num).addclass("newsbtnhover");
$(".newslist .newslistbox").hide().eq(num).show();
});
//合作伙伴
var result = window.matchmedia('(max-width:418px)');
var result2 = window.matchmedia('(max-width:1000px)');
var result3 = window.matchmedia('(max-width:992px)');
if (result2.matches) {
var swiperheuzo = new swiper('.hezuolist', {
slidesperview: 2,
slidespercolumn: 2,
spacebetween: 10,
slidespercolumnfill : 'row',
navigation: {
nextel: '.heuzobtnnext',
prevel: '.heuzobtnprev',
},
});
} else {
var swiperheuzo = new swiper('.hezuolist', {
slidesperview: 4,
slidespercolumn: 2,
spacebetween: 30,
slidespercolumnfill : 'row',
navigation: {
nextel: '.heuzobtnnext',
prevel: '.heuzobtnprev',
},
});
}