var BuyListUtil={};BuyListUtil.addShopList=function(n,t,i,r){jQuery.getJSON("/PinPeasPay/AddShopList/"+(new Date).getTime().toString(),{activityID:n,joinCount:t,joinPeriod:i},function(n){n.sucess?r&&r():n.status===1?(alert("哟，一不小心就被抢光啦~~"),window.location.reload()):n.status===2?(alert("该活动已不再销售状态中"),window.location.reload()):n.status===101&&alert(n.msg,function(){window.location="/Account/LogonWebApp?ReturnUrl="+escape(window.location.href)},"")})};BuyListUtil.promptJoin=function(n,t,i,r){jQuery.getJSON("/PinPeasPay/PromptJoin/"+(new Date).getTime().toString(),{activityID:n,joinCount:t,joinPeriod:i},function(n){n.sucess?r&&r():n.status===60?alert("你还没有登录,请登录后操作",function(){window.location="/Account/LogonWebApp?ReturnUrl="+escape(window.location.href)},""):n.status===1?(alert("哟，一不小心就被抢光啦~~"),window.location.reload()):n.status===2&&(alert("该活动已不在销售状态中"),window.location.reload())})};BuyListUtil.GetShoppListCount=function(){($("i.pro_count").length>0||$("b.cart-count").length>0)&&jQuery.getJSON("/PinPeasPay/GetShoppListCount/"+(new Date).getTime().toString(),{},function(n){n.sucess&&($("i.pro_count").text(n.count),$("b.cart-count").text(n.count))})};$(function(){BuyListUtil.GetShoppListCount()})