Browse Source

呵呵线上支付

zhengjinyi 4 years ago
parent
commit
3d04fb68e7
2 changed files with 15 additions and 1 deletions
  1. 14 0
      pages/tabBar/cart/index.vue
  2. 1 1
      pages/tabBar/index/index.vue

+ 14 - 0
pages/tabBar/cart/index.vue

@@ -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}`)

+ 1 - 1
pages/tabBar/index/index.vue

@@ -46,7 +46,7 @@
 			</view>
 		</view>
 		<!-- 侧边 -->
-		<scroll-top :isScrollTop="isScrollTop" :bottom="50"></scroll-top>
+		<scroll-top :isScrollTop="isScrollTop" :bottom="160"></scroll-top>
 	</view>
 </template>