From 5d1f29d18d7a449b37054075eebda0b6b1d5d32c Mon Sep 17 00:00:00 2001 From: feie9456 Date: Tue, 8 Jul 2025 12:03:10 +0800 Subject: [PATCH] scroll list --- src/pages/Page1.vue | 358 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 348 insertions(+), 10 deletions(-) diff --git a/src/pages/Page1.vue b/src/pages/Page1.vue index acde2ab..df07f98 100644 --- a/src/pages/Page1.vue +++ b/src/pages/Page1.vue @@ -1,18 +1,108 @@ @@ -420,4 +570,192 @@ img { width: 100%; object-fit: cover; } + +/* 店铺选择界面样式 */ +.store-selector { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1000; + display: flex; + align-items: center; + justify-content: center; +} + +.store-selector-content { + width: 90%; + max-width: 400px; + text-align: center; + color: #333; +} + +.region-title { + font-size: 6vw; + font-weight: bold; + margin-bottom: 8vw; + color: #333; +} + +.store-list-container { + margin-bottom: 12vw; + height: 40vh; + overflow: hidden; + position: relative; + mask-image: linear-gradient( + to bottom, + transparent 0%, + black 15%, + black 85%, + transparent 100% + ); + -webkit-mask-image: linear-gradient( + to bottom, + transparent 0%, + black 15%, + black 85%, + transparent 100% + ); +} + +.store-list { + height: 100%; + overflow-y: auto; + scroll-behavior: smooth; + scroll-snap-type: y mandatory; + padding: 0; +} + +.scroll-padding { + height: calc(20vh - 4vw); /* 容器高度的一半减去项目高度的一半 */ + flex-shrink: 0; +} + +.store-item { + width: 50vw; + height: 8vw; + display: flex; + justify-content: center; + align-items: center; + + border-radius: 8vw; + scroll-snap-align: center; + transition: all 0.3s ease; + cursor: pointer; + opacity: 0.6; + font-size: 4vw; + margin: 1vw auto; + flex-shrink: 0; +} + +.store-item.active { + background: rgba(255, 255, 255, 0.9); + opacity: 1; + font-weight: bold; +} + +.center-indicator { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 90%; + height: 10vw; + border: 2px solid rgba(51, 51, 51, 0.2); + border-radius: 10vw; + pointer-events: none; + z-index: 2; + background: rgba(255, 255, 255, 0.05); +} + + +.name-input-section { + margin-bottom: 8vw; +} + +.name-input-section h3 { + font-size: 5vw; + color: #333; + margin-bottom: 4vw; + font-weight: normal; +} + +.input-container { + position: relative; + width: 80%; + margin: 0 auto; +} + +.name-input { + width: 100%; + padding: 2vw 0; + font-size: 4.5vw; + background: transparent; + border: none; + outline: none; + color: #333; + text-align: center; +} + +.input-line { + width: 100%; + height: 2px; + background: #333; + margin-top: 1vw; + position: relative; +} + +.input-line::after { + content: ''; + position: absolute; + right: 0; + top: -8px; + width: 0; + height: 0; + border-left: 12px solid transparent; + border-right: 12px solid transparent; + border-bottom: 16px solid #333; +} + +.action-buttons { + display: flex; + justify-content: center; + align-items: center; + gap: 4vw; +} + +.start-button { + display: flex; + align-items: center; + gap: 3vw; + padding: 4vw 8vw; + background: #000; + color: #fff; + border: none; + border-radius: 50px; + font-size: 4.5vw; + font-weight: bold; + cursor: pointer; + transition: all 0.3s ease; +} + +.start-button:hover { + transform: scale(1.05); +} + +.start-button .arrow { + font-size: 5vw; + font-weight: normal; +} + +/* 隐藏滚动条 */ +.store-list::-webkit-scrollbar { + display: none; +} + +.store-list { + -ms-overflow-style: none; + scrollbar-width: none; +} \ No newline at end of file