From 946f85a8b37cb176a106eaef4db0118060aa4c31 Mon Sep 17 00:00:00 2001 From: xiaoguang Date: Mon, 16 May 2022 17:23:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=AD=E5=8D=88=E7=89=A9=E6=B5=81=E6=9C=AA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/module/header/HeaderCart.vue | 2 +- layouts/module/header/HeaderInfoBar.vue | 16 +++++++---- layouts/module/header/index.vue | 28 +++++++++++++------ .../index/home/module/LogisitcsInfo.vue | 8 +++--- 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/layouts/module/header/HeaderCart.vue b/layouts/module/header/HeaderCart.vue index 3d697c2..4c18552 100644 --- a/layouts/module/header/HeaderCart.vue +++ b/layouts/module/header/HeaderCart.vue @@ -17,7 +17,7 @@
{{ cartCount }}
diff --git a/layouts/module/header/HeaderInfoBar.vue b/layouts/module/header/HeaderInfoBar.vue index ea3caf4..5c24306 100644 --- a/layouts/module/header/HeaderInfoBar.vue +++ b/layouts/module/header/HeaderInfoBar.vue @@ -52,7 +52,11 @@ > 消息 -
+
{{ messageCount }}
@@ -244,16 +248,18 @@ export default { } } .wrap-content-message__tip { - min-width: 14px; + width: 14px; height: 14px; - padding: 0 3px; - line-height: 14px; font-size: 10px; color: #ffffff; - text-align: center; background: #ff512b; border-radius: 50%; margin-left: 4px; + &--more { + width: unset; + padding: 0 3px; + border-radius: 7px; + } } .header-wrap-content--line { width: 1px; diff --git a/layouts/module/header/index.vue b/layouts/module/header/index.vue index c63409a..2706262 100644 --- a/layouts/module/header/index.vue +++ b/layouts/module/header/index.vue @@ -32,7 +32,13 @@ />
- {{ cartCount }} +
+ {{ cartCount }} +
0) { const formatRecords = records.map((item) => { const goods = item.products || [{ productImageUrl: "" }]; - const logisticsList = item.logistics.logisticsDataList || [ - { context: "暂无物流信息" }, - ]; + const logisticsList = item.logistics.logisticsDataList || []; return { ...item, cover: goods[0].productImageUrl, // 订单封面 - logisticsContext: logisticsList[0].context, // 物流详细信息 + logisticsContext: + (logisticsList.length > 0 && logisticsList[0].context) || + "暂无物流信息", // 物流详细信息 }; }); this.list = this.list.concat(formatRecords);