Commit 7916658c by 高淑倩

modify: 消费集点兑换

parent d3bd4464
......@@ -91,8 +91,20 @@ wxService.page({
wxService.router(`/subPackage/page/pages/pointGoodsList/pointGoodsList`).search({ activityId })
},
handleGo() {
// 兑换成功跳转
this.getPointExchange()
// 跳转 popupType: 0 默认不跳转 1 优惠券 2 积分
const { popupType } = this.data
let dialog = this.data.dialog
if (popupType == 1) {
wxService.router(`/pages/coupons/coupons`)
} else if (popupType == 2) {
wxService.router(`/pages/integralWater/integralWater`)
} else {
// 隐藏 dialog
dialog.show = false
this.setData({
dialog
})
}
},
// 触点有礼-消费集点兑换
getPointExchange() {
......@@ -106,30 +118,18 @@ wxService.page({
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
// 隐藏 dialog
// 显示 dialog
let dialog = this.data.dialog
dialog.show = false
dialog.show = true
this.setData({
dialog
}, () => {
// 跳转 popupType: 0 默认不跳转 1 优惠券 2 积分
const { popupType } = this.data
if (popupType == 1) {
wxService.router(`/pages/coupons/coupons`)
} else if (popupType == 2) {
wxService.router(`/pages/integralWater/integralWater`)
}
})
}
}
})
},
handleToGet() {
let dialog = this.data.dialog
dialog.show = true
this.setData({
dialog
})
this.getPointExchange()
},
/**
* 生命周期函数--监听页面初次渲染完成
......
......@@ -19,7 +19,7 @@
border-radius="{{20}}"
/>
</view>
<view wx:if="{{countObj.totalPoints}}" class="info-status-btn available breathe-btn border_box" bindtap="handleToGet">
<view wx:if="{{!countObj.totalPoints}}" class="info-status-btn available breathe-btn border_box" bindtap="handleToGet">
可领取奖励<text class="total-points"> {{countObj.totalPoints}} </text>次
</view>
<view wx:else class="info-status-btn unacommpolished border_box">
......
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