与牧同行-小程序用户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

555 lines
8.3 KiB

/* 页面容器 */
.home-container {
width: 100%;
min-height: 100vh;
background: linear-gradient(180deg, #86D8D0 0%, #a9dfda 30%, #cfe9e7 60%, #ECF8F7 90%);
padding-top: env(safe-area-inset-top);
}
/* 主要内容区域 */
.box {
width: 93%;
margin: 0 auto;
padding-bottom: 40rpx;
}
/* AI问诊 */
.Aidiagnosis {
position: fixed;
right: 0;
bottom: 150px;
margin: 0 auto;
z-index: 100;
}
.Aidiagnosis image {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
/* 定位 */
.orientation {
display: flex;
align-items: center;
padding: 20rpx 0;
color: #fff;
font-weight: bold;
font-size: 26rpx;
}
.orientation image {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
/* 轮播图区域 */
.swiper-container {
position: relative;
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.1);
animation: scaleIn 0.6s ease-out 0.4s both;
}
@keyframes scaleIn {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
.custom-swiper {
border-radius: 20rpx;
}
.swiper-item {
position: relative;
height: 360rpx;
overflow: hidden;
border-radius: 20rpx;
transition: transform 0.5s ease;
}
.swiper-item.active {
transform: scale(1.02);
}
.swiper-image {
width: 100%;
height: 100%;
transition: transform 8s ease;
}
.swiper-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent 50%);
}
.swiper-content {
position: absolute;
bottom: 60rpx;
left: 40rpx;
z-index: 2;
max-width: 60%;
}
.swiper-tag {
display: inline-block;
padding: 6rpx 20rpx;
background: rgba(76, 175, 80, 0.9);
color: white;
font-size: 20rpx;
border-radius: 20rpx;
margin-bottom: 16rpx;
backdrop-filter: blur(10rpx);
}
.swiper-title {
display: block;
font-size: 36rpx;
font-weight: bold;
color: #FFFFFF;
margin-bottom: 8rpx;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
line-height: 1.4;
}
.swiper-desc {
display: block;
font-size: 24rpx;
color: rgba(255, 255, 255, 0.9);
text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
}
.swiper-gradient {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 120rpx;
background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
}
.custom-indicator {
position: absolute;
bottom: 30rpx;
right: 30rpx;
display: flex;
align-items: center;
z-index: 3;
}
.indicator-dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.5);
margin: 0 6rpx;
transition: all 0.3s ease;
}
.indicator-dot.active {
width: 30rpx;
background: #96DBD4;
border-radius: 6rpx;
}
/* 卡片类型 */
.kap {
animation: kapIn 0.5s ease-out 0.5s both;
}
@keyframes kapIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.card {
width: 100%;
display: grid;
grid-template-columns: 1.1fr 2fr;
column-gap: 20rpx;
margin: 20rpx 0;
}
.card2 {
background-color: #F8918C;
border-radius: 25rpx;
padding: 30rpx 20rpx 120rpx;
}
.card2 view:nth-child(1) {
font-size: 38rpx;
color: #fff;
font-weight: bold;
letter-spacing: 0.1em;
}
.card2_1 {
margin: 10rpx 0;
font-size: 26rpx;
color: #FDE8E1;
}
.card3 {
display: grid;
grid-template-rows: 1fr 1fr;
row-gap: 20rpx;
}
.card3>view {
border-radius: 25rpx;
padding: 0 0 0 20rpx;
}
.card3_1 {
background-color: #5EBEB8;
}
.card3_1 view:last-child {
color: #D9F0EE;
}
.card3_2 {
background-color: #E9B770;
}
.card3_2 view:last-child {
color: #F4E8DB;
}
.card3_kp view:first-child {
font-size: 38rpx;
color: #fff;
margin: 30rpx 0 10rpx 0;
}
.card3_kp view:last-child {
font-size: 26rpx;
}
/* 知识库 */
.repository {
width: 100%;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
column-gap: 20rpx;
}
.repository>view {
padding: 20rpx 0 20rpx 20rpx;
border-radius: 20rpx;
}
.zsk view:first-child {
color: #fff;
margin-bottom: 5rpx;
}
.zsk view:last-child {
background-color: #fff;
font-size: 22rpx;
display: inline-block;
padding: 0 10rpx;
}
.repository1_1 {
background-color: #6CAB86;
}
.repository1_2 {
background-color: #017D77;
}
.repository1_3 {
background-color: #FD8140;
}
/* 通知公告区域 */
.notice-section {
background: #FFFFFF;
border-radius: 20rpx;
padding: 20rpx 20rpx 0;
margin: 20rpx 0;
box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.05);
animation: fadeIn 0.6s ease-out 0.6s both;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.notice-content {
position: relative;
}
.notice-swiper {
height: 200rpx;
}
.notice-item {
padding: 20rpx 0;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
position: relative;
}
.notice-item.highlight {
background: rgba(76, 175, 80, 0.05);
border-radius: 12rpx;
padding: 20rpx;
margin: -10rpx -10rpx 0;
}
.notice-item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
}
.notice-type {
padding: 4rpx 16rpx;
border-radius: 20rpx;
font-size: 22rpx;
font-weight: 500;
}
.notice-type.urgent {
background: rgba(244, 67, 54, 0.1);
color: #F44336;
}
.notice-type.important {
background: rgba(255, 152, 0, 0.1);
color: #FF9800;
}
.notice-type.normal {
background: rgba(33, 150, 243, 0.1);
color: #2196F3;
}
.notice-time {
font-size: 22rpx;
color: #999999;
}
.notice-text {
font-size: 28rpx;
color: #333333;
line-height: 1.5;
flex: 1;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
/* 用户提问板块 - 优化样式 */
.user-question-section {
background: #FFFFFF;
border-radius: 24rpx;
padding: 32rpx;
margin: 40rpx 0 20rpx;
box-shadow: 0 8rpx 40rpx rgba(0, 0, 0, 0.06);
animation: slideUp 0.8s ease-out 0.8s both;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(60rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* 标题区域 */
.question-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 40rpx;
padding-bottom: 24rpx;
border-bottom: 1px solid rgba(150, 219, 212, 0.3);
}
.question-title {
display: flex;
flex-direction: column;
}
.title-text {
font-size: 38rpx;
font-weight: bold;
color: #333;
margin-bottom: 8rpx;
position: relative;
padding-left: 20rpx;
}
.title-text::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 8rpx;
height: 32rpx;
background: #60C0B9;
border-radius: 4rpx;
}
.title-sub {
font-size: 24rpx;
color: #999;
padding-left: 20rpx;
}
.view-all {
display: flex;
align-items: center;
font-size: 26rpx;
color: #60C0B9;
padding: 12rpx 24rpx;
background: rgba(96, 192, 185, 0.1);
border-radius: 30rpx;
transition: all 0.3s ease;
}
.view-all:active {
background: rgba(96, 192, 185, 0.2);
transform: scale(0.98);
}
/* 问题元信息 */
.question-meta {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 28rpx;
}
.question-tag {
flex: 1;
display: flex;
align-items: flex-start;
gap: 12rpx;
}
.tag-icon {
font-size: 28rpx;
font-weight: bold;
color: #60C0B9;
background: rgba(96, 192, 185, 0.1);
padding: 6rpx 16rpx;
border-radius: 12rpx;
flex-shrink: 0;
line-height: 1.4;
}
.tag-text {
font-size: 30rpx;
color: #333;
line-height: 1.5;
font-weight: 500;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
/* 用户信息 */
.question-info {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 28rpx;
padding-bottom: 20rpx;
border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}
.user-info {
display: flex;
align-items: center;
gap: 16rpx;
}
.user-avatar {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: #E0F2F1;
border: 2rpx solid #60C0B9;
}
.user-detail {
display: flex;
flex-direction: column;
}
.user-name {
font-size: 26rpx;
font-weight: 500;
color: #333;
margin-bottom: 6rpx;
}
.user-location {
display: flex;
align-items: center;
gap: 6rpx;
}
.user-location text {
font-size: 22rpx;
color: #999;
}
.time-info {
font-size: 22rpx;
color: #999;
background: rgba(0, 0, 0, 0.04);
padding: 6rpx 16rpx;
border-radius: 16rpx;
}