Compare commits

..

2 Commits

  1. 17
      pages/user/coupon/GetCoupon/index.vue
  2. 17
      pages/user/coupon/UserCoupon/index.vue

17
pages/user/coupon/GetCoupon/index.vue

@ -158,23 +158,30 @@ export default {
},
getCoupon: function(id, index) {
let that = this
let list = that.couponsList
getCouponReceive(id)
.then(function(res) {
let list = that.couponsList,
tmplIds = ['lOOnpYASRMKy81gh5tNMR7OXSHMKw05x-aosYjvhK-E', 'lejbsmRtheMLXEGNx_UhVHuq5P6Yjwfokc183n9oMek'];
uni.requestSubscribeMessage({
tmplIds,
fail(err) {
console.log("requestSubscribeMessage err", err)
},
complete() {
getCouponReceive(id).then(function(res) {
list[index].isUse = true
uni.showToast({
title: '领取成功',
icon: 'success',
duration: 2000,
})
})
.catch(function(err) {
}).catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: 'none',
duration: 2000,
})
})
}
})
},
getUseCoupons() {
if (this.loading) return //false

17
pages/user/coupon/UserCoupon/index.vue

@ -150,23 +150,30 @@
})
return
}
let list = that.couponsList
getCouponReceive(id)
.then(function(res) {
let list = that.couponsList,
tmplIds = ['lOOnpYASRMKy81gh5tNMR7OXSHMKw05x-aosYjvhK-E', 'lejbsmRtheMLXEGNx_UhVHuq5P6Yjwfokc183n9oMek'];
uni.requestSubscribeMessage({
tmplIds,
fail(err) {
console.log("requestSubscribeMessage err", err)
},
complete() {
getCouponReceive(id).then(function(res) {
list[index].isUse = true
uni.showToast({
title: '领取成功',
icon: 'success',
duration: 2000,
})
})
.catch(function(err) {
}).catch(function(err) {
uni.showToast({
title: err.msg || err.response.data.msg || err.response.data.message,
icon: 'none',
duration: 2000,
})
})
}
})
},
getUseCoupons: function(i) {

Loading…
Cancel
Save