Commit 6808e8d1 by 高淑倩

modify: 积分兑换

parent 04adec83
......@@ -75,20 +75,26 @@ Component({
const params = {
activateId: this.data.exchangeId
}
wxService.post(`/coupon/pointsRedemptionCouponSetting/exchange`, this.data.exchangeId).then(res=>{
const {result,data} = res.data
if(result == 0){
wxService.post(`/coupon/pointsRedemptionCouponSetting/exchange`, this.data.exchangeId).then(res => {
if(res){
if(res.result == 0){
wx.hideLoading()
wx.showToast({
title: '兑换成功',
icon: 'success'
})
} else {
wx.showToast({
title: '兑换失败',
icon: 'none'
},()=>{
this.setData({
isExchange: false
})
})
}
} else {
this.setData({
isExchange: false
})
}
}).catch(err => {
console.log('ffff',err)
})
}
}
......
......@@ -39,6 +39,7 @@ Component({
methods: {
// 查询积分信息
getMemberPointInfo(){
console.log('getMemberPointInfo')
wx.showLoading({
title: '加载中'
})
......
......@@ -25,7 +25,7 @@ wxService.page({
})
this.getCouponDetail(cardno)
// 条形码
wxbarcode.barcode('barcode',cardno, 600, 150);
wxbarcode.barcode('barcode',cardno, 550, 150);
},
// 查询单个优惠券
......
......@@ -144,6 +144,12 @@ class Http {
content: '请求数据超时'
})
}
if(error.response.data.desc){
wx.showToast({
title: `${error.response.data.desc}`,
icon: 'none'
})
}
console.log(JSON.stringify(error))
return Promise.reject(error)
}
......
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