-
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 (#2006)
* π₯ Remove christmas campaign ui * π₯ Disable christmas coupon functionality
- Loading branch information
1 parent
a813b96
commit a4fec96
Showing
4 changed files
with
2 additions
and
33 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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; | ||
}, | ||
}, | ||
}; |