fix(homepage): 修复个人主页样式和功能问题

修复个人主页的响应式布局问题,优化移动端显示效果
调整分类和排序区域的样式,移除不必要的margin-left
更新投票组件的内容显示类名为one-line-display-v2
修复主页加载逻辑,优化数据获取和分页处理
移除未使用的代码和注释,清理CSS样式
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-12-26 18:50:05 +08:00
parent 82e67b2a0b
commit ea6ae8d7fc
17 changed files with 1033 additions and 453 deletions

View File

@@ -201,6 +201,9 @@
margin-right: 8px;
margin-bottom: 8px;
}
#homepage-me .matter .matter-content {
min-width: 0;
}
#homepage-me .matter .matter-content .message-box {
background-color: #ffffff;
border: 1px solid #e9eef2;
@@ -327,7 +330,6 @@
font-family: PingFangSC-Semibold, "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 18px;
color: #000000;
}
#homepage-me .matter .matter-content .list-area .operation-box .operation-item.pitch::after {
@@ -345,13 +347,6 @@
padding-bottom: 23px;
padding-left: 95px;
padding-right: 40px;
overflow-x: auto;
justify-content: flex-start;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
#homepage-me .matter .matter-content .list-area .classify::-webkit-scrollbar {
display: none;
}
#homepage-me .matter .matter-content .list-area .classify .item {
width: 50px;
@@ -393,7 +388,6 @@
margin-bottom: 20px;
}
#homepage-me .matter .matter-content .list-area .empty {
width: 725px;
height: 360px;
background-color: #ffffff;
border: 1px solid #e9eef2;
@@ -412,11 +406,41 @@
color: #7f7f7f;
margin-top: 10px;
}
#homepage-me .matter .matter-content .list-area .list-load-box {
margin-left: 95px;
margin-right: 40px;
width: auto;
}
#homepage-me .matter .matter-content .list-area .load-more {
padding: 20px 0 40px;
color: #7f7f7f;
font-size: 14px;
}
@media screen and (max-width: 1050px) {
#homepage-me .matter .matter-content .list-area .operation-box {
padding-left: 40px;
}
#homepage-me .matter .matter-content .list-area .classify {
padding-left: 40px;
}
#homepage-me .matter .matter-content .list-area .issue-data {
padding-left: 40px;
}
#homepage-me .matter .matter-content .list-area .list-load-box {
margin-left: 40px;
}
#homepage-me .matter .matter-content .list-area .list-box {
padding-left: 40px;
}
#homepage-me .matter .matter-content .list-area .empty {
margin-left: 40px;
}
}
@media screen and (max-width: 950px) {
.item-box .bottom .bottom-item:not(:last-child) {
margin-right: 45px;
}
}
/* 响应式布局优化 */
@media screen and (max-width: 880px) {
.head-top {
@@ -427,7 +451,6 @@
}
#homepage-me {
width: 100%;
padding: 0;
}
#homepage-me .matter {
flex-direction: column;
@@ -439,7 +462,6 @@
padding: 30px 20px;
position: static;
align-items: center;
border-radius: 0;
border-left: none;
border-right: none;
}
@@ -471,23 +493,17 @@
width: auto;
margin: 0 0 15px 0;
padding: 20px;
border-radius: 0;
border-left: none;
border-right: none;
}
#homepage-me .matter .matter-content .message-box .header {
padding-top: 0;
text-align: center;
#homepage-me .matter .matter-content .message-box .stats {
padding-bottom: 0;
}
#homepage-me .matter .matter-content .message-box .header .avatar {
#homepage-me .matter .matter-content .message-box .header {
display: none;
}
#homepage-me .matter .matter-content .message-box .header .username {
font-size: 16px;
font-weight: 600;
}
#homepage-me .matter .matter-content .message-box .info-list {
padding-top: 15px;
padding-top: 0;
}
#homepage-me .matter .matter-content .message-box .info-list .item {
width: 50%;
@@ -498,38 +514,21 @@
justify-content: center;
}
#homepage-me .matter .matter-content .list-area {
border-radius: 0;
border-left: none;
border-right: none;
}
#homepage-me .matter .matter-content .list-area .operation-box {
padding: 15px 20px;
overflow-x: auto;
white-space: nowrap;
display: flex;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
#homepage-me .matter .matter-content .list-area .operation-box::-webkit-scrollbar {
display: none;
}
#homepage-me .matter .matter-content .list-area .operation-box .operation-item {
flex-shrink: 0;
font-size: 16px;
}
#homepage-me .matter .matter-content .list-area .operation-box .operation-item:not(:last-child) {
margin-right: 30px;
}
#homepage-me .matter .matter-content .list-area .classify {
padding: 10px 20px 20px;
overflow-x: auto;
white-space: nowrap;
display: flex;
justify-content: flex-start;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
#homepage-me .matter .matter-content .list-area .operation-box .operation-item.pitch::after {
bottom: -18px;
}
#homepage-me .matter .matter-content .list-area .classify::-webkit-scrollbar {
display: none;
#homepage-me .matter .matter-content .list-area .classify {
padding: 20px;
}
#homepage-me .matter .matter-content .list-area .classify .item {
flex-shrink: 0;
@@ -537,7 +536,10 @@
padding: 0 15px;
}
#homepage-me .matter .matter-content .list-area .issue-data {
padding: 0 20px 15px;
padding: 0 20px;
}
#homepage-me .matter .matter-content .list-area .list-load-box {
margin: 0 20px;
}
#homepage-me .matter .matter-content .list-area .list-box {
padding: 0 20px;
@@ -557,6 +559,30 @@
margin-bottom: 30px;
}
}
@media screen and (max-width: 768px) {
.head-top .sign-in {
display: none !important;
}
.head-top .input-box {
width: inherit;
height: inherit;
background: none;
border: none;
padding: 5px;
}
.head-top .input-box .placeholder {
display: none;
}
.head-top .input-box .input {
display: none;
}
.head-top .input-box .icon {
margin-left: 0;
}
#homepage-me .matter .matter-content .list-area .classify .item {
padding: 0 9px;
}
}
@media screen and (max-width: 480px) {
#homepage-me .matter .card-user .bi-box {
width: 100%;
@@ -566,6 +592,27 @@
width: 100%;
background-size: 100% 100%;
}
#homepage-me .matter .matter-content .list-area .operation-box {
padding: 15px 8px;
font-size: 15px;
}
#homepage-me .matter .matter-content .list-area .classify {
padding: 20px 8px;
}
#homepage-me .matter .matter-content .list-area .classify .item {
padding: 0 7px;
font-size: 13px;
}
#homepage-me .matter .matter-content .list-area .list-box {
padding: 0 8px;
}
#homepage-me .matter .matter-content .list-area .list-load-box {
margin: 0 8px;
}
#homepage-me .matter .matter-content .list-area .empty {
margin-left: 8px;
margin-right: 8px;
}
#homepage-me .matter .matter-content .message-box .info-list .item {
width: 100%;
margin-bottom: 12px;
@@ -574,4 +621,17 @@
#homepage-me .matter .matter-content .message-box .info-list .item .label {
width: auto;
}
.item-box .bottom .bottom-item:not(:last-child) {
margin-right: 0;
}
}
@media screen and (max-width: 430px) {
#homepage-me .matter .matter-content .list-area .classify .item:not(:last-child) {
margin-right: 7px;
}
}
@media screen and (max-width: 410px) {
#homepage-me .matter .matter-content .list-area .classify .item {
font-size: 13px;
}
}

