Authored by 郭成尧

Merge branch 'release/4.8' of git.yoho.cn:fe/YOHOBUYPC into release/4.8

@@ -649,8 +649,8 @@ function addcart(data, cookieList) { @@ -649,8 +649,8 @@ function addcart(data, cookieList) {
649 path: '/' 649 path: '/'
650 }); 650 });
651 } 651 }
652 - } else if (d.code === 500) {  
653 - new Alert(d.message).show(); 652 + } else {
  653 + new Alert(d.message === '' ? '加入购物车失败哦~~' : d.message).show();
654 } 654 }
655 }); 655 });
656 } 656 }
@@ -322,6 +322,8 @@ $addToCart.click(function() { @@ -322,6 +322,8 @@ $addToCart.click(function() {
322 $('#balance').slideDown(SLIDETIME); 322 $('#balance').slideDown(SLIDETIME);
323 323
324 $('#cart-num').text(data.data.goods_count); //更新数目 324 $('#cart-num').text(data.data.goods_count); //更新数目
  325 + } else {
  326 + new Alert(data.message === '' ? '加入购物车失败哦~~' : data.message).show();
325 } 327 }
326 }); 328 });
327 }); 329 });