优惠券相关更新

This commit is contained in:
GaoHao
2024-11-25 17:11:42 +08:00
parent 18aecb9f6c
commit e17d5ffcaa

View File

@@ -327,7 +327,7 @@
let productList = selectCouponData.filter(v => v.type == 2);
if ( couponList.length > 0 ) {
uni.cache.set('selectCouponData',productList)
if ( this.couopnInfo ) {
if ( this.couopnInfo && this.orderId ) {
let params = {
shopId: this.shopId,
orderId: this.orderId,
@@ -346,6 +346,8 @@
let productList = selectCouponData.filter(v => v.type == 2);
if ( productList.length > 0 ) {
uni.cache.set('selectCouponData',couponList)
if ( this.couopnInfo && this.orderId ) {
let params = {
shopId: this.shopId,
orderId: this.orderId,
@@ -359,6 +361,7 @@
let res = await this.api.useCoupon(params)
}
}
}
uni.navigateBack();
},