fix(登录): 修复登录流程问题并优化样式

- 在登录前清除本地存储的用户数据
- 允许直接访问登录页面无需重定向
- 调整销售时间线组件的字体大小和间距
This commit is contained in:
2025-08-28 21:37:50 +08:00
parent 21ef158ce4
commit 2f380b1fe5
3 changed files with 32 additions and 23 deletions

View File

@@ -395,6 +395,9 @@ const handleLogin = async () => {
loading.value = true
errorMessage.value = ''
// 清除本地存储的用户数据,确保使用最新的登录信息
userStore.logout()
try {
// 调用登录API
// token检测

View File

@@ -850,13 +850,13 @@ $indigo: #4f46e5;
width: 100%;
.stage-title {
font-size: 1.25rem;
font-size: 1rem;
font-weight: 500;
color: $slate-700;
margin: 0 0 0.75rem 0;
@media (max-width: 768px) {
font-size: 1.125rem;
font-size: 0.875rem;
}
}
@@ -868,25 +868,25 @@ $indigo: #4f46e5;
margin-bottom: 0.5rem;
.stage-count {
font-size: 2rem;
font-size: 1.5rem;
font-weight: 700;
color: $slate-600;
line-height: 1;
@media (max-width: 768px) {
font-size: 1.75rem;
font-size: 1.25rem;
}
}
.stage-label {
font-size: 0.875rem;
font-size: 0.75rem;
color: $slate-500;
font-weight: 500;
}
}
.stage-percentage {
font-size: 0.875rem;
font-size: 0.75rem;
color: $slate-400;
font-weight: 500;
background: $slate-100;
@@ -922,8 +922,9 @@ $indigo: #4f46e5;
.items-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
grid-template-columns: repeat(7, minmax(0, 250px));
gap: 0.45rem;
justify-content: center;
@media (max-width: 768px) {
grid-template-columns: repeat(2, 1fr);
@@ -1079,7 +1080,7 @@ $indigo: #4f46e5;
.item-name {
font-weight: 600;
font-size: 0.9rem;
font-size: 0.875rem;
line-height: 1.3;
color: $slate-800;
@@ -1090,11 +1091,11 @@ $indigo: #4f46e5;
max-width: 100%;
@media (max-width: 768px) {
font-size: 0.875rem;
font-size: 0.75rem;
}
@media (max-width: 480px) {
font-size: 0.8125rem;
font-size: 0.75rem;
}
}
}
@@ -1132,7 +1133,7 @@ $indigo: #4f46e5;
.profession-education {
display: flex;
align-items: center;
gap: 0.75rem;
gap: 0.2rem;
flex-wrap: wrap;
@media (max-width: 480px) {
@@ -1141,16 +1142,16 @@ $indigo: #4f46e5;
.profession, .education {
font-size: 0.75rem;
border-radius: 0.375rem;
border-radius: 0.3rem;
font-weight: 500;
@media (max-width: 768px) {
font-size: 0.6875rem;
font-size: 0.75rem;
padding: 0.1875rem 0.375rem;
}
@media (max-width: 480px) {
font-size: 0.625rem;
font-size: 0.75rem;
padding: 0.125rem 0.25rem;
}
}
@@ -1169,19 +1170,18 @@ $indigo: #4f46e5;
background-color: #e8f5e8;
color: #2e7d32;
font-size: 0.75rem;
padding: 0.125rem 0.5rem;
border-radius: 0.375rem;
padding: 0.1rem 0.5rem;
border-radius: 0.3rem;
font-weight: 500;
display: inline-block;
margin-left: 0.5rem;
@media (max-width: 768px) {
font-size: 0.6875rem;
font-size: 0.75rem;
padding: 0.1875rem 0.375rem;
}
@media (max-width: 480px) {
font-size: 0.625rem;
font-size: 0.75rem;
padding: 0.125rem 0.25rem;
margin-left: 0.375rem;
}
@@ -1190,21 +1190,21 @@ $indigo: #4f46e5;
.course-attendance {
display: inline-block;
// margin-top: 0.25rem;
padding: 0.125rem 0.5rem;
padding: 0.1rem 0.25rem;
background: linear-gradient(135deg, #e3f2fd, #bbdefb);
border-radius: 0.375rem;
border-radius: 0.3rem;
font-size: 0.75rem;
color: #1565c0;
font-weight: 500;
border: 1px solid #90caf9;
@media (max-width: 768px) {
font-size: 0.6875rem;
font-size: 0.75rem;
padding: 0.1875rem 0.375rem;
}
@media (max-width: 480px) {
font-size: 0.625rem;
font-size: 0.75rem;
padding: 0.125rem 0.25rem;
}
}