diff --git a/pages/shop/buy-order.vue b/pages/shop/buy-order.vue
index 1cdab7f..8d6fa7d 100644
--- a/pages/shop/buy-order.vue
+++ b/pages/shop/buy-order.vue
@@ -15,7 +15,7 @@
- 订单编号:{{order.number}}
+ 服务时段:{{order.number}}
- {{ stateText }}
-
+ }" v-if="showState">
+ {{ stateText }}
+
-
-
+
@@ -30,12 +29,13 @@
- 下单时间: {{ dataItem.add_time }}
+ 下单时间:
+ {{ dataItem.add_time }}
-
+
{{`团购价: `}}¥{{ dataItem.order_money }}
- {{ dataItem.line_money }}
+ {{ dataItem.line_money }}
@@ -83,49 +83,49 @@
useTime() {
const start = this.dataItem.reservation_time;
const server_time = this.dataItem.server_time || 0;
-
+
// 格式化时间范围:输出 2025年05月29 12:30-13:30 格式
function formatTimeRange(startTimeStr, serviceMinutes) {
// 1. 空值兜底:避免无开始时间时报错
if (!startTimeStr) return "";
-
+
// 2. 兼容低版本iOS:iOS不识别 "-" 分隔的日期,必须替换为 "/"
const iosSafeTimeStr = startTimeStr.replace(/-/g, "/");
const startTime = new Date(iosSafeTimeStr);
-
+
// 校验时间有效性
if (isNaN(startTime.getTime())) {
console.error("无效的开始时间格式:", startTimeStr);
return "";
}
-
+
// 3. 计算结束时间(开始时间 + 服务分钟数)
const endTime = new Date(startTime.getTime() + serviceMinutes * 60 * 1000);
-
+
// 格式化年份:YYYY年
const formatYear = (date) => {
return date.getFullYear() + '年';
};
-
+
// 格式化月份和日期:MM月DD(补零)
const formatMonthDay = (date) => {
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
return `${month}月${day}`;
};
-
+
// 格式化时间部分:HH:MM(补零)
const formatTimePart = (date) => {
const hours = String(date.getHours()).padStart(2, "0");
const minutes = String(date.getMinutes()).padStart(2, "0");
return `${hours}:${minutes}`;
};
-
+
// 4. 判断是否同一天
const isSameDay = startTime.getFullYear() === endTime.getFullYear() &&
- startTime.getMonth() === endTime.getMonth() &&
- startTime.getDate() === endTime.getDate();
-
+ startTime.getMonth() === endTime.getMonth() &&
+ startTime.getDate() === endTime.getDate();
+
// 5. 拼接最终格式
if (isSameDay) {
// 同一天:2025年05月29 12:30-13:30
@@ -135,7 +135,7 @@
return `${formatYear(startTime)}${formatMonthDay(startTime)} ${formatTimePart(startTime)}-${formatYear(endTime)}${formatMonthDay(endTime)} ${formatTimePart(endTime)}`;
}
}
-
+
// 兜底:如果start为空,返回空字符串避免报错
return start ? formatTimeRange(start, server_time) : "";
},
@@ -233,12 +233,13 @@
align-items: center;
justify-content: center;
}
-
- .stateText2{
+
+ .stateText2 {
background-image: url("/static/images/icons/tabBj2.png");
color: #333;
}
- .stateText3{
+
+ .stateText3 {
background-image: url("/static/images/icons/tabBj2.png");
color: #999999 !important;
}
@@ -256,8 +257,8 @@
padding-bottom: 24rpx;
border-bottom: 1px solid #f6f5f5;
}
-
- .noFotter{
+
+ .noFotter {
border-bottom: none;
padding-bottom: 0rpx;
}
@@ -286,6 +287,7 @@
line-height: 34rpx;
text-align: left;
font-style: normal;
+
.service-price-line {
font-weight: 400;
font-size: 24rpx;
@@ -351,13 +353,15 @@
margin-top: 28rpx;
display: flex;
align-items: center;
- .time-info-img{
+
+ .time-info-img {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
border-radius: 50%;
}
- .time-info-name{
+
+ .time-info-name {
font-weight: 400;
font-size: 26rpx;
color: #333333;
@@ -365,8 +369,22 @@
text-align: left;
font-style: normal;
margin-right: 20rpx;
+ max-width: 110rpx;
+ overflow: hidden;
+ word-break: break-all;
+ /* break-all(允许在单词内换行。) */
+ text-overflow: ellipsis;
+ /* 超出部分省略号 */
+ display: -webkit-box;
+ /** 对象作为伸缩盒子模型显示 **/
+ -webkit-box-orient: vertical;
+ /** 设置或检索伸缩盒对象的子元素的排列方式 **/
+ -webkit-line-clamp: 1;
+ /** 显示的行数 **/
+
}
- .time-info-text1{
+
+ .time-info-text1 {
font-weight: 400;
font-size: 26rpx;
color: #999999;
@@ -374,8 +392,10 @@
text-align: left;
font-style: normal;
// margin-right: 20rpx;
+ white-space: nowrap;
}
- .time-info-text2{
+
+ .time-info-text2 {
font-weight: 400;
font-size: 26rpx;
color: #333333;
diff --git a/pages/shop/manHour/saleList.vue b/pages/shop/manHour/saleList.vue
index 1a6741a..09ba921 100644
--- a/pages/shop/manHour/saleList.vue
+++ b/pages/shop/manHour/saleList.vue
@@ -57,10 +57,10 @@ export default {
text: "全部",
},
- // {
- // id: 1,
- // text: "待支付",
- // },
+ {
+ id: 1,
+ text: "待支付",
+ },
{
id: 2,
text: "待接单",
diff --git a/pages/shop/userorder-detail.vue b/pages/shop/userorder-detail.vue
index 9d9aaa4..4331ac0 100644
--- a/pages/shop/userorder-detail.vue
+++ b/pages/shop/userorder-detail.vue
@@ -15,12 +15,11 @@
}}
-
-
+