Showing
2 changed files
with
8 additions
and
1 deletions
@@ -38,6 +38,13 @@ function handelProduct(data) { | @@ -38,6 +38,13 @@ function handelProduct(data) { | ||
38 | } | 38 | } |
39 | 39 | ||
40 | function refreshBag() { | 40 | function refreshBag() { |
41 | + var time = Date.parse(new Date()), | ||
42 | + oldTime = this.time; | ||
43 | + | ||
44 | + if (oldTime && time - oldTime < 100) { | ||
45 | + return; | ||
46 | + } | ||
47 | + this.time = time; | ||
41 | $.ajax({ | 48 | $.ajax({ |
42 | type: 'GET', | 49 | type: 'GET', |
43 | url: '/shopping/cart/data', | 50 | url: '/shopping/cart/data', |
@@ -182,6 +189,7 @@ $searchKey.focus(function() { | @@ -182,6 +189,7 @@ $searchKey.focus(function() { | ||
182 | $searchKey.val('search').css('color', '#aaa'); | 189 | $searchKey.val('search').css('color', '#aaa'); |
183 | } | 190 | } |
184 | }).val('search').css('color', '#aaa'); | 191 | }).val('search').css('color', '#aaa'); |
192 | + | ||
185 | // } | 193 | // } |
186 | 194 | ||
187 | $clearInput.click(function() { | 195 | $clearInput.click(function() { |
-
Please register or login to post a comment