-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔥 Disable christmas coupon functionality
- Loading branch information
1 parent
17deb02
commit e375bec
Showing
1 changed file
with
2 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,8 @@ | ||
import { | ||
CHRISTMAS_CAMPAIGN_MIN_SPEND, | ||
CHRISTMAS_CAMPAIGN_COUPON, | ||
} from '@/constant/index'; | ||
|
||
export default { | ||
computed: { | ||
mixinCoupon() { | ||
return this.$route.query.coupon || ''; | ||
}, | ||
}, | ||
methods: { | ||
getApplicableCoupon({ cartCoupon, checkoutPrice }) { | ||
if (this.mixinCoupon || cartCoupon) { | ||
return this.mixinCoupon || cartCoupon; | ||
} | ||
return checkoutPrice > CHRISTMAS_CAMPAIGN_MIN_SPEND | ||
? CHRISTMAS_CAMPAIGN_COUPON | ||
: ''; | ||
const queryCoupon = this.$route.query.coupon || ''; | ||
return queryCoupon || cartCoupon || undefined; | ||
}, | ||
}, | ||
}; |