diff --git a/src/pages-order/order/components/OrderCard/index.vue b/src/pages-order/order/components/OrderCard/index.vue
index 1c21494..079ece9 100644
--- a/src/pages-order/order/components/OrderCard/index.vue
+++ b/src/pages-order/order/components/OrderCard/index.vue
@@ -62,6 +62,7 @@ const ICON_MAP = {
0: "https://oss.nianxx.cn/mp/static/version_101/order/room.png", // 酒店订单
1: "https://oss.nianxx.cn/mp/static/version_101/order/ticket.png", // 门票订单
2: "https://oss.nianxx.cn/mp/static/version_101/order/food.png", // 餐饮
+ 3: "https://oss.nianxx.cn/mp/static/version_101/order/package.png", // 套餐
};
// 订单类型映射
@@ -69,6 +70,7 @@ const ORDER_NAME_MAP = {
0: "房间",
1: "门票",
2: "餐饮",
+ 3: "套餐",
};
// 获取状态图标
diff --git a/src/pages-quick/components/Card/index.vue b/src/pages-quick/components/Card/index.vue
new file mode 100644
index 0000000..1576693
--- /dev/null
+++ b/src/pages-quick/components/Card/index.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+ {{ item.commodityName }}
+
+
+ 1 张 1.8 米大床
+
+
+ {{ item.commodityTradeRuleList.join(" / ") }}
+
+
+
+
+ {{ item.commodityPrice }}
+
+
+ /{{ item.stockUnitLabel }}
+
+ 订
+
+
+
+
+
+
+
+
diff --git a/src/pages-quick/components/Card/styles/index.scss b/src/pages-quick/components/Card/styles/index.scss
new file mode 100644
index 0000000..7ade15c
--- /dev/null
+++ b/src/pages-quick/components/Card/styles/index.scss
@@ -0,0 +1,21 @@
+.left {
+ height: 107px;
+ width: 80px;
+}
+
+.right {
+ height: 100%;
+}
+
+.amt {
+ &::before {
+ content: "¥";
+ font-size: 12px;
+ margin-right: 4px;
+ }
+}
+
+.btn {
+ background: linear-gradient(90deg, #ff3d60 57%, #ff990c 100%);
+ padding: 4px 8px;
+}
diff --git a/src/pages-quick/components/Tabs/index.vue b/src/pages-quick/components/Tabs/index.vue
new file mode 100644
index 0000000..65f1c51
--- /dev/null
+++ b/src/pages-quick/components/Tabs/index.vue
@@ -0,0 +1,276 @@
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages-quick/components/Tabs/styles/index.scss b/src/pages-quick/components/Tabs/styles/index.scss
new file mode 100644
index 0000000..b84aea7
--- /dev/null
+++ b/src/pages-quick/components/Tabs/styles/index.scss
@@ -0,0 +1,67 @@
+.tab-wrapper {
+ background-color: #d9eeff;
+ height: 48px;
+}
+
+.tab-item {
+ height: 100%;
+}
+
+.tab-item-active {
+ &::before {
+ content: "";
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ background-color: #fff;
+ border-radius: 20px 20px 0 0;
+ transform: perspective(40px) rotateX(6deg) translate(0, -1px);
+ transform-origin: bottom bottom;
+ box-shadow: 0 -0.5px 0 #2d91ff;
+ }
+}
+
+.tab-text-active {
+ color: #2d91ff;
+ z-index: 3;
+}
+
+.tab-indicator {
+ bottom: 0;
+ height: 3px;
+ background-color: #2d91ff;
+ border-radius: 4px 4px 0 0;
+ transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
+ width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
+ z-index: 3;
+ transform: translateZ(0); /* 启用硬件加速 */
+ will-change: left, width; /* 优化动画性能 */
+
+ /* 初始状态:未初始化时隐藏 */
+ opacity: 0;
+ width: 20px; /* 默认宽度15px */
+ left: 0;
+}
+
+/* 已初始化状态 */
+.tab-indicator.initialized {
+ opacity: 1;
+}
+
+/* 动画增强 */
+@keyframes tabSwitch {
+ 0% {
+ transform: translateZ(0) scaleX(0.8);
+ opacity: 0.6;
+ }
+ 100% {
+ transform: translateZ(0) scaleX(1);
+ opacity: 1;
+ }
+}
+
+.tab-indicator.animating {
+ animation: tabSwitch 0.3s ease-out;
+}
diff --git a/src/pages-quick/list.vue b/src/pages-quick/list.vue
new file mode 100644
index 0000000..66bac5b
--- /dev/null
+++ b/src/pages-quick/list.vue
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+ 入住
+
+ {{ DateUtils.formatDate() }}
+
+
+
+
+
+ {{ 1 }}晚
+
+
+
+ 离店
+
+ {{ DateUtils.formatDate() }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages.json b/src/pages.json
index 6873c2e..2857ac2 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -47,6 +47,17 @@
}
}
]
+ },
+ {
+ "root": "pages-quick",
+ "pages": [
+ {
+ "path": "list",
+ "style": {
+ "navigationStyle": "custom"
+ }
+ }
+ ]
}
],
"globalStyle": {
diff --git a/src/pages/index/components/chat/ChatQuickAccess/index.vue b/src/pages/index/components/chat/ChatQuickAccess/index.vue
index d6193f9..a45f79f 100644
--- a/src/pages/index/components/chat/ChatQuickAccess/index.vue
+++ b/src/pages/index/components/chat/ChatQuickAccess/index.vue
@@ -52,6 +52,13 @@ const sendReply = (item) => {
uni.$emit("SHOW_MORE_POPUP");
return;
}
+
+ // 快速预定
+ if (item.type === Command.quickBooking) {
+ uni.navigateTo({ url: "/pages-quick/list" });
+ return;
+ }
+
uni.$emit(SEND_MESSAGE_COMMAND_TYPE, item);
};
diff --git a/src/pages/index/components/module/MoreService/index.vue b/src/pages/index/components/module/MoreService/index.vue
index ad76fae..e47453b 100644
--- a/src/pages/index/components/module/MoreService/index.vue
+++ b/src/pages/index/components/module/MoreService/index.vue
@@ -52,7 +52,7 @@ const list = ref([
content: "预定门票、房间、餐食",
btnText: "去预定",
type: Command.quickBooking,
- path: "",
+ path: "/pages-quick/list",
},
{
icon: "https://oss.nianxx.cn/mp/static/version_101/home/tsfx.png",
@@ -98,10 +98,12 @@ const close = () => {
const handleClick = (item) => {
close();
+
if (item.path) {
uni.navigateTo({ url: item.path });
return;
}
+
uni.$emit(SEND_MESSAGE_COMMAND_TYPE, item);
};
diff --git a/src/static/scss/background.scss b/src/static/scss/background.scss
index 95a9b0b..6cb318e 100644
--- a/src/static/scss/background.scss
+++ b/src/static/scss/background.scss
@@ -11,6 +11,10 @@
background-color: #17294e;
}
+.bg-E5E8EE {
+ background-color: #e5e8ee;
+}
+
.bg-liner {
background: linear-gradient(205deg, #8ae3fc 0%, rgba(138, 227, 252, 0) 20%),
linear-gradient(155deg, #fef7e1 0%, rgba(254, 247, 225, 0) 20%),
diff --git a/src/static/scss/margin.scss b/src/static/scss/margin.scss
index 64966cf..ee0c1fa 100644
--- a/src/static/scss/margin.scss
+++ b/src/static/scss/margin.scss
@@ -1,4 +1,8 @@
// 外边距-bottom
+.ml-auto {
+ margin-left: auto;
+}
+
.m-4 {
margin: 4px;
}
@@ -7,6 +11,18 @@
margin-right: 4px;
}
+.mb-4 {
+ margin-bottom: 4px;
+}
+
+.mt-6 {
+ margin-top: 6px;
+}
+
+.mb-6 {
+ margin-bottom: 6px;
+}
+
.m-8 {
margin: 8px;
}
@@ -15,6 +31,10 @@
margin-top: 8px;
}
+.ml-8 {
+ margin-left: 8px;
+}
+
.mr-8 {
margin-right: 8px;
}
@@ -39,18 +59,14 @@
margin-bottom: 12px;
}
-.mt-6 {
- margin-top: 6px;
-}
-
-.mb-6 {
- margin-bottom: 6px;
-}
-
.ml-12 {
margin-left: 12px;
}
+.ml-16 {
+ margin-left: 16px;
+}
+
.ml-20 {
margin-left: 20px;
}
diff --git a/src/static/scss/rounded.scss b/src/static/scss/rounded.scss
index 6a3c8e1..d27baf3 100644
--- a/src/static/scss/rounded.scss
+++ b/src/static/scss/rounded.scss
@@ -7,6 +7,10 @@
border-radius: 8px;
}
+.rounded-10 {
+ border-radius: 10px;
+}
+
.rounded-12 {
border-radius: 12px;
}
diff --git a/src/utils/index.js b/src/utils/index.js
index 4dc0334..cfb3f81 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -299,12 +299,33 @@ export class ThrottleUtils {
}
}
+/**
+ * 日期工具类
+ * 提供日期格式化功能
+ * */
+export class DateUtils {
+ /**
+ * 格式化日期为指定格式
+ * @param {Date} date - 日期对象
+ * @param {string} format - 格式化字符串,默认值为 "yyyy-MM-dd"
+ * @returns {string} 格式化后的日期字符串
+ */
+ static formatDate(date = new Date(), format = "yyyy-MM-dd") {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+
+ return format.replace("yyyy", year).replace("MM", month).replace("dd", day);
+ }
+}
+
// 默认导出所有工具类
export default {
IdUtils,
CallbackUtils,
MessageUtils,
TimerUtils,
+ DateUtils,
DebounceUtils,
ThrottleUtils,
};