f336b801
YunaiV
项目结构调整 x 11 : 修改前...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
import request from '@/utils/request'
// 登录方法
export function login(username, password, code, uuid) {
const data = {
username,
password,
code,
uuid
}
return request({
url: '/login',
method: 'post',
data: data
})
}
// 获取用户详细信息
export function getInfo() {
return request({
url: '/get-permission-info',
method: 'get'
})
}
// 退出方法
export function logout() {
return request({
url: '/logout',
method: 'post'
})
}
// 获取验证码
export function getCodeImg() {
return request({
url: '/system/captcha/get-image',
method: 'get'
})
}
|
133cb49c
weir
接入第三方登录(已接入Gitee[...
|
41
|
|
4a23a696
YunaiV
1. 修复“登陆”=》“登录”
|
42
43
|
// 社交授权的跳转
export function socialAuthRedirect(type, redirectUri) {
|
133cb49c
weir
接入第三方登录(已接入Gitee[...
|
44
|
return request({
|
4a23a696
YunaiV
1. 修复“登陆”=》“登录”
|
45
|
url: '/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri,
|
133cb49c
weir
接入第三方登录(已接入Gitee[...
|
46
47
48
49
|
method: 'get'
})
}
|
4a23a696
YunaiV
1. 修复“登陆”=》“登录”
|
50
|
// 社交登录,使用 code 授权码
|
9be00d60
YunaiV
完整完成钉钉的三方接入
|
51
|
export function socialLogin(type, code, state) {
|
133cb49c
weir
接入第三方登录(已接入Gitee[...
|
52
|
return request({
|
9be00d60
YunaiV
完整完成钉钉的三方接入
|
53
|
url: '/social-login',
|
e05d9059
YunaiV
接入 dingtalk 钉钉的三方...
|
54
55
56
57
58
59
|
method: 'post',
data: {
type,
code,
state
}
|
133cb49c
weir
接入第三方登录(已接入Gitee[...
|
60
61
|
})
}
|
9be00d60
YunaiV
完整完成钉钉的三方接入
|
62
|
|
4a23a696
YunaiV
1. 修复“登陆”=》“登录”
|
63
|
// 社交登录,使用 code 授权码 + + 账号密码
|
9be00d60
YunaiV
完整完成钉钉的三方接入
|
64
65
66
67
68
69
70
71
72
73
74
75
76
|
export function socialLogin2(type, code, state, username, password) {
return request({
url: '/social-login2',
method: 'post',
data: {
type,
code,
state,
username,
password
}
})
}
|
cd205a60
wangwenbin10
前端接入绑定社交平台的逻辑
|
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
// 社交绑定,使用 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
}
})
}
|