This commit is contained in:
张成
2025-08-24 14:54:04 +08:00
parent 74174c504e
commit b92301a887
6 changed files with 49 additions and 33 deletions

View File

@@ -115,13 +115,13 @@
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
justify-content: flex-end;
padding: 0 20px;
}
// 品牌区域
.brand_section {
margin-top: 237px;
.logo_container {
display: flex;
@@ -138,8 +138,8 @@
.slogan_container {
margin-bottom: 51px;
background: url('../../../static/login/bro.svg') no-repeat left top;
background-size: inherit;
width: 363px;
background-size: contain;
width: 100%;
height: 114px;
}
@@ -179,7 +179,7 @@
// 微信登录按钮
&.wechat_button {
background: #FFFFFF;
border: 1px solid rgba(0, 0, 0, 0.06);
box-shadow: 0px 8px 64px rgba(0, 0, 0, 0.1);

View File

@@ -26,14 +26,10 @@ const LoginPage: React.FC = () => {
const response = await wechat_auth_login();
if (response.success) {
save_login_state(response.token!, response.user_info!);
Taro.showToast({
title: '登录成功',
icon: 'success',
duration: 1500
});
setTimeout(() => {
Taro.switchTab({ url: '/pages/index/index' });
}, 1500);
Taro.redirectTo({ url: '/pages/index/index' });
}, 200);
} else {
Taro.showToast({
title: response.message,

View File

@@ -348,9 +348,30 @@
cursor: not-allowed;
}
&:not(.disabled):hover {
transform: translateY(-2px);
box-shadow: 0px 12px 80px 0px rgba(0, 0, 0, 0.15);
// 倒计时文案样式
.countdown_text {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
gap: 2px;
.countdown_line1 {
font-family: 'PingFang SC';
font-weight: 500;
font-size: 12px;
line-height: 1.2;
color: #FFFFFF;
}
.countdown_line2 {
font-family: 'PingFang SC';
font-weight: 400;
font-size: 11px;
line-height: 1.2;
color: rgba(255, 255, 255, 0.8);
}
}
}
}
@@ -379,10 +400,6 @@
cursor: not-allowed;
}
&:not(.loading):hover {
transform: translateY(-2px);
box-shadow: 0px 12px 80px 0px rgba(0, 0, 0, 0.15);
}
}
// 协议区域

View File

@@ -98,17 +98,12 @@ const VerificationPage: React.FC = () => {
const result = await phone_auth_login({ phone, verification_code });
if (result.success) {
Taro.showToast({
title: '登录成功',
icon: 'success',
duration: 1500
});
setTimeout(() => {
Taro.switchTab({
Taro.redirectTo({
url: '/pages/index/index'
});
}, 1500);
}, 200);
} else {
Taro.showToast({
title: result.message || '登录失败',
@@ -187,7 +182,14 @@ const VerificationPage: React.FC = () => {
onClick={handle_send_code}
disabled={!can_send_code}
>
{can_send_code ? '获取验证码' : `${countdown}s`}
{can_send_code ? (
'获取验证码'
) : (
<View className="countdown_text">
<Text className="countdown_line1"></Text>
<Text className="countdown_line2">{countdown}</Text>
</View>
)}
</Button>
</View>
</View>