feat: 添加微信授权成功通知功能

This commit is contained in:
wangqiao
2025-10-14 08:58:36 +08:00
parent 5baae7652f
commit 58d3f2e890
2 changed files with 24 additions and 30 deletions

View File

@ -28,13 +28,17 @@ export const loginByMobile = (params: { mobile: string; code: string; socialCode
* 发送邮箱验证码
*/
export const sendEmailCode = (data: { email: string }) => {
return useDollarFetchRequest.post<IResponse<any>>('/prod-api/app-api/member/auth/send-email-code?email=' + data.email, {},{
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json, text/plain, */*',
'Access-Control-Allow-Origin-Type': '*',
return useDollarFetchRequest.post<IResponse<any>>(
'/prod-api/app-api/member/auth/send-email-code?email=' + data.email,
{},
{
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Accept: 'application/json, text/plain, */*',
'Access-Control-Allow-Origin-Type': '*',
},
}
})
)
}
/**
@ -50,3 +54,10 @@ export const loginByEmail = (params: { email: string; code: string }) => {
export const resetPassword = (params: { password: string; code: string }) => {
return useDollarFetchRequest.put<IResponse<boolean>>('/prod-api/app-api/member/user/update-password', params)
}
/**
* 授权成功通知后台
*/
export const notifyAuthSuccess = (params: { code: string; state: string }) => {
return useDollarFetchRequest.get<IResponse<any>>('/prod-api/app-api/member/auth/wx-login-url', { query: params })
}