|
@@ -61,8 +61,6 @@ Page({
|
|
|
this.setData({
|
|
|
orderNo: options.orderNo,
|
|
|
tabIdx: options.tabIdx
|
|
|
- }, () => {
|
|
|
- this.getDetail(this.onTimeout)
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -70,6 +68,9 @@ Page({
|
|
|
this.setData({
|
|
|
serviceShow: true
|
|
|
})
|
|
|
+ if(this.data.orderNo) {
|
|
|
+ this.getDetail(this.onTimeout)
|
|
|
+ }
|
|
|
},
|
|
|
onHide() {
|
|
|
this.setData({
|
|
@@ -87,6 +88,7 @@ Page({
|
|
|
tempGoods.push({
|
|
|
...item,
|
|
|
shortUrl: item.activationCodeInfo.shortUrl,
|
|
|
+ code: item.activationCodeInfo.activationCode,
|
|
|
originalPrice: this.formatPrice(item.paymentCashAmount, 'ALL'),
|
|
|
typeName: this.formatPeriod(item.activationCodeInfo?.times || 1, item.activationCodeInfo.type)
|
|
|
})
|
|
@@ -97,11 +99,13 @@ Page({
|
|
|
} else if(result.refundStyle === 'OFFLINE') {
|
|
|
refundStyleStr = '线下'
|
|
|
}
|
|
|
+ const firstGoods = tempGoods[0]
|
|
|
const goodsInfo = {
|
|
|
orderNo: result.orderNo,
|
|
|
createTime: result.createTime,
|
|
|
wechatStatus: result.wechatStatus,
|
|
|
goods: tempGoods,
|
|
|
+ code: firstGoods.code || '',
|
|
|
refundOrderId: result.refundOrderId,
|
|
|
refundTime: result.refundTime,
|
|
|
refundAmount: this.formatPrice(result.refundAmount || 0, 'ALL'),
|
|
@@ -271,5 +275,35 @@ Page({
|
|
|
wx.showToast({title: '复制失败,请稍后再试', icon: 'none'})
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ onActivation(e: { currentTarget: any }) {
|
|
|
+ const code = e.currentTarget.dataset.code || ''
|
|
|
+ if(!code) {
|
|
|
+ wx.showToast({
|
|
|
+ title: '暂无法激活',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '../protocol/register?type=activation&code=' + code
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onDownload() {
|
|
|
+ wx.saveImageToPhotosAlbum({
|
|
|
+ filePath: this.data.canvasImg,
|
|
|
+ success: () => {
|
|
|
+ wx.showToast({
|
|
|
+ title: '保存成功',
|
|
|
+ icon: 'success',
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ wx.showToast({
|
|
|
+ title: '保存失败',
|
|
|
+ icon: 'none',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|