From 9da046c314075278ec938ee2716f613de51a65be Mon Sep 17 00:00:00 2001
From: DEV_DSW <562304744@qq.com>
Date: Wed, 13 May 2026 15:38:04 +0800
Subject: [PATCH] feat: redesign FacilityLocationCard and RoutePlanCard with
improved layout, styles, and mock data; enhance user interaction and visual
appeal
---
.../ChatModule/FacilityLocationCard/index.vue | 78 ++++---
.../ChatModule/FacilityLocationCard/mocks.js | 28 ++-
.../FacilityLocationCard/styles/index.scss | 111 ++++++----
src/pages/ChatModule/RoutePlanCard/index.vue | 143 +++++++++----
src/pages/ChatModule/RoutePlanCard/mocks.js | 82 +++++++-
.../RoutePlanCard/styles/index.scss | 199 +++++++++++++++---
6 files changed, 484 insertions(+), 157 deletions(-)
diff --git a/src/pages/ChatModule/FacilityLocationCard/index.vue b/src/pages/ChatModule/FacilityLocationCard/index.vue
index d9b0a00..618ff6f 100644
--- a/src/pages/ChatModule/FacilityLocationCard/index.vue
+++ b/src/pages/ChatModule/FacilityLocationCard/index.vue
@@ -1,38 +1,50 @@
-
-
-
-
-
- {{ data.title }}
-
-
-
- {{ data.description }}
-
-
-
-
- {{ item.name }}
- {{ item.meta }}
-
- {{ item.distance }}
+
+
+
+
+
+
+ {{ type.text }}
+
+
+ {{ data.title }}
+
+
+ {{ distance.icon }}
+ {{ distance.text }}
+
+
+
+
+ {{ location.icon }}
+ {{ location.label }}
+
+
+ {{ location.text }}
+
+
+
+
+ {{ action.icon }}
+ {{ action.text }}
+
-
+
diff --git a/src/pages/ChatModule/FacilityLocationCard/mocks.js b/src/pages/ChatModule/FacilityLocationCard/mocks.js
index 44cbdf6..1b6de42 100644
--- a/src/pages/ChatModule/FacilityLocationCard/mocks.js
+++ b/src/pages/ChatModule/FacilityLocationCard/mocks.js
@@ -1,11 +1,21 @@
export default {
- title: "附近设施位置",
- badge: "设施引导",
- cover: "https://images.unsplash.com/photo-1518005020951-eccb494ad742?auto=format&fit=crop&w=900&q=80",
- description: "根据你当前位置推荐最近的服务点和补给点。",
- facilities: [
- { id: "f1", name: "游客中心", meta: "咨询、补给、卫生间", distance: "120m" },
- { id: "f2", name: "观光车站", meta: "前往水上森林", distance: "260m" },
- { id: "f3", name: "咖啡轻食", meta: "可短暂停留", distance: "360m" },
- ],
+ id: "wolongtan-restroom",
+ title: "卧龙潭公厕",
+ image: "https://images.unsplash.com/photo-1584622650111-993a426fbf0a?auto=format&fit=crop&w=900&q=80",
+ type: {
+ text: "厕所",
+ },
+ distance: {
+ icon: "⌖",
+ text: "距你约 200 米",
+ },
+ location: {
+ icon: "●",
+ label: "所在位置",
+ text: "卧龙潭景点入口右侧",
+ },
+ action: {
+ icon: "↗",
+ text: "带我去",
+ },
};
diff --git a/src/pages/ChatModule/FacilityLocationCard/styles/index.scss b/src/pages/ChatModule/FacilityLocationCard/styles/index.scss
index a6a438c..ad393fc 100644
--- a/src/pages/ChatModule/FacilityLocationCard/styles/index.scss
+++ b/src/pages/ChatModule/FacilityLocationCard/styles/index.scss
@@ -1,58 +1,87 @@
-.facility-location-card__hero {
- position: relative;
- padding: 8px;
+.facility-location-card {
+ border: 1px solid rgba(226, 232, 240, 0.72);
+ box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
+ box-sizing: border-box;
}
.facility-location-card__image {
-}
-
-.facility-location-card__overlay {
- position: absolute;
- left: 20px;
- right: 20px;
- bottom: 20px;
-}
-
-.facility-location-card__title {
- margin-top: 8px;
- color: #fff;
- font-size: 18px;
- font-weight: 900;
- text-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
+ height: 184px;
}
.facility-location-card__body {
- padding-top: 6px;
+ padding-top: 28px;
+ box-sizing: border-box;
}
-.facility-location-card__desc {
- line-height: 20px;
-}
-
-.facility-location-card__list {
- margin-top: 14px;
-}
-
-.facility-location-card__item {
- padding: 11px 0;
-}
-
-.facility-location-card__dot {
- width: 8px;
- height: 8px;
- background: #06b6d4;
-}
-
-.facility-location-card__info {
+.facility-location-card__title-row {
min-width: 0;
}
-.facility-location-card__name {
+.facility-location-card__badge {
+ height: 30px;
+ margin-right: 12px;
+ padding: 0 12px;
+ border: 1px solid #bfdbfe;
+ border-radius: 10px;
+ line-height: 30px;
+ white-space: nowrap;
+ box-sizing: border-box;
}
-.facility-location-card__meta {
- margin-top: 3px;
+.facility-location-card__title {
+ min-width: 0;
+ line-height: 24px;
}
.facility-location-card__distance {
+ margin-top: 8px;
+ line-height: 18px;
+}
+
+.facility-location-card__distance-icon {
+ margin-right: 5px;
+ font-size: 15px;
+ line-height: 15px;
+}
+
+.facility-location-card__location {
+ margin-top: 24px;
+ padding: 18px 20px;
+ box-sizing: border-box;
+}
+
+.facility-location-card__location-label {
+ line-height: 18px;
+}
+
+.facility-location-card__location-dot {
+ margin-right: 8px;
+ color: #ec4899;
+ font-size: 14px;
+ line-height: 14px;
+}
+
+.facility-location-card__location-text {
+ margin-top: 12px;
+ line-height: 22px;
+}
+
+.facility-location-card__button {
+ height: 54px;
+ margin-top: 20px;
+ border-radius: 16px;
+}
+
+.facility-location-card__button:active {
+ opacity: 0.86;
+}
+
+.facility-location-card__button.is-disabled {
+ opacity: 0.55;
+}
+
+.facility-location-card__button-icon {
+ margin-right: 8px;
+ font-size: 19px;
+ line-height: 19px;
}
diff --git a/src/pages/ChatModule/RoutePlanCard/index.vue b/src/pages/ChatModule/RoutePlanCard/index.vue
index f5f1682..88a7e56 100644
--- a/src/pages/ChatModule/RoutePlanCard/index.vue
+++ b/src/pages/ChatModule/RoutePlanCard/index.vue
@@ -1,54 +1,113 @@
-
-
-
-
- {{ data.title }}
-
-
+
+
+
+
+
+ {{ data.title }}
+
+
+
+ {{ tag.text }}
+
- ›
-
+
+
-
-
+
+
+
+ ‹
+
+
+ {{ data.title }}
+
+
+ {{ detail.badge }}
+
+
+
+
-
- {{ index + 1 }}
-
-
- {{ node.title }}
- {{ node.description }}
-
+
+
+ {{ index + 1 }}
+
+
+
+
+
+ {{ node.title }}
+
+
+ {{ node.description }}
+
+
+ {{ node.tag }}
+
+
-
-
- {{ connectors[index] }}
+
+
+
+
+
+ {{ connectors[index].icon }}
+ {{ connectors[index].text }}
+
-
- {{ data.tipsTitle }}
- {{ tip }}
+
+
+
+
+ {{ detail.tipsTitle }}
+
+
+
+ {{ tip }}
-
+