cc1-admin-front 0.0.5 → 0.0.6
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/dist/apis/cron/ApiCron.d.ts +0 -1
- package/dist/index.d.ts +87 -2
- package/package.json +1 -1
- package/dist/apis/types/query.d.ts +0 -79
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import 'tools-css/index.css';
|
|
2
2
|
import 'tools-css/scroll.css';
|
|
3
|
-
import type { query, ApiData, ApiRes } from './apis/types/query';
|
|
4
3
|
import ApiAuthApi from './apis/auth/ApiAuthApi';
|
|
5
4
|
import ApiAuthMenu from './apis/auth/ApiAuthMenu';
|
|
6
5
|
import ApiAuthPhone from './apis/auth/ApiAuthPhone';
|
|
@@ -25,7 +24,93 @@ import { svf } from './sstore/svf';
|
|
|
25
24
|
import './styles/index.less';
|
|
26
25
|
import System from './utils/System';
|
|
27
26
|
declare const initApp: (config: Partial<typeof System.config>) => Promise<void>;
|
|
28
|
-
export { ApiApp, ApiAuthApi, ApiAuthMenu, ApiAuthPhone, ApiAuthRole, ApiAuthUser, ApiCaptcha, ApiCron, ApiEmailConfig, ApiErrorLog, ApiJob, ApiLoginLog, ApiSmsConfig, ApiSystemConfig, ApiSystemTenant, ERouter, initApp, scurd, ssys, suser, sutil, svf, System
|
|
27
|
+
export { ApiApp, ApiAuthApi, ApiAuthMenu, ApiAuthPhone, ApiAuthRole, ApiAuthUser, ApiCaptcha, ApiCron, ApiEmailConfig, ApiErrorLog, ApiJob, ApiLoginLog, ApiSmsConfig, ApiSystemConfig, ApiSystemTenant, ERouter, initApp, scurd, ssys, suser, sutil, svf, System };
|
|
28
|
+
|
|
29
|
+
declare global {
|
|
30
|
+
type query = {
|
|
31
|
+
size: number
|
|
32
|
+
num: number
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface ApiRes {
|
|
36
|
+
/**
|
|
37
|
+
* 错误代码-未处理
|
|
38
|
+
*/
|
|
39
|
+
code: any
|
|
40
|
+
/**
|
|
41
|
+
* 错误信息-未处理
|
|
42
|
+
*/
|
|
43
|
+
msg: string
|
|
44
|
+
/**
|
|
45
|
+
* 请求数据
|
|
46
|
+
*/
|
|
47
|
+
data: any
|
|
48
|
+
}
|
|
49
|
+
interface ApiData {
|
|
50
|
+
[key: string]: any
|
|
51
|
+
/**
|
|
52
|
+
* 自定义请求错误回调
|
|
53
|
+
* @param msg 错误信息
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
56
|
+
toast?: (
|
|
57
|
+
/**
|
|
58
|
+
* 错误代码
|
|
59
|
+
*/
|
|
60
|
+
code: any,
|
|
61
|
+
/**
|
|
62
|
+
* 请求响应
|
|
63
|
+
*/
|
|
64
|
+
xhr: TXHRRes,
|
|
65
|
+
/**
|
|
66
|
+
* 请求配置
|
|
67
|
+
*/
|
|
68
|
+
config: callbackConfig<ApiRes>
|
|
69
|
+
) => void
|
|
70
|
+
/**
|
|
71
|
+
* 出现401错误时,是否跳转登录页
|
|
72
|
+
* @returns
|
|
73
|
+
*/
|
|
74
|
+
toLogin?: () => boolean | void
|
|
75
|
+
/**
|
|
76
|
+
* 请求完毕后回调
|
|
77
|
+
* @param config
|
|
78
|
+
* @returns
|
|
79
|
+
*/
|
|
80
|
+
final?: (
|
|
81
|
+
/** 成功状态 */
|
|
82
|
+
status: boolean,
|
|
83
|
+
/**
|
|
84
|
+
* 请求配置
|
|
85
|
+
*/
|
|
86
|
+
config: callbackConfig<ApiRes>,
|
|
87
|
+
/**
|
|
88
|
+
* 请求响应
|
|
89
|
+
*/
|
|
90
|
+
xhr: TXHRRes
|
|
91
|
+
) => void
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
type TXHRRes = {
|
|
95
|
+
/**
|
|
96
|
+
* 请求响应数据
|
|
97
|
+
*/
|
|
98
|
+
data: ApiRes
|
|
99
|
+
/**
|
|
100
|
+
* 请求响应类型
|
|
101
|
+
*/
|
|
102
|
+
responseType: any
|
|
103
|
+
/**
|
|
104
|
+
* 请求响应代码
|
|
105
|
+
*/
|
|
106
|
+
status: number
|
|
107
|
+
/**
|
|
108
|
+
* 请求响应对象
|
|
109
|
+
*/
|
|
110
|
+
xhr: XMLHttpRequest
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
}
|
|
29
114
|
|
|
30
115
|
export {}
|
|
31
116
|
|
package/package.json
CHANGED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export type query = {
|
|
2
|
-
size: number;
|
|
3
|
-
num: number;
|
|
4
|
-
};
|
|
5
|
-
export interface ApiRes {
|
|
6
|
-
/**
|
|
7
|
-
* 错误代码-未处理
|
|
8
|
-
*/
|
|
9
|
-
code: any;
|
|
10
|
-
/**
|
|
11
|
-
* 错误信息-未处理
|
|
12
|
-
*/
|
|
13
|
-
msg: string;
|
|
14
|
-
/**
|
|
15
|
-
* 请求数据
|
|
16
|
-
*/
|
|
17
|
-
data: any;
|
|
18
|
-
}
|
|
19
|
-
export interface ApiData {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
/**
|
|
22
|
-
* 自定义请求错误回调
|
|
23
|
-
* @param msg 错误信息
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
toast?: (
|
|
27
|
-
/**
|
|
28
|
-
* 错误代码
|
|
29
|
-
*/
|
|
30
|
-
code: any,
|
|
31
|
-
/**
|
|
32
|
-
* 请求响应
|
|
33
|
-
*/
|
|
34
|
-
xhr: TXHRRes,
|
|
35
|
-
/**
|
|
36
|
-
* 请求配置
|
|
37
|
-
*/
|
|
38
|
-
config: callbackConfig<ApiRes>) => void;
|
|
39
|
-
/**
|
|
40
|
-
* 出现401错误时,是否跳转登录页
|
|
41
|
-
* @returns
|
|
42
|
-
*/
|
|
43
|
-
toLogin?: () => boolean | void;
|
|
44
|
-
/**
|
|
45
|
-
* 请求完毕后回调
|
|
46
|
-
* @param config
|
|
47
|
-
* @returns
|
|
48
|
-
*/
|
|
49
|
-
final?: (
|
|
50
|
-
/** 成功状态 */
|
|
51
|
-
status: boolean,
|
|
52
|
-
/**
|
|
53
|
-
* 请求配置
|
|
54
|
-
*/
|
|
55
|
-
config: callbackConfig<ApiRes>,
|
|
56
|
-
/**
|
|
57
|
-
* 请求响应
|
|
58
|
-
*/
|
|
59
|
-
xhr: TXHRRes) => void;
|
|
60
|
-
}
|
|
61
|
-
type TXHRRes = {
|
|
62
|
-
/**
|
|
63
|
-
* 请求响应数据
|
|
64
|
-
*/
|
|
65
|
-
data: ApiRes;
|
|
66
|
-
/**
|
|
67
|
-
* 请求响应类型
|
|
68
|
-
*/
|
|
69
|
-
responseType: any;
|
|
70
|
-
/**
|
|
71
|
-
* 请求响应代码
|
|
72
|
-
*/
|
|
73
|
-
status: number;
|
|
74
|
-
/**
|
|
75
|
-
* 请求响应对象
|
|
76
|
-
*/
|
|
77
|
-
xhr: XMLHttpRequest;
|
|
78
|
-
};
|
|
79
|
-
export {};
|