fix(api): update sendCode endpoint and format code
correct the API path for sendCode and reformat function signatures for better readability
This commit is contained in:
@@ -30,7 +30,9 @@ export function buildFormUrlEncodedParams(
|
|||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function oauthToken(data: OauthTokenRequest): Promise<OAuthTokenResponse> {
|
export async function oauthToken(
|
||||||
|
data: OauthTokenRequest,
|
||||||
|
): Promise<OAuthTokenResponse> {
|
||||||
const params = buildFormUrlEncodedParams(data as Record<string, unknown>);
|
const params = buildFormUrlEncodedParams(data as Record<string, unknown>);
|
||||||
|
|
||||||
const res = await requestRaw<OAuthTokenResponse>(
|
const res = await requestRaw<OAuthTokenResponse>(
|
||||||
@@ -58,10 +60,13 @@ export function sendCode(mobile: string) {
|
|||||||
const value = (mobile ?? "").trim();
|
const value = (mobile ?? "").trim();
|
||||||
const encoded = encodeURIComponent(value);
|
const encoded = encodeURIComponent(value);
|
||||||
|
|
||||||
return request({
|
return request(
|
||||||
url: `/admin/mobile/${encoded}`,
|
{
|
||||||
|
url: `/admin/platformUser/sendMobileCode/${encoded}`,
|
||||||
method: "get",
|
method: "get",
|
||||||
}, { skipAuth: true });
|
},
|
||||||
|
{ skipAuth: true },
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检测用户是否绑定手机号
|
// 检测用户是否绑定手机号
|
||||||
|
|||||||
Reference in New Issue
Block a user