修复店铺和平台优惠券同时选择时,显示问题
parent
52bcf07e25
commit
bbeb31e8a3
|
@ -51,6 +51,7 @@ export default {
|
||||||
list: [], // 优惠券列表
|
list: [], // 优惠券列表
|
||||||
total: 0, // 优惠券总数
|
total: 0, // 优惠券总数
|
||||||
params: { // 请求参数
|
params: { // 请求参数
|
||||||
|
getType: 'FREE',
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
}
|
}
|
||||||
|
@ -95,6 +96,7 @@ export default {
|
||||||
content: '<p>优惠券领取成功,可到我的优惠券页面查看</p>',
|
content: '<p>优惠券领取成功,可到我的优惠券页面查看</p>',
|
||||||
okText: '我的优惠券',
|
okText: '我的优惠券',
|
||||||
cancelText: '立即使用',
|
cancelText: '立即使用',
|
||||||
|
closable: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
this.$router.push('/home/Coupons')
|
this.$router.push('/home/Coupons')
|
||||||
},
|
},
|
||||||
|
|
|
@ -313,8 +313,12 @@ export default {
|
||||||
let notSupArea = res.result.notSupportFreight;
|
let notSupArea = res.result.notSupportFreight;
|
||||||
this.selectedCoupon = {};
|
this.selectedCoupon = {};
|
||||||
if (res.result.platformCoupon)
|
if (res.result.platformCoupon)
|
||||||
this.selectedCoupon.platformCoupon = res.result.platformCoupon;
|
this.selectedCoupon[res.result.platformCoupon.memberCoupon.id] = res.result.platformCoupon;
|
||||||
Object.assign(this.selectedCoupon, res.result.storeCoupons);
|
if (res.result.storeCoupons && Object.keys(res.result.storeCoupons)[0]) {
|
||||||
|
let storeMemberCouponsId = Object.keys(res.result.storeCoupons)[0];
|
||||||
|
let storeCouponId = res.result.storeCoupons[storeMemberCouponsId].memberCoupon.id;
|
||||||
|
this.selectedCoupon[storeCouponId] = res.result.storeCoupons[storeMemberCouponsId];
|
||||||
|
}
|
||||||
if (notSupArea) {
|
if (notSupArea) {
|
||||||
let content = [];
|
let content = [];
|
||||||
let title = "";
|
let title = "";
|
||||||
|
@ -340,7 +344,7 @@ export default {
|
||||||
const couponKeys = Object.keys(this.selectedCoupon);
|
const couponKeys = Object.keys(this.selectedCoupon);
|
||||||
if (couponKeys.length) {
|
if (couponKeys.length) {
|
||||||
this.couponList.forEach((e) => {
|
this.couponList.forEach((e) => {
|
||||||
if (e.id === this.selectedCoupon[couponKeys].memberCoupon.id) {
|
if (this.selectedCoupon[e.id] && e.id === this.selectedCoupon[e.id].memberCoupon.id) {
|
||||||
this.usedCouponId.push(e.id);
|
this.usedCouponId.push(e.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue