hookehuyr

feat(Home): 添加法会流程组件并实现步骤切换功能

refactor(vite): 修改开发服务器端口为5573
chore: 添加法会相关图片资源
...@@ -26,6 +26,44 @@ ...@@ -26,6 +26,44 @@
26 :options="videoOptions" 26 :options="videoOptions"
27 /> 27 />
28 </div> 28 </div>
29 +
30 + <!-- 法会流程 -->
31 + <div class="ceremony-process">
32 + <!-- 标题 -->
33 + <div class="ceremony-title">
34 + <img src="/src/assets/images/02 西园戒幢律寺三坛大戒法会/法會流程@2x.png" alt="法会流程" />
35 + </div>
36 +
37 + <!-- 流程步骤 -->
38 + <div class="process-container">
39 + <!-- 麻绳背景 -->
40 + <div class="rope-background"></div>
41 +
42 + <!-- 流程步骤 -->
43 + <div class="process-steps">
44 + <div
45 + v-for="(step, index) in processSteps"
46 + :key="index"
47 + class="process-step"
48 + :class="{ active: step.active }"
49 + @click="selectStep(index)"
50 + >
51 + <!-- 顶部白色圆形占位(选中状态) -->
52 + <div class="top-circle"></div>
53 +
54 + <!-- 步骤内容 -->
55 + <div class="step-content">
56 + <span class="step-text">{{ step.name }}</span>
57 + </div>
58 +
59 + <!-- 底部箭头(选中状态) -->
60 + <div v-if="step.active" class="bottom-arrow">
61 + <img src="/src/assets/images/02 西园戒幢律寺三坛大戒法会/点@2x.png" alt="选中" />
62 + </div>
63 + </div>
64 + </div>
65 + </div>
66 + </div>
29 </div> 67 </div>
30 </div> 68 </div>
31 </template> 69 </template>
...@@ -50,6 +88,24 @@ const videoOptions = ref({ ...@@ -50,6 +88,24 @@ const videoOptions = ref({
50 type: 'video/mp4' 88 type: 'video/mp4'
51 }] 89 }]
52 }) 90 })
91 +
92 +// 法会流程步骤数据
93 +const processSteps = ref([
94 + { name: '准 备', active: true },
95 + { name: '正式开堂', active: false },
96 + { name: '封堂洒净', active: false },
97 + { name: '正授沙弥戒', active: false },
98 + { name: '二坛比丘戒', active: false },
99 + { name: '三坛菩萨戒', active: false },
100 + { name: '圆 满', active: false }
101 +])
102 +
103 +// 点击切换步骤状态
104 +const selectStep = (index) => {
105 + processSteps.value.forEach((step, i) => {
106 + step.active = i === index
107 + })
108 +}
53 </script> 109 </script>
54 110
55 <style scoped> 111 <style scoped>
...@@ -142,4 +198,192 @@ const videoOptions = ref({ ...@@ -142,4 +198,192 @@ const videoOptions = ref({
142 height: 35%; 198 height: 35%;
143 } 199 }
144 } 200 }
201 +
202 +/* 法会流程模块 */
203 +.ceremony-process {
204 + width: 100%;
205 + padding: 2rem 1rem;
206 + position: relative;
207 + z-index: 2;
208 +}
209 +
210 +/* 标题部分 */
211 +.ceremony-title {
212 + display: flex;
213 + justify-content: center;
214 + align-items: center;
215 + margin-bottom: 2rem;
216 +}
217 +
218 +.ceremony-title img {
219 + max-width: 12rem;
220 + height: auto;
221 +}
222 +
223 +/* 流程容器 */
224 +.process-container {
225 + position: relative;
226 + width: 100%;
227 +}
228 +
229 +/* 麻绳背景 */
230 +.rope-background {
231 + position: absolute;
232 + top: 10%;
233 + left: 0;
234 + right: 0;
235 + height: 0.3rem;
236 + background-image: url('@/assets/images/02 西园戒幢律寺三坛大戒法会/麻绳@2x.png');
237 + background-size: cover;
238 + background-position: top;
239 + background-repeat: repeat-x;
240 + transform: translateY(-10%);
241 + z-index: 1;
242 +}
243 +
244 +/* 流程步骤容器 */
245 +.process-steps {
246 + display: flex;
247 + justify-content: space-between;
248 + align-items: center;
249 + position: relative;
250 + z-index: 2;
251 + padding: 0 0.5rem;
252 + gap: 0.5rem;
253 +}
254 +
255 +/* 单个流程步骤 */
256 +.process-step {
257 + position: relative;
258 + display: flex;
259 + flex-direction: column;
260 + align-items: center;
261 + flex: 1;
262 + cursor: pointer;
263 + transition: transform 0.2s ease;
264 +}
265 +
266 +.process-step:hover {
267 + transform: scale(1.05);
268 +}
269 +
270 +/* 步骤内容 */
271 +.step-content {
272 + width: 4rem;
273 + height: 10rem;
274 + background: linear-gradient(180deg, #DAC39E 0%, #BE9C63 100%);
275 + border-radius: 0.75rem;
276 + display: flex;
277 + align-items: center;
278 + justify-content: center;
279 + position: relative;
280 + transition: all 0.3s ease;
281 + box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
282 +}
283 +
284 +/* 选中状态的步骤内容 */
285 +.process-step.active .step-content {
286 + background: linear-gradient(180deg, #C8916C 0%, #975021 100%);
287 + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
288 +}
289 +
290 +/* 步骤文字 */
291 +.step-text {
292 + color: white;
293 + font-size: 1rem;
294 + font-weight: 600;
295 + text-align: center;
296 + line-height: 1.3;
297 + writing-mode: vertical-rl;
298 + text-orientation: mixed;
299 + text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
300 + margin-top: 0.85rem;
301 + /* 文字间隔 */
302 + letter-spacing: 0.05rem;
303 +}
304 +
305 +/* 顶部白色圆形占位 */
306 +.top-circle {
307 + position: absolute;
308 + top: 0.5rem;
309 + left: 50%;
310 + transform: translateX(-50%);
311 + width: 0.5rem;
312 + height: 0.5rem;
313 + background: white;
314 + border-radius: 50%;
315 + z-index: 3;
316 +}
317 +
318 +/* 底部箭头 */
319 +.bottom-arrow {
320 + position: absolute;
321 + bottom: -1.25rem;
322 + left: 50%;
323 + transform: translateX(-50%);
324 + z-index: 3;
325 +}
326 +
327 +.bottom-arrow img {
328 + width: 1rem;
329 + height: 1rem;
330 +}
331 +
332 +/* 响应式调整 */
333 +@media (max-width: 48rem) {
334 + .ceremony-process {
335 + padding: 1.5rem 0.5rem;
336 + }
337 +
338 + .ceremony-title img {
339 + max-width: 10rem;
340 + }
341 +
342 + .step-content {
343 + width: 3rem;
344 + height: 8rem;
345 + }
346 +
347 + .step-text {
348 + font-size: 0.9rem;
349 + }
350 +
351 + .process-steps {
352 + padding: 0 0.25rem;
353 + gap: 0.25rem;
354 + }
355 +}
356 +
357 +@media (max-width: 30rem) {
358 + .ceremony-process {
359 + padding: 1rem 0.25rem;
360 + }
361 +
362 + .ceremony-title img {
363 + max-width: 8rem;
364 + }
365 +
366 + .step-content {
367 + width: 2.5rem;
368 + height: 6.5rem;
369 + }
370 +
371 + .step-text {
372 + font-size: 0.8rem;
373 + }
374 +
375 + .top-circle {
376 + width: 0.75rem;
377 + height: 0.75rem;
378 + }
379 +
380 + .bottom-arrow img {
381 + width: 1rem;
382 + height: 0.75rem;
383 + }
384 +
385 + .process-steps {
386 + gap: 0.125rem;
387 + }
388 +}
145 </style> 389 </style>
......
1 /* 1 /*
2 * @Date: 2025-10-30 10:27:43 2 * @Date: 2025-10-30 10:27:43
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-10-30 13:55:18 4 + * @LastEditTime: 2025-10-30 15:24:36
5 * @FilePath: /stdj_h5/vite.config.js 5 * @FilePath: /stdj_h5/vite.config.js
6 * @Description: 文件描述 6 * @Description: 文件描述
7 */ 7 */
...@@ -66,7 +66,7 @@ export default defineConfig({ ...@@ -66,7 +66,7 @@ export default defineConfig({
66 }, 66 },
67 server: { 67 server: {
68 host: '0.0.0.0', 68 host: '0.0.0.0',
69 - port: 5173, 69 + port: 5573,
70 open: true, 70 open: true,
71 proxy: { 71 proxy: {
72 '/api': { 72 '/api': {
......