Commit 3f23bc90 by 李伟康

fix(OrderPopup): 修复可用优惠券列表的筛选逻辑

- 更新了优惠券筛选条件,确保只显示可用的优惠券
- 修复了已选优惠券的显示问题,现在能正确高亮显示
1 parent 2388df1c
......@@ -112,7 +112,7 @@ export default {
},
async getCustomerCouponList (customerPhone) {
const phoneRex = /^[1]([3-9])[0-9]{9}$/,
{ userInfo, params: formParams, data: orderObj } = this,
{ data: orderObj } = this,
params = {
customerPhone,
statusList: [0, 1],
......@@ -123,7 +123,7 @@ export default {
this.customerCouponList = data.filter((item) => {
return (
item.status != 1 ||
(item.status == 1 && item.customerCouponCode == orderObj[formParams.idKey])
(item.status == 1 && item.id == orderObj.customerCouponId)
);
})
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!