|
|
@@ -32,14 +32,13 @@ |
|
|
|
<text style="width: 100%;">权益名称:{{list.productName}}</text> |
|
|
|
<view |
|
|
|
style="display: flex;flex-direction: row;min-height: 60rpx;justify-content: space-between;text-align: baseline;"> |
|
|
|
<text class="text-w" |
|
|
|
style="flex: 1;margin-top: 5rpx;" |
|
|
|
:style="item.status == 'WAIT_ACTIVATED' ? 'color: #023F8F;' : item.status == 'WAIT_USE' ? 'color: orange;' : item.status == 'USED' ? 'color: green;' : 'color: gray;'">卡卷状态:{{item.status == 'WAIT_ACTIVATED' ? '待激活' : item.status == 'WAIT_USE' ? '待领取' : item.status == 'USED' ? '已领取' : '已失效'}}</text> |
|
|
|
<button v-if="item.status != 'EXPIRED' && list && list.equityType !='ZFB'" |
|
|
|
:style="item.status == 'WAIT_ACTIVATED' ? 'background-color: #023F8F;' : item.status == 'WAIT_USE' ? 'background-color: orange;' : item.status == 'USED' ? 'background-color: green;' : 'background-color: gray;'" |
|
|
|
<text class="text-w" style="flex: 1;margin-top: 5rpx;" |
|
|
|
:style="functBackName(list) == 'WAIT_ACTIVATED' ? 'color: #023F8F;' : functBackName(list) == 'WAIT_USE' ? 'color: orange;' : functBackName(list) == 'USED' ? 'color: green;' : 'color: gray;'">卡卷状态:{{functBackName(list) == 'WAIT_ACTIVATED' ? '待激活' : functBackName(list) == 'WAIT_USE' ? '待领取' : functBackName(list) == 'USED' ? '已领取' : '已失效'}}</text> |
|
|
|
<button v-if="functBackName(list) != 'EXPIRED' && list && list.equityType !='ZFB'" |
|
|
|
:style="functBackName(list) == 'WAIT_ACTIVATED' ? 'background-color: #023F8F;' : functBackName(list) == 'WAIT_USE' ? 'background-color: orange;' : functBackName(list) == 'USED' ? 'background-color: green;' : 'background-color: gray;'" |
|
|
|
class="copy-btn" data-code="{{item}}" @click.stop="copyCode(list)"> |
|
|
|
{{item.status == 'WAIT_ACTIVATED' ? '去激活' : item.status == 'WAIT_USE' ? '立即领取' : |
|
|
|
item.status == 'USED' ? '复制' : '已失效'}}</button> |
|
|
|
{{functBackName(list) == 'WAIT_ACTIVATED' ? '去激活' : functBackName(list) == 'WAIT_USE' ? '立即领取' : |
|
|
|
functBackName(list) == 'USED' ? '复制' : '已失效'}}</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@@ -122,14 +121,14 @@ |
|
|
|
item.equityInfoItems[0].isUse == '0' && item.equityInfoItems[0].couponStatus == |
|
|
|
'WAIT_GET' ? 'WAIT_USE' : |
|
|
|
item.equityInfoItems[0].isUse == '1' && item.equityInfoItems[0].couponStatus == |
|
|
|
'WAIT_GET' ? 'WAIT_ACTIVATED' : |
|
|
|
item.equityInfoItems[0].couponStatus == 'USED' ? 'USED' : ''; |
|
|
|
'WAIT_GET' ? 'WAIT_ACTIVATED' : item.equityInfoItems[0].couponStatus == 'USED' ? |
|
|
|
'USED' : ''; |
|
|
|
//WAIT_ACTIVATED(待激活) WAIT_USE(待领取使用) USED(已使用) EXPIRED(已过期) OUINGSYNREE |
|
|
|
console.log(item.equityInfoItems[0].periodOfValidity, |
|
|
|
item.equityInfoItems[0].isUse, item.equityInfoItems[0].notUseCase, |
|
|
|
item.status, item.equityInfoItems[0].couponStatus, '=================', |
|
|
|
item.vehiclePlate); |
|
|
|
// item.status = item.equityInfoItems[0].couponStatus == 'WAIT_GET' ? 'WAIT_ACTIVATED' : item.equityInfoItems[0].couponStatus |
|
|
|
// functBackName(list) = item.equityInfoItems[0].couponStatus == 'WAIT_GET' ? 'WAIT_ACTIVATED' : item.equityInfoItems[0].couponStatus |
|
|
|
item.getStatus = getStatusValue(item.status) |
|
|
|
item.redeemCodeStr = item.equityInfoItems[0].couponInfoItem && desensitize(item |
|
|
|
.equityInfoItems[0].couponInfoItem.redeemCode) |
|
|
@@ -161,7 +160,7 @@ |
|
|
|
// url: '/subpackage/service/equityInfo/equityInfo?singleEquityId=' + singleEquityId.value + |
|
|
|
// "&couponAgencyType=" + couponAgencyType.value + "&couponId=" + couponId.value, |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
url: '/subpackage/service/equityInfo/equityInfo?singleEquityId=' + singleEquityId.value + |
|
|
@@ -169,6 +168,12 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
function functBackName(item) { |
|
|
|
return item.isUse == '0' && item.couponStatus == 'WAIT_GET' ? 'WAIT_USE' : |
|
|
|
item.isUse == '1' && item.couponStatus == 'WAIT_GET' ? 'WAIT_ACTIVATED' : item.couponStatus == 'USED' ? |
|
|
|
'USED' : ''; |
|
|
|
} |
|
|
|
|
|
|
|
function copyCode(e) { |
|
|
|
let item = e; |
|
|
|
// // 复制兑换码到剪贴板 |
|
|
@@ -181,7 +186,7 @@ |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (item.status == 'WAIT_ACTIVATED') { //待激活 |
|
|
|
if (e.status == 'WAIT_ACTIVATED') { //待激活 |
|
|
|
uni.showModal({ |
|
|
|
title: '温馨提示', |
|
|
|
content: "激活后,可领取卡卷", |
|
|
@@ -196,7 +201,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} else if (item.status == 'WAIT_USE') { //待领取使用 |
|
|
|
} else if (e.status == 'WAIT_USE') { //待领取使用 |
|
|
|
uni.showModal({ |
|
|
|
title: '温馨提示', |
|
|
|
content: "请在领取后120天内使用,超期失效", |
|
|
@@ -237,7 +242,7 @@ |
|
|
|
}); |
|
|
|
// 已使用 USED |
|
|
|
// 已过期 EXPIRED |
|
|
|
} else if (item.status == 'USED') { //已使用 |
|
|
|
} else if (e.status == 'USED') { //已使用 |
|
|
|
uni.setClipboardData({ |
|
|
|
data: code, |
|
|
|
success: function() { |
|
|
@@ -247,7 +252,7 @@ |
|
|
|
}); |
|
|
|
}, |
|
|
|
}); |
|
|
|
} else if (item.status == 'EXPIRED') { //已过期 |
|
|
|
} else if (e.status == 'EXPIRED') { //已过期 |
|
|
|
|
|
|
|
} |
|
|
|
} |