Commit 6808e8d1 by 高淑倩

modify: 积分兑换

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