优化会员信息模块及首页组件,清理冗余图片资源
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<!-- 轮播图容器 -->
|
||||
<view class="banner-container">
|
||||
<!-- 轮播图组件 -->
|
||||
<swiper
|
||||
class="banner-swiper"
|
||||
:circular="true"
|
||||
@@ -11,15 +9,10 @@
|
||||
:indicator-dots="false"
|
||||
@change="onSwiperChange"
|
||||
>
|
||||
<!-- 轮播项 -->
|
||||
<swiper-item v-for="(banner, index) in banners" :key="index">
|
||||
<!-- 轮播内容 -->
|
||||
<view class="banner-content">
|
||||
<!-- 轮播图片 -->
|
||||
<image :src="banner.image" mode="aspectFill" class="banner-image" />
|
||||
<!-- 图片遮罩层 -->
|
||||
<view class="banner-overlay"></view>
|
||||
<!-- 轮播文字信息 -->
|
||||
<view class="banner-text">
|
||||
<text class="banner-title">{{ banner.title }}</text>
|
||||
<text class="banner-subtitle">{{ banner.subtitle }}</text>
|
||||
@@ -28,7 +21,6 @@
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<!-- 轮播指示器点 -->
|
||||
<view class="banner-dots">
|
||||
<view
|
||||
v-for="(_, index) in banners"
|
||||
@@ -42,7 +34,6 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
// 轮播图数据列表
|
||||
const banners = [
|
||||
{
|
||||
image: 'https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=800&q=80',
|
||||
@@ -64,29 +55,25 @@ const banners = [
|
||||
}
|
||||
]
|
||||
|
||||
// 当前轮播索引,用于控制指示器激活状态
|
||||
const currentIndex = ref(0)
|
||||
|
||||
// 轮播图切换时的回调函数,更新当前索引
|
||||
const onSwiperChange = (e) => {
|
||||
currentIndex.value = e.detail.current
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 轮播图容器样式 */
|
||||
.banner-container {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 轮播图组件样式 */
|
||||
.banner-swiper {
|
||||
width: 100%;
|
||||
height: 360rpx;
|
||||
height: 480rpx;
|
||||
}
|
||||
|
||||
/* 轮播内容容器样式 */
|
||||
.banner-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -94,78 +81,108 @@ const onSwiperChange = (e) => {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 轮播图片样式 */
|
||||
.banner-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 图片遮罩层样式,添加渐变效果 */
|
||||
.banner-overlay {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(135deg, rgba(11, 43, 75, 0.85) 0%, rgba(26, 74, 111, 0.6) 100%);
|
||||
}
|
||||
|
||||
/* 轮播文字信息容器样式 */
|
||||
.wave-transition {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: -2rpx;
|
||||
height: 100rpx;
|
||||
z-index: 3;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wt-layer {
|
||||
position: absolute;
|
||||
left: -10%;
|
||||
width: 120%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wt-layer-1 {
|
||||
bottom: 0;
|
||||
background: #C0DDE9;
|
||||
border-radius: 45% 55% 0 0;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.wt-layer-2 {
|
||||
bottom: -10rpx;
|
||||
background: #D4EAF2;
|
||||
border-radius: 55% 45% 0 0;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.wt-layer-3 {
|
||||
bottom: -20rpx;
|
||||
background: #E8F4F9;
|
||||
border-radius: 40% 60% 0 0;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.banner-text {
|
||||
position: absolute;
|
||||
left: 32rpx;
|
||||
left: 36rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
/* 轮播标题样式 */
|
||||
.banner-title {
|
||||
display: block;
|
||||
font-size: 48rpx;
|
||||
font-weight: 800;
|
||||
color: #ffffff;
|
||||
margin-bottom: 8rpx;
|
||||
text-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.3);
|
||||
text-shadow: 0 4rpx 16rpx rgba(80, 150, 190, 0.4);
|
||||
}
|
||||
|
||||
/* 轮播副标题样式 */
|
||||
.banner-subtitle {
|
||||
display: block;
|
||||
font-size: 56rpx;
|
||||
font-weight: 800;
|
||||
color: #f97316;
|
||||
color: #E0F0FA;
|
||||
margin-bottom: 16rpx;
|
||||
text-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.3);
|
||||
text-shadow: 0 4rpx 16rpx rgba(80, 150, 190, 0.4);
|
||||
}
|
||||
|
||||
/* 轮播描述文字样式 */
|
||||
.banner-desc {
|
||||
display: block;
|
||||
font-size: 26rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
/* 轮播指示器容器样式 */
|
||||
.banner-dots {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 16rpx;
|
||||
margin-top: 24rpx;
|
||||
margin-top: -100rpx;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
/* 轮播指示器点样式 */
|
||||
.dot {
|
||||
width: 48rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 9999rpx;
|
||||
background: #d1d5db;
|
||||
background: #D0E4EE;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
/* 轮播指示器激活状态样式 */
|
||||
.dot.active {
|
||||
width: 64rpx;
|
||||
background: #f97316;
|
||||
background: linear-gradient(90deg, #7AB5CC, #9CCFDF);
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user