优惠券相关更新
This commit is contained in:
@@ -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,17 +346,20 @@
|
||||
let productList = selectCouponData.filter(v => v.type == 2);
|
||||
if ( productList.length > 0 ) {
|
||||
uni.cache.set('selectCouponData',couponList)
|
||||
let params = {
|
||||
shopId: this.shopId,
|
||||
orderId: this.orderId,
|
||||
|
||||
if ( this.couopnInfo && this.orderId ) {
|
||||
let params = {
|
||||
shopId: this.shopId,
|
||||
orderId: this.orderId,
|
||||
}
|
||||
if ( this.couopnInfo.userCouponInfos.filter(v => v.type == 1).length > 0 ) {
|
||||
params.userCouponInfos = this.couopnInfo.userCouponInfos.filter(v => v.type == 1)
|
||||
}
|
||||
if ( this.couopnInfo.isPointsChecked && this.couopnInfo.calcUsablePointsData.pointsNum && this.couopnInfo.calcUsablePointsData.pointsNum > 0) {
|
||||
params.pointsNum = this.couopnInfo.calcUsablePointsData.pointsNum;
|
||||
}
|
||||
let res = await this.api.useCoupon(params)
|
||||
}
|
||||
if ( this.couopnInfo.userCouponInfos.filter(v => v.type == 1).length > 0 ) {
|
||||
params.userCouponInfos = this.couopnInfo.userCouponInfos.filter(v => v.type == 1)
|
||||
}
|
||||
if ( this.couopnInfo.isPointsChecked && this.couopnInfo.calcUsablePointsData.pointsNum && this.couopnInfo.calcUsablePointsData.pointsNum > 0) {
|
||||
params.pointsNum = this.couopnInfo.calcUsablePointsData.pointsNum;
|
||||
}
|
||||
let res = await this.api.useCoupon(params)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user