✨ feat(auth): Add type parameter to SendCode and update related API typings
This commit is contained in:
@@ -37,10 +37,11 @@ export default function SendCode({ type, params }: SendCodeProps) {
|
||||
};
|
||||
|
||||
const getPhoneCode = async () => {
|
||||
if (params.telephone && params.telephone_area_code) {
|
||||
if (params.telephone && params.telephone_area_code && params.type) {
|
||||
await sendSmsCode({
|
||||
telephone: params.telephone,
|
||||
telephone_area_code: params.telephone_area_code,
|
||||
type: params.type,
|
||||
});
|
||||
setTargetDate(Date.now() + 60000);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @ts-ignore
|
||||
|
||||
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
import * as announcement from './announcement';
|
||||
|
||||
+1
@@ -1401,6 +1401,7 @@ declare namespace API {
|
||||
auth_type: string;
|
||||
auth_identifier: string;
|
||||
verified: boolean;
|
||||
area_code?: string;
|
||||
};
|
||||
|
||||
type UserBalanceLog = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @ts-ignore
|
||||
|
||||
|
||||
// API 更新时间:
|
||||
// API 唯一标识:
|
||||
import * as auth from './auth';
|
||||
|
||||
+2
@@ -348,6 +348,7 @@ declare namespace API {
|
||||
};
|
||||
|
||||
type SendSmsCodeRequest = {
|
||||
type: number;
|
||||
telephone: string;
|
||||
telephone_area_code: string;
|
||||
};
|
||||
@@ -594,6 +595,7 @@ declare namespace API {
|
||||
auth_type: string;
|
||||
auth_identifier: string;
|
||||
verified: boolean;
|
||||
area_code?: string;
|
||||
};
|
||||
|
||||
type UserBalanceLog = {
|
||||
|
||||
Reference in New Issue
Block a user