- Add tagFontColor column to tags table (Prisma db push) - Update Create/UpdateTagDto, TagsService, PublicTagDto, GoodDto, OriginGoodsService - Expose tagFontColor in PublicGoodDto and backend product mapping - Admin TagsView: add 背景色/字体色 color pickers, separate table columns, live preview - Admin GoodsView inline tag dialog: add 字体色 picker alongside background color - Add product-category.html design reference
1023 lines
28 KiB
HTML
1023 lines
28 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>产品分类 - 印美达官网</title>
|
|
<style>
|
|
:root {
|
|
--ink: #111111;
|
|
--muted: #777777;
|
|
--line: #eeeeee;
|
|
--soft: #f7f7f7;
|
|
--panel: #ffffff;
|
|
--orange: #ff6a00;
|
|
--orange-soft: #fff2e8;
|
|
--sidebar: #fafafa;
|
|
--skeleton: #eeeeee;
|
|
--skeleton-glow: #f7f7f7;
|
|
--shadow: 0 8px 28px rgba(17, 17, 17, 0.06);
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
min-width: 1180px;
|
|
color: var(--ink);
|
|
background: #ffffff;
|
|
font-family:
|
|
"Alibaba PuHuiTi",
|
|
"PingFang SC",
|
|
"Microsoft YaHei",
|
|
sans-serif;
|
|
}
|
|
|
|
button {
|
|
color: inherit;
|
|
font: inherit;
|
|
border: 0;
|
|
background: transparent;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.page {
|
|
width: 1440px;
|
|
min-height: 1773px;
|
|
margin: 0 auto;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.topbar {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
display: flex;
|
|
align-items: center;
|
|
height: 80px;
|
|
padding: 0 24px;
|
|
background: #ffffff;
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
|
|
.logo {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 139px;
|
|
height: 60px;
|
|
color: var(--orange);
|
|
font-size: 27px;
|
|
font-weight: 900;
|
|
letter-spacing: -0.04em;
|
|
}
|
|
|
|
.logo::before {
|
|
content: "";
|
|
width: 34px;
|
|
height: 34px;
|
|
margin-right: 8px;
|
|
border-radius: 11px 11px 11px 3px;
|
|
background: linear-gradient(135deg, #ff8a00, #ff4f00);
|
|
transform: rotate(-8deg);
|
|
}
|
|
|
|
.nav {
|
|
display: flex;
|
|
gap: 32px;
|
|
margin-left: 50px;
|
|
font-size: 18px;
|
|
line-height: 25px;
|
|
}
|
|
|
|
.nav a {
|
|
color: #222222;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.top-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 24px;
|
|
margin-left: auto;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.action {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.icon {
|
|
display: inline-grid;
|
|
place-items: center;
|
|
width: 24px;
|
|
height: 24px;
|
|
color: #222222;
|
|
}
|
|
|
|
.workspace-icon::before {
|
|
content: "";
|
|
width: 17px;
|
|
height: 17px;
|
|
border: 2px solid currentColor;
|
|
border-radius: 5px;
|
|
box-shadow: 6px 6px 0 -2px #ffffff, 6px 6px 0 0 currentColor;
|
|
}
|
|
|
|
.cart-icon::before {
|
|
content: "";
|
|
width: 18px;
|
|
height: 14px;
|
|
border: 2px solid currentColor;
|
|
border-top: 0;
|
|
border-radius: 0 0 5px 5px;
|
|
transform: translateY(2px);
|
|
}
|
|
|
|
.phone-icon::before {
|
|
content: "";
|
|
width: 12px;
|
|
height: 18px;
|
|
border: 2px solid currentColor;
|
|
border-radius: 4px;
|
|
transform: rotate(-12deg);
|
|
}
|
|
|
|
.chevron {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
border-right: 1.8px solid currentColor;
|
|
border-bottom: 1.8px solid currentColor;
|
|
transform: rotate(45deg) translateY(-2px);
|
|
}
|
|
|
|
.content {
|
|
display: grid;
|
|
grid-template-columns: 240px 1fr;
|
|
min-height: 1693px;
|
|
}
|
|
|
|
.sidebar {
|
|
position: relative;
|
|
padding-top: 26px;
|
|
background: var(--sidebar);
|
|
border-right: 1px solid var(--line);
|
|
}
|
|
|
|
.category-list {
|
|
width: 216px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.cat-row {
|
|
display: flex;
|
|
align-items: center;
|
|
height: 45px;
|
|
margin-bottom: 12px;
|
|
padding: 0 10px;
|
|
border-radius: 8px;
|
|
font-size: 18px;
|
|
line-height: 25px;
|
|
transition: background 0.2s ease, color 0.2s ease;
|
|
}
|
|
|
|
.cat-row.active {
|
|
color: var(--orange);
|
|
background: #ffffff;
|
|
box-shadow: 0 4px 16px rgba(255, 106, 0, 0.08);
|
|
}
|
|
|
|
.cat-icon {
|
|
position: relative;
|
|
width: 24px;
|
|
height: 24px;
|
|
margin-right: 8px;
|
|
color: currentColor;
|
|
}
|
|
|
|
.cat-icon::before {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 4px 5px;
|
|
border: 2px solid currentColor;
|
|
border-radius: 7px 7px 4px 4px;
|
|
}
|
|
|
|
.cat-icon::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 8px;
|
|
top: 2px;
|
|
width: 8px;
|
|
height: 7px;
|
|
border: 2px solid currentColor;
|
|
border-bottom: 0;
|
|
border-radius: 7px 7px 0 0;
|
|
}
|
|
|
|
.cat-row .chevron {
|
|
margin-left: auto;
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
.subtree {
|
|
position: relative;
|
|
margin: -2px 0 12px;
|
|
padding: 0 0 0 42px;
|
|
}
|
|
|
|
.subtree::before {
|
|
content: "";
|
|
position: absolute;
|
|
left: 22px;
|
|
top: 0;
|
|
width: 1px;
|
|
height: 254px;
|
|
background: #dddddd;
|
|
}
|
|
|
|
.sub-row {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
width: 174px;
|
|
height: 45px;
|
|
margin-bottom: 10px;
|
|
padding-left: 10px;
|
|
border-radius: 8px;
|
|
color: #555555;
|
|
font-size: 18px;
|
|
}
|
|
|
|
.sub-row::before {
|
|
content: "";
|
|
position: absolute;
|
|
left: -16px;
|
|
top: 22px;
|
|
width: 6px;
|
|
height: 1px;
|
|
background: #dddddd;
|
|
}
|
|
|
|
.sub-row.active {
|
|
color: var(--orange);
|
|
background: var(--orange-soft);
|
|
}
|
|
|
|
.sidebar-banner {
|
|
position: absolute;
|
|
left: 12px;
|
|
top: 752px;
|
|
display: flex;
|
|
align-items: center;
|
|
width: 216px;
|
|
height: 60px;
|
|
padding: 0 16px;
|
|
border-radius: 12px;
|
|
color: #ffffff;
|
|
background: linear-gradient(135deg, #ff8a00, #ff5c00);
|
|
box-shadow: 0 12px 28px rgba(255, 106, 0, 0.22);
|
|
}
|
|
|
|
.sidebar-banner strong {
|
|
display: block;
|
|
font-size: 16px;
|
|
line-height: 20px;
|
|
}
|
|
|
|
.sidebar-banner span {
|
|
display: block;
|
|
margin-top: 2px;
|
|
font-size: 12px;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.banner-close {
|
|
position: absolute;
|
|
right: 12px;
|
|
top: 8px;
|
|
width: 14px;
|
|
height: 14px;
|
|
}
|
|
|
|
.banner-close::before,
|
|
.banner-close::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 6px;
|
|
top: 0;
|
|
width: 1.5px;
|
|
height: 14px;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.banner-close::before {
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
.banner-close::after {
|
|
transform: rotate(-45deg);
|
|
}
|
|
|
|
.main {
|
|
min-width: 0;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.subnav {
|
|
display: flex;
|
|
align-items: center;
|
|
height: 112px;
|
|
padding: 0 24px;
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
|
|
.crumb {
|
|
font-size: 18px;
|
|
color: #333333;
|
|
}
|
|
|
|
.filters {
|
|
display: flex;
|
|
gap: 12px;
|
|
margin-top: 24px;
|
|
padding-left: 24px;
|
|
}
|
|
|
|
.filter-pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 38px;
|
|
padding: 0 16px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--line);
|
|
background: #ffffff;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.selected-tags {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
min-height: 38px;
|
|
margin: -38px 24px 0 auto;
|
|
}
|
|
|
|
.tag {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
height: 38px;
|
|
min-width: 220px;
|
|
padding: 0 12px;
|
|
border-radius: 8px;
|
|
background: var(--orange-soft);
|
|
color: var(--orange);
|
|
font-size: 16px;
|
|
}
|
|
|
|
.tag-dot {
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 6px;
|
|
border: 1.8px solid currentColor;
|
|
}
|
|
|
|
.tag-close {
|
|
position: relative;
|
|
width: 20px;
|
|
height: 20px;
|
|
margin-left: auto;
|
|
}
|
|
|
|
.tag-close::before,
|
|
.tag-close::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 9px;
|
|
top: 4px;
|
|
width: 1.5px;
|
|
height: 12px;
|
|
background: currentColor;
|
|
}
|
|
|
|
.tag-close::before {
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
.tag-close::after {
|
|
transform: rotate(-45deg);
|
|
}
|
|
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 270px);
|
|
gap: 24px;
|
|
padding: 24px;
|
|
}
|
|
|
|
.product-card {
|
|
width: 270px;
|
|
height: 382px;
|
|
overflow: hidden;
|
|
border-radius: 12px;
|
|
background: #ffffff;
|
|
border: 1px solid var(--line);
|
|
box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
|
|
.product-card:hover {
|
|
transform: translateY(-3px);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.product-media {
|
|
display: grid;
|
|
place-items: center;
|
|
width: 270px;
|
|
height: 270px;
|
|
background: linear-gradient(180deg, #f8f8f8, #f0f0f0);
|
|
}
|
|
|
|
.shirt {
|
|
position: relative;
|
|
width: 138px;
|
|
height: 168px;
|
|
border-radius: 22px 22px 18px 18px;
|
|
background: #ffffff;
|
|
box-shadow: inset 0 0 0 1px #e5e5e5, 0 16px 32px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.shirt::before,
|
|
.shirt::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 24px;
|
|
width: 50px;
|
|
height: 72px;
|
|
border-radius: 18px;
|
|
background: #ffffff;
|
|
box-shadow: inset 0 0 0 1px #e5e5e5;
|
|
}
|
|
|
|
.shirt::before {
|
|
left: -32px;
|
|
transform: rotate(18deg);
|
|
}
|
|
|
|
.shirt::after {
|
|
right: -32px;
|
|
transform: rotate(-18deg);
|
|
}
|
|
|
|
.shirt-mark {
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 62px;
|
|
width: 46px;
|
|
height: 46px;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, #ff9b38, #ff5c00);
|
|
transform: translateX(-50%);
|
|
}
|
|
|
|
.product-info {
|
|
padding: 12px;
|
|
}
|
|
|
|
.product-title {
|
|
margin: 0 0 11px;
|
|
font-size: 18px;
|
|
line-height: 25px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.chips {
|
|
display: flex;
|
|
gap: 6px;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
height: 18px;
|
|
padding: 0 8px;
|
|
border-radius: 5px;
|
|
color: var(--orange);
|
|
background: var(--orange-soft);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.price {
|
|
color: #222222;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.empty-state {
|
|
display: none;
|
|
place-items: center;
|
|
min-height: 720px;
|
|
padding-top: 80px;
|
|
}
|
|
|
|
.empty-card {
|
|
text-align: center;
|
|
}
|
|
|
|
.empty-art {
|
|
position: relative;
|
|
width: 220px;
|
|
height: 176px;
|
|
margin: 0 auto 28px;
|
|
}
|
|
|
|
.empty-box {
|
|
position: absolute;
|
|
left: 35px;
|
|
top: 42px;
|
|
width: 150px;
|
|
height: 94px;
|
|
border-radius: 18px;
|
|
background: #f2f2f2;
|
|
transform: perspective(400px) rotateX(58deg) rotateZ(-8deg);
|
|
}
|
|
|
|
.empty-lid {
|
|
position: absolute;
|
|
left: 48px;
|
|
top: 20px;
|
|
width: 124px;
|
|
height: 64px;
|
|
border-radius: 16px;
|
|
background: #e8e8e8;
|
|
transform: rotate(-8deg);
|
|
}
|
|
|
|
.empty-spark {
|
|
position: absolute;
|
|
width: 12px;
|
|
height: 12px;
|
|
border-radius: 999px;
|
|
background: var(--orange);
|
|
}
|
|
|
|
.empty-spark:nth-child(3) {
|
|
left: 21px;
|
|
top: 52px;
|
|
}
|
|
|
|
.empty-spark:nth-child(4) {
|
|
right: 26px;
|
|
top: 18px;
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
.empty-card h2 {
|
|
margin: 0 0 10px;
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.empty-card p {
|
|
margin: 0 0 24px;
|
|
color: var(--muted);
|
|
font-size: 16px;
|
|
}
|
|
|
|
.empty-action {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 44px;
|
|
padding: 0 26px;
|
|
border-radius: 10px;
|
|
color: #ffffff;
|
|
background: var(--orange);
|
|
font-size: 16px;
|
|
}
|
|
|
|
.skeleton-card {
|
|
border-color: transparent;
|
|
}
|
|
|
|
.skeleton-card .product-media,
|
|
.skeleton-line,
|
|
.skeleton-chip {
|
|
position: relative;
|
|
overflow: hidden;
|
|
background: var(--skeleton);
|
|
}
|
|
|
|
.skeleton-card .product-media::after,
|
|
.skeleton-line::after,
|
|
.skeleton-chip::after {
|
|
content: "";
|
|
position: absolute;
|
|
inset: 0;
|
|
background: linear-gradient(90deg, transparent, var(--skeleton-glow), transparent);
|
|
animation: loading 1.25s infinite;
|
|
transform: translateX(-100%);
|
|
}
|
|
|
|
.skeleton-line {
|
|
height: 22px;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.skeleton-line.title {
|
|
width: 246px;
|
|
margin-bottom: 11px;
|
|
}
|
|
|
|
.skeleton-line.price {
|
|
width: 98px;
|
|
}
|
|
|
|
.skeleton-chip {
|
|
width: 46px;
|
|
height: 18px;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.state-switcher {
|
|
position: fixed;
|
|
right: 24px;
|
|
bottom: 24px;
|
|
z-index: 20;
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 8px;
|
|
border: 1px solid var(--line);
|
|
border-radius: 14px;
|
|
background: rgba(255, 255, 255, 0.92);
|
|
box-shadow: var(--shadow);
|
|
backdrop-filter: blur(12px);
|
|
}
|
|
|
|
.state-switcher button {
|
|
height: 34px;
|
|
padding: 0 14px;
|
|
border-radius: 9px;
|
|
color: #666666;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.state-switcher button.active {
|
|
color: #ffffff;
|
|
background: var(--ink);
|
|
}
|
|
|
|
body[data-state="empty"] .grid {
|
|
display: none;
|
|
}
|
|
|
|
body[data-state="empty"] .empty-state {
|
|
display: grid;
|
|
}
|
|
|
|
body[data-state="loading"] .product-card:not(.skeleton-card) {
|
|
display: none;
|
|
}
|
|
|
|
body:not([data-state="loading"]) .skeleton-card {
|
|
display: none;
|
|
}
|
|
|
|
@keyframes loading {
|
|
100% {
|
|
transform: translateX(100%);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
body {
|
|
min-width: 0;
|
|
}
|
|
|
|
.page {
|
|
width: 100%;
|
|
}
|
|
|
|
.topbar {
|
|
height: auto;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
padding: 14px 16px;
|
|
}
|
|
|
|
.nav {
|
|
order: 3;
|
|
width: 100%;
|
|
margin: 0;
|
|
gap: 18px;
|
|
overflow-x: auto;
|
|
font-size: 15px;
|
|
}
|
|
|
|
.top-actions {
|
|
gap: 12px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.content {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.sidebar {
|
|
overflow-x: auto;
|
|
padding: 12px 16px;
|
|
border-right: 0;
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
|
|
.category-list {
|
|
display: flex;
|
|
gap: 8px;
|
|
width: max-content;
|
|
margin: 0;
|
|
}
|
|
|
|
.cat-row {
|
|
margin: 0;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.subtree,
|
|
.sidebar-banner {
|
|
display: none;
|
|
}
|
|
|
|
.subnav {
|
|
height: auto;
|
|
padding: 18px 16px;
|
|
}
|
|
|
|
.filters {
|
|
padding: 16px;
|
|
margin-top: 0;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.selected-tags {
|
|
justify-content: flex-start;
|
|
margin: 0;
|
|
padding: 0 16px 8px;
|
|
}
|
|
|
|
.grid {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 14px;
|
|
padding: 16px;
|
|
}
|
|
|
|
.product-card {
|
|
width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
.product-media {
|
|
width: 100%;
|
|
height: 46vw;
|
|
min-height: 170px;
|
|
}
|
|
|
|
.state-switcher {
|
|
right: 12px;
|
|
bottom: 12px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="page">
|
|
<header class="topbar">
|
|
<div class="logo">INKREACH</div>
|
|
<nav class="nav" aria-label="主导航">
|
|
<a href="#">产品中心</a>
|
|
<a href="#">在线设计</a>
|
|
<a href="#">选品推荐</a>
|
|
<a href="#">解决方案</a>
|
|
</nav>
|
|
<div class="top-actions">
|
|
<span class="action"><i class="icon workspace-icon"></i>工作台</span>
|
|
<span class="action"><i class="icon cart-icon"></i>购物车</span>
|
|
<span class="action"><i class="icon phone-icon"></i>18588980344 <i class="chevron"></i></span>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="content">
|
|
<aside class="sidebar" aria-label="产品分类">
|
|
<div class="category-list">
|
|
<button class="cat-row">
|
|
<i class="cat-icon"></i>
|
|
全部商品
|
|
</button>
|
|
<button class="cat-row">
|
|
<i class="cat-icon"></i>
|
|
男士服装
|
|
<i class="chevron"></i>
|
|
</button>
|
|
<button class="cat-row active">
|
|
<i class="cat-icon"></i>
|
|
女士服装
|
|
<i class="chevron"></i>
|
|
</button>
|
|
<div class="subtree">
|
|
<button class="sub-row active">T恤</button>
|
|
<button class="sub-row">裤装</button>
|
|
<button class="sub-row">卫衣</button>
|
|
<button class="sub-row">裙装</button>
|
|
<button class="sub-row">内衣</button>
|
|
</div>
|
|
<button class="cat-row">
|
|
<i class="cat-icon"></i>
|
|
儿童服装
|
|
<i class="chevron"></i>
|
|
</button>
|
|
<button class="cat-row">
|
|
<i class="cat-icon"></i>
|
|
家居配饰
|
|
<i class="chevron"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="sidebar-banner">
|
|
<div>
|
|
<strong>定制热卖款</strong>
|
|
<span>一件起订,全球发货</span>
|
|
</div>
|
|
<button class="banner-close" aria-label="关闭"></button>
|
|
</div>
|
|
</aside>
|
|
|
|
<section class="main">
|
|
<div class="subnav">
|
|
<div class="crumb">产品中心 / 女士服装 / T恤</div>
|
|
</div>
|
|
|
|
<div class="filters">
|
|
<button class="filter-pill">物流 <i class="chevron"></i></button>
|
|
<button class="filter-pill">工艺 <i class="chevron"></i></button>
|
|
</div>
|
|
|
|
<div class="selected-tags">
|
|
<span class="tag"><i class="tag-dot"></i>T恤<i class="tag-close"></i></span>
|
|
</div>
|
|
|
|
<section class="grid" aria-label="产品列表">
|
|
<article class="product-card">
|
|
<div class="product-media"><div class="shirt"><i class="shirt-mark"></i></div></div>
|
|
<div class="product-info">
|
|
<h3 class="product-title">女士圆领短袖T恤</h3>
|
|
<div class="chips"><span class="chip">DTG</span><span class="chip">美国</span><span class="chip">24H</span><span class="chip">爆款</span></div>
|
|
<div class="price">¥39.90起</div>
|
|
</div>
|
|
</article>
|
|
<article class="product-card">
|
|
<div class="product-media"><div class="shirt"><i class="shirt-mark"></i></div></div>
|
|
<div class="product-info">
|
|
<h3 class="product-title">女士宽松印花T恤</h3>
|
|
<div class="chips"><span class="chip">刺绣</span><span class="chip">英国</span><span class="chip">48H</span><span class="chip">新款</span></div>
|
|
<div class="price">¥45.00起</div>
|
|
</div>
|
|
</article>
|
|
<article class="product-card">
|
|
<div class="product-media"><div class="shirt"><i class="shirt-mark"></i></div></div>
|
|
<div class="product-info">
|
|
<h3 class="product-title">女士修身圆领T恤</h3>
|
|
<div class="chips"><span class="chip">热转印</span><span class="chip">德国</span><span class="chip">本土</span><span class="chip">轻薄</span></div>
|
|
<div class="price">¥42.80起</div>
|
|
</div>
|
|
</article>
|
|
<article class="product-card">
|
|
<div class="product-media"><div class="shirt"><i class="shirt-mark"></i></div></div>
|
|
<div class="product-info">
|
|
<h3 class="product-title">女士重磅纯棉T恤</h3>
|
|
<div class="chips"><span class="chip">DTF</span><span class="chip">加拿大</span><span class="chip">质感</span><span class="chip">热销</span></div>
|
|
<div class="price">¥52.00起</div>
|
|
</div>
|
|
</article>
|
|
<article class="product-card">
|
|
<div class="product-media"><div class="shirt"><i class="shirt-mark"></i></div></div>
|
|
<div class="product-info">
|
|
<h3 class="product-title">女士V领短袖T恤</h3>
|
|
<div class="chips"><span class="chip">DTG</span><span class="chip">澳洲</span><span class="chip">24H</span><span class="chip">柔软</span></div>
|
|
<div class="price">¥43.20起</div>
|
|
</div>
|
|
</article>
|
|
<article class="product-card">
|
|
<div class="product-media"><div class="shirt"><i class="shirt-mark"></i></div></div>
|
|
<div class="product-info">
|
|
<h3 class="product-title">女士落肩短袖T恤</h3>
|
|
<div class="chips"><span class="chip">DTF</span><span class="chip">西班牙</span><span class="chip">48H</span><span class="chip">潮流</span></div>
|
|
<div class="price">¥49.00起</div>
|
|
</div>
|
|
</article>
|
|
<article class="product-card">
|
|
<div class="product-media"><div class="shirt"><i class="shirt-mark"></i></div></div>
|
|
<div class="product-info">
|
|
<h3 class="product-title">女士运动速干T恤</h3>
|
|
<div class="chips"><span class="chip">升华</span><span class="chip">美国</span><span class="chip">运动</span><span class="chip">速干</span></div>
|
|
<div class="price">¥58.00起</div>
|
|
</div>
|
|
</article>
|
|
<article class="product-card">
|
|
<div class="product-media"><div class="shirt"><i class="shirt-mark"></i></div></div>
|
|
<div class="product-info">
|
|
<h3 class="product-title">女士基础款白T恤</h3>
|
|
<div class="chips"><span class="chip">DTG</span><span class="chip">英国</span><span class="chip">基础</span><span class="chip">低价</span></div>
|
|
<div class="price">¥35.90起</div>
|
|
</div>
|
|
</article>
|
|
|
|
<article class="product-card skeleton-card">
|
|
<div class="product-media"></div>
|
|
<div class="product-info"><div class="skeleton-line title"></div><div class="chips"><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i></div><div class="skeleton-line price"></div></div>
|
|
</article>
|
|
<article class="product-card skeleton-card">
|
|
<div class="product-media"></div>
|
|
<div class="product-info"><div class="skeleton-line title"></div><div class="chips"><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i></div><div class="skeleton-line price"></div></div>
|
|
</article>
|
|
<article class="product-card skeleton-card">
|
|
<div class="product-media"></div>
|
|
<div class="product-info"><div class="skeleton-line title"></div><div class="chips"><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i></div><div class="skeleton-line price"></div></div>
|
|
</article>
|
|
<article class="product-card skeleton-card">
|
|
<div class="product-media"></div>
|
|
<div class="product-info"><div class="skeleton-line title"></div><div class="chips"><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i></div><div class="skeleton-line price"></div></div>
|
|
</article>
|
|
<article class="product-card skeleton-card">
|
|
<div class="product-media"></div>
|
|
<div class="product-info"><div class="skeleton-line title"></div><div class="chips"><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i></div><div class="skeleton-line price"></div></div>
|
|
</article>
|
|
<article class="product-card skeleton-card">
|
|
<div class="product-media"></div>
|
|
<div class="product-info"><div class="skeleton-line title"></div><div class="chips"><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i></div><div class="skeleton-line price"></div></div>
|
|
</article>
|
|
<article class="product-card skeleton-card">
|
|
<div class="product-media"></div>
|
|
<div class="product-info"><div class="skeleton-line title"></div><div class="chips"><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i></div><div class="skeleton-line price"></div></div>
|
|
</article>
|
|
<article class="product-card skeleton-card">
|
|
<div class="product-media"></div>
|
|
<div class="product-info"><div class="skeleton-line title"></div><div class="chips"><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i><i class="skeleton-chip"></i></div><div class="skeleton-line price"></div></div>
|
|
</article>
|
|
</section>
|
|
|
|
<section class="empty-state" aria-label="空状态">
|
|
<div class="empty-card">
|
|
<div class="empty-art">
|
|
<i class="empty-box"></i>
|
|
<i class="empty-lid"></i>
|
|
<i class="empty-spark"></i>
|
|
<i class="empty-spark"></i>
|
|
</div>
|
|
<h2>暂无匹配商品</h2>
|
|
<p>试试清空筛选条件,或切换其他分类看看。</p>
|
|
<button class="empty-action">清空筛选</button>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
</main>
|
|
</div>
|
|
|
|
<div class="state-switcher" aria-label="页面状态切换">
|
|
<button data-state="default">产品分类</button>
|
|
<button data-state="empty">空状态</button>
|
|
<button data-state="loading">预加载</button>
|
|
</div>
|
|
|
|
<script>
|
|
const params = new URLSearchParams(window.location.search);
|
|
const state = params.get("state") || "default";
|
|
const allowedStates = new Set(["default", "empty", "loading"]);
|
|
const currentState = allowedStates.has(state) ? state : "default";
|
|
document.body.dataset.state = currentState;
|
|
|
|
document.querySelectorAll(".state-switcher button").forEach((button) => {
|
|
const buttonState = button.dataset.state;
|
|
button.classList.toggle("active", buttonState === currentState);
|
|
button.addEventListener("click", () => {
|
|
const next = buttonState === "default" ? location.pathname : `${location.pathname}?state=${buttonState}`;
|
|
window.history.pushState({}, "", next);
|
|
document.body.dataset.state = buttonState;
|
|
document.querySelectorAll(".state-switcher button").forEach((item) => {
|
|
item.classList.toggle("active", item.dataset.state === buttonState);
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|