View File

@@ -32,8 +32,6 @@
border-radius: 8px;
}
.pen-box {
width: 24px;
height: 24px;
@@ -234,7 +232,8 @@
}
}
.matter-content {
.matter-content {
min-width: 0;
.message-box {
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
@@ -370,6 +369,7 @@
.operation-item {
position: relative;
cursor: pointer;
&:not(:last-child) {
margin-right: 40px;
}
@@ -378,7 +378,6 @@
font-family: PingFangSC-Semibold, "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 18px;
color: #000000;
&::after {
@@ -401,14 +400,14 @@
padding-left: 95px;
padding-right: 40px;
overflow-x: auto;
justify-content: flex-start;
-webkit-overflow-scrolling: touch;
// overflow-x: auto;
// justify-content: flex-start;
// -webkit-overflow-scrolling: touch;
&::-webkit-scrollbar {
display: none;
}
scrollbar-width: none;
// &::-webkit-scrollbar {
// display: none;
// }
// scrollbar-width: none;
.item {
width: 50px;
@@ -457,7 +456,7 @@
}
.empty {
width: 725px;
// width: 725px;
height: 360px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
@@ -479,6 +478,12 @@
}
}
.list-load-box {
margin-left: 95px;
margin-right: 40px;
width: auto;
}
.load-more {
padding: 20px 0 40px;
color: #7f7f7f;
@@ -489,19 +494,53 @@
}
}
@media screen and (max-width: 1050px) {
#homepage-me .matter .matter-content .list-area {
.operation-box {
padding-left: 40px;
}
.classify {
padding-left: 40px;
}
.issue-data {
padding-left: 40px;
}
.list-load-box {
margin-left: 40px;
}
.list-box {
padding-left: 40px;
}
.empty {
margin-left: 40px;
}
}
}
@media screen and (max-width: 950px) {
.item-box .bottom .bottom-item:not(:last-child) {
margin-right: 45px;
}
}
/* 响应式布局优化 */
@media screen and (max-width: 880px) {
.head-top {
margin: 10px auto 15px !important;
}
.head-navigation {
display: none !important;
}
#homepage-me {
width: 100%;
padding: 0;
// padding: 0;
.matter {
flex-direction: column;
@@ -513,7 +552,7 @@
padding: 30px 20px;
position: static;
align-items: center;
border-radius: 0;
// border-radius: 0;
border-left: none;
border-right: none;
@@ -545,24 +584,25 @@
.matter-content {
width: 100%;
.message-box {
width: auto;
margin: 0 0 15px 0;
padding: 20px;
border-radius: 0;
// border-radius: 0;
border-left: none;
border-right: none;
.stats {
padding-bottom: 0;
}
.header {
padding-top: 0;
text-align: center;
.avatar { display: none; }
.username { font-size: 16px; font-weight: 600; }
display: none;
}
.info-list {
padding-top: 15px;
padding-top: 0;
.item {
width: 50%;
padding-right: 10px;
@@ -576,34 +616,26 @@
}
.list-area {
border-radius: 0;
border-left: none;
border-right: none;
.operation-box {
padding: 15px 20px;
overflow-x: auto;
white-space: nowrap;
display: flex;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar { display: none; }
scrollbar-width: none;
font-size: 16px;
.operation-item {
flex-shrink: 0;
&:not(:last-child) { margin-right: 30px; }
&:not(:last-child) {
margin-right: 30px;
}
&.pitch::after {
bottom: -18px;
}
}
}
.classify {
padding: 10px 20px 20px;
overflow-x: auto;
white-space: nowrap;
display: flex;
justify-content: flex-start;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar { display: none; }
scrollbar-width: none;
padding: 20px;
.item {
flex-shrink: 0;
@@ -613,7 +645,11 @@
}
.issue-data {
padding: 0 20px 15px;
padding: 0 20px;
}
.list-load-box {
margin: 0 20px;
}
.list-box {
@@ -626,13 +662,13 @@
min-height: 200px;
margin: 20px;
padding: 40px 0;
.empty-icon {
width: 60px;
height: 60px;
}
}
.load-more {
margin-bottom: 30px;
}
@@ -642,28 +678,115 @@
}
}
@media screen and (max-width: 768px) {
.head-top {
.sign-in {
display: none !important;
}
.input-box {
width: inherit;
height: inherit;
background: none;
border: none;
padding: 5px;
.placeholder {
display: none;
}
.input {
display: none;
}
.icon {
margin-left: 0;
}
}
}
#homepage-me .matter .matter-content .list-area .classify .item {
padding: 0 9px;
}
}
@media screen and (max-width: 480px) {
#homepage-me .matter {
.card-user {
.bi-box {
width: 100%;
max-width: 320px;
.bi-masking { width: 100%; background-size: 100% 100%; }
.bi-masking {
width: 100%;
background-size: 100% 100%;
}
}
}
.matter-content {
.list-area {
.operation-box {
padding: 15px 8px;
font-size: 15px;
}
.classify {
padding: 20px 8px;
.item {
padding: 0 7px;
font-size: 13px;
}
}
.list-box {
padding: 0 8px;
}
.list-load-box {
margin: 0 8px;
}
.empty {
margin-left: 8px;
margin-right: 8px;
}
}
.message-box {
.info-list {
.item {
width: 100%;
margin-bottom: 12px;
justify-content: space-between;
.label { width: auto; }
.label {
width: auto;
}
}
}
}
}
}
.item-box .bottom .bottom-item:not(:last-child) {
margin-right: 0;
}
}
@media screen and (max-width: 430px) {
#homepage-me .matter {
.matter-content {
.list-area .classify {
.item:not(:last-child) {
margin-right: 7px;
}
}
}
}
}
@media screen and (max-width: 410px) {
#homepage-me .matter .matter-content .list-area .classify .item {
font-size: 13px;
}
}

View File

@@ -107,6 +107,9 @@
border: 1px solid #50e3c2;
color: #000000;
}
#homepage-other .matter .matter-content {
min-width: 0;
}
#homepage-other .matter .matter-content .message-box {
background-color: #ffffff;
border: 1px solid #e9eef2;
@@ -255,7 +258,6 @@
margin-bottom: 20px;
}
#homepage-other .matter .matter-content .list-area .empty {
width: 725px;
height: 360px;
background-color: #ffffff;
border: 1px solid #e9eef2;

