mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-16 20:15:06 +08:00
进一步重构社交登陆的实现
This commit is contained in:
26
yudao-ui-admin/src/api/system/socialUser.js
Normal file
26
yudao-ui-admin/src/api/system/socialUser.js
Normal 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
|
||||
}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user