feat: 小程序端实现微信登录

This commit is contained in:
wangtaocs
2024-11-27 17:51:23 +08:00
parent c8787b43cd
commit dd7a4795fc
5 changed files with 72 additions and 1 deletions

View File

@@ -20,6 +20,23 @@ const AuthAPI = {
});
},
/**
* 微信登录接口
*
* @param code 微信登录code
* @returns 返回 token
*/
wxlogin(code: string): Promise<LoginResult> {
return request<LoginResult>({
url: "/api/v1/auth/wxlogin",
method: "POST",
data: { code },
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
});
},
/**
* 登出接口
*/