前端接入绑定社交平台的逻辑

This commit is contained in:
wangwenbin10
2021-10-07 19:30:12 +08:00
parent 4a23a696f4
commit cd205a6061
5 changed files with 136 additions and 5 deletions

View File

@ -74,3 +74,28 @@ export function socialLogin2(type, code, state, username, password) {
}
})
}
// 社交绑定,使用 code 授权码
export function socialBind(type, code, state) {
return request({
url: '/social-bind',
method: 'post',
data: {
type,
code,
state,
}
})
}
// 取消社交绑定
export function socialUnbind(type, unionId) {
return request({
url: '/social-unbind',
method: 'delete',
data: {
type,
unionId
}
})
}