Commit 622a73c2 by 李嘉林

领取优惠券

parent d74c0c72
......@@ -327,12 +327,14 @@ export function getCoupon(code, item) {
confirmColor: "#CA173B",
content: `是否消耗${usingIntegrals}积分领取`
})
.then(() => {
useCoupon(2, couponCode, usingIntegrals);
.then((res) => {
if (res.confirm) {
useCoupon(2, couponCode, usingIntegrals);
console.log("用户点击确认");
} else if (res.cancel) {
console.log("用户点击取消");
}
})
.catch(() => {
// on cancel
});
return;
} else {
useCoupon(1, couponCode, usingIntegrals);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment