@kengic/uni 0.6.3-beta.1 → 0.6.3-beta.11

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.
@@ -14,14 +14,7 @@ export class GetLatestApkVersionQuery {}
14
14
  * @param option 请求选项.
15
15
  */
16
16
  export function GetLatestApkVersion(config?: IRequestConfig<GetLatestApkVersionQuery, {}>, option?: IRequestOptions): Promise<string> {
17
- return httpClient().request(
18
- {
19
- method: GetLatestApkVersion.method,
20
- url: `${option?.mock ? '/mock' : ''}${GetLatestApkVersion.url}`,
21
- ...(config ?? {}),
22
- },
23
- option,
24
- );
17
+ return httpClient().request({ method: GetLatestApkVersion.method, url: GetLatestApkVersion.url, ...(config ?? {}) }, option);
25
18
  }
26
19
 
27
20
  GetLatestApkVersion.method = 'GET' as const;
@@ -14,14 +14,7 @@ export class GetUserInfoQuery {}
14
14
  * @param option 请求选项.
15
15
  */
16
16
  export function GetUserInfo(config?: IRequestConfig<GetUserInfoQuery, {}>, option?: IRequestOptions): Promise<Record<any, any>> {
17
- return httpClient().request(
18
- {
19
- method: GetUserInfo.method,
20
- url: `${option?.mock ? '/mock' : ''}${GetUserInfo.url}`,
21
- ...(config ?? {}),
22
- },
23
- option,
24
- );
17
+ return httpClient().request({ method: GetUserInfo.method, url: GetUserInfo.url, ...(config ?? {}) }, option);
25
18
  }
26
19
 
27
20
  GetUserInfo.method = 'GET' as const;
@@ -14,14 +14,7 @@ export class LogoutQuery {}
14
14
  * @param option 请求选项.
15
15
  */
16
16
  export function Logout(config?: IRequestConfig<LogoutQuery, {}>, option?: IRequestOptions): Promise<Record<any, any>> {
17
- return httpClient().request(
18
- {
19
- method: Logout.method,
20
- url: `${option?.mock ? '/mock' : ''}${Logout.url}`,
21
- ...(config ?? {}),
22
- },
23
- option,
24
- );
17
+ return httpClient().request({ method: Logout.method, url: Logout.url, ...(config ?? {}) }, option);
25
18
  }
26
19
 
27
20
  Logout.method = 'GET' as const;
@@ -81,14 +81,7 @@ wh-分页列表查询VO
81
81
  * @param option 请求选项.
82
82
  */
83
83
  export function ListVO(config?: IRequestConfig<ListVOQuery, {}>, option?: IRequestOptions): Promise<DEF.WMS.IPage<DEF.WMS.WhDTO>> {
84
- return httpClient().request(
85
- {
86
- method: ListVO.method,
87
- url: `${option?.mock ? '/mock' : ''}${ListVO.url}`,
88
- ...(config ?? {}),
89
- },
90
- option,
91
- );
84
+ return httpClient().request({ method: ListVO.method, url: ListVO.url, ...(config ?? {}) }, option);
92
85
  }
93
86
 
94
87
  ListVO.method = 'GET' as const;
@@ -0,0 +1,45 @@
1
+ // noinspection ES6UnusedImports
2
+
3
+ import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
4
+ import * as DEF from '../../../def';
5
+ import { keys } from '../../models';
6
+
7
+ /** 请求参数. */
8
+ export class ListQuery {
9
+ /** 排序字段. */
10
+ public column?: string | null;
11
+ /** 排序方式. */
12
+ public order?: 'asc' | 'desc' | null;
13
+ /** 当前页数. */
14
+ public pageNo?: number | null;
15
+ /** 每页条数. */
16
+ public pageSize?: number | null;
17
+
18
+ public constructor(obj?: ListQuery) {
19
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
20
+ switch (key) {
21
+ case 'column':
22
+ case 'order':
23
+ case 'pageNo':
24
+ case 'pageSize':
25
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
26
+ break;
27
+ default:
28
+ break;
29
+ }
30
+ });
31
+ }
32
+ }
33
+
34
+ /**
35
+ * 工作站-分页列表查询
36
+ *
37
+ * @param config 请求配置.
38
+ * @param option 请求选项.
39
+ */
40
+ export function List(config?: IRequestConfig<ListQuery, {}>, option?: IRequestOptions): Promise<DEF.WMS.IPage<DEF.WMS.WorkstationDTO>> {
41
+ return httpClient().request({ method: List.method, url: List.url, ...(config ?? {}) }, option);
42
+ }
43
+
44
+ List.method = 'GET' as const;
45
+ List.url = '/workstation/workstation/list';
@@ -0,0 +1 @@
1
+ export { List, ListQuery } from './List';
@@ -1,3 +1,4 @@
1
1
  export * as CommonController from './CommonController';
2
2
  export * as LoginController from './LoginController';
3
3
  export * as WhController from './WhController';
4
+ export * as WorkstationController from './WorkstationController';