var das,ds=0,asds=0,shi=0,das2,ads,bbs=1,index_1=0,sftj=0
jQuery(document).ready(function(){
if($(".banner2").length>0){
var scripts = document.getElementsByTagName("script");
var jsFolder = "";
for (var i= 0; i< scripts.length; i++)
{
if( scripts[i].src && scripts[i].src.match(/lovelygallery\.js/i))
jsFolder = scripts[i].src.substr(0, scripts[i].src.lastIndexOf("/") + 1);
}
ksas()
$(window).bind("resize",function(){
ksas()
})
function ksas(){
var kd=$(window).width();
$(".banner2").height(parseInt($(window).width()/1920*580))
jQuery("#html5zoo-2").html5zoo({
jsfolder:jsFolder,
width:kd,
height:parseInt($(window).width()/1920*580),
skinsfoldername:"",
loadimageondemand:false,
isresponsive:false,
autoplayvideo:false,
pauseonmouseover:true,
addmargin:true,
randomplay:false,
slideinterval:5000,
enabletouchswipe:true,
transitiononfirstslide:false,
loop:0,
autoplay:true,
navplayvideoimage:"../../images/bg/play-32-32-0.png",
navpreviewheight:60,
timerheight:2,
shownumbering:false,
skin:"Frontpage",
addgooglefonts:true,
navshowplaypause:true,
navshowplayvideo:true,
navshowplaypausestandalonemarginx:8,
navshowplaypausestandalonemarginy:8,
navbuttonradius:0,
navthumbnavigationarrowimageheight:32,
navmarginy:20,
showshadow:false,
navfeaturedarrowimagewidth:16,
navpreviewwidth:120,
googlefonts:"Inder",
textpositionmarginright:24,
bordercolor:"#ffffff",
navthumbnavigationarrowimagewidth:32,
navthumbtitlehovercss:"text-decoration:underline;",
navcolor:"#999999",
arrowwidth:48,
texteffecteasing:"easeOutCubic",
texteffect:"fade",
navspacing:12,
playvideoimage:"../../images/bg/playvideo-64-64-0.png",
ribbonimage:"../../images/bg/ribbon_topleft-0.png",
navwidth:24,
showribbon:false,
arrowimage:"../../images/bg/arrows-48-48-3.png",
timeropacity:0.6,
navthumbnavigationarrowimage:"../../images/bg/carouselarrows-32-32-0.png",
navshowplaypausestandalone:false,
navpreviewbordercolor:"#ffffff",
ribbonposition:"topleft",
navthumbdescriptioncss:"display:block;position:relative;padding:2px 4px;text-align:left;font:normal 12px Arial,Helvetica,sans-serif;color:#333;",
arrowstyle:"mouseover",
navthumbtitleheight:20,
textpositionmargintop:24,
navswitchonmouseover:false,
navarrowimage:"../../images/bg/navarrows-28-28-0.png",
arrowtop:50,
textstyle:"static",
playvideoimageheight:64,
navfonthighlightcolor:"#666666",
showbackgroundimage:false,
navpreviewborder:4,
navopacity:0.8,
shadowcolor:"#aaaaaa",
navbuttonshowbgimage:true,
navbuttonbgimage:"../../images/bg/navbuttonbgimage-28-28-0.png",
textbgcss:"display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:#333333; opacity:0.6; filter:alpha(opacity=60);",
navdirection:"horizontal",
navborder:4,
bottomshadowimagewidth:110,
showtimer:true,
navradius:0,
navshowpreview:true,
navpreviewarrowheight:8,
navmarginx:16,
navfeaturedarrowimage:"../../images/bg/featuredarrow-16-8-0.png",
navfeaturedarrowimageheight:8,
navstyle:"bullets",
textpositionmarginleft:24,
descriptioncss:"display:block; position:relative; margin-top:4px; font:14px Inder,Arial,Tahoma,Helvetica,sans-serif; color:#fff;",
navplaypauseimage:"../../images/bg/navplaypause-28-28-0.png",
backgroundimagetop:-10,
timercolor:"#ffffff",
numberingformat:"%NUM/%TOTAL ",
navfontsize:12,
navhighlightcolor:"#333333",
navimage:"../../images/bg/bullet-24-24-4.png",
navheight:24,
navshowplaypausestandaloneautohide:false,
navbuttoncolor:"#999999",
navshowarrow:true,
navshowfeaturedarrow:false,
titlecss:"display:block; position:relative; font:16px Inder,Arial,Tahoma,Helvetica,sans-serif; color:#fff;",
ribbonimagey:0,
ribbonimagex:0,
navshowplaypausestandaloneposition:"bottomright",
shadowsize:5,
arrowhideonmouseleave:1000,
navshowplaypausestandalonewidth:28,
navshowplaypausestandaloneheight:28,
backgroundimagewidth:120,
textautohide:true,
navthumbtitlewidth:120,
navpreviewposition:"top",
playvideoimagewidth:64,
arrowheight:48,
arrowmargin:0,
texteffectduration:1000,
//bottomshadowimage:"../../images/bg/bottomshadow-110-100-5.png",
border:0,
timerposition:"bottom",
navfontcolor:"#333333",
navthumbnavigationstyle:"arrow",
borderradius:0,
navbuttonhighlightcolor:"#333333",
textpositionstatic:"bottom",
navthumbstyle:"imageonly",
textcss:"display:block; padding:12px; text-align:left;",
navbordercolor:"#ffffff",
navpreviewarrowimage:"../../images/bg/previewarrow-16-8-0.png",
showbottomshadow:true,
textpositionmarginstatic:0,
backgroundimage:"",
navposition:"bottom",
navpreviewarrowwidth:16,
bottomshadowimagetop:100,
textpositiondynamic:"bottomleft",
navshowbuttons:true,
navthumbtitlecss:"display:block;position:relative;padding:2px 4px;text-align:left;font:bold 14px Arial,Helvetica,sans-serif;color:#333;",
textpositionmarginbottom:24,
ribbonmarginy:0,
ribbonmarginx:0,
slide: {
duration:1000,
easing:"easeOutCubic",
checked:true
},
crossfade: {
duration:1000,
easing:"easeOutCubic",
checked:true
},
threedhorizontal: {
checked:true,
bgcolor:"#222222",
perspective:1000,
slicecount:1,
duration:1500,
easing:"easeOutCubic",
fallback:"slice",
scatter:5,
perspectiveorigin:"bottom"
},
slice: {
duration:1500,
easing:"easeOutCubic",
checked:true,
effects:"up,down,updown",
slicecount:10
},
fade: {
duration:1000,
easing:"easeOutCubic",
checked:true
},
blocks: {
columncount:5,
checked:true,
rowcount:5,
effects:"topleft,bottomright,top,bottom,random",
duration:1500,
easing:"easeOutCubic"
},
blinds: {
duration:2000,
easing:"easeOutCubic",
checked:true,
slicecount:3
},
shuffle: {
duration:1500,
easing:"easeOutCubic",
columncount:5,
checked:true,
rowcount:5
},
threed: {
checked:true,
bgcolor:"#222222",
perspective:1000,
slicecount:5,
duration:1500,
easing:"easeOutCubic",
fallback:"slice",
scatter:5,
perspectiveorigin:"right"
},
transition:"slide,crossfade,threedhorizontal,slice,fade,blocks,blinds,shuffle,threed"
});
}
}
});
jQuery(document).ready(function(){
if($(".banner").length>0){
var scripts = document.getElementsByTagName("script");
var jsFolder = "";
for (var i= 0; i< scripts.length; i++)
{
if( scripts[i].src && scripts[i].src.match(/lovelygallery\.js/i))
jsFolder = scripts[i].src.substr(0, scripts[i].src.lastIndexOf("/") + 1);
}
ksas()
$(window).bind("resize",function(){
ksas()
})
function ksas(){
var kd=$(window).width();
$(".banner").height(parseInt($(window).width()/1920*800))
jQuery("#html5zoo-1").html5zoo({
jsfolder:jsFolder,
width:kd,
height:parseInt($(window).width()/1920*800),
skinsfoldername:"",
loadimageondemand:false,
isresponsive:false,
autoplayvideo:false,
pauseonmouseover:true,
addmargin:true,
randomplay:false,
slideinterval:5000,
enabletouchswipe:true,
transitiononfirstslide:false,
loop:0,
autoplay:true,
navplayvideoimage:"../../images/bg/play-32-32-0.png",
navpreviewheight:60,
timerheight:2,
shownumbering:false,
skin:"Frontpage",
addgooglefonts:true,
navshowplaypause:true,
navshowplayvideo:true,
navshowplaypausestandalonemarginx:8,
navshowplaypausestandalonemarginy:8,
navbuttonradius:0,
navthumbnavigationarrowimageheight:32,
navmarginy:20,
showshadow:false,
navfeaturedarrowimagewidth:16,
navpreviewwidth:120,
googlefonts:"Inder",
textpositionmarginright:24,
bordercolor:"#ffffff",
navthumbnavigationarrowimagewidth:32,
navthumbtitlehovercss:"text-decoration:underline;",
navcolor:"#999999",
arrowwidth:48,
texteffecteasing:"easeOutCubic",
texteffect:"fade",
navspacing:12,
playvideoimage:"../../images/bg/playvideo-64-64-0.png",
ribbonimage:"../../images/bg/ribbon_topleft-0.png",
navwidth:24,
showribbon:false,
arrowimage:"../../images/bg/arrows-48-48-3.png",
timeropacity:0.6,
navthumbnavigationarrowimage:"../../images/bg/carouselarrows-32-32-0.png",
navshowplaypausestandalone:false,
navpreviewbordercolor:"#ffffff",
ribbonposition:"topleft",
navthumbdescriptioncss:"display:block;position:relative;padding:2px 4px;text-align:left;font:normal 12px Arial,Helvetica,sans-serif;color:#333;",
arrowstyle:"mouseover",
navthumbtitleheight:20,
textpositionmargintop:24,
navswitchonmouseover:false,
navarrowimage:"../../images/bg/navarrows-28-28-0.png",
arrowtop:50,
textstyle:"static",
playvideoimageheight:64,
navfonthighlightcolor:"#666666",
showbackgroundimage:false,
navpreviewborder:4,
navopacity:0.8,
shadowcolor:"#aaaaaa",
navbuttonshowbgimage:true,
navbuttonbgimage:"../../images/bg/navbuttonbgimage-28-28-0.png",
textbgcss:"display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:#333333; opacity:0.6; filter:alpha(opacity=60);",
navdirection:"horizontal",
navborder:4,
bottomshadowimagewidth:110,
showtimer:true,
navradius:0,
navshowpreview:true,
navpreviewarrowheight:8,
navmarginx:16,
navfeaturedarrowimage:"../../images/bg/featuredarrow-16-8-0.png",
navfeaturedarrowimageheight:8,
navstyle:"bullets",
textpositionmarginleft:24,
descriptioncss:"display:block; position:relative; margin-top:4px; font:14px Inder,Arial,Tahoma,Helvetica,sans-serif; color:#fff;",
navplaypauseimage:"../../images/bg/navplaypause-28-28-0.png",
backgroundimagetop:-10,
timercolor:"#ffffff",
numberingformat:"%NUM/%TOTAL ",
navfontsize:12,
navhighlightcolor:"#333333",
navimage:"../../images/bg/bullet-24-24-4.png",
navheight:24,
navshowplaypausestandaloneautohide:false,
navbuttoncolor:"#999999",
navshowarrow:true,
navshowfeaturedarrow:false,
titlecss:"display:block; position:relative; font:16px Inder,Arial,Tahoma,Helvetica,sans-serif; color:#fff;",
ribbonimagey:0,
ribbonimagex:0,
navshowplaypausestandaloneposition:"bottomright",
shadowsize:5,
arrowhideonmouseleave:1000,
navshowplaypausestandalonewidth:28,
navshowplaypausestandaloneheight:28,
backgroundimagewidth:120,
textautohide:true,
navthumbtitlewidth:120,
navpreviewposition:"top",
playvideoimagewidth:64,
arrowheight:48,
arrowmargin:0,
texteffectduration:1000,
//bottomshadowimage:"../../images/bg/bottomshadow-110-100-5.png",
border:0,
timerposition:"bottom",
navfontcolor:"#333333",
navthumbnavigationstyle:"arrow",
borderradius:0,
navbuttonhighlightcolor:"#333333",
textpositionstatic:"bottom",
navthumbstyle:"imageonly",
textcss:"display:block; padding:12px; text-align:left;",
navbordercolor:"#ffffff",
navpreviewarrowimage:"../../images/bg/previewarrow-16-8-0.png",
showbottomshadow:true,
textpositionmarginstatic:0,
backgroundimage:"",
navposition:"bottom",
navpreviewarrowwidth:16,
bottomshadowimagetop:100,
textpositiondynamic:"bottomleft",
navshowbuttons:true,
navthumbtitlecss:"display:block;position:relative;padding:2px 4px;text-align:left;font:bold 14px Arial,Helvetica,sans-serif;color:#333;",
textpositionmarginbottom:24,
ribbonmarginy:0,
ribbonmarginx:0,
slide: {
duration:1000,
easing:"easeOutCubic",
checked:true
},
crossfade: {
duration:1000,
easing:"easeOutCubic",
checked:true
},
threedhorizontal: {
checked:true,
bgcolor:"#222222",
perspective:1000,
slicecount:1,
duration:1500,
easing:"easeOutCubic",
fallback:"slice",
scatter:5,
perspectiveorigin:"bottom"
},
slice: {
duration:1500,
easing:"easeOutCubic",
checked:true,
effects:"up,down,updown",
slicecount:10
},
fade: {
duration:1000,
easing:"easeOutCubic",
checked:true
},
blocks: {
columncount:5,
checked:true,
rowcount:5,
effects:"topleft,bottomright,top,bottom,random",
duration:1500,
easing:"easeOutCubic"
},
blinds: {
duration:2000,
easing:"easeOutCubic",
checked:true,
slicecount:3
},
shuffle: {
duration:1500,
easing:"easeOutCubic",
columncount:5,
checked:true,
rowcount:5
},
threed: {
checked:true,
bgcolor:"#222222",
perspective:1000,
slicecount:5,
duration:1500,
easing:"easeOutCubic",
fallback:"slice",
scatter:5,
perspectiveorigin:"right"
},
transition:"slide,crossfade,threedhorizontal,slice,fade,blocks,blinds,shuffle,threed"
});
}
}
});
$(function () {
if($(".cool").length>0){
if($.trim($(".cool").html())==""){
$(".pdks").hide()
$(".cool").hide()
}
}
if($(".sgrn2").length>0 && $.cookie('tjdd')!=null && $.cookie('tjdd')!=""){
var i1s = "";
g1s = "[" + $.cookie('tjdd') + "]";
var objs = $.parseJSON(g1s);
if ($.cookie('tjdd') != null) {
$.each(objs, function (i, e) {
i1s += "
";
i1s += "
";
i1s += "
";
i1s += "" + objs[i].biaoti+"
";
i1s += "" + objs[i].kuandu+"
";
i1s += "" + objs[i].houdu +"
";
i1s += "" + objs[i].cggym +"
";
i1s += "" + objs[i].len+"
";
i1s += "" + objs[i].jg+"元
";
i1s += "
";
i1s += "
";
})
}
$(".sgrn2").html(i1s)
$(window).bind('beforeunload',function(){
$.cookie('tjdd', null, { path: '/' });
})
}
$(".sear").click(function(){
$(".tjio").show();
})
$(".tjio").click(function(){
$(".tjio").hide();
})
$(".searchs").click(function(e){
e.stopPropagation();
})
$(".skjf a").click(function () {
$(".bg").hide();
})
/*$.ajax({
type: "post",
dataType: "text",
url: "/api/lvchen.ashx",
data: { "action": "bs"},
success: function (date) {
alert(date)
// if (date.msg == 1) {
// alert('更新记录成功!');
// }
},
error: function () {
//alert("数据加载错误!");
}
});*/
$(".alsk li a").hover(function(){
$(this).find(".skiy").stop().animate({"opacity":"0"})
$(this).find(".ksij").stop().animate({"opacity":"1"})
},function(){
$(this).find(".skiy").stop().animate({"opacity":"1"})
$(this).find(".ksij").stop().animate({"opacity":"0"})
})
if($(".tpgf").length>0){
$(window).scroll(function(){
if($("html,body").scrollTop()>$(".tgdu").offset().top){
$(".tpgf").css({"position":"fixed"})
}
else{
$(".tpgf").css({"position":"absolute"})
}
})
}
$(".seay input").click(function(){
if($(".seaz input").val()==""){
alert("请输入搜索关键词!");
return false;
}
})
if($(".pban input").length>0){
$(window).bind('beforeunload',function(){
if($.trim($("#gsmc").val())!=""){
return '您输入的内容尚未保存,确定离开此页面吗?';
}
});
}
$(".pban input").click(function () {
$(window).unbind('beforeunload');
var txt_0 = $("#gsmc");
if ($.trim(txt_0.val()) == "") {
alert("请输入公司名称!");
txt_0.val("").focus();
return false;
}
var txt_1 = $("#xmmc");
if ($.trim(txt_1.val()) == "") {
alert("请输入项目名称!");
txt_1.val("").focus();
return false;
}
/*var txt_5 = $("#cppz");
if ($.trim(txt_5.val()) == "") {
alert("请输入所需产品品种!");
txt_5.val("").focus();
return false;
}
var txt_6 = $("#cpgg");
if ($.trim(txt_6.val()) == "") {
alert("请输入所需产品规格!");
txt_6.val("").focus();
return false;
}*/
var txt_2 = $("#name");
if ($.trim(txt_2.val()) == "") {
alert("请输入联系人姓名!");
txt_2.val("").focus();
return false;
}
var txt_3 = $("#tel");
if ($.trim(txt_3.val()) == "") {
alert("请输入联系人电话!");
txt_3.val("").focus();
return false;
}
if ($.trim(txt_3.val()) != "") {
if (!Validate5.cellPhone()) {
alert("联系方式格式错误!");
txt_3.focus();
return false;
}
}
var txt_4 = $("#souj");
if ($.trim(txt_4.val()) == "") {
alert("请输入样品收寄地址!");
txt_4.val("").focus();
return false;
}
//if ($.trim($('#ypxx').val()) == "" || $.trim($('#ypxx').val()) == null) {
//if (sftj == 0) {
//if ($.cookie('tjdd') == null && $.cookie('gwc') != null) {
//$(".bg").show();
//return false;
//}
if($.cookie('tjdd') == null){
$.cookie('tjdd', $.cookie('gwc'), {path: '/' })
$.cookie('gwc', null, { path: '/' })
}
$('#ypxx').val($.cookie('tjdd'))
if ($.cookie('tjgwcxx') != null &&$.cookie('tjgwcxx') !="") {
$.cookie('gwc', $.cookie('tjgwcxx'), { path: '/' })
}
else {
$.cookie('gwc', null, { path: '/' })
}
$.cookie('tjgwcxx',null, { path: '/' })
$.cookie('tjdd', null, { path: '/' });
//}
})
$("#lkja").click(function () {
location.href='/xxtx.html'
//$(".pban input").trigger("click");
//购物车信息提交到订单
})
$("#zbsx").click(function () {
//不提交购物车信息
//sftj = 1;
//$(".pban input").trigger("click");
})
//循环购物车
function func() {
var i1 = "";
g1 = "[" + $.cookie('gwc') + "]";
var obj = $.parseJSON(g1);
var obj2 = $.parseJSON(g1);
if ($(".sgrn").length > 0) {
if ($.cookie('gwc') != null) {
$.each(obj, function (i, e) {
i1 += "";
i1 += "
";
i1 += "";
i1 += "" + obj[i].biaoti+"
";
i1 += "" + obj[i].kuandu+"
";
i1 += "" + obj[i].houdu +"
";
i1 += "" + obj[i].cggym +"
";
i1 += "";
i1 += "" + obj[i].jg+"元
";
i1 += "";
i1 += "
";
i1 += "
";
})
}
$(".sgrn").html(i1)
if ($.cookie('gwc') != null) {
$(".ka1 font").html(obj.length)
}
else {
$(".ka1 font").html(0)}
}
$(".khjo").each(
function (i, e) {
$(".khjo").eq(i).find(".qxuan font").bind("click",function () {
if ($(this).hasClass("curs") != true) {
$(this).addClass("curs")
}
else {
$(this).removeClass("curs")
}
kiol()
})
$(".khjo").eq(i).find(".jia").bind("click",function(){
$(".khjo").eq(i).find(".hpnu font input").val(parseInt($(".khjo").eq(i).find(".hpnu font input").val())+1)
kiol();
$.each(obj, function (i2, e2) {
if (obj[i2].title == $(".khjo").eq(i).attr("name") && obj[i2].cpid == $(".khjo").eq(i).find(".qxuan input").val()) {
obj[i2].len = $(".khjo").eq(i).find(".hpnu font input").val()
}
})
xin = JSON.stringify(obj).substring(1, JSON.stringify(obj).length - 1);
$.cookie('gwc', xin, { path: '/' })
//alert($.cookie('gwc'))
})
$(".khjo").eq(i).find(".jian").bind("click",function(){
if(parseInt($(".khjo").eq(i).find(".hpnu font input").val())>1){
$(".khjo").eq(i).find(".hpnu font input").val(parseInt($(".khjo").eq(i).find(".hpnu font input").val())-1)
kiol();
$.each(obj, function (i2, e2) {
if (obj[i2].title == $(".khjo").eq(i).attr("name") && obj[i2].cpid == $(".khjo").eq(i).find(".qxuan input").val()) {
obj[i2].len = $(".khjo").eq(i).find(".hpnu font input").val()
}
})
xin = JSON.stringify(obj).substring(1, JSON.stringify(obj).length - 1);
$.cookie('gwc', xin, { path: '/' })
}
})
//删除购物车信息
$(".khjo").eq(i).find(".hpcz div img").bind("click", function () {
$.each(obj, function (i2, e2) {
if (obj[i2].title == $(".khjo").eq(i).attr("name") && obj[i2].cpid == $(".khjo").eq(i).find(".qxuan input").val()) {
//delete obj[i2];
//obj.splice(i2,1)
obj2.splice(i2, 1);
}
})
if (JSON.stringify(obj2) == "[]") {
$.cookie('gwc', null, { path: '/' })
}
else {
xin = JSON.stringify(obj2).substring(1, JSON.stringify(obj2).length - 1);
$.cookie('gwc', xin, { path: '/' })
}
mrgwc()
$(".khjo").eq(i).remove();
kiol();
func();
})
}
)
}
//批量删除
$(".pldelete").click(function () {
if ($(".khjo font.curs").length > 0) {
plsc()
window.location.reload();
}
else {
alert("请选择需要删除的信息!");
}
})
function plsc() {
g1 = "[" + $.cookie('gwc') + "]";
var obj = $.parseJSON(g1);
var obj2 = $.parseJSON(g1);
$(".khjo font.curs").each(function (i, e) {
m1 = $(".khjo font.curs").parents(".khjo")
$.each(obj, function (i2, e2) {
if (e2.title == m1.eq(i).attr("name") && e2.cpid == m1.eq(i).find(".qxuan input").val()) {
delete obj2[i2];
}
})
})
m2 = ""
$.each(obj2, function (i2, e2) {
if (e2 != null) {
m2 += JSON.stringify(e2) + ","
}
})
m2 = m2.substring(0, m2.length - 1)
if (m2 != "") {
$.cookie('gwc', m2, { path: '/' })
}
else {
$.cookie('gwc', null, { path: '/' })
}
}
//批量提交购物车信息
function pltj() {
g1 = "[" + $.cookie('gwc') + "]";
m3 = "";
var obj = $.parseJSON(g1);
var obj2 = $.parseJSON(g1);
$(".khjo font.curs").each(function (i, e) {
m1 = $(".khjo font.curs").parents(".khjo")
$.each(obj, function (i2, e2) {
if (e2.title == m1.eq(i).attr("name") && e2.cpid == m1.eq(i).find(".qxuan input").val()) {
obj2[i2].len = m1.find(".hpnu font input").val();
m3 += JSON.stringify(obj2[i2])+",";
delete obj2[i2];
}
})
})
m2 = ""
$.each(obj2, function (i2, e2) {
if (e2 != null) {
m2 += JSON.stringify(e2) + ","
}
})
m2 = m2.substring(0, m2.length - 1)
m3 = m3.substring(0, m3.length - 1)
/*if (m2 != "") {
$.cookie('gwc', m2, { path: '/' })
}
else {
$.cookie('gwc', null)
}*/
$.cookie('tjgwcxx', m2, { path: '/' })
$.cookie('tjdd', m3, { path: '/' })
}
func();
$(".ka3").click(function () {
if ($.cookie('gwc') == null || $(".khjo font.curs").length==0) {
alert("请选择产品!");
return false;
}
else {
pltj()
//alert($.cookie('tjdd'))
location.href = "/xxtx.html"
}
})
//点击规格执行
function fjk() {
f1 = $("#cpid").val();
f2 = $("input[name=cpgg]:checked").val();
f3 = $("input[name=cpdd]:checked").val();
f5 = $("input[name=cggym]:checked").val();
f4 = f2 + "," + f3+ "," + f5
if (f2 != undefined && f3 != undefined&& f5 != undefined) {
$.ajax({
type: "post",
dataType: "text",
url: "/tools/web_ajax.ashx",
data: { "action": "cxjg", "pro_id": f1, "title": f4 },
success: function (date) {
$(".hlft p font").html(date + "元")
// if (date.msg == 1) {
// alert('更新记录成功!');
// }
},
error: function () {
//alert("数据加载错误!");
}
});
}
}
$(".khuo li input").click(function () {
//$("input[name=cpgg]:checked").val()
var akj = $(this).siblings("font").html();
$(".idiv font").html(akj)
$(".khuo li").removeClass("curs")
$(this).parents("li").addClass("curs")
fjk();
})
$(".ylrc li input").click(function () {
//$("input[name=cpdd]:checked").val()
var akj = $(this).siblings("font").html();
$(".idiv span").html(akj)
$(".ylrc li").removeClass("curs")
$(this).parents("li").addClass("curs")
fjk();
})
$(".ytrc li input").click(function () {
//$("input[name=cpdd]:checked").val()
var akj = $(this).siblings("font").html();
$(".grij font").html(akj)
$(".ytrc li").removeClass("curs")
$(this).parents("li").addClass("curs")
fjk();
})
//替换购物车信息
if ($(".zuok p").length > 0) {
g1 = "[" + $.cookie('gwc') + "]";
var obj = $.parseJSON(g1);
if ($.cookie('gwc') != null) {
var j1 = obj[obj.length - 1];
$(".zuok p").html(j1.biaoti + " " + j1.kuandu + " " +j1.houdu + " " +j1.cggym)
}
}
//购物车
$(".jrgwc").click(function () {
gg = $("input[name=cpgg]:checked").val()
hd = $("input[name=cpdd]:checked").val()
cggym = $("input[name=cggym]:checked").val()
g2 = gg + "," + hd + "," + cggym;
g3 = true;
jgk = $(".hlft p font").html().replace("元", "")
sl = parseInt($(".bdon font input").val())
if(window.isNaN(sl)){sl=0}
cpid = $("#cpid").val();
if (gg == undefined || hd == undefined|| cggym == undefined) {
alert("请选择规格!");
return false;
}
if (sl <= 0) {
alert("数量需要大于零!");
return false;
}
h1 = $(".xukh").html();
h1a = $(".xukh2").html();
h2 = $(".khuo .curs font").html();
h3 = $(".ylrc .curs font").html();
h5 = $(".ytrc .curs font").html();
h2a = $(".khuo .curs p").html();
h3a = $(".ylrc .curs p").html();
h5a = $(".ytrc .curs p").html();
h4 = $(".tzip .swiper-slide:eq(0) img").attr("src")
g1 = "[" + $.cookie('gwc') + "]";
var obj = $.parseJSON(g1);
var _ids = "{\"title\":\"" + g2 + "\",\"len\":" + sl + ",\"cpid\":" + cpid + ",\"jg\":\"" + jgk + "\",\"biaoti\":\"" + h1 + "\",\"biaotien\":\"" + h1a + "\",\"kuandu\":\"" + h2 + "\",\"houdu\":\"" + h3 + "\",\"cggym\":\"" + h5 + "\",\"kuanduen\":\"" + h2a + "\",\"houduen\":\"" + h3a + "\",\"cggymen\":\"" + h5a + "\",\"tupian\":\"" + h4 + "\"}"
if ($.cookie('gwc')!= null)
{
$.each(obj, function (i, e) {
if (g2 == obj[i].title && String(cpid) == String(obj[i].cpid)) {
alert("购物车已存在该产品!");
g3 = false;
return false;
}
})
if (!g3) {
return g3;
}
_ids = $.cookie('gwc')+"," + _ids
}
$.cookie('gwc', _ids, { path: '/' })
var sl = obj.length + 1
mrgwc()
//$(".mlba p font").html(sl)
location.href = '/jrgwc.html';
//alert("添加到购物车成功!")
})
$(".mlba p").click(function () {
location.href = '/gwc.html';
})
$(".care").click(function () {
location.href = '/gwc.html';
})
//默认购物车数量
function mrgwc() {
g1 = "[" + $.cookie('gwc') + "]";
var obj = $.parseJSON(g1);
if ($(".mlba p font").length > 0 && $.cookie('gwc') != null) {
$(".mlba p font").html(obj.length)
}
else { $(".mlba p font").html(0)}
if ($(".care font").length > 0 && $.cookie('gwc') != null) {
$(".care font").html(obj.length)
} else { $(".care font").html(0) }
}
mrgwc()
//在线下单
$(".zxxd").click(function () {
gg = $("input[name=cpgg]:checked").val()
hd = $("input[name=cpdd]:checked").val()
cggym = $("input[name=cggym]:checked").val()
g2 = gg + "," + hd+ "," + cggym;
g3 = true;
jgk = $(".hlft p font").html().replace("元", "")
sl = parseInt($(".bdon font input").val())
if(window.isNaN(sl)){sl=0}
cpid = $("#cpid").val();
if (gg == undefined || hd == undefined || cggym == undefined) {
alert("请选择规格!");
return false;
}
if (sl <= 0) {
alert("数量需要大于零!");
return false;
}
h1 = $(".xukh").html();
h1a = $(".xukh2").html();
h2 = $(".khuo .curs font").html();
h3 = $(".ylrc .curs font").html();
h5 = $(".ytrc .curs font").html();
h2a = $(".khuo .curs p").html();
h3a = $(".ylrc .curs p").html();
h5a = $(".ytrc .curs p").html();
h4 = $(".tzip .swiper-slide:eq(0) img").attr("src")
var _ids = "{\"title\":\"" + g2 + "\",\"len\":" + sl + ",\"cpid\":" + cpid + ",\"jg\":\"" + jgk + "\",\"biaoti\":\"" + h1 + "\",\"biaotien\":\"" + h1a + "\",\"kuandu\":\"" + h2 + "\",\"houdu\":\"" + h3 + "\",\"cggym\":\"" + h5 + "\",\"kuanduen\":\"" + h2a + "\",\"houduen\":\"" + h3a + "\",\"cggymen\":\"" + h5a + "\",\"tupian\":\"" + h4 + "\"}"
$.cookie('tjdd', _ids, { path: '/' });
$.cookie('tjgwcxx',null, { path: '/' })
location.href = "/xxtx.html"
})
//更新购物车信息
function kiol(){
var ct=0;
$(".khjo").each(function(i,e){
if ($(this).find(".qxuan font").hasClass("curs")) {
ct += parseInt($(".khjo").eq(i).find(".hpnu font input").val()) * parseInt($(".khjo").eq(i).find(".hpxj div").html())
}
})
$(".ka1 font").html($(".khjo").length);
$(".ka1 b").html($(".khjo .qxuan .curs").length);
$(".ka2 font").html(ct + "元");
}
$(".bdon .jian").click(function () {
var ins = parseInt($(".bdon font input").val());
if(window.isNaN(ins)){ins=2}
if (ins > 1) {
$(".bdon font input").val((ins-1))
}
})
$(".bdon .jia").click(function () {
var ins = parseInt($(".bdon font input").val());
if(window.isNaN(ins)){ins=0}
$(".bdon font input").val((ins + 1))
})
//全选取消
$(".hlkd .qxuan a").click(function () {
if ($(this).hasClass("curs")!=true) {
$(this).addClass("curs")
$(".khjo .qxuan font").not($(".khjo .qxuan .curs")).trigger("click");
}
else {
$(this).removeClass("curs")
$(".khjo .qxuan .curs").trigger("click");
}
})
dataAnimate();
if ($(".pros li").length > 0) {
$(".pros li:last").addClass("kold");
}
/*$(".pros li").hover(function(){
var lo=$(this).offset().left-$(".pros li").eq(0).offset().left
$(".pros ul i").stop(0,1).animate({"left":lo})
$(".pros li").removeClass("curs")
$(".qiba .kol1").hide()
$(this).addClass("curs")
$(".qiba .kol1").eq($(this).index()).show()
},function(){
})*/
if ($(".shuj .curs").length > 0) {
$(".shuj em").stop(0, 1).animate({ "left": $(".shuj .curs").offset().left - $(".shuj li").eq(0).offset().left })
}
var ars
$(".shuj li").hover(function () {
clearTimeout(ars);
var lo = $(this).offset().left - $(".shuj li").eq(0).offset().left
$(".shuj em").stop(0, 1).animate({ "left": lo })
}, function () {
ars=setTimeout(function () { $(".shuj em").stop(0, 1).animate({ "left": $(".shuj .curs").offset().left - $(".shuj li").eq(0).offset().left })},200)
})
if($(".zhyi .kquan").length>0){
$(".zhyi .kquan").eq(0).show()
$(".tedn li").eq(0).addClass("curs")
$(".tedn li:last").addClass("outer")
$(".tedn li").hover(function(){
tindex=$(".tedn li").index($(this));
$(".zhyi .kquan").hide().eq(tindex).show()
$(".tedn li").removeClass("curs").eq(tindex).addClass("curs")
},function(){})
}
})
$(window).load(function () {
if ($(".shij").length > 0) {
var mySwiper = new Swiper('.shij', {
autoplay: 4000,
speed: 400,
slidesPerView : 3,
slidesPerGroup : 3,
cssWidthAndHeight : true,
autoplayDisableOnInteraction: false,
paginationClickable: true
})
}
if ($(".tzip").length > 0) {
var mySwiper = new Swiper('.tzip', {
pagination: '.pagination',
autoplay: 1500,
speed: 800,
centeredSlides: true,
loop: true,
autoplayDisableOnInteraction: false,
paginationClickable: true
})
}
if($(".k1").length>0){
var mySwiper = new Swiper('.k1',{
pagination: '.pagination',
autoplay:4000,
speed:800,
centeredSlides: true,
loop:true,
effect:'fade',
autoplayDisableOnInteraction : false,
paginationClickable: true,
onSwiperCreated:function(){
$(".pagination span").each(function(index, element) {
$(this).html("0"+(index+1)+"")
});
},
/*progress:true,
onProgressChange: function(swiper){
for (var i = 0; i < swiper.slides.length; i++){
var slide = swiper.slides[i];
var progress = slide.progress;
var translate = progress*swiper.width;
var opacity = 1 - Math.min(Math.abs(progress),1);
slide.style.opacity = opacity;
swiper.setTransform(slide,'translate3d('+translate+'px,0,0)');
}
},
onTouchStart:function(swiper){
for (var i = 0; i < swiper.slides.length; i++){
swiper.setTransition(swiper.slides[i], 0);
}
},
onSetWrapperTransition: function(swiper, speed) {
for (var i = 0; i < swiper.slides.length; i++){
swiper.setTransition(swiper.slides[i], speed);
}
} */
})
}
if($(".k2").length>0){
if($(".k2 .swiper-slide").length>2){
oki=2
}
else{
oki=0
}
var k2 = new Swiper('.k2',{
slidesPerView:3,
loopAdditionalSlides:2,
loop:true,
tdFlow: {
rotate : 0,
stretch :50,
depth: 100,
modifier : 1.25,
shadows:false
}
})
$('.arrow-left').on('click', function(e){
e.preventDefault()
k2.swipePrev()
})
$('.arrow-right').on('click', function(e){
e.preventDefault()
k2.swipeNext()
})
}
if($(".k3 .swiper-slide").length>0){
kio=$(".k3 .swiper-slide").length;
var k3 = new Swiper('.k3',{
autoplay:3000,
paginationClickable: true,
autoplayDisableOnInteraction : false,
centeredSlides: true,
loop:true,
initialSlide:0,
slidesPerView: "auto",
onSwiperCreated:function(){
$(".fkuan li").eq(0).css("opacity","1")
$(".anlineirong_left font").html(1)
$(".awal font").html(kio)
},
onSlideChangeStart: function(events){
$(".anlineirong_left font").html(events.activeLoopIndex+1)
$(".fkuan li").css("opacity",0).eq(events.activeLoopIndex).css("opacity",1);
}
})
$('.arrow-lefta').on('click', function(e){
e.preventDefault()
k3.swipePrev()
})
$('.arrow-righta').on('click', function(e){
e.preventDefault()
k3.swipeNext()
})
}
var dts=$(".k40");
if(dts.find(".swiper-slide").length>0){
var aki=new Swiper(".k40",{
paginationClickable: true,
autoplayDisableOnInteraction : false,
loop:true,
loopAdditionalSlides:2,
centeredSlides: true,
initialSlide:0,
slidesPerView: "auto",
onSlideChangeEnd: function(swiper){
$(".pros li").eq(swiper.activeLoopIndex).trigger("mouseover")
}
})
$(".pros li").hover(function(){
wz_index=$(".pros li").index($(this))
aki.swipeTo(wz_index)
var lo=$(this).offset().left-$(".pros li").eq(0).offset().left
$(".pros ul i").stop(0,1).animate({"left":lo})
$(".pros li").removeClass("curs")
$(this).addClass("curs")
},function(){
})
}
if($(".pros li").length>0){$(".pros li").eq(1).trigger("mouseover")}
})
function ToggleCode(obj, codeurl) {
$(obj).attr("src", codeurl + "?time=" + Math.random());
}
function f_check2() {
var txt_0 = $("#jobtitle");
if ($.trim(txt_0.val()) == "") {
alert("请输入职位!");
txt_0.val("").focus();
return false;
}
var txt_1 = $("#txt_name");
if ($.trim(txt_1.val()) == "") {
alert("请输入姓名!");
txt_1.val("").focus();
return false;
}
var txt_2 = $("#txt_phone");
if ($.trim(txt_2.val()) == "") {
alert("请输入联系方式!");
txt_2.val("").focus();
return false;
}
var txt_5 = $("#txt_email");
if($.trim(txt_5.val())!=""){
//验证邮箱格式
var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
if (!reg.test($(txt_5).val())) {
alert("邮箱格式错误!");
$(txt_5).focus();
return false;
}
}
if ($.trim(txt_2.val()) != "") {
if (!Validate4.cellPhone()) {
alert("联系方式格式错误!联系方式正确格式0577-88888888");
txt_2.focus();
return false;
}}
var txt_3 = $("#txt_content");
if ($.trim(txt_3.val()) == "") {
alert("请输入简历!");
txt_3.val("").focus();
return false;
}
var txt_4 = $("#txt_code");
if ($.trim(txt_4.val()) == "") {
alert("请输入验证码!");
txt_4.val("").focus();
return false;
}
return true;
}
function f_check() {
var txt_0 = $("#txt_title");
if ($.trim(txt_0.val()) == "" || $.trim(txt_0.val()) == "主题") {
alert("请输入主题!");
txt_0.focus();
return false;
}
var txt_1 = $("#txt_name");
if ($.trim(txt_1.val()) == "" || $.trim(txt_1.val()) == "联系人") {
alert("请输入联系人!");
txt_1.focus();
return false;
}
var txt_2 = $("#txt_email");
if ($.trim(txt_2.val()) == "" || $.trim(txt_2.val()) == "E-mail") {
alert("请输入邮箱!");
txt_2.focus();
return false;
}
else {
//验证邮箱格式
var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
if (!reg.test($(txt_2).val())) {
alert("邮箱格式错误!");
$(txt_2).focus();
return false;
}
}
var txt_3 = $("#txt_tel");
if ($.trim(txt_3.val()) == "" || $.trim(txt_3.val()) == "电话") {
alert("请输入电话!");
txt_3.focus();
return false;
}
else if (!Validate.cellPhone()) {
alert("电话格式错误!电话正确格式0577-88888888");
txt_3.focus();
return false;
}
var txt_4 = $("#txt_content");
if ($.trim(txt_4.val()) == "" || $.trim(txt_4.val()) == "填写内容") {
alert("请输入内容!");
txt_4.focus();
return false;
}
var txt_5 = $("#txt_Code");
if ($.trim(txt_5.val()) == "" || $.trim(txt_5.val()) == "验证码") {
alert("请输入验证码!");
txt_5.focus();
return false;
}
/*var txt_5 = $("#txt_Code");
if ($.trim(txt_5.val()) == "") {
alert("请输入验证码!");
txt_5.focus();
return false;
}*/
return true;
}
var Validate4 = {
isTel: function (s) {
var patrn = /^0\d{2,3}-?\d{7,8}$/
if (!patrn.test(s)) return false
return true
},
isMobile: function (value) {
var validateReg = /^((\+?86)|(\(\+86\)))?1\d{10}$/;
return validateReg.test(value);
},
cellPhone: function () {
var cellPhoneNumber = $("#txt_phone").val();
if (Validate4.isMobile(cellPhoneNumber) || Validate4.isTel(cellPhoneNumber)) {
return true;
} else {
return false;
}
},
telePhone: function () {
}
}
var Validate5 = {
isTel: function (s) {
var patrn = /^0\d{2,3}-?\d{7,8}$/
if (!patrn.test(s)) return false
return true
},
isMobile: function (value) {
var validateReg = /^((\+?86)|(\(\+86\)))?1\d{10}$/;
return validateReg.test(value);
},
cellPhone: function () {
var cellPhoneNumber = $("#tel").val();
if (Validate5.isMobile(cellPhoneNumber) || Validate5.isTel(cellPhoneNumber)) {
return true;
} else {
return false;
}
},
telePhone: function () {
}
}
var Validate = {
isTel: function (s) {
var patrn = /^0\d{2,3}-?\d{7,8}$/
if (!patrn.test(s)) return false
return true
},
isMobile: function (value) {
var validateReg = /^((\+?86)|(\(\+86\)))?1\d{10}$/;
return validateReg.test(value);
},
cellPhone: function () {
var cellPhoneNumber = $("#txt_tel").val();
if (Validate.isMobile(cellPhoneNumber) || Validate.isTel(cellPhoneNumber)) {
return true;
} else {
return false;
}
},
telePhone: function () {
}
}
var Validate3 = {
isTel: function (s) {
var patrn = /^0\d{2,3}-?\d{7,8}$/
if (!patrn.test(s)) return false
return true
},
isMobile: function (value) {
var validateReg = /^((\+?86)|(\(\+86\)))?1\d{10}$/;
return validateReg.test(value);
},
cellPhone: function () {
var cellPhoneNumber = $("#Text4").val();
if (Validate.isMobile(cellPhoneNumber) || Validate.isTel(cellPhoneNumber)) {
return true;
} else {
return false;
}
},
telePhone: function () {
}
}
var Validate2 = {
isTel: function (s) {
var patrn = /^0\d{2,3}-?\d{7,8}$/
if (!patrn.test(s)) return false
return true
},
isMobile: function (value) {
var validateReg = /^((\+?86)|(\(\+86\)))?1\d{10}$/;
return validateReg.test(value);
},
cellPhone: function () {
var cellPhoneNumber = $("#ContactWay").val();
if (Validate.isMobile(cellPhoneNumber) || Validate.isTel(cellPhoneNumber)) {
return true;
} else {
return false;
}
},
telePhone: function () {
}
}
//收藏本站
function AddFavorite(title, url) {
try {
window.external.addFavorite(url, title);
}
catch (e) {
try {
window.sidebar.addPanel(title, url, "");
}
catch (e) {
alert("抱歉,您所使用的浏览器无法完成此操作。\n\n加入收藏失败,请使用Ctrl+D进行添加");
}
}
}
$(function(){
$(".pro_quan1").hover(function(){
$(".pro_quan1").removeClass("cur");$(this).addClass("cur");
},function(){})
})