进一步重构社交登陆的实现

This commit is contained in:
YunaiV
2022-04-26 23:36:26 +08:00
parent 878445a238
commit 7227664f77
21 changed files with 155 additions and 134 deletions

View File

@ -0,0 +1,26 @@
import request from "@/utils/request";
// 社交绑定,使用 code 授权码
export function socialBind(type, code, state) {
return request({
url: '/system/social-user/bind',
method: 'post',
data: {
type,
code,
state,
}
})
}
// 取消社交绑定
export function socialUnbind(type, unionId) {
return request({
url: '/system/social-user/unbind',
method: 'delete',
data: {
type,
unionId
}
})
}