wui-components-v2 1.1.89 → 1.1.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/login.ts +8 -4
- package/package.json +1 -1
package/api/login.ts
CHANGED
|
@@ -12,12 +12,15 @@ export function pubKey(): Promise<any> {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// 登录
|
|
15
|
-
export async function login(
|
|
15
|
+
export async function login(
|
|
16
|
+
username: string,
|
|
17
|
+
password: string,
|
|
18
|
+
kaptchaToken: string = '',
|
|
19
|
+
kaptchaText: string = ''
|
|
20
|
+
): Promise<any> {
|
|
16
21
|
dayjs.extend(utc)
|
|
17
22
|
dayjs.extend(timezone)
|
|
18
|
-
const datetime = dayjs(new Date())
|
|
19
|
-
.tz('Europe/London')
|
|
20
|
-
.format('YYYY-MM-DD HH:mm:ss')
|
|
23
|
+
const datetime = dayjs(new Date()).tz('Europe/London').format('YYYY-MM-DD HH:mm:ss')
|
|
21
24
|
const json = {
|
|
22
25
|
username,
|
|
23
26
|
password,
|
|
@@ -47,5 +50,6 @@ export function getKaptchaToken(): Promise<any> {
|
|
|
47
50
|
export function getUserConfig(): Promise<any> {
|
|
48
51
|
return req({
|
|
49
52
|
url: `/v3/current-user`,
|
|
53
|
+
method: 'POST',
|
|
50
54
|
})
|
|
51
55
|
}
|