feat: 首页样式调整

This commit is contained in:
yangzhe 2025-07-11 13:49:59 +08:00
parent e3834d5428
commit 6a341a89c3
1 changed files with 215 additions and 294 deletions

View File

@ -13,7 +13,7 @@
</view> </view>
<!-- 首页 --> <!-- 首页 -->
<view class="content" v-if="!isChat"> <view class="main-content" v-if="!isChat">
<view class="welcome-message"> <view class="welcome-message">
<image <image
class="avatar" class="avatar"
@ -588,7 +588,7 @@ page {
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
background-position: 0 88rpx; background-position: 0 88rpx;
// overflow-y: scroll; // overflow: hidden; /* hidden */
} }
.home-container { .home-container {
@ -628,7 +628,7 @@ page {
} }
} }
.content { .main-content {
padding: 30rpx; padding: 30rpx;
padding-top: 100rpx; padding-top: 100rpx;
@ -776,83 +776,236 @@ page {
} }
} }
} }
}
.drawer-container { .chat-container {
padding: 32rpx; display: flex;
display: flex; flex-direction: column;
flex-direction: column; padding: 30rpx;
height: 100vh; box-sizing: border-box;
background-color: #ffffff;
.chat-history-list { .chat-scroll {
flex: 1; flex: 1;
// padding: 30rpx 40rpx; flex-shrink: 0;
height: calc(100vh - 200rpx); // overflow-y: auto; /* 使autoscroll */ //
.chat-day {
display: flex;
margin: 20rpx 0 20rpx 30rpx;
.day-text {
font-size: 24rpx;
color: #999999;
font-family: PingFang SC;
margin-bottom: 10rpx;
}
} }
.chat-item { //
padding: 24rpx 30rpx; .test-button {
border-radius: 16rpx; position: fixed;
// margin-bottom: 30rpx; bottom: 180rpx;
right: 30rpx;
background-color: #4370fe;
color: #ffffff;
padding: 16rpx 24rpx;
border-radius: 10rpx;
font-size: 28rpx;
z-index: 999;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.2);
}
.chat-text { .chat-card {
font-size: 28rpx; // background-color: #ffffff;
color: #303030; // border-radius: 16rpx;
font-family: PingFang SC; padding: 30rpx;
margin-bottom: 30rpx;
.chat-card-title {
font-family: DouyinSans;
font-weight: bold;
font-size: 36rpx;
color: #5255e6;
// line-height: 24rpx;
background: linear-gradient(-56deg, #4d50dd 0%, #3e6aff 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 12rpx;
} }
&-active { .chat-card-desc {
background-color: #4f6aff; font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #9ba5c7;
line-height: 24rpx;
margin-bottom: 12rpx;
}
.chat-text { .chat-card-questions {
color: #fff; display: flex;
flex-direction: column;
gap: 16rpx;
.question-item {
font-size: 28rpx;
color: #333333;
line-height: 1.5;
} }
} }
} }
}
.drawer-footer { .chat-content {
height: 130rpx; flex: 1;
border: 1rpx solid #eeeeee; padding: 20rpx 0;
border-radius: 12rpx; margin-bottom: 150rpx;
padding: 0 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
.user-info { .message-time {
display: flex; text-align: center;
align-items: center; font-size: 24rpx;
color: #999999;
.user-avatar { padding: 20rpx;
width: 56rpx;
height: 56rpx;
border-radius: 50%;
margin-right: 30rpx;
} }
.user-name { .message-left,
font-size: 28rpx; .message-right {
font-weight: bold; display: flex;
font-family: DouyinSans; margin-bottom: 40rpx;
color: #333; align-items: flex-start;
}
.message-left {
justify-content: flex-start;
.ai-avatar {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
margin-right: 16rpx;
background-color: #f0f0f0;
flex-shrink: 0;
}
.message-content {
background-color: #ffffff;
max-width: 70%;
padding: 20rpx 24rpx;
border-radius: 0 16rpx 16rpx 16rpx;
font-size: 28rpx;
line-height: 1.5;
/* Markdown内容样式调整 */
/deep/ .markdown-container {
padding: 0;
/* 覆盖默认的padding避免额外空白 */
p {
margin: 0;
padding: 0;
}
/* 确保代码块不会超出气泡 */
pre {
max-width: 100%;
overflow-x: auto;
}
/* 调整图片大小 */
img {
max-width: 100%;
}
/* 调整表格样式 */
table {
font-size: 24rpx;
}
}
}
}
.message-right {
justify-content: flex-end;
.user-avatar {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
margin-left: 16rpx;
background-color: #f0f0f0;
flex-shrink: 0;
}
.message-content {
background-color: #4370fe;
color: #ffffff;
max-width: 70%;
padding: 20rpx 24rpx;
border-radius: 16rpx 0 16rpx 16rpx;
font-size: 28rpx;
line-height: 1.5;
text-align: left;
}
} }
} }
.settings { .chat-footer {
padding: 10rpx; position: fixed;
bottom: 0;
left: 0;
right: 0;
.floating-tabs {
display: flex;
justify-content: flex-start;
margin: 0 0 20rpx 20rpx;
.tab-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
background-color: #ffffff;
padding: 8rpx 24rpx;
border-radius: 50rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
margin-right: 12rpx;
.tab-icon {
width: 28rpx;
height: 28rpx;
margin-right: 10rpx;
}
text {
font-size: 28rpx;
color: #333333;
}
}
}
.input-container {
padding: 32rpx;
background-color: #fff;
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
.input-area {
display: flex;
align-items: center;
background-color: #f2f4f9;
border-radius: 20rpx;
padding: 16rpx 24rpx;
box-sizing: border-box;
.chat-input {
flex: 1;
height: 40rpx;
font-size: 28rpx;
color: #333;
background-color: transparent;
}
.send-btn {
width: 50rpx;
height: 50rpx;
display: flex;
align-items: center;
justify-content: center;
.send-icon {
width: 40rpx;
height: 46rpx;
}
}
}
}
} }
} }
} }
@ -883,236 +1036,4 @@ page {
} }
} }
} }
.chat-container {
display: flex;
flex-direction: column;
padding: 30rpx;
box-sizing: border-box;
.chat-scroll {
flex: 1;
flex-shrink: 0;
// overflow-y: auto; /* 使autoscroll */ //
}
//
.test-button {
position: fixed;
bottom: 180rpx;
right: 30rpx;
background-color: #4370fe;
color: #ffffff;
padding: 16rpx 24rpx;
border-radius: 10rpx;
font-size: 28rpx;
z-index: 999;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.2);
}
.chat-card {
// background-color: #ffffff;
// border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 30rpx;
.chat-card-title {
font-family: DouyinSans;
font-weight: bold;
font-size: 36rpx;
color: #5255e6;
// line-height: 24rpx;
background: linear-gradient(-56deg, #4d50dd 0%, #3e6aff 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 12rpx;
}
.chat-card-desc {
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #9ba5c7;
line-height: 24rpx;
margin-bottom: 12rpx;
}
.chat-card-questions {
display: flex;
flex-direction: column;
gap: 16rpx;
.question-item {
font-size: 28rpx;
color: #333333;
line-height: 1.5;
}
}
}
.chat-content {
flex: 1;
padding: 20rpx 0;
margin-bottom: 150rpx;
.message-time {
text-align: center;
font-size: 24rpx;
color: #999999;
padding: 20rpx;
}
.message-left,
.message-right {
display: flex;
margin-bottom: 40rpx;
align-items: flex-start;
}
.message-left {
justify-content: flex-start;
.ai-avatar {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
margin-right: 16rpx;
background-color: #f0f0f0;
flex-shrink: 0;
}
.message-content {
background-color: #ffffff;
max-width: 70%;
padding: 20rpx 24rpx;
border-radius: 0 16rpx 16rpx 16rpx;
font-size: 28rpx;
line-height: 1.5;
/* Markdown内容样式调整 */
/deep/ .markdown-container {
padding: 0;
/* 覆盖默认的padding避免额外空白 */
p {
margin: 0;
padding: 0;
}
/* 确保代码块不会超出气泡 */
pre {
max-width: 100%;
overflow-x: auto;
}
/* 调整图片大小 */
img {
max-width: 100%;
}
/* 调整表格样式 */
table {
font-size: 24rpx;
}
}
}
}
.message-right {
justify-content: flex-end;
.user-avatar {
width: 64rpx;
height: 64rpx;
border-radius: 50%;
margin-left: 16rpx;
background-color: #f0f0f0;
flex-shrink: 0;
}
.message-content {
background-color: #4370fe;
color: #ffffff;
max-width: 70%;
padding: 20rpx 24rpx;
border-radius: 16rpx 0 16rpx 16rpx;
font-size: 28rpx;
line-height: 1.5;
text-align: left;
}
}
}
.chat-footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
.floating-tabs {
display: flex;
justify-content: flex-start;
margin: 0 0 20rpx 20rpx;
.tab-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
background-color: #ffffff;
padding: 8rpx 24rpx;
border-radius: 50rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
margin-right: 12rpx;
.tab-icon {
width: 28rpx;
height: 28rpx;
margin-right: 10rpx;
}
text {
font-size: 28rpx;
color: #333333;
}
}
}
.input-container {
padding: 32rpx;
background-color: #fff;
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
.input-area {
display: flex;
align-items: center;
background-color: #f2f4f9;
border-radius: 20rpx;
padding: 16rpx 24rpx;
box-sizing: border-box;
.chat-input {
flex: 1;
height: 40rpx;
font-size: 28rpx;
color: #333;
background-color: transparent;
}
.send-btn {
width: 50rpx;
height: 50rpx;
display: flex;
align-items: center;
justify-content: center;
.send-icon {
width: 40rpx;
height: 46rpx;
}
}
}
}
}
}
</style> </style>