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;
|
||||
}
|
||||
|
||||
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 res = await requestRaw<OAuthTokenResponse>(
|
||||
@@ -58,10 +60,13 @@ export function sendCode(mobile: string) {
|
||||
const value = (mobile ?? "").trim();
|
||||
const encoded = encodeURIComponent(value);
|
||||
|
||||
return request({
|
||||
url: `/admin/mobile/${encoded}`,
|
||||
method: "get",
|
||||
}, { skipAuth: true });
|
||||
return request(
|
||||
{
|
||||
url: `/admin/platformUser/sendMobileCode/${encoded}`,
|
||||
method: "get",
|
||||
},
|
||||
{ skipAuth: true },
|
||||
);
|
||||
}
|
||||
|
||||
// 检测用户是否绑定手机号
|
||||
|
||||
Reference in New Issue
Block a user