|
@@ -181,8 +181,7 @@
|
|
|
return{
|
|
|
modal:false,
|
|
|
contentModalText:'',
|
|
|
- clubId:'', //机构ID
|
|
|
- userID:'',
|
|
|
+ userId:'', //机构userId
|
|
|
kindCount:0,
|
|
|
serviceProviderId:'',//协销ID
|
|
|
isStock:'',
|
|
@@ -212,10 +211,7 @@
|
|
|
pageSize: 10,
|
|
|
pageNum: 1,
|
|
|
submitIds:[],
|
|
|
- depositIds : [6060,6061,6062,6063,6064],//定金商品ID
|
|
|
- rechargeIds : [6065,6066,6067,6068,6069],//充值余额商品ID
|
|
|
isIphoneX:this.$store.state.isIphoneX,
|
|
|
- againBuyProductIds:''
|
|
|
}
|
|
|
},
|
|
|
onLoad(){
|
|
@@ -306,8 +302,13 @@
|
|
|
}, 500)
|
|
|
},
|
|
|
initGetCartGoodsList(){//初始化购物车 index:1
|
|
|
- let params = {clubId:this.clubId,serviceProviderId:this.serviceProviderId,pageNum:1,pageSize:this.pageSize,againBuyProductIds:this.againBuyProductIds}
|
|
|
- this.SellerService.GetSellerShoppingInfo(params).then(response =>{
|
|
|
+ let params = {
|
|
|
+ userId:this.userId,
|
|
|
+ serviceProviderId:this.serviceProviderId,
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:this.pageSize,
|
|
|
+ }
|
|
|
+ this.ProductService.QueryShoppingCartList(params).then(response =>{
|
|
|
this.skeletonShow = false
|
|
|
this.$store.commit('updateAllNum',response.data.cartQuantity)
|
|
|
this.promotionsList = response.data.promotionsList;
|
|
@@ -373,8 +374,8 @@
|
|
|
},
|
|
|
getOnReachBottomData(){//上拉加载
|
|
|
this.pageNum+=1
|
|
|
- let params = {clubId:this.clubId,serviceProviderId:this.serviceProviderId,pageNum:this.pageNum,pageSize:this.pageSize}
|
|
|
- this.SellerService.GetSellerShoppingInfo(params).then(response =>{
|
|
|
+ let params = {userId:this.userId,serviceProviderId:this.serviceProviderId,pageNum:this.pageNum,pageSize:this.pageSize}
|
|
|
+ this.ProductService.QueryShoppingCartList(params).then(response =>{
|
|
|
let resultsData = response.data.pageDate
|
|
|
this.promotionsList = response.data.promotionsList;
|
|
|
this.hasNextPage = resultsData.hasNextPage;
|
|
@@ -710,31 +711,8 @@
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- //判断勾选的商品是否为充值商品或者为定金商品的一些处理逻辑
|
|
|
- const isHasDepositlds = productIdList.filter(item =>this.depositIds.includes(item))
|
|
|
- const isHasRechargeIds = productIdList.filter(item =>this.rechargeIds.includes(item))
|
|
|
- const isGoods= productIdList.every(item =>{ [...this.depositIds,...this.rechargeIds].includes(item)})
|
|
|
- if(productIdList.length == 1 && isHasDepositlds.length === 1 && isHasRechargeIds.length === 0){
|
|
|
- console.log('定金商品')
|
|
|
- productIdList.forEach(item =>{
|
|
|
- productID += item +','
|
|
|
- })
|
|
|
- }else if(productIdList.length == 1 && isHasRechargeIds.length === 1 && isHasDepositlds.length === 0){
|
|
|
- console.log('充值余额商品')
|
|
|
- productIdList.forEach(item =>{
|
|
|
- productID += item +','
|
|
|
- })
|
|
|
- }else if(!isGoods && isHasRechargeIds.length === 0 && isHasDepositlds.length === 0){
|
|
|
- console.log('正常商品')
|
|
|
- productIdList.forEach(item =>{
|
|
|
- productID += item +','
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.$util.modal('提示','缴纳订金商品或余额充值商品请单独下单!','确定','',false,() =>{})
|
|
|
- return
|
|
|
- }
|
|
|
let cartPramsData={
|
|
|
- clubId:this.clubId,
|
|
|
+ userId:this.userId,
|
|
|
allPrice:this.allPrice,
|
|
|
allCount:this.allCount,
|
|
|
productID:productID.substring(0,productID.lastIndexOf(',')),
|
|
@@ -842,12 +820,11 @@
|
|
|
uni.stopPullDownRefresh()
|
|
|
},
|
|
|
onShow(){
|
|
|
- // this.$api.getComStorage('orderUserInfo').then((resolve) =>{
|
|
|
- // console.log(resolve)
|
|
|
- // this.clubId = resolve.clubID
|
|
|
- // this.againBuyProductIds = resolve.againBuyProductIds
|
|
|
- // this.initData()
|
|
|
- // })
|
|
|
+ this.$api.getComStorage('clubInfo').then((resolve) =>{
|
|
|
+ console.log(resolve)
|
|
|
+ this.userId = resolve.userId
|
|
|
+ this.initData()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|