mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-16 03:55:06 +08:00
前端接入绑定社交平台的逻辑
This commit is contained in:
@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user