zs 2 anni fa
parent
commit
34903459a5
1 ha cambiato i file con 15 aggiunte e 7 eliminazioni
  1. 15 7
      pagesHome/exchange/index.vue

+ 15 - 7
pagesHome/exchange/index.vue

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