修复短信登陆问题
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
margin-bottom: 16px;
|
|
||||||
|
|
||||||
// 基本信息
|
// 基本信息
|
||||||
.basic_info {
|
.basic_info {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const LoginPage: React.FC = () => {
|
|||||||
} else {
|
} else {
|
||||||
Taro.redirectTo({ url: '/pages/list/index' });
|
Taro.redirectTo({ url: '/pages/list/index' });
|
||||||
}
|
}
|
||||||
}, 200);
|
}, 10);
|
||||||
} else {
|
} else {
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
title: response.message,
|
title: response.message,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const VerificationPage: React.FC = () => {
|
|||||||
const [is_loading, setIsLoading] = useState(false);
|
const [is_loading, setIsLoading] = useState(false);
|
||||||
const [code_input_focus, setCodeInputFocus] = 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;
|
const can_login = phone.length === 11 && verification_code.length === 6 && !is_loading;
|
||||||
@@ -120,18 +120,15 @@ const VerificationPage: React.FC = () => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// 调用登录服务
|
// 调用登录服务
|
||||||
|
debugger;
|
||||||
const result = await phone_auth_login({ phone, verification_code });
|
const result = await phone_auth_login({ phone, verification_code });
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (redirect) {
|
|
||||||
Taro.redirectTo({ url: decodeURIComponent(redirect) });
|
|
||||||
} else {
|
|
||||||
Taro.redirectTo({
|
Taro.redirectTo({
|
||||||
url: '/pages/list/index'
|
url: '/pages/list/index'
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}, 200);
|
}, 200);
|
||||||
} else {
|
} else {
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
|
|||||||
@@ -17,14 +17,13 @@
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 15px 15px 15px;
|
padding: 0px 15px 15px 15px ;
|
||||||
|
|
||||||
// 用户信息区域
|
// 用户信息区域
|
||||||
.user_info_section {
|
.user_info_section {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
margin-bottom: 16px;
|
|
||||||
margin-top: 98px;
|
margin-top: 98px;
|
||||||
|
|
||||||
// 加载状态
|
// 加载状态
|
||||||
@@ -146,7 +145,6 @@
|
|||||||
|
|
||||||
// 球局类型标签页
|
// 球局类型标签页
|
||||||
.game_tabs_section {
|
.game_tabs_section {
|
||||||
margin-bottom: 16px;
|
|
||||||
|
|
||||||
.tab_container {
|
.tab_container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user