zs пре 2 година
родитељ
комит
34903459a5
1 измењених фајлова са 15 додато и 7 уклоњено
  1. 15 7
      pagesHome/exchange/index.vue

+ 15 - 7
pagesHome/exchange/index.vue

@@ -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 {
+									uni.showToast({
+										title: `领取成功`,
+										icon: 'none',
+										duration: 3000
+									})
+									that.clearPage();
+									that.search();
+								}
 							} else {
 								uni.showToast({
 									title: arr.errmsg,