Explorar el Código

加入购物车公共弹框2

chao hace 4 años
padre
commit
ce2718c77d
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/main/resources/static/js/base.js

+ 2 - 1
src/main/resources/static/js/base.js

@@ -554,7 +554,7 @@ function dialog(txt,callback) {
 }
 
 // 加入购物车
-function addShoppingCart(userId, productId, count){
+function addShoppingCart(userId, productId, count, callback){
     tokenAjax("post", "/shoppingCart/addCart", {
         userID: userId,
         productID: productId,
@@ -589,6 +589,7 @@ function addShoppingCart(userId, productId, count){
         } else {
             dialog("加入购物车失败!");
         }
+        callback();
     });
 }