修复短信登陆问题

This commit is contained in:
张成
2025-09-07 16:27:36 +08:00
parent f43dde0924
commit 98bf0fbe13
4 changed files with 4 additions and 10 deletions

View File

@@ -5,7 +5,6 @@
display: flex;
flex-direction: column;
gap: 16px;
margin-bottom: 16px;
// 基本信息
.basic_info {

View File

@@ -49,7 +49,7 @@ const LoginPage: React.FC = () => {
} else {
Taro.redirectTo({ url: '/pages/list/index' });
}
}, 200);
}, 10);
} else {
Taro.showToast({
title: response.message,

View File

@@ -12,7 +12,7 @@ const VerificationPage: React.FC = () => {
const [is_loading, setIsLoading] = useState(false);
const [code_input_focus, setCodeInputFocus] = useState(false);
const { params: { redirect } } = useRouter();
// 计算登录按钮是否应该启用
const can_login = phone.length === 11 && verification_code.length === 6 && !is_loading;
@@ -120,18 +120,15 @@ const VerificationPage: React.FC = () => {
try {
// 调用登录服务
debugger;
const result = await phone_auth_login({ phone, verification_code });
if (result.success) {
setTimeout(() => {
if (redirect) {
Taro.redirectTo({ url: decodeURIComponent(redirect) });
} else {
Taro.redirectTo({
url: '/pages/list/index'
});
}
}, 200);
} else {
Taro.showToast({

View File

@@ -17,14 +17,13 @@
margin-top: 0;
box-sizing: border-box;
overflow-y: auto;
padding: 15px 15px 15px;
padding: 0px 15px 15px 15px ;
// 用户信息区域
.user_info_section {
display: flex;
flex-direction: column;
gap: 16px;
margin-bottom: 16px;
margin-top: 98px;
// 加载状态
@@ -146,7 +145,6 @@
// 球局类型标签页
.game_tabs_section {
margin-bottom: 16px;
.tab_container {
display: flex;