|
@@ -201,6 +201,7 @@
|
|
|
this.$api.getStorage().then((resolve) => {
|
|
|
this.userId = resolve.userId ? resolve.userId : 0;
|
|
|
this.InitGetCartGoodsList();
|
|
|
+ this.GetCartNumber();
|
|
|
})
|
|
|
},
|
|
|
clickPopupShow(pros,type){
|
|
@@ -625,6 +626,19 @@
|
|
|
hideMobel(){
|
|
|
this.modal = false;
|
|
|
},
|
|
|
+ GetCartNumber(){//查询购物车数量
|
|
|
+ this.ProductService.QueryShoppingQuantity(
|
|
|
+ {
|
|
|
+ userId:this.userId,
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(response => {
|
|
|
+ this.$store.commit('updateAllNum',response.data)
|
|
|
+ })
|
|
|
+ .catch(error =>{
|
|
|
+ console.log('查询购物车数量错误信息',error)
|
|
|
+ })
|
|
|
+ },
|
|
|
navToListPage(item){
|
|
|
this.isModallayer = true;
|
|
|
this.$api.navigateTo(`/pages/goods/product?productId=${item.productId}`)
|