Przeglądaj źródła

commit -m 订单相关接口联调

zhengjinyi 4 lat temu
rodzic
commit
c4fd5e99e2

+ 8 - 2
pages/goods/product-activi.vue

@@ -358,10 +358,16 @@
 				})
 			},
 			GetCartNumber(){//查询购物车数量
-				this.ProductService.QueryShoppingQuantity({userId:this.userId}).then(response => {
+				this.ProductService.QueryShoppingQuantity(
+					{
+						userId:this.userId,
+					}
+				)
+				.then(response => {
 					this.goodsData.cartCount = response.data
 					this.$store.commit('updateAllNum',response.data)
-				}).catch(error =>{
+				})
+				.catch(error =>{
 					console.log('查询购物车数量错误信息',error)
 				})
 			},

+ 12 - 5
pages/goods/product.vue

@@ -288,13 +288,14 @@
 			}
 		},
 		onLoad(option) {
-			if(this.isShareType =='share'){
-				wxLogin.wxLoginAuthorize()
-			}
+			
 			this.productId = option.productId;//获取商品ID
 			this.isShareType = option.type
 			this.linkPath = option.path
 			this.isHeaderPoduct = true
+			if(this.isShareType =='share'){
+				wxLogin.wxLoginAuthorize()
+			}
 			if(option.page == 2){
 				this.backPage = option.page
 			}
@@ -351,10 +352,16 @@
 				})
 			},
 			GetCartNumber(){//查询购物车数量
-				this.ProductService.QueryShoppingQuantity({userId:this.userId}).then(response => {
+				this.ProductService.QueryShoppingQuantity(
+					{
+						userId:this.userId,
+					}
+				)
+				.then(response => {
 					this.goodsData.cartCount = response.data
 					this.$store.commit('updateAllNum',response.data)
-				}).catch(error =>{
+				})
+				.catch(error =>{
 					console.log('查询购物车数量错误信息',error)
 				})
 			},

+ 2 - 2
pages/tabBar/cart/index.vue

@@ -24,9 +24,9 @@
 										<view class="checkbox-box" @click.stop="ischeck(item,pros)">
 											<view class="checkbox iconfont" :class="[pros.productsChecked ? 'icon-xuanze':'icon-weixuanze']"></view>
 										</view>
-										<view class="pros-img" @click.stop="navToListPage(pros.productId)"	><image :src="pros.mainImage ? pros.mainImage:''" alt="" /></view>
+										<view class="pros-img" @click.stop="navToListPage(pros)"	><image :src="pros.mainImage ? pros.mainImage:''" alt="" /></view>
 										<view class="pros-product">
-											<view class="producttitle" @click.stop="navToListPage(pros.productId)"	>{{pros.productName}}</view>
+											<view class="producttitle" @click.stop="navToListPage(pros)"	>{{pros.productName}}</view>
 											<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
 											<view class="floor-item-act" v-if="pros.activeStatus == 1">
 												<view class="tag"@click.stop="clickPopupShow(pros,2)">活动价</view>

+ 8 - 2
pages/tabBar/index/index.vue

@@ -184,10 +184,16 @@
 				}
 			}, 
 			GetCartNumber(){//查询购物车数量
-				this.ProductService.QueryShoppingQuantity({userId:this.userId}).then(response => {
+				this.ProductService.QueryShoppingQuantity(
+					{
+						userId:this.userId,
+					}
+				)
+				.then(response => {
 					this.$store.commit('updateAllNum',response.data)
 					this.skeletonShow = false;
-				}).catch(error =>{
+				})
+				.catch(error =>{
 					console.log('查询购物车数量错误信息',error)
 				})
 			},

+ 9 - 5
pages/tabBar/user/index.vue

@@ -129,9 +129,9 @@ export default {
 			CustomBar: this.CustomBar, // 顶部导航栏高度
 			UserInfo: {}, //用户信息
 			isRequest: true,
-			paymentCount: 1, //待付款角标
-			waitShipmentsCount: 20, //待收货角标
-			shipmentsCount: 123, //已发货角标
+			paymentCount: 0, //待付款角标
+			waitShipmentsCount: 0, //待收货角标
+			shipmentsCount: 0, //已发货角标
 			salesReturnCount: 0, //退货/款角标
 			userId:0
 		}
@@ -166,7 +166,11 @@ export default {
 		},
 		//初始化个人中心数据
 		GetUserInfoPersonal() {
-			this.UserService.GetUserOrderTotal({ userId: this.userId })
+			this.UserService.GetUserOrderTotal(
+				{ 
+					userId: this.userId
+				}
+			)
 			.then(response => {
 				const data = response.data
 				this.paymentCount = data.paymentCount //待付款
@@ -178,7 +182,7 @@ export default {
 				this.$util.msg(error.msg, 2000)
 			})
 		},
-		handleContact(e) {// 客服
+		handleContact(e) {//客服
 			console.log(e.detail.path)
 			console.log(e.detail.query)
 		},

+ 0 - 1
pages/user/activity/activity-list.vue

@@ -55,7 +55,6 @@
 				})
 			},
 			NavigatorPath(item){
-				console.log(item)
 				this.$api.navigateTo(`/pages/user/activity/activity?activityId=${item.activityId}&userId=${this.listQuery.userId}`)
 			}
 		},

+ 8 - 2
pages/user/activity/activity.vue

@@ -103,10 +103,16 @@
 				}
 			},
 			GetCartNumber(){//查询购物车数量
-				this.ProductService.QueryShoppingQuantity({userId:this.userId}).then(response => {
+				this.ProductService.QueryShoppingQuantity(
+					{
+						userId:this.listQuery.userId,
+					}
+				)
+				.then(response => {
 					this.$store.commit('updateAllNum',response.data)
 					this.skeletonShow = false;
-				}).catch(error =>{
+				})
+				.catch(error =>{
 					console.log('查询购物车数量错误信息',error)
 				})
 			}

+ 8 - 2
pages/user/order/order-logistics.vue

@@ -99,7 +99,12 @@
 				})
 			},
 			getData() {
-				this.OrderService.QueryLogistics({orderId: this.orderId}).then(response =>{
+				this.OrderService.QueryLogistics(
+					{
+						orderId: this.orderId,
+					}
+				)
+				.then(response =>{
 					const resData = response.data;
 					// 添加订单列表信息
 					let orderListArr = [];
@@ -161,7 +166,8 @@
 						})
 					})
 					this.goodsList = [...orderListArr];
-				}).catch(error =>{
+				})
+				.catch(error =>{
 					this.$util.msg(error.msg,2000);
 				})
 			}