瀏覽代碼

1

newCard
congzc 2 年之前
父節點
當前提交
166e2f77b5
共有 1 個檔案被更改,包括 26 行新增5 行删除
  1. +26
    -5
      pages/integralmall/payIntegcoupondetail/index.js

+ 26
- 5
pages/integralmall/payIntegcoupondetail/index.js 查看文件

@@ -21,7 +21,8 @@ Page({
showErr: false,
showAlert: false,
remainingPoints:0,
submitAble:true
submitAble:true,
couponChannelDetail:null
},
getUserInfo: function () {
let that = this;
@@ -221,6 +222,7 @@ Page({
}
}
})
},
/**
* 支付订单更新
@@ -239,9 +241,26 @@ Page({
})
.then(res => {
wx.hideLoading()
wx.navigateTo({
url: '/pages/integralmall/payIntegcouponStatus/index?title=' + _this.data.data.title + '&coverImg=' + _this.data.data.coverImg + '&remainingPoints=' + _this.data.remainingPoints + '&type=' + _this.data.data.type,
})
// 如果是停车券直接跳往停车页
if (_this.couponChannelDetail.type == 51 ||_this.couponChannelDetail.type== 5) {
wx.showModal({
title: '兑换成功',
cancelText: '我知道了',
confirmText: '去使用',
content: '即将前往停车页面',
success(res) {
if (res.confirm) {
wx.switchTab({
url: '/index/passCar'
});
}
}
})
} else {
wx.navigateTo({
url: '/pages/integralmall/payIntegcouponStatus/index?title=' + _this.data.data.title + '&coverImg=' + _this.data.data.coverImg + '&remainingPoints=' + _this.data.remainingPoints + '&type=' + _this.data.data.type,
})
}
})
.catch(err => {
if (err.code != 12002) {
@@ -262,6 +281,8 @@ Page({
couponChannelId: couponChannelId
}
}).then(res => {
that.couponChannelDetail=res.data
console.log(that.couponChannelDetail.merchantVoList[0].merchantName,'that.couponChannelDetail');
wx.stopPullDownRefresh();
that.getUserInfo()
let data = res.data;
@@ -279,5 +300,5 @@ Page({
this.setData({
submitAble: true
})
}
},
})

Loading…
取消
儲存