text: "use strict";$(function(){var t=Cookie.get("name");t?($(".name").css("display","none"),$(".name1").css("display","block"),$(".name1").mouseover(function(){$(".name1 a").css("background","#fff"),$(".login_2_list").css("display","block")}).mouseout(function(){$(".login_2_list").css("display","none"),$(".name1 a").css("background","#fafafa")}),$(".name1 a").text(t).css("color","red"),$.ajax({type:"POST",url:"../api/query.php",async:!0,data:{method:"alllist",listname:"goodslist"},success:function(t){var s=JSON.parse(t);console.log(s);var n=JSON.parse(s.content);console.log(n.length),$(".num1").text(n.length),$(".num2").text(n.length)}})):($(".num1").text(0),$(".num2").text(0)),$(".comment_top_box").find("h3").click(function(){$("html , body").animate({scrollTop:770},"slow"),$(".comment_top_box h3").attr("class",""),$(this).attr("class","active"),$(".comment_content1").css("display","none"),$(".comment_content1").eq($(this).index()).css("display","block"),"宝贝详情"==$(this).text()?$("#title21").attr("class","active"):$("#title21").attr("class",""),"评价"==$(this).text()?$("#title22").attr("class","active"):$("#title22").attr("class",""),"售后保障"==$(this).text()?$("#title23").attr("class","active"):$("#title23").attr("class",""),"商品咨询"==$(this).text()?$("#title24").attr("class","active"):$("#title24").attr("class","")}),$(".title2").find("h3").click(function(){$("html , body").animate({scrollTop:770},"slow"),$(".title2 h3").attr("class",""),$(this).attr("class","active"),$(".comment_content1").css("display","none"),$(".comment_content1").eq($(this).index()).css("display","block"),"宝贝详情"==$(this).text()?($("#top1").attr("class","active"),$(".comment_r").css("display","block"),$(".comment_content1").css("display","none"),$(".comment_content1").eq($(this).index()).css("display","block")):($("#top1").attr("class",""),$(".comment_r").css("display","none")),"评价"==$(this).text()?($("#top2").attr("class","active"),$(".comment_content1").css("display","none"),$(".comment_content1").eq($(this).index()).css("display","block")):$("#top2").attr("class",""),"售后保障"==$(this).text()?($("#top3").attr("class","active"),$(".comment_content1").css("display","none"),$(".comment_content1").eq($(this).index()).css("display","block")):$("#top3").attr("class",""),"商品咨询"==$(this).text()?($("#top4").attr("class","active"),$(".comment_content1").css("display","none"),$(".comment_content1").eq($(this).index()).css("display","block")):$("#top4").attr("class","")}),$(window).scroll(function(){var t=$(this).scrollTop();770<=t?($(".comment_top").css("display","block"),$(".comment_r").css("display","none")):t<770&&($(".comment_top").css("display","none"),$(".comment_r").css("display","block"))});var s=location.search.slice(1),c=[];s&&$.ajax({type:"POST",url:"../api/query.php",async:!0,data:{method:"getid",listname:"table",id:s},success:function(t){c=JSON.parse(t),$(".msg .wrap h1").text(c[0].name),$(".msg .wrap h3").text(c[0].name2),$(".msg .panelA .xianjia").text(c[0].xianjia),$(".msg .panelA .yuan").text("￥"+c[0].yuan);for(var s=[c[0].url1,c[0].url2,c[0].url3,c[0].url4,c[0].url5],n="",i=0;i<s.length;i++)n+='<li>\n\t\t\t\t\t\t<div class="small-img">\n\t\t\t\t\t\t\t<img src="../'+s[i]+'" />\n\t\t\t\t\t\t</div>\n\t\t\t</li>';$(".animation03").html(n),$(".content_top").html('<p><a href="javascript:;">特卖商城</a>><a href="javascript:;">女装</a>><a href="javascript:;">针织衫</a>><span>'+c[0].name+"</span></p>");magnifier({magnifier:"#magnifier1",width:400,height:400,moveWidth:null,zoom:1.5})}}),$("#num input").click(function(){$(this).css("border","1px solid blue")}).blur(function(){$(this).css("border","1px solid #ccc"),isNaN($(this).val())&&$(this).val(1)}),$("#num i").eq(0).click(function(){var t=$("#num input").val();--t<1&&(t=1),$("#num input").val(t)}),$("#num i").eq(1).click(function(){var t=$("#num input").val();10<++t&&(t=10),$("#num input").val(t)}),$(".color div").eq(1).find("a").click(function(){$(".color div").eq(1).find("a").css("border","1px solid #ccc"),$(this).css("border","1px solid red")}),$(".cun div").eq(1).find("a").click(function(){$(".cun div").eq(1).find("a").css({color:"#666",border:"1px solid #ccc"}),$(this).css({border:"1px solid red",color:"red"})}),$(".submit input").click(function(){$(".shadow").css("display","block"),$(".diginfo").css("display","block")}),$(".diginfo h4 span").click(function(){$(".shadow").css("display","none"),$(".diginfo").css("display","none")}),$(".diginfo .btn input").click(function(){console.log($(this).val()),"去购物车结算"==$(this).val()?$.ajax({type:"POST",url:"../api/add.php",async:!0,data:{method:"inputgl",listname:"goodslist",cid:c[0].id,url:c[0].url1,name:c[0].name,xianjia:c[0].xianjia,yuan:c[0].yuan,num:$("#num input").val(),price:c[0].xianjia},success:function(t){console.log(t),"1"==t&&(location.href="result.html?")}}):($(".shadow").css("display","none"),$(".diginfo").css("display","none"))})});