From 1b5dd40a24e5be63437aaa5c30e2e334636cdbe8 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期二, 10 九月 2024 15:19:06 +0800
Subject: [PATCH] 1

---
 sub_pages/customer/shopping/confirm.vue |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/sub_pages/customer/shopping/confirm.vue b/sub_pages/customer/shopping/confirm.vue
index c88048e..f496ad4 100644
--- a/sub_pages/customer/shopping/confirm.vue
+++ b/sub_pages/customer/shopping/confirm.vue
@@ -51,14 +51,14 @@
 				this.dto.couponRecordStr = this.cache_coupon.couponName
 			}
 			//兑换券
-			this.dto.couponRecordStr = ''
+			this.dto.goodsRecordIdListStr = ''
 			if (this.cache_goods && this.cache_goods.length > 0) {
-				this.dto.couponRecordStr = ''
+				this.dto.goodsRecordIdListStr = ''
 				var names = []
 				for (var tmp of this.cache_goods) {
 					names.push(tmp.name || tmp.title || '')
 				}
-				this.dto.couponRecordStr = names.join(',')
+				this.dto.goodsRecordIdListStr = names.join(',')
 			}
 		},
 		onLoad(options) {
@@ -216,6 +216,12 @@
 					return
 				}
 				this.dto.addressId = this.address.id
+				var goodsRecordIds = []
+				if (this.dto.goodsRecordIdListStr) {
+					for (var t of this.cache_goods) {
+						t.push(t.goodsId)
+					}
+				}
 
 				let tmp = this
 				wx.login({
@@ -229,7 +235,8 @@
 							} = await tmp.$http.request('post', '/api/customer/flower/order/commit', {
 								data: {
 									...tmp.dto,
-									wxcode: res.code
+									wxcode: res.code,
+									goodsRecordIdList: goodsRecordIds
 								}
 							})
 							tmp.$message.hideLoading()

--
Gitblit v1.9.3