|
|
@@ -283,88 +283,91 @@ |
|
|
|
} |
|
|
|
|
|
|
|
function copyCode(e, start, items) { |
|
|
|
console.log("e====",e,start,items) |
|
|
|
let item = e; |
|
|
|
// // 复制兑换码到剪贴板 |
|
|
|
let code = e.redeemCode ? e.redeemCode : items.redeemCode; |
|
|
|
if (item.equityType == 'ZFB') { |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/subpackage/service/zfbqy/zfbqy` |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
console.log(item, "===e===", e.equityType, items, start); |
|
|
|
if (start == 'WAIT_ACTIVATED') { //待激活 |
|
|
|
uni.showModal({ |
|
|
|
title: '温馨提示', |
|
|
|
content: "激活后,可领取卡卷", |
|
|
|
confirmText: "去激活", |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subpackage/personal-center/install-activation-order', |
|
|
|
}) |
|
|
|
} else if (res.cancel) { |
|
|
|
console.log('用户点击取消'); |
|
|
|
}else{ |
|
|
|
let code = e.redeemCode ? e.redeemCode : items.redeemCode; |
|
|
|
console.log(item, "===e===", e.equityType, items, start); |
|
|
|
if (start == 'WAIT_ACTIVATED') { //待激活 |
|
|
|
uni.showModal({ |
|
|
|
title: '温馨提示', |
|
|
|
content: "激活后,可领取卡卷", |
|
|
|
confirmText: "去激活", |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subpackage/personal-center/install-activation-order', |
|
|
|
}) |
|
|
|
} else if (res.cancel) { |
|
|
|
console.log('用户点击取消'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} else if (start == 'WAIT_USE') { //待领取使用 |
|
|
|
uni.showModal({ |
|
|
|
title: '温馨提示', |
|
|
|
content: "请在领取后120天内使用,超期失效", |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
request("a6bd3d8c855548eb8015655ea8d9287b", { |
|
|
|
type: 2, |
|
|
|
data: { |
|
|
|
mobile: getItem('mobile') + "", |
|
|
|
notificationType: 'USE', |
|
|
|
cardIds: [items.id], |
|
|
|
couponId: couponId.value, |
|
|
|
equityId: item.singleEquityId, |
|
|
|
orderId: items.orderId ? items.orderId : items.purchasedEquityId |
|
|
|
}, |
|
|
|
method: "POST", |
|
|
|
showLoading: true, |
|
|
|
}).then((item) => { |
|
|
|
// uni.setClipboardData({ |
|
|
|
// data: code, |
|
|
|
// success: function() { |
|
|
|
// uni.showToast({ |
|
|
|
// title: '已复制兑换码', |
|
|
|
// icon: 'success', |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
// }); |
|
|
|
loadExchangeCodes(); |
|
|
|
uni.showToast({ |
|
|
|
title: '领取成功', |
|
|
|
icon: 'success', |
|
|
|
}); |
|
|
|
// uni.navigateBack(); |
|
|
|
}) |
|
|
|
} else if (res.cancel) { |
|
|
|
console.log('用户点击取消'); |
|
|
|
}); |
|
|
|
} else if (start == 'WAIT_USE') { //待领取使用 |
|
|
|
uni.showModal({ |
|
|
|
title: '温馨提示', |
|
|
|
content: "请在领取后120天内使用,超期失效", |
|
|
|
success: function(res) { |
|
|
|
if (res.confirm) { |
|
|
|
request("a6bd3d8c855548eb8015655ea8d9287b", { |
|
|
|
type: 2, |
|
|
|
data: { |
|
|
|
mobile: getItem('mobile') + "", |
|
|
|
notificationType: 'USE', |
|
|
|
cardIds: [items.id], |
|
|
|
couponId: couponId.value, |
|
|
|
equityId: item.singleEquityId, |
|
|
|
orderId: items.orderId ? items.orderId : items.purchasedEquityId |
|
|
|
}, |
|
|
|
method: "POST", |
|
|
|
showLoading: true, |
|
|
|
}).then((item) => { |
|
|
|
// uni.setClipboardData({ |
|
|
|
// data: code, |
|
|
|
// success: function() { |
|
|
|
// uni.showToast({ |
|
|
|
// title: '已复制兑换码', |
|
|
|
// icon: 'success', |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
// }); |
|
|
|
loadExchangeCodes(); |
|
|
|
uni.showToast({ |
|
|
|
title: '领取成功', |
|
|
|
icon: 'success', |
|
|
|
}); |
|
|
|
// uni.navigateBack(); |
|
|
|
}) |
|
|
|
} else if (res.cancel) { |
|
|
|
console.log('用户点击取消'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
// 已使用 USED |
|
|
|
// 已过期 EXPIRED |
|
|
|
} else if (start == 'USED') { //已使用 |
|
|
|
console.log("已复制兑换码1111", code) |
|
|
|
uni.setClipboardData({ |
|
|
|
data: code, |
|
|
|
success: function() { |
|
|
|
console.log("已复制兑换码") |
|
|
|
uni.showToast({ |
|
|
|
title: '已复制兑换码', |
|
|
|
icon: 'success', |
|
|
|
}); |
|
|
|
}, |
|
|
|
}); |
|
|
|
} else if (start == 'EXPIRED') { //已过期 |
|
|
|
|
|
|
|
}); |
|
|
|
// 已使用 USED |
|
|
|
// 已过期 EXPIRED |
|
|
|
} else if (start == 'USED') { //已使用 |
|
|
|
console.log("已复制兑换码1111", code) |
|
|
|
uni.setClipboardData({ |
|
|
|
data: code, |
|
|
|
success: function() { |
|
|
|
console.log("已复制兑换码") |
|
|
|
uni.showToast({ |
|
|
|
title: '已复制兑换码', |
|
|
|
icon: 'success', |
|
|
|
}); |
|
|
|
}, |
|
|
|
}); |
|
|
|
} else if (start == 'EXPIRED') { //已过期 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function desensitize(str) { |