@@ -47,13 +47,21 @@
if (res.confirm) {
const arr = await that.$api(`/userCoupon/getCoupon/${e._id}`, 'POST');
if (arr.errcode == '0') {
- uni.showToast({
- title: `领取成功`,
- icon: 'none',
- duration: 3000
- })
- that.clearPage();
- that.search();
+ if (arr.data) {
+ uni.showToast({
+ title: arr.data.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ } else {
+ title: `领取成功`,
+ duration: 3000
+ })
+ that.clearPage();
+ that.search();
+ }
} else {
uni.showToast({
title: arr.errmsg,