From 03d26aca1b656c03dc4280f85acb1132bd87639d Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期一, 09 九月 2024 23:57:43 +0800
Subject: [PATCH] update 会员信息、兑换商品等
---
sub_pages/customer/coupon/good-detail.vue | 2 +-
sub_pages/customer/shopping/confirm.vue | 15 +++++++++++----
sub_pages/customer/coupon/good-self.vue | 10 +++++-----
3 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/sub_pages/customer/coupon/good-detail.vue b/sub_pages/customer/coupon/good-detail.vue
index 47fb628..cad5a75 100644
--- a/sub_pages/customer/coupon/good-detail.vue
+++ b/sub_pages/customer/coupon/good-detail.vue
@@ -69,7 +69,7 @@
this.$message.showLoading()
const {
data
- } = await this.$http.request('get', '/api/pub/announcement/page/view?id=' + this.id, {
+ } = await this.$http.request('get', '/api/customer/point/goods/list/view?id=' + this.id, {
})
this.$message.hideLoading()
diff --git a/sub_pages/customer/coupon/good-self.vue b/sub_pages/customer/coupon/good-self.vue
index 547ac56..a2abe80 100644
--- a/sub_pages/customer/coupon/good-self.vue
+++ b/sub_pages/customer/coupon/good-self.vue
@@ -104,7 +104,7 @@
methods: {
isIngood(item) {
for (var tmp of this.cache_goods) {
- if (tmp.id == item.id) {
+ if (tmp.goodsId == item.goodsId) {
return true
}
}
@@ -114,7 +114,7 @@
async updateSelectGood(item) {
var has = false
for (var tmp of this.cache_goods) {
- if (tmp.id == item.id) {
+ if (tmp.goodsId == item.goodsId) {
has = true
break
}
@@ -125,7 +125,7 @@
//移除
var arr = []
for (var tmp of this.cache_goods) {
- if (tmp.id == item.id) {} else {
+ if (tmp.goodsId == item.goodsId) {} else {
arr.push(tmp)
}
}
@@ -136,7 +136,7 @@
}
arr.push(item)
}
- await this.$store.dispatch('cache_coupon_select', arr)
+ await this.$store.dispatch('cache_goods_select', arr)
this.$forceUpdate()
},
@@ -147,7 +147,7 @@
},
getPointGood(item) {
uni.navigateTo({
- url: `/sub_pages/customer/coupon/good-detail?id=${item.id}`
+ url: `/sub_pages/customer/coupon/good-detail?id=${item.goodsId}`
})
},
toGoodAll() {
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