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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
| /**
| * 系统应用
| *
| * @author yubaoshan
| * @date 2020/5/26 19:06
| */
| import { axios } from '@/utils/request'
|
| /**
| * 登录
| *
| * @author yubaoshan
| * @date 2020/5/26 19:06
| */
| export function login (parameter) {
| // 密码采用sm2加密传输密码
| const sm2 = require('sm-crypto').sm2
| const publicKey = '04298364ec840088475eae92a591e01284d1abefcda348b47eb324bb521bb03b0b2a5bc393f6b71dabb8f15c99a0050818b56b23f31743b93df9cf8948f15ddb54'
| const encryptData = sm2.doEncrypt(parameter.password, publicKey, 1)
| parameter.password = encryptData
|
| return axios({
| url: '/login',
| method: 'post',
| data: parameter
| })
| }
|
| /**
| * 登出
| *
| * @author yubaoshan
| * @date 2020/5/26 19:07
| */
| export function logout (parameter) {
| return axios({
| url: '/logout',
| method: 'get',
| params: parameter
| })
| }
|
| /**
| * 获取登录用户信息
| *
| * @author yubaoshan
| * @date 2020/5/26 19:08
| */
| export function getLoginUser (parameter) {
| return axios({
| url: '/getLoginUser',
| method: 'get',
| params: parameter
| })
| }
|
| /**
| * 获取租户开关
| *
| * @author yubaoshan
| * @date 2020/9/5 1:24
| */
| export function getTenantOpen (parameter) {
| return axios({
| url: '/getTenantOpen',
| method: 'get',
| params: parameter
| })
| }
|
| /**
| * 获取短信验证码
| *
| * @author yubaoshan
| * @date 2020/5/26 19:29
| */
| export function getSmsCaptcha (parameter) {
| return axios({
| url: '/getSmsCaptcha',
| method: 'get',
| params: parameter
| })
| }
|
| /**
| * 获取验证码开关
| *
| * @author Jax
| * @date 2021/1/22 00:00
| */
| export function getCaptchaOpen (parameter) {
| return axios({
| url: '/getCaptchaOpen',
| method: 'get',
| params: parameter
| })
| }
|
| /**
| * 获取验证图片 以及token
| *
| * @author Jax
| * @date 2021/1/22 00:00
| */
| export function reqGet(data) {
| return axios({
| url: '/captcha/get',
| method: 'post',
| data
| })
| }
|
| /**
| * 滑动或者点选验证
| *
| * @author Jax
| * @date 2021/1/22 00:00
| */
| export function reqCheck(data) {
| return axios({
| url: '/captcha/check',
| method: 'post',
| data
| })
| }
|
|