mirror of
https://gitee.com/myxzgzs/boyue-vue-pro.git
synced 2025-08-09 08:52:44 +08:00
32 lines
642 B
TypeScript
32 lines
642 B
TypeScript
import request from '@/config/axios'
|
|
|
|
// 社交绑定,使用 code 授权码
|
|
export const socialBind = (type, code, state) => {
|
|
return request.post({
|
|
url: '/system/social-user/bind',
|
|
data: {
|
|
type,
|
|
code,
|
|
state
|
|
}
|
|
})
|
|
}
|
|
|
|
// 取消社交绑定
|
|
export const socialUnbind = (type, openid) => {
|
|
return request.delete({
|
|
url: '/system/social-user/unbind',
|
|
data: {
|
|
type,
|
|
openid
|
|
}
|
|
})
|
|
}
|
|
|
|
// 社交授权的跳转
|
|
export const socialAuthRedirect = (type, redirectUri) => {
|
|
return request.get({
|
|
url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri
|
|
})
|
|
}
|