From 8962631b6ad9eff1ac8ff3239890bb003f584d65 Mon Sep 17 00:00:00 2001
From: YunaiV <>
Date: Wed, 17 Apr 2019 20:45:44 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF=EF=BC=9A=E5=95=86=E5=93=81?=
=?UTF-8?q?=E4=BB=B7=E6=A0=BC=E8=AE=A1=E7=AE=97=EF=BC=8C=E6=8E=A5=E5=85=A5?=
=?UTF-8?q?=E4=BF=83=E9=94=80=E6=B4=BB=E5=8A=A8=20H5=20=E5=89=8D=E7=AB=AF?=
=?UTF-8?q?=EF=BC=9A=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=8E=A5=E5=85=A5=E4=BF=83?=
=?UTF-8?q?=E9=94=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mobile-web/src/page/cart/index.vue | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/mobile-web/src/page/cart/index.vue b/mobile-web/src/page/cart/index.vue
index 807ed6b5f..54e787e04 100644
--- a/mobile-web/src/page/cart/index.vue
+++ b/mobile-web/src/page/cart/index.vue
@@ -28,6 +28,9 @@
+
+ {{ formatTimeLimitedDiscountText(item.activity) }}
+
@@ -88,6 +91,9 @@ export default {
},
methods: {
formatFullPrivilegeText(activity) {
+ if (!activity) {
+ return '';
+ }
let text = '';
let fullPrivilege = activity.fullPrivilege;
for (let i in fullPrivilege.privileges) {
@@ -111,6 +117,22 @@ export default {
}
return text;
},
+ formatTimeLimitedDiscountText(activity) {
+ if (!activity) {
+ return '';
+ }
+ let text = '';
+ let timeLimitedDiscount = activity.timeLimitedDiscount.items[0];
+ if (timeLimitedDiscount.preferentialType === 1) {
+ text += '减 ' + timeLimitedDiscount.preferentialValue / 100.0 + ' 元';
+ } else if (timeLimitedDiscount.preferentialType === 2) {
+ text += '打 ' + timeLimitedDiscount.preferentialValue / 10.0 + ' 折';
+ }
+ if (activity.timeLimitedDiscount.quota > 0) {
+ text += '【限购 ' + activity.timeLimitedDiscount.quota + ' 件】';
+ }
+ return text;
+ },
formatItemGroupDiscountPriceText() {
let price = 0;
for (let i in this.itemGroups) {