提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
// 社交绑定,使用 code 授权码 |
|
4 |
export const socialBind = (type, code, state) => { |
|
5 |
return request.post({ |
|
6 |
url: '/system/social-user/bind', |
|
7 |
data: { |
|
8 |
type, |
|
9 |
code, |
|
10 |
state |
|
11 |
} |
|
12 |
}) |
|
13 |
} |
|
14 |
|
|
15 |
// 取消社交绑定 |
|
16 |
export const socialUnbind = (type, openid) => { |
|
17 |
return request.delete({ |
|
18 |
url: '/system/social-user/unbind', |
|
19 |
data: { |
|
20 |
type, |
|
21 |
openid |
|
22 |
} |
|
23 |
}) |
|
24 |
} |
|
25 |
|
|
26 |
// 社交授权的跳转 |
|
27 |
export const socialAuthRedirect = (type, redirectUri) => { |
|
28 |
return request.get({ |
|
29 |
url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri |
|
30 |
}) |
|
31 |
} |