feat(mobile): 优化订单个人中心与足迹界面

This commit is contained in:
yml
2026-11-16 18:25:37 +08:00
parent a9970c3ae1
commit 29a16483ac
6 changed files with 802 additions and 454 deletions
@@ -343,11 +343,11 @@ async function copyListingCode(order: UserOrderListItem) {
<van-tabs
v-model:active="activeTab"
class="custom-tabs"
line-width="20px"
line-width="18px"
line-height="3px"
color="#1477ff"
title-active-color="#1477ff"
title-inactive-color="#6b7280"
color="#a95522"
title-active-color="#8d461c"
title-inactive-color="#747980"
:border="false"
swipeable
animated
@@ -384,30 +384,32 @@ async function copyListingCode(order: UserOrderListItem) {
<!-- 租赁卡片 -->
<template v-if="item.bizType === 'rental' && item.rental">
<div class="card-body">
<button
class="listing-code-chip"
type="button"
@click.stop="copyListingCode(item.rental)"
>
商品编号 {{ formatListingCode(item.rental) }}
</button>
<h3 class="order-title">{{ item.title }}</h3>
<p v-if="rentalTermChips(item.rental).length" class="rental-terms">
<span
v-for="chip in rentalTermChips(item.rental)"
:key="chip.label"
:class="chip.tone"
<div class="card-body rental-body">
<div class="rental-main">
<button
class="listing-code-chip"
type="button"
@click.stop="copyListingCode(item.rental)"
>
{{ chip.label }} {{ chip.value }}
</span>
</p>
<div class="tag-row">
<span class="info-tag">{{ item.rental.server_region }}</span>
<span class="info-tag">{{ item.rental.login_platform }}</span>
商品编号 {{ formatListingCode(item.rental) }}
</button>
<h3 class="order-title">{{ item.title }}</h3>
<p v-if="rentalTermChips(item.rental).length" class="rental-terms">
<span
v-for="chip in rentalTermChips(item.rental)"
:key="chip.label"
:class="chip.tone"
>
{{ chip.label }} {{ chip.value }}
</span>
</p>
<div class="tag-row">
<span class="info-tag">{{ item.rental.server_region }}</span>
<span class="info-tag">{{ item.rental.login_platform }}</span>
</div>
</div>
<div class="price-row">
<div class="rental-price-panel">
<div class="price-item">
<span class="price-label">{{ amountLabel(item.rental) }}</span>
<span class="price-val">¥{{ money(orderRentAmount(item.rental)) }}</span>
@@ -532,8 +534,10 @@ async function copyListingCode(order: UserOrderListItem) {
<style scoped>
.mobile-orders {
min-height: 100dvh;
background: #f6f8fa;
padding-bottom: calc(64px + env(safe-area-inset-bottom));
padding-bottom: calc(52px + env(safe-area-inset-bottom));
background: #f4f4f2;
color: #252a31;
--van-primary-color: #a95522;
}
.page-header {
@@ -542,11 +546,12 @@ async function copyListingCode(order: UserOrderListItem) {
z-index: 100;
display: flex;
align-items: center;
height: 48px;
padding: 0 12px;
background: rgba(255, 255, 255, 0.94);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(243, 244, 246, 0.8);
height: 52px;
padding: 0 10px;
background: rgba(255, 255, 255, 0.96);
backdrop-filter: blur(12px);
border-bottom: 1px solid #ececea;
box-shadow: 0 1px 8px rgba(26, 28, 31, 0.03);
}
.page-header h1 {
@@ -554,7 +559,7 @@ async function copyListingCode(order: UserOrderListItem) {
font-size: 17px;
font-weight: 700;
text-align: center;
color: #111827;
color: #24282d;
}
.header-title-wrap {
@@ -568,58 +573,59 @@ async function copyListingCode(order: UserOrderListItem) {
.m-site-order-tag {
display: inline-block;
padding: 2px 8px;
border-radius: 999px;
background: rgba(20, 119, 255, 0.1);
border: 1px solid rgba(20, 119, 255, 0.25);
color: #1477ff;
font-size: 11px;
font-weight: 600;
max-width: 110px;
white-space: nowrap;
overflow: hidden;
padding: 2px 7px;
border-radius: 999px;
border: 1px solid #e9d9cd;
background: #f8f1eb;
color: #9c542b;
font-size: 10px;
font-weight: 600;
text-overflow: ellipsis;
white-space: nowrap;
}
.site-order-notice-bar {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
background: linear-gradient(90deg, #eff6ff, #f0fdf4);
border-bottom: 1px solid #dbeafe;
font-size: 12px;
color: #1d4ed8;
padding: 7px 14px;
border-bottom: 1px solid #ece6e1;
background: #faf7f4;
color: #7c6657;
font-size: 11px;
font-weight: 500;
}
.site-order-notice-bar .notice-icon {
font-size: 14px;
color: #2563eb;
font-size: 13px;
color: #9c6746;
}
.back-btn {
display: grid;
width: 36px;
height: 36px;
width: 34px;
height: 34px;
place-items: center;
border: none;
background: none;
color: #374151;
border: 1px solid #ececea;
border-radius: 8px;
background: #f7f7f5;
color: #4f555b;
cursor: pointer;
}
.header-spacer {
width: 36px;
width: 34px;
}
.custom-tabs {
position: sticky;
top: 48px;
top: 52px;
z-index: 99;
background: rgba(255, 255, 255, 0.94);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(243, 244, 246, 0.6);
background: rgba(255, 255, 255, 0.96);
backdrop-filter: blur(12px);
border-bottom: 1px solid #ececea;
}
:deep(.van-tabs__nav) {
@@ -633,7 +639,7 @@ async function copyListingCode(order: UserOrderListItem) {
}
.order-list {
padding: 14px 16px;
padding: 12px;
}
.center-loading {
@@ -648,30 +654,28 @@ async function copyListingCode(order: UserOrderListItem) {
.order-card {
background: #ffffff;
border-radius: 16px;
margin-bottom: 14px;
padding: 16px;
box-shadow:
0 4px 18px rgba(0, 0, 0, 0.02),
0 1px 4px rgba(0, 0, 0, 0.02);
border: 1px solid #e7e6e3;
border-radius: 8px;
margin-bottom: 10px;
padding: 14px;
box-shadow: 0 4px 14px rgba(28, 31, 35, 0.035);
transition:
transform 0.1s ease,
box-shadow 0.1s ease;
border: 1px solid rgba(243, 244, 246, 0.9);
background 0.15s,
box-shadow 0.15s;
cursor: pointer;
}
.order-card:active {
transform: scale(0.98);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
background: #faf8f6;
box-shadow: 0 2px 8px rgba(28, 31, 35, 0.03);
}
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 10px;
border-bottom: 1px dashed #f3f4f6;
padding-bottom: 9px;
border-bottom: 1px dashed #ececea;
gap: 8px;
}
@@ -684,26 +688,24 @@ async function copyListingCode(order: UserOrderListItem) {
.biz-tag {
flex-shrink: 0;
padding: 2px 6px;
border-radius: 6px;
padding: 0;
background: transparent !important;
font-size: 10px;
font-weight: 800;
font-weight: 700;
line-height: 1.2;
}
.biz-tag.rental {
color: #1477ff;
background: rgba(20, 119, 255, 0.1);
color: #61705f;
}
.biz-tag.crash {
color: #ff6a00;
background: rgba(255, 106, 0, 0.1);
color: #965a35;
}
.order-no {
font-size: 11px;
color: #9ca3af;
color: #95999e;
font-family: monospace;
overflow: hidden;
text-overflow: ellipsis;
@@ -712,133 +714,202 @@ async function copyListingCode(order: UserOrderListItem) {
.status-badge {
flex-shrink: 0;
padding: 4px 8px;
border-radius: 8px;
font-size: 11px;
display: inline-flex;
align-items: center;
gap: 4px;
padding: 0;
background: transparent !important;
font-size: 10px;
font-weight: 700;
line-height: 1;
}
.status-badge::before {
flex: 0 0 5px;
width: 5px;
height: 5px;
border-radius: 50%;
background: currentColor;
content: '';
}
.listing-code-chip {
margin-bottom: 8px;
padding: 4px 9px;
border: 1px solid #dbeafe;
border-radius: 999px;
background: #eff6ff;
color: #2563eb;
font-size: 12px;
font-weight: 800;
max-width: 100%;
overflow: hidden;
margin-bottom: 7px;
padding: 0;
border: 0;
background: transparent;
color: #888d92;
font: inherit;
font-size: 11px;
font-weight: 600;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
}
.badge-pending_payment {
color: #ff6a00;
background: rgba(255, 106, 0, 0.08);
background: #f8eee6;
color: #9c542b;
}
.badge-pending_handoff {
color: #d97706;
background: rgba(217, 119, 6, 0.08);
background: #f8f3e9;
color: #876936;
}
.badge-renting {
color: #1477ff;
background: rgba(20, 119, 255, 0.08);
background: #eef4ef;
color: #55705d;
}
.badge-overdue {
color: #ef4444;
background: rgba(239, 68, 68, 0.08);
background: #f8eded;
color: #9c5656;
}
.badge-pending_return_confirm,
.badge-pending_checkout_confirm {
color: #8b5cf6;
background: rgba(139, 92, 246, 0.08);
background: #f4efeb;
color: #80614f;
}
.badge-pending_checkout_accept {
color: #a855f7;
background: rgba(168, 85, 247, 0.08);
background: #f3f0ec;
color: #776554;
}
.badge-checkout_disputing,
.badge-disputing,
.badge-abnormal {
color: #ef4444;
background: rgba(239, 68, 68, 0.08);
background: #f8eded;
color: #9c5656;
}
.badge-paid {
color: #1477ff;
background: rgba(20, 119, 255, 0.08);
background: #f2f3f2;
color: #666d6b;
}
.badge-receiving {
color: #d97706;
background: rgba(217, 119, 6, 0.1);
background: #f8f3e9;
color: #876936;
}
.badge-completed {
color: #10b981;
background: rgba(16, 185, 129, 0.08);
background: #eef4ef;
color: #55705d;
}
.badge-cancelled,
.badge-closed,
.badge-refunded {
color: #9ca3af;
background: rgba(156, 163, 175, 0.08);
background: #f3f3f2;
color: #858a90;
}
.card-body {
padding: 12px 0 0;
padding: 11px 0 0;
}
.rental-body {
display: grid;
grid-template-columns: minmax(0, 1fr) 118px;
align-items: start;
gap: 12px;
}
.rental-main {
min-width: 0;
}
.order-title {
margin: 0 0 8px;
font-size: 15px;
margin: 0 0 7px;
color: #252a31;
font-size: 14px;
font-weight: 700;
color: #111827;
line-height: 1.4;
line-height: 1.45;
}
.rental-terms {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin: -2px 0 8px;
gap: 8px;
margin: -1px 0 7px;
}
.rental-terms span {
padding: 1px 8px;
border-radius: 999px;
font-size: 12px;
font-weight: 800;
line-height: 18px;
position: relative;
padding: 0;
font-size: 10px;
font-weight: 600;
line-height: 16px;
}
.rental-terms span + span::before {
margin-right: 8px;
color: #b1b3b5;
content: '·';
}
.rental-terms .term-rental {
background: #16a34a;
color: #fff;
color: #55705d;
}
.rental-terms .term-loss {
background: #f97316;
color: #fff;
color: #95603a;
}
.tag-row {
display: flex;
gap: 6px;
margin-bottom: 12px;
flex-wrap: wrap;
align-items: center;
gap: 8px;
margin-bottom: 10px;
}
.rental-main .tag-row {
margin-bottom: 0;
}
.info-tag {
position: relative;
padding: 0;
background: transparent;
color: #676d73;
font-size: 11px;
color: #6b7280;
background: #f3f4f6;
padding: 3px 8px;
border-radius: 6px;
font-weight: 500;
font-weight: 600;
}
.info-tag + .info-tag::before {
margin-right: 8px;
color: #b1b3b5;
content: '·';
}
.price-row {
display: flex;
background: #f9fafb;
border-radius: 12px;
padding: 10px 14px;
justify-content: space-between;
gap: 12px;
padding: 10px 12px;
border: 1px solid #eeeeec;
border-radius: 8px;
background: #f8f8f6;
}
.rental-price-panel {
display: grid;
gap: 9px;
padding: 0;
}
.rental-price-panel .price-item {
gap: 3px;
}
.rental-price-panel .price-label {
text-align: right;
}
.rental-price-panel .price-val {
align-items: flex-end;
font-size: 16px;
}
.rental-price-panel .price-item + .price-item {
padding-top: 8px;
border-top: 1px solid #efefed;
}
.price-item {
@@ -849,31 +920,31 @@ async function copyListingCode(order: UserOrderListItem) {
.price-label {
font-size: 10px;
color: #9ca3af;
color: #8a8f95;
}
.price-val {
display: flex;
flex-direction: column;
align-items: flex-end;
color: #9c542b;
font-size: 15px;
font-weight: 800;
color: #ff5f00;
font-weight: 700;
}
.price-val em {
font-style: normal;
font-size: 10px;
font-weight: 600;
color: #2563eb;
color: #8b6a55;
}
.price-val.deposit {
color: #374151;
color: #343a40;
}
.price-sub {
color: #10b981;
color: #55705d;
font-size: 11px;
font-weight: 700;
}
@@ -887,13 +958,13 @@ async function copyListingCode(order: UserOrderListItem) {
.crash-cover {
width: 64px;
height: 64px;
border-radius: 10px;
border-radius: 8px;
overflow: hidden;
background: #f0f3f8;
background: #f3f3f1;
display: flex;
align-items: center;
justify-content: center;
color: #a0aec0;
color: #92979c;
font-size: 12px;
}
@@ -910,7 +981,7 @@ async function copyListingCode(order: UserOrderListItem) {
.crash-meta {
margin: 0 0 8px;
font-size: 13px;
color: #8a94a6;
color: #81868c;
}
.crash-price {
@@ -925,16 +996,16 @@ async function copyListingCode(order: UserOrderListItem) {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 14px;
padding-top: 12px;
border-top: 1px solid #f3f4f6;
margin-top: 12px;
padding-top: 10px;
border-top: 1px solid #eeeeec;
}
.time-box {
display: flex;
align-items: center;
gap: 4px;
color: #9ca3af;
color: #92979c;
}
.clock-icon {
@@ -947,7 +1018,7 @@ async function copyListingCode(order: UserOrderListItem) {
.detail-link {
font-size: 12px;
color: #1477ff;
color: #9c542b;
font-weight: 600;
display: flex;
align-items: center;
@@ -955,13 +1026,16 @@ async function copyListingCode(order: UserOrderListItem) {
}
.pay-hint {
color: #ff5f00;
color: #9c542b;
}
.hide-btn {
height: 28px;
padding: 0 12px;
font-size: 12px;
border-color: #e5cece !important;
background: #ffffff !important;
color: #985858 !important;
font-size: 11px;
}
.footer-action {
@@ -972,11 +1046,29 @@ async function copyListingCode(order: UserOrderListItem) {
.pay-btn {
height: 28px !important;
padding: 0 16px !important;
font-size: 12px !important;
padding: 0 14px !important;
border: 1px solid #a95522 !important;
background: #a95522 !important;
color: #ffffff !important;
font-size: 11px !important;
font-weight: 700 !important;
background: linear-gradient(135deg, #ff8c00, #ff5f00) !important;
border: none !important;
box-shadow: 0 4px 10px rgba(255, 95, 0, 0.2) !important;
box-shadow: none !important;
}
@media (max-width: 360px) {
.rental-body {
grid-template-columns: 1fr;
}
.rental-price-panel {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.rental-price-panel .price-item + .price-item {
padding-top: 0;
padding-left: 10px;
border-top: 0;
border-left: 1px solid #e9e9e7;
}
}
</style>