瀏覽代碼

组合商品下单

zhengjinyi 3 年之前
父節點
當前提交
eb145dbf94

+ 2 - 2
components/cm-module/cart-components/index.vue

@@ -1122,7 +1122,7 @@ export default {
 			})
 				.then(response => {
 					this.isshowDelbtn = false
-					this.initGetCartGoodsList()
+					// this.initGetCartGoodsList()
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)
@@ -1181,7 +1181,7 @@ export default {
 						Um_Key_SourcePage: '底部菜单购物车'
 					})
 				}
-				this.$api.navigateTo(`/pages/user/order/create-order?data=${JSON.stringify({ data: cartPramsData })}`)
+				this.$api.navigateTo(`/pages/user/order/create-order?type=2&data=${JSON.stringify({ data: cartPramsData })}`)
 			}
 		},
 		showDelManager() {

+ 124 - 164
pages/goods/goods-supporting.vue

@@ -38,7 +38,9 @@
 											<view class="list-none"><view class="price-small">¥未公开价格</view></view>
 										</view>
 										<view class="list-details-price" v-else-if="pros.priceFlag == 2">
-											<view class="list-none"><view class="price-small">¥价格仅会员可见</view></view>
+											<view class="list-none"
+												><view class="price-small">¥价格仅会员可见</view></view
+											>
 										</view>
 										<template v-else>
 											<view class="list-details-price">
@@ -46,13 +48,15 @@
 													<text
 														class="price-larger"
 														:class="
-															PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+															PromotionsFormat(pros.promotions) ||
+															pros.svipProductFlag == 1
 																? 'none'
 																: ''
 														"
 													>
 														¥{{
-															(PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+															(PromotionsFormat(pros.promotions) ||
+															pros.svipProductFlag == 1
 																? pros.originalPrice
 																: pros.price) | NumFormat
 														}}
@@ -69,8 +73,7 @@
 															type="number"
 															maxlength="4"
 															v-model="pros.number"
-															@blur="changeNumber($event,pros)"
-															@focus="changeInput(pros)"
+															@blur="changeNumber($event, pros)"
 														/>
 														<view
 															class="iconfont icon-jiahao"
@@ -81,23 +84,33 @@
 											</view>
 											<view class="list-details-price none">
 												<view class="floor-item-act">
-													<view class="coupon-tags" v-if="item.product.couponsLogo">优惠券</view>
+													<view class="coupon-tags" v-if="item.product.couponsLogo"
+														>优惠券</view
+													>
 													<template v-if="pros.actStatus == 1">
 														<view
 															class="floor-tags"
-															v-if="pros.actStatus == 1 && PromotionsFormat(pros.promotions)"
+															v-if="
+																pros.actStatus == 1 && PromotionsFormat(pros.promotions)
+															"
 														>
 															{{ pros.promotions.name }}
 															<text
-																v-if="hasLogin && userIdentity == 2 && pros.priceFlag != 1"
+																v-if="
+																	hasLogin && userIdentity == 2 && pros.priceFlag != 1
+																"
 																>:¥{{ pros.price | NumFormat }}</text
 															>
 														</view>
-														<view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
+														<view class="floor-tags" v-else>{{
+															pros.promotions.name
+														}}</view>
 													</template>
 													<template v-if="pros.svipProductFlag == 1">
 														<view class="svip-tags">
-															<view class="tags" :class="{ none: vipFlag == 0 }">SVIP</view>
+															<view class="tags" :class="{ none: vipFlag == 0 }"
+																>SVIP</view
+															>
 															<view class="price" v-if="isShowVipFlag(pros)">{{
 																pros.svipPriceTag
 															}}</view>
@@ -117,13 +130,15 @@
 													<text
 														class="price-larger"
 														:class="
-															PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+															PromotionsFormat(pros.promotions) ||
+															pros.svipProductFlag == 1
 																? 'none'
 																: ''
 														"
 													>
 														¥{{
-															(PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
+															(PromotionsFormat(pros.promotions) ||
+															pros.svipProductFlag == 1
 																? pros.originalPrice
 																: pros.price) | NumFormat
 														}}
@@ -141,8 +156,7 @@
 															type="number"
 															maxlength="4"
 															v-model="pros.number"
-															@blur="changeNumber($event,pros)"
-															@focus="changeInput(pros)"
+															@blur="changeNumber($event, pros)"
 														/>
 														<view
 															class="iconfont icon-jiahao"
@@ -157,19 +171,27 @@
 													<template v-if="pros.actStatus == 1">
 														<view
 															class="floor-tags"
-															v-if="pros.actStatus == 1 && PromotionsFormat(pros.promotions)"
+															v-if="
+																pros.actStatus == 1 && PromotionsFormat(pros.promotions)
+															"
 														>
 															{{ pros.promotions.name }}
 															<text
-																v-if="hasLogin && userIdentity == 2 && pros.priceFlag != 1"
+																v-if="
+																	hasLogin && userIdentity == 2 && pros.priceFlag != 1
+																"
 																>:¥{{ pros.price | NumFormat }}</text
 															>
 														</view>
-														<view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
+														<view class="floor-tags" v-else>{{
+															pros.promotions.name
+														}}</view>
 													</template>
 													<template v-if="pros.svipProductFlag == 1">
 														<view class="svip-tags">
-															<view class="tags" :class="{ none: vipFlag == 0 }">SVIP</view>
+															<view class="tags" :class="{ none: vipFlag == 0 }"
+																>SVIP</view
+															>
 															<view class="price" v-if="isShowVipFlag(pros)">{{
 																pros.svipPriceTag
 															}}</view>
@@ -198,12 +220,8 @@
 													maxlength="4"
 													v-model="pros.number"
 													@blur="changeNumber($event, pros)"
-													@focus="changeInput(pros)"
 												/>
-												<view
-													class="iconfont icon-jiahao"
-													@click="changeCountAdd(pros)"
-												></view>
+												<view class="iconfont icon-jiahao" @click="changeCountAdd(pros)"></view>
 											</view>
 										</view>
 									</view>
@@ -219,9 +237,7 @@
 												<view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
 											</template>
 											<template v-if="pros.svipProductFlag == 1">
-												<view class="svip-tags">
-													<view class="tags none">SVIP</view>
-												</view>
+												<view class="svip-tags"> <view class="tags none">SVIP</view> </view>
 											</template>
 										</view>
 									</view>
@@ -277,11 +293,6 @@ import tuiNomore from '@/components/tui-components/nomore/nomore'
 import uniGrader from '@/components/uni-grade/uni-grade.vue'
 
 import { mapState, mapMutations } from 'vuex'
-const defaultListQuery = {
-	userId: 0,
-	pageNum: 1,
-	pageSize: 10
-}
 export default {
 	components: {
 		tuiLoadmore,
@@ -310,7 +321,13 @@ export default {
 			totalRecord: 0,
 			cartQuantity: 0,
 			popupShow: true,
-			listQuery: Object.assign({}, defaultListQuery),
+			listQuery: {
+				userId: 0,
+				productId: 0,
+				source: 2,
+				pageNum:1,
+				pageSize:10
+			},
 			productList: [],
 			handleData: {},
 			number: 0,
@@ -320,6 +337,7 @@ export default {
 			scrollTop: 0,
 			isEmpty: false,
 			isAllChecked: false,
+			navbarHeight: '',
 			loadding: false,
 			pullUpOn: true,
 			pullFlag: true,
@@ -331,10 +349,11 @@ export default {
 			vipFlag: 0,
 			userIdentity: 0,
 			isQuantity: false,
-			isStock: false,
+			isStock: false
 		}
 	},
-	onLoad() {
+	onLoad(option) {
+		this.listQuery.productId = option.productId
 		this.initGetStotage()
 	},
 	filters: {
@@ -355,58 +374,54 @@ export default {
 			this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
 			this.vipFlag = userInfo.vipFlag ? userInfo.vipFlag : 0
 			this.userIdentity = userInfo.userIdentity ? userInfo.userIdentity : 0
-			this.GetProductListInfo()
-			this.shoppingHeaderCartNumber()
+			this.getCommodityCombinationList()
 		},
-		GetProductListInfo() {
-			this.productList = []
-			this.listQuery.pageNum = 1
-			this.ProductService.getProductUserLikeList(this.listQuery)
+		getCommodityCombinationList() {
+			// 初始化商品详情配套商品
+			this.ProductService.getCommodityCombinationList(this.listQuery)
 				.then(response => {
-					let data = response.data
-					if (data.results && data.results.length > 0) {
-						this.isEmpty = false
-						this.hasNextPage = data.hasNextPage
-						this.totalRecord = data.totalRecord
-						this.productList = data.results.map((el,index)=>{
-								el.isChecked = false
-								el.number = el.minBuyNumber
-								return el
-							})
-						this.pullFlag = false
-						setTimeout(() => {
-							this.pullFlag = true
-						}, 500)
-						if (this.hasNextPage) {
-							this.pullUpOn = false
-							this.nomoreText = '上拉显示更多'
+					let data = response.data 
+					this.hasNextPage = data.hasNextPage
+					this.productList = data.results.map((el, index) => {
+						el.isChecked = false
+						el.number = el.minBuyNumber
+						return el
+					})
+					this.pullFlag = false
+					setTimeout(() => {
+						this.pullFlag = true
+					}, 500)
+					if (this.hasNextPage) {
+						this.pullUpOn = false
+						this.nomoreText = '上拉显示更多'
+					} else {
+						if (this.productList.length < 8) {
+							this.pullUpOn = true
 						} else {
-							if (this.productList.length < 8) {
-								this.pullUpOn = true
-							} else {
-								this.pullUpOn = false
-								this.loadding = false
-								this.nomoreText = '已至底部'
-							}
+							this.pullUpOn = false
+							this.loadding = false
+							this.nomoreText = '已至底部'
 						}
-					} else {
-						this.isEmpty = true
 					}
-					this.isRequest = true
 				})
 				.catch(error => {
-					this.$util.msg(error.msg, 2000)
+					console.log('获取组合商品列表失败')
 				})
 		},
-		GetOnReachBottomData(index) {
+		GetOnReachBottomData() {
 			//上拉加载
 			this.listQuery.pageNum += 1
-			this.ProductService.getProductUserLikeList(this.listQuery)
+			this.ProductService.getCommodityCombinationList(this.listQuery)
 				.then(response => {
 					let data = response.data
 					if (data.results && data.results.length > 0) {
 						this.hasNextPage = data.hasNextPage
-						this.productList = this.productList.concat(data.results)
+						let list = data.results.map((el, index) => {
+							el.isChecked = false
+							el.number = el.minBuyNumber
+							return el
+						})
+						this.productList = this.productList.concat(list)
 						this.pullFlag = false // 防上拉暴滑
 						setTimeout(() => {
 							this.pullFlag = true
@@ -425,32 +440,49 @@ export default {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
-		shoppingHeaderCartNumber() {
-			// 获取用户购物车储量
-			this.ProductService.shoppingHeaderCartNumber({
-				userId: this.listQuery.userId
-			})
-				.then(response => {
-					this.cartQuantity = response.data.length
-				})
-				.catch(error => {
-					console.log('获取购物车数量失败')
-				})
-		},
-		handleSupportingSubmit(type){
-			if(this.hasLogin){
-				switch(type){
+		handleSupportingSubmit(type) {
+			if (this.hasLogin) {
+				switch (type) {
 					case 'buy':
 						console.log('立即购买')
+						this.toConfirmation()
 						break
 					case 'add':
 						console.log('加入购物车')
+						this.getAddProductCart()
 						break
 				}
-			}else{
+			} else {
 				this.$api.navigateTo('/pages/login/login')
 			}
 		},
+		getAddProductCart() {
+			//增加购物车成功和toast弹窗提示成功
+			this.ProductService.shoppingAddCart({
+				productID: this.handleData.productId,
+				userID: this.listQuery.userId,
+				productCount: this.number
+			})
+				.then(response => {
+					this.$util.msg('加入购物车成功', 1500, true, 'success')
+				})
+				.catch(error => {
+					this.$util.msg(error.msg, 2000)
+				})
+		},
+		toConfirmation() {
+			//跳转确认订单页面
+			let data = []
+			this.productList.map((el, index) => {
+				if(el.isChecked){
+					data.push({ id:el.productId , count: el.number })
+				}
+			})
+			console.log('勾选商品',data)
+			this.$api.navigateTo(
+				`/pages/user/order/create-order?type=3&data=${JSON.stringify({ data: data })}`
+			)
+		},
 		handleClick(e) {
 			//取消收藏
 			if (e.index == 1) {
@@ -466,9 +498,6 @@ export default {
 			})
 				.then(response => {
 					this.$util.msg('取消收藏成功', 2000, true, 'success')
-					setTimeout(() => {
-						this.GetProductListInfo()
-					}, 2000)
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)
@@ -551,7 +580,7 @@ export default {
 				this.isQuantity = false
 			}
 		},
-		changeNumber(e,pros) {
+		changeNumber(e, pros) {
 			let _value = e.detail.value
 			if (!this.$api.isNumber(_value)) {
 				pros.number = pros.minBuyNumber
@@ -576,69 +605,9 @@ export default {
 				})
 			}
 		},
-		toConfirmation() {
-			//跳转确认订单页面
-			this.popupShow1 = false
-			let productStp = {
-				allPrice: this.number * this.buyRetailPrice,
-				allCount: this.number,
-				productID: this.handleData.productId,
-				productCount: this.number
-			}
-			this.$api.navigateTo(
-				`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({ data: productStp })}`
-			)
-		},
-		getAddProductCart() {
-			//增加购物车成功和toast弹窗提示成功
-			this.ProductService.shoppingAddCart({
-				productID: this.handleData.productId,
-				userID: this.listQuery.userId,
-				productCount: this.number
-			})
-				.then(response => {
-					this.popupShow1 = false
-					this.$util.msg('加入购物车成功', 1500, true, 'success')
-					this.shoppingHeaderCartNumber()
-				})
-				.catch(error => {
-					this.$util.msg(error.msg, 2000)
-				})
-		},
-		showPopup(index, pros) {
-			// 弹窗显示
-			switch (index) {
-				case 0:
-					this.popupShow = true
-					break
-				case 1:
-					this.popupShow1 = true
-					this.handleData = pros
-					console.log(this.handleData)
-					this.buyRetailPrice = this.handleData.price
-					this.buyRetailPriceStep = this.handleData.step
-					if (this.handleData.ladderPriceFlag == 1) {
-						this.number = this.handleData.maxBuyNumber ? this.handleData.maxBuyNumber : 1
-					} else {
-						this.number = this.handleData.minBuyNumber
-					}
-					break
-			}
-		},
-		hidePopup(index) {
-			// 弹窗隐藏
-			switch (index) {
-				case 0:
-					this.popupShow = false
-					break
-				case 1:
-					this.popupShow1 = false
-					break
-			}
-		},
 		isShowVipFlag(pros) {
 			// 超级会员价格显示控制
-			if(this.hasLogin){
+			if (this.hasLogin) {
 				if (pros.priceFlag != 1) {
 					if (this.userIdentity == 4 && this.vipFlag == 1) {
 						return true
@@ -652,15 +621,6 @@ export default {
 			this.isModallayer = true
 			this.$api.navigateTo(`/pages/goods/product?id=${id}`)
 			this.isModallayer = false
-		},
-		btnClick() {
-			this.$api.switchTabTo('/pages/tabBar/cart/index')
-		},
-		btnTouchstart() {
-			// console.log('btnTouchstart');
-		},
-		btnTouchend() {
-			// console.log('btnTouchend');
 		}
 	},
 	onPageScroll(e) {
@@ -670,12 +630,12 @@ export default {
 		if (this.hasNextPage) {
 			this.loadding = true
 			this.pullUpOn = true
-			// this.GetOnReachBottomData()
+			this.GetOnReachBottomData()
 		}
 	},
 	onPullDownRefresh() {
 		setTimeout(() => {
-			this.listQuery.pageNum = 1
+			this.getCommodityCombinationList()
 			uni.stopPullDownRefresh()
 		}, 200)
 	},
@@ -816,7 +776,7 @@ page {
 		float: left;
 		.p-stars {
 			float: left;
-			.p-no{
+			.p-no {
 				font-size: $font-size-28;
 				color: $text-color;
 				display: block;

+ 42 - 13
pages/goods/product.vue

@@ -170,13 +170,21 @@
 						<text class="iconfont icon-xiayibu"></text>
 					</view>
 					<!-- 配套商品 -->
-					<view class="product-supporting" v-if="userIdentity == 2 || userIdentity == 4">
-						<view class="product-supporting-title">配套商品(20)</view>
+					<view
+						class="product-supporting"
+						v-if="isShowSupportingList"
+					>
+						<view class="product-supporting-title">配套商品({{ supportingNum }}})</view>
 						<view class="product-supporting-list">
-							<view class="list" v-for="(supporting, index) in supportingList" :key="index">
-								<image class="list-image" :src="supporting" mode=""></image>
+							<view
+								class="list"
+								v-for="(supporting, index) in supportingList"
+								:key="index"
+								v-if="index < 4"
+							>
+								<image class="list-image" :src="supporting.image" mode=""></image>
 							</view>
-							<text class="iconfont icon-xiayibu"  @click.stop="handleSupporting"></text>
+							<text class="iconfont icon-xiayibu" @click.stop="handleSupporting"></text>
 						</view>
 					</view>
 					<!-- 优惠券 -->
@@ -675,12 +683,9 @@ export default {
 			isPreviewImage: false,
 			opentype: '',
 			collectionType: false,
-			supportingList: [
-				'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
-				'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
-				'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png',
-				'https://img.caimei365.com/group1/M00/00/10/rB-lGGCHqP-AIE9-AAEQHiqWjQY981.png'
-			]
+			isShowSupportingList:false,
+			supportingList: [],
+			supportingNum:0 // 组合商品总数
 		}
 	},
 	computed: {
@@ -837,12 +842,36 @@ export default {
 						this.shoppingHeaderCartNumber()
 					}
 					this.queryProductDetilsCoupons()
+					this.getCommodityCombinationList()
 					this.isRequest = true
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
+		getCommodityCombinationList() {
+			// 初始化商品详情配套商品
+			this.ProductService.getCommodityCombinationList({
+				userId: this.userId,
+				productId: this.productId,
+				source: 2,
+				pageNum:1,
+				pageSize:4
+			})
+				.then(response => {
+					const data = response.data 
+					this.supportingList = data.results
+					this.supportingNum = data.totalRecord
+					if(this.supportingList.length>0){
+						if(this.userIdentity == 2 || this.userIdentity == 4){
+							this.isShowSupportingList = true
+						}
+					}
+				})
+				.catch(error => {
+					console.log('获取组合商品列表失败')
+				})
+		},
 		queryProductDetilsCoupons() {
 			// 初始化商品详情优惠券信息
 			this.ProductService.QueryProductDetilsCoupons(this.couponParam)
@@ -1089,7 +1118,7 @@ export default {
 				productCount: this.number
 			}
 			this.$api.navigateTo(
-				`/pages/user/order/create-order?type=prodcut&data=${JSON.stringify({ data: productStp })}`
+				`/pages/user/order/create-order?type=1&data=${JSON.stringify({ data: productStp })}`
 			)
 			setTimeout(() => {
 				this.specClass = 'none'
@@ -1222,7 +1251,7 @@ export default {
 		},
 		handleSupporting() {
 			// 跳转组合商品页面
-			this.$api.navigateTo('/pages/goods/goods-supporting')
+			this.$api.navigateTo(`/pages/goods/goods-supporting?productId=${this.productId}`)
 		},
 		// 获取每个tab对应区域的区间
 		async getSectionProps() {

+ 62 - 52
pages/user/order/create-order.vue

@@ -154,6 +154,11 @@
 					source:2,			// 来源:1WWW 2小程序
 					userId:0			// 用户Id
 				}, 	
+				supportParm:{// 组合商品立即购买确认订单参数
+					productInfo:'',
+					source:2,			// 来源:1WWW 2小程序
+					userId:0			// 用户Id
+				},
 				postageParam: {// 邮费计算参数
 					productIds:0,		// 商品Id(逗号隔开)
 					userId:0,			// 用户Id
@@ -244,44 +249,48 @@
 				const data = JSON.parse(option.data)
 				const userInfo = await this.$api.getStorage()
 				console.log('infodata',data)
-				this.productParam.userId = this.cartParam.userId = this.postageParam.userId = userInfo.userId ? userInfo.userId : 0
+				this.productParam.userId = 
+				this.cartParam.userId = 
+				this.supportParm.userId = 
+				this.postageParam.userId = userInfo.userId ? userInfo.userId : 0
 				this.confirmParam.clubId = userInfo.clubId ? userInfo.clubId : 0
-				console.log('userInfo',this.productParam.userId)
-				if(option.type =='prodcut'){
-					this.confirmParam.cartType = 2 
-					this.productParam.productCount = data.data.productCount
-					this.productParam.productId = data.data.productIds
-					// this.productIds = this.postageParam.productIds = data.data.productIds
-					this.productIds = data.data.productIds
-					this.GetProductCreateOrderInfo()
-				}else{
-					this.confirmParam.cartType = 1
-					this.confirmType = 2
-					// this.productIds = this.cartParam.productIds = this.postageParam.productIds = data.data.productIds
-					this.productIds = this.cartParam.productIds = data.data.productIds
-					this.CartCreateOrderInfo()
+				switch(option.type){
+					case '1':
+						console.log('商品详情立即购买')
+						this.confirmParam.cartType = 2
+						this.productParam.productCount = data.data.productCount
+						this.productParam.productId = data.data.productIds
+						// this.productIds = this.postageParam.productIds = data.data.productIds
+						this.productIds = data.data.productIds
+						this.GetProductCreateOrderInfo()
+						break;
+					case '2':
+						console.log('购物车结算')
+						this.confirmParam.cartType = 1
+						this.confirmType = 2
+						// this.productIds = this.cartParam.productIds = this.postageParam.productIds = data.data.productIds
+						this.productIds = this.cartParam.productIds = data.data.productIds
+						this.CartCreateOrderInfo()
+						break;
+					case '3':
+						console.log('组合商品立即购买')
+						this.confirmParam.cartType = 1
+						this.confirmType = 2
+						this.supportParm.productInfo = JSON.stringify(data.data) 
+						this.GetOrderClubProductSupporting()
 				}
 			},
 			GetProductCreateOrderInfo(){// 商品立即购买确认订单数据初始化
 				this.OrderService.ProductCreateOrderInfo(this.productParam).then(response =>{
-					let data = response.data
-					this.isRequest = true
-					this.goodsData = data.list
-					this.couponList = data.couponList
-					this.userMoney = data.userMoney
-					this.reducedPrice = data.reducedPrice
-					this.totalCount = data.totalCount
-					this.allPrice = data.totalPrice
-					this.rechargeGoods = data.rechargeGoods
-					this.isCouponShow = true
-					if(this.couponList.length>0){
-						this.couponAmount = data.couponList[0].couponAmount
-						this.confirmParam.clubCouponId = data.couponList[0].clubCouponId 
-					}
-					this.orderShouldPayFee = this.allPrice - this.couponAmount
-					this.totalDiscountAmount = this.reducedPrice + this.couponAmount
-					this.postageParam.productIds = this.getProductIds(data.list)
-					this.getAddressData()
+					this.setCreatDataInfo(response.data)
+				})
+				.catch(error =>{
+					this.$util.msg(error.msg,2000)
+				})
+			},
+			GetOrderClubProductSupporting(){// 组合商品立即购买确认订单数据初始化
+				this.OrderService.OrderClubProductSupporting(this.supportParm).then(response =>{
+					this.setCreatDataInfo(response.data)
 				})
 				.catch(error =>{
 					this.$util.msg(error.msg,2000)
@@ -289,30 +298,31 @@
 			},
 			CartCreateOrderInfo(){// 购物车去结算确认订单数据初始化
 				this.OrderService.CartCreateOrderInfo(this.cartParam).then(response =>{
-					let data = response.data
-					this.isRequest = true
-					debugger
-					this.goodsData = data.list
-					this.couponList = data.couponList
-					this.userMoney = data.userMoney
-					this.reducedPrice = data.reducedPrice
-					this.totalCount = data.totalCount
-					this.allPrice = data.totalPrice
-					this.rechargeGoods = data.rechargeGoods
-					if(this.couponList.length>0){
-						this.isCouponShow = true
-						this.couponAmount = data.couponList[0].couponAmount
-						this.confirmParam.clubCouponId = data.couponList[0].clubCouponId 
-					}
-					this.orderShouldPayFee = this.allPrice - this.couponAmount
-					this.totalDiscountAmount = this.reducedPrice + this.couponAmount
-					this.postageParam.productIds = this.getProductIds(data.list)
-					this.getAddressData()
+					this.setCreatDataInfo(response.data)
 				})
 				.catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
+			setCreatDataInfo(data){// 公共初始化数据
+				this.isRequest = true
+				this.goodsData = data.list
+				this.couponList = data.couponList
+				this.userMoney = data.userMoney
+				this.reducedPrice = data.reducedPrice
+				this.totalCount = data.totalCount
+				this.allPrice = data.totalPrice
+				this.rechargeGoods = data.rechargeGoods
+				if(this.couponList.length>0){
+					this.isCouponShow = true
+					this.couponAmount = data.couponList[0].couponAmount
+					this.confirmParam.clubCouponId = data.couponList[0].clubCouponId 
+				}
+				this.orderShouldPayFee = this.allPrice - this.couponAmount
+				this.totalDiscountAmount = this.reducedPrice + this.couponAmount
+				this.postageParam.productIds = this.getProductIds(data.list)
+				this.getAddressData()
+			},
 			// 获取订单商品id列表
 			getProductIds(list){
 				const productIds = []

+ 14 - 0
services/order.service.js

@@ -259,4 +259,18 @@ export default class OrderService {
             isHost:true
         })
     }
+	/**
+	 * @组合商品多商品立即购买
+	 * @param:userId 用户ID(必填)
+	 * @param:productInfo 用户ID(必填)
+	 * @param:source 来源 1 WWW 2 小程序
+	 */
+    OrderClubProductSupporting (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/club/product/buynow', 
+            data, 
+            isLoading: true ,
+            isHost:true
+        })
+    }
 }

+ 27 - 0
services/product.service.js

@@ -120,6 +120,19 @@ export default class ProductService {
             isHost:true
         })
     }
+    /**
+	 * @批量加入购物车
+	 * @param:userId 用户ID(必填)
+	 * @param:productInfo 商品及数量信息:[// 商品Id 数量]
+	 */
+    ShoppingAddCarts (data = {}) {
+        return this.AjaxService.post({
+            url:'/order/club/cart/add/bulk',
+            data,
+            isLoading: true ,
+			isHost:true
+        })
+    }
     /**
 	 * @查询购物车数量
 	 * @param:userId 用户ID(必填)
@@ -435,5 +448,19 @@ export default class ProductService {
             isHost:true
         })
     }
+    /**
+	 * @商品详情组合商品列表
+	 * @param:userId 用户userId(必传)
+	 * @param:productId 商品Id字符串逗号隔开
+	 * @param:source 来源 1 网站 2 小程序
+	 */
+    getCommodityCombinationList (data = {}) {
+        return this.AjaxService.get({
+            url:'/commodity/seller/combination/list',
+            data,
+            isLoading: true ,
+            isHost:true
+        })
+    }
 	
 }