View File

@@ -124,6 +124,8 @@
}
.matter-content {
min-width: 0;
.message-box {
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
@@ -297,7 +299,7 @@
}
.empty {
width: 725px;
// width: 725px;
height: 360px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);

View File

@@ -3208,19 +3208,6 @@ td {
font-size: calc(16 / 600 * 100vw);
line-height: calc(28 / 600 * 100vw);
}
// .pop-bottom1,
// .pop-bottom2 {
// width: calc(500 / 600 * 100vw);
// }
// .pop-bottom1 {
// height: calc(155 / 600 * 100vw);
// }
// .pop-bottom2 {
// height: calc(151 / 600 * 100vw);
// }
}
}
}
}

View File

@@ -65,7 +65,6 @@
margin: 0 10px;
}
#search-tag .quantity .sort-area {
margin-left: auto;
position: relative;
z-index: 1;
}

View File

@@ -75,7 +75,6 @@
}
.sort-area {
margin-left: auto;
position: relative;
z-index: 1;

View File

@@ -64,6 +64,62 @@
color: #000000;
margin: 0 10px;
}
#search .quantity .sort-area {
position: relative;
z-index: 1;
}
#search .quantity .sort-area .sort-head {
cursor: pointer;
}
#search .quantity .sort-area .sort-head .text {
font-size: 14px;
color: #555555;
line-height: 26px;
margin-right: 6px;
}
#search .quantity .sort-area .sort-head .icon {
width: 8px;
height: 5px;
transform: rotate(0deg);
transition: transform 0.3s ease-in-out;
}
#search .quantity .sort-area .sort-head .icon.rotate {
transform: rotate(180deg);
}
#search .quantity .sort-area .sort-mask {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
}
#search .quantity .sort-area .sort-box {
position: absolute;
top: 28px;
right: 0;
width: 140px;
padding: 0 10px;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.16862745);
}
#search .quantity .sort-area .sort-box .item {
font-size: 16px;
color: #555555;
text-align: center;
height: 60px;
line-height: 60px;
cursor: pointer;
}
#search .quantity .sort-area .sort-box .item.pitch {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
color: #d35110;
}
#search .quantity .sort-area .sort-box .item:not(:last-child) {
border-bottom: 1px dotted #d7d7d7;
}
#search .matter {
align-items: flex-start;
}

View File

@@ -71,6 +71,73 @@
color: #000000;
margin: 0 10px;
}
.sort-area {
position: relative;
z-index: 1;
.sort-head {
cursor: pointer;
.text {
font-size: 14px;
color: #555555;
line-height: 26px;
margin-right: 6px;
}
.icon {
width: 8px;
height: 5px;
transform: rotate(0deg);
transition: transform 0.3s ease-in-out;
&.rotate {
transform: rotate(180deg);
}
}
}
.sort-mask {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
}
.sort-box {
position: absolute;
top: 28px;
right: 0;
width: 140px;
padding: 0 10px;
background-color: rgba(255, 255, 255, 1);
border-radius: 8px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.168627450980392);
.item {
font-size: 16px;
color: #555555;
text-align: center;
height: 60px;
line-height: 60px;
cursor: pointer;
&.pitch {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
color: #d35110;
}
&:not(:last-child) {
border-bottom: 1px dotted #d7d7d7;
}
}
}
}
}
.matter {