text: "use strict";define(["jquery","../index/cookie","../url"],function(r,a,o){var e=r(".plus"),l=r(".minus"),t=r("#num"),i=r(".addtocar"),c=r(".total"),n=r(".price"),u=r(".shoppingtotal"),m=localStorage.getItem("logininfo");e.click(function(){t.val(Number(t.val())+1)}),l.click(function(){1<Number(t.val())&&t.val(Number(t.val())-1)}),i.click(function(){m?(str=location.search,arr=str.substr(1),arr=arr.split("="),a.getCookie(arr[0]+arr[1])?(c.html((Number(t.val())+Number(a.getCookie(arr[0]+arr[1])))*Number(n.html())),a.addCookie(arr[0]+arr[1],Number(t.val())+Number(a.getCookie(arr[0]+arr[1])),10)):(c.html(Number(t.val())*Number(n.html())),a.addCookie(arr[0]+arr[1],t.val(),10))):alert("请先登录！")}),u[0].onclick=function(){var r;m?(console.log(111),r=location.search,location.href=o.url+"/tianmao/src/cart.html"+r):alert("请先登录！")}});