feat(messages): 新增 PC 消息中心与订单群聊入口

This commit is contained in:
yml2213
2026-10-30 14:08:16 +08:00
parent 4fc4e9236b
commit f2552fe523
13 changed files with 1258 additions and 11 deletions
+1
View File
@@ -14,4 +14,5 @@
@import './mobile-order-detail.css';
@import './mobile-messages.css';
@import './mobile-chat.css';
@import './pc-messages.css';
@import './components.css';
+426
View File
@@ -0,0 +1,426 @@
.pc-messages-page {
max-width: 1180px;
margin: 0 auto;
padding: 42px 24px 64px;
}
.pc-messages-hero {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 24px;
margin-bottom: 24px;
}
.pc-messages-hero__eyebrow {
color: var(--brand-seal);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.22em;
}
.pc-messages-hero h2 {
margin: 6px 0 8px !important;
}
.pc-messages-hero .ant-typography {
max-width: 640px;
margin-bottom: 0;
}
.pc-messages-grid {
display: grid;
grid-template-columns: minmax(0, 1fr) 320px;
gap: 20px;
align-items: start;
}
.pc-messages-card .ant-card-body {
padding: 0;
}
.pc-chat-list {
display: flex;
flex-direction: column;
}
.pc-chat-row {
display: flex;
align-items: center;
gap: 14px;
padding: 16px 20px;
border-bottom: 1px solid var(--line);
transition: background 0.2s ease;
}
.pc-chat-row:last-child {
border-bottom: 0;
}
.pc-chat-row:hover {
background: var(--paper-warm);
}
.pc-chat-row__avatar {
flex: 0 0 auto;
}
.pc-chat-row__body {
flex: 1;
min-width: 0;
}
.pc-chat-row__top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.pc-chat-row__top strong {
overflow: hidden;
color: var(--ink);
font-size: 15px;
text-overflow: ellipsis;
white-space: nowrap;
}
.pc-chat-row__top span {
flex: 0 0 auto;
color: var(--ink-muted);
font-size: 12px;
}
.pc-chat-row__meta {
display: flex;
align-items: center;
gap: 8px;
margin-top: 4px;
color: var(--ink-muted);
font-size: 12px;
}
.pc-chat-row__meta .ant-tag {
margin-inline-end: 0;
}
.pc-chat-row__body p {
display: -webkit-box;
overflow: hidden;
margin: 6px 0 0;
color: var(--ink-secondary);
font-size: 13px;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
}
.pc-chat-row__tail {
display: flex;
flex: 0 0 auto;
align-items: center;
gap: 10px;
color: var(--ink-muted);
}
.pc-messages-side {
display: flex;
flex-direction: column;
gap: 16px;
}
.pc-messages-side__card .ant-card-body {
padding: 18px 20px;
}
.pc-messages-side__card ul {
margin: 0;
padding-left: 18px;
color: var(--ink-secondary);
font-size: 13px;
line-height: 1.9;
}
.pc-messages-side__card .ant-typography {
font-size: 13px;
}
.pc-messages-login {
max-width: 520px;
margin: 72px auto;
text-align: center;
}
.pc-messages-login .ant-card-body {
padding: 44px 36px;
}
.pc-messages-login .ant-typography {
margin-top: 18px;
}
.pc-chat-page {
max-width: 1080px;
margin: 0 auto;
padding: 28px 24px 60px;
}
.pc-chat-page__crumb {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 12px;
color: var(--ink-muted);
font-size: 13px;
}
.pc-chat-page__crumb .ant-btn {
padding-left: 0;
}
.pc-chat-card .ant-card-body {
display: flex;
flex-direction: column;
min-height: 600px;
padding: 0;
}
.pc-chat-card__head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
padding: 20px 24px;
border-bottom: 1px solid var(--line);
}
.pc-chat-card__head h3 {
margin: 0 0 8px !important;
}
.pc-chat-body {
flex: 1;
min-height: 380px;
max-height: calc(100vh - 420px);
overflow-y: auto;
padding: 20px 24px;
background: #fbf9f3;
}
.pc-chat-earlier {
display: flex;
justify-content: center;
padding-bottom: 12px;
}
.pc-chat-empty {
display: grid;
place-items: center;
min-height: 240px;
color: var(--ink-muted);
font-size: 13px;
}
.pc-chat-date {
display: flex;
justify-content: center;
margin: 18px 0 14px;
color: var(--ink-muted);
font-size: 11px;
}
.pc-chat-system {
display: flex;
justify-content: center;
margin: 14px 0;
color: var(--ink-muted);
font-size: 12px;
}
.pc-chat-message {
display: flex;
align-items: flex-start;
gap: 10px;
margin: 16px 0;
}
.pc-chat-message--self {
flex-direction: row-reverse;
}
.pc-chat-message__avatar {
flex: 0 0 auto;
margin-top: 2px;
}
.pc-chat-message__body {
max-width: 72%;
}
.pc-chat-message--self .pc-chat-message__body {
display: flex;
flex-direction: column;
align-items: flex-end;
}
.pc-chat-message__meta {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 5px;
color: var(--ink-muted);
font-size: 12px;
}
.pc-chat-message__meta strong {
color: var(--ink-secondary);
font-weight: 600;
}
.pc-chat-message__meta .ant-tag {
margin-inline-end: 0;
}
.pc-chat-message__bubble {
padding: 11px 14px;
border: 1px solid var(--line);
border-radius: 4px 14px 14px;
background: var(--paper-warm);
box-shadow: 0 1px 0 rgba(29, 36, 33, 0.03);
}
.pc-chat-message--self .pc-chat-message__bubble {
border-color: transparent;
border-radius: 14px 4px 14px 14px;
background: var(--brand-ink);
color: #fff;
}
.pc-chat-message__bubble p {
margin: 0;
font-size: 14px;
line-height: 1.7;
white-space: pre-wrap;
word-break: break-word;
}
.pc-chat-message__images {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
margin-bottom: 8px;
}
.pc-chat-message__images .ant-image,
.pc-chat-message__images img {
border-radius: 8px;
}
.pc-chat-pending {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 20px;
overflow-x: auto;
border-top: 1px solid var(--line);
background: var(--paper-warm);
}
.pc-chat-pending__item {
position: relative;
flex: 0 0 62px;
width: 62px;
height: 62px;
overflow: hidden;
border: 1px solid var(--line);
border-radius: 10px;
}
.pc-chat-pending__item img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.pc-chat-pending__item button {
position: absolute;
top: 0;
right: 0;
width: 20px;
height: 20px;
display: grid;
place-items: center;
border: 0;
border-radius: 0 0 0 8px;
background: rgba(20, 26, 23, 0.62);
color: #fff;
font-size: 11px;
cursor: pointer;
}
.pc-chat-pending > span {
margin-left: auto;
color: var(--ink-muted);
font-size: 12px;
}
.pc-chat-composer {
display: flex;
align-items: flex-end;
gap: 10px;
padding: 14px 20px;
border-top: 1px solid var(--line);
background: var(--paper-warm);
}
.pc-chat-composer .ant-input {
flex: 1;
}
@media (max-width: 900px) {
.pc-messages-grid {
grid-template-columns: minmax(0, 1fr);
}
.pc-messages-side {
flex-direction: row;
flex-wrap: wrap;
}
.pc-messages-side__card {
flex: 1 1 280px;
}
}
@media (max-width: 767px) {
.pc-messages-page,
.pc-chat-page {
padding: 24px 14px 40px;
}
.pc-messages-hero {
align-items: flex-start;
flex-direction: column;
gap: 14px;
}
.pc-chat-body {
max-height: calc(100vh - 360px);
padding: 16px;
}
.pc-chat-message__body {
max-width: 84%;
}
.pc-chat-composer {
flex-wrap: wrap;
}
.pc-chat-composer .ant-input {
order: 3;
width: 100%;
flex-basis: 100%;
}
}
@@ -559,6 +559,10 @@
top: 84px;
}
.pc-order-chat-button {
margin-bottom: 16px;
}
.pc-order-action-card {
border-color: var(--line);
background: var(--paper-warm);