@kengic/uni 0.4.1 → 0.5.0

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.
@@ -1,28 +1,28 @@
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 GetLatestApkVersionQuery {}
9
-
10
- /**
11
- * 获取 APK 最新的版本号.
12
- *
13
- * @param config 请求配置.
14
- * @param option 请求选项.
15
- */
16
- export function GetLatestApkVersion(config?: IRequestConfig<GetLatestApkVersionQuery, {}>, option?: IRequestOptions): Promise<number> {
17
- return httpClient().request(
18
- {
19
- method: GetLatestApkVersion.method,
20
- url: `${option?.mock ? '/mock' : ''}${GetLatestApkVersion.url}`,
21
- ...(config ?? {}),
22
- },
23
- option,
24
- );
25
- }
26
-
27
- GetLatestApkVersion.method = 'GET' as const;
28
- GetLatestApkVersion.url = '/sys/common/getLatestApkVersion';
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 GetLatestApkVersionQuery {}
9
+
10
+ /**
11
+ * 获取 APK 最新的版本号.
12
+ *
13
+ * @param config 请求配置.
14
+ * @param option 请求选项.
15
+ */
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
+ );
25
+ }
26
+
27
+ GetLatestApkVersion.method = 'GET' as const;
28
+ GetLatestApkVersion.url = '/sys/common/getLatestApkVersion';
@@ -1 +1 @@
1
- export { GetLatestApkVersion, GetLatestApkVersionQuery } from './GetLatestApkVersion';
1
+ export { GetLatestApkVersion, GetLatestApkVersionQuery } from './GetLatestApkVersion';
@@ -1,28 +1,28 @@
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 LogoutQuery {}
9
-
10
- /**
11
- * 退出登录.
12
- *
13
- * @param config 请求配置.
14
- * @param option 请求选项.
15
- */
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
- );
25
- }
26
-
27
- Logout.method = 'GET' as const;
28
- Logout.url = '/sys/logout';
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 LogoutQuery {}
9
+
10
+ /**
11
+ * 退出登录.
12
+ *
13
+ * @param config 请求配置.
14
+ * @param option 请求选项.
15
+ */
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
+ );
25
+ }
26
+
27
+ Logout.method = 'GET' as const;
28
+ Logout.url = '/sys/logout';
@@ -1 +1 @@
1
- export { Logout, LogoutQuery } from './Logout';
1
+ export { Logout, LogoutQuery } from './Logout';
@@ -1,92 +1,92 @@
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 ListVOQuery {
9
- /** 是否可用 */
10
- public activeFlg?: number | null;
11
- /** 地址编号 */
12
- public adrId?: string | null;
13
- /** 地址名 */
14
- public adrnam?: string | null;
15
- /** 公司代码 */
16
- public comCod?: string | null;
17
- /** 默认仓库 */
18
- public defWhFlg?: number | null;
19
- /** 主键. */
20
- public id?: string | null;
21
- /** 所属地/国编号 */
22
- public orgcod?: string | null;
23
- /** 永久调整托盘 */
24
- public permAdjLod?: string | null;
25
- /** 永久调整箱 */
26
- public permAdjSub?: string | null;
27
- /** 永久创建托盘 */
28
- public permCreLod?: string | null;
29
- /** 永久创建箱 */
30
- public permCreSub?: string | null;
31
- /** 仓库名称 */
32
- public whDsc?: string | null;
33
- /** 仓库编号 */
34
- public whId?: string | null;
35
- /** 排序字段. */
36
- public column?: string | null;
37
- /** 排序方式. */
38
- public order?: 'asc' | 'desc' | null;
39
- /** 当前页数. */
40
- public pageNo?: number | null;
41
- /** 每页条数. */
42
- public pageSize?: number | null;
43
-
44
- public constructor(obj?: ListVOQuery) {
45
- keys(obj ?? {}).forEach((key: PropertyKey) => {
46
- switch (key) {
47
- case 'activeFlg':
48
- case 'adrId':
49
- case 'adrnam':
50
- case 'comCod':
51
- case 'defWhFlg':
52
- case 'id':
53
- case 'orgcod':
54
- case 'permAdjLod':
55
- case 'permAdjSub':
56
- case 'permCreLod':
57
- case 'permCreSub':
58
- case 'whDsc':
59
- case 'whId':
60
- case 'column':
61
- case 'order':
62
- case 'pageNo':
63
- case 'pageSize':
64
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
65
- break;
66
- default:
67
- break;
68
- }
69
- });
70
- }
71
- }
72
-
73
- /**
74
- * wh-分页列表查询VO
75
- wh-分页列表查询VO
76
- *
77
- * @param config 请求配置.
78
- * @param option 请求选项.
79
- */
80
- export function ListVO(config?: IRequestConfig<ListVOQuery, {}>, option?: IRequestOptions): Promise<DEF.WMS.IPage<DEF.WMS.WhDTO>> {
81
- return httpClient().request(
82
- {
83
- method: ListVO.method,
84
- url: `${option?.mock ? '/mock' : ''}${ListVO.url}`,
85
- ...(config ?? {}),
86
- },
87
- option,
88
- );
89
- }
90
-
91
- ListVO.method = 'GET' as const;
92
- ListVO.url = '/wh/wh/listVO';
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 ListVOQuery {
9
+ /** 是否可用 */
10
+ public activeFlg?: number | null;
11
+ /** 地址编号 */
12
+ public adrId?: string | null;
13
+ /** 地址名 */
14
+ public adrnam?: string | null;
15
+ /** 公司代码 */
16
+ public comCod?: string | null;
17
+ /** 默认仓库 */
18
+ public defWhFlg?: number | null;
19
+ /** 主键. */
20
+ public id?: string | null;
21
+ /** 所属地/国编号 */
22
+ public orgcod?: string | null;
23
+ /** 永久调整托盘 */
24
+ public permAdjLod?: string | null;
25
+ /** 永久调整箱 */
26
+ public permAdjSub?: string | null;
27
+ /** 永久创建托盘 */
28
+ public permCreLod?: string | null;
29
+ /** 永久创建箱 */
30
+ public permCreSub?: string | null;
31
+ /** 仓库名称 */
32
+ public whDsc?: string | null;
33
+ /** 仓库编号 */
34
+ public whId?: string | null;
35
+ /** 排序字段. */
36
+ public column?: string | null;
37
+ /** 排序方式. */
38
+ public order?: 'asc' | 'desc' | null;
39
+ /** 当前页数. */
40
+ public pageNo?: number | null;
41
+ /** 每页条数. */
42
+ public pageSize?: number | null;
43
+
44
+ public constructor(obj?: ListVOQuery) {
45
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
46
+ switch (key) {
47
+ case 'activeFlg':
48
+ case 'adrId':
49
+ case 'adrnam':
50
+ case 'comCod':
51
+ case 'defWhFlg':
52
+ case 'id':
53
+ case 'orgcod':
54
+ case 'permAdjLod':
55
+ case 'permAdjSub':
56
+ case 'permCreLod':
57
+ case 'permCreSub':
58
+ case 'whDsc':
59
+ case 'whId':
60
+ case 'column':
61
+ case 'order':
62
+ case 'pageNo':
63
+ case 'pageSize':
64
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
65
+ break;
66
+ default:
67
+ break;
68
+ }
69
+ });
70
+ }
71
+ }
72
+
73
+ /**
74
+ * wh-分页列表查询VO
75
+ wh-分页列表查询VO
76
+ *
77
+ * @param config 请求配置.
78
+ * @param option 请求选项.
79
+ */
80
+ export function ListVO(config?: IRequestConfig<ListVOQuery, {}>, option?: IRequestOptions): Promise<DEF.WMS.IPage<DEF.WMS.WhDTO>> {
81
+ return httpClient().request(
82
+ {
83
+ method: ListVO.method,
84
+ url: `${option?.mock ? '/mock' : ''}${ListVO.url}`,
85
+ ...(config ?? {}),
86
+ },
87
+ option,
88
+ );
89
+ }
90
+
91
+ ListVO.method = 'GET' as const;
92
+ ListVO.url = '/wh/wh/listVO';
@@ -1 +1 @@
1
- export { ListVO, ListVOQuery } from './ListVO';
1
+ export { ListVO, ListVOQuery } from './ListVO';
@@ -1,3 +1,3 @@
1
- export * as CommonController from './CommonController';
2
- export * as LoginController from './LoginController';
3
- export * as WhController from './WhController';
1
+ export * as CommonController from './CommonController';
2
+ export * as LoginController from './LoginController';
3
+ export * as WhController from './WhController';
@@ -1,2 +1,2 @@
1
- export * as WMSAPI from './Controllers';
2
- export * as WMSDEF from './models';
1
+ export * as WMSAPI from './Controllers';
2
+ export * as WMSDEF from './models';
@@ -1,192 +1,192 @@
1
- export class IPage<T0> {
2
- /** Current. */
3
- public current?: number | null;
4
- /** Pages. */
5
- public pages?: number | null;
6
- /** Records. */
7
- public records?: Array<T0> | null;
8
- /** Size. */
9
- public size?: number | null;
10
- /** Total. */
11
- public total?: number | null;
12
-
13
- public constructor(obj?: IPage<T0>) {
14
- keys(obj ?? {}).forEach((key: PropertyKey) => {
15
- switch (key) {
16
- case 'current':
17
- case 'pages':
18
- case 'records':
19
- case 'size':
20
- case 'total':
21
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
22
- break;
23
- default:
24
- break;
25
- }
26
- });
27
- }
28
- }
29
-
30
- /** 用户. */
31
- export class SysUser {
32
- /** Activiti Sync. */
33
- public activitiSync?: number | null;
34
- /** 头像. */
35
- public avatar?: string | null;
36
- /** Birthday. */
37
- public birthday?: string | null;
38
- /** Client Id. */
39
- public clientId?: string | null;
40
- /** Create By. */
41
- public createBy?: string | null;
42
- /** Create Time. */
43
- public createTime?: string | null;
44
- /** Del Flag. */
45
- public delFlag?: number | null;
46
- /** Depart Ids. */
47
- public departIds?: string | null;
48
- /** 邮件. */
49
- public email?: string | null;
50
- /** Home Path. */
51
- public homePath?: string | null;
52
- /** Id. */
53
- public id?: string | null;
54
- /** Org Code. */
55
- public orgCode?: string | null;
56
- /** Org Code Txt. */
57
- public orgCodeTxt?: string | null;
58
- /** Password. */
59
- public password?: string | null;
60
- /** 电话. */
61
- public phone?: string | null;
62
- /** Post. */
63
- public post?: string | null;
64
- /** 姓名. */
65
- public realname?: string | null;
66
- /** Rel Tenant Ids. */
67
- public relTenantIds?: string | null;
68
- /** Salt. */
69
- public salt?: string | null;
70
- /** Sex. */
71
- public sex?: number | null;
72
- /** 状态. */
73
- public status?: number | null;
74
- /** Telephone. */
75
- public telephone?: string | null;
76
- /** Update By. */
77
- public updateBy?: string | null;
78
- /** Update Time. */
79
- public updateTime?: string | null;
80
- /** User Identity. */
81
- public userIdentity?: number | null;
82
- /** 账号. */
83
- public username?: string | null;
84
- /** 工号. */
85
- public workNo?: string | null;
86
-
87
- public constructor(obj?: SysUser) {
88
- keys(obj ?? {}).forEach((key: PropertyKey) => {
89
- switch (key) {
90
- case 'activitiSync':
91
- case 'avatar':
92
- case 'birthday':
93
- case 'clientId':
94
- case 'createBy':
95
- case 'createTime':
96
- case 'delFlag':
97
- case 'departIds':
98
- case 'email':
99
- case 'homePath':
100
- case 'id':
101
- case 'orgCode':
102
- case 'orgCodeTxt':
103
- case 'password':
104
- case 'phone':
105
- case 'post':
106
- case 'realname':
107
- case 'relTenantIds':
108
- case 'salt':
109
- case 'sex':
110
- case 'status':
111
- case 'telephone':
112
- case 'updateBy':
113
- case 'updateTime':
114
- case 'userIdentity':
115
- case 'username':
116
- case 'workNo':
117
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
118
- break;
119
- default:
120
- break;
121
- }
122
- });
123
- }
124
- }
125
-
126
- /** 仓库数据传输对象 */
127
- export class WhDTO {
128
- /** 是否可用 */
129
- public activeFlg?: number | null;
130
- /** 地址编号 */
131
- public adrId?: string | null;
132
- /** 地址名 */
133
- public adrnam?: string | null;
134
- /** 公司代码 */
135
- public comCod?: string | null;
136
- /** 默认仓库 */
137
- public defWhFlg?: number | null;
138
- /** 主键. */
139
- public id?: string | null;
140
- /** 所属地/国编号 */
141
- public orgcod?: string | null;
142
- /** 永久调整托盘 */
143
- public permAdjLod?: string | null;
144
- /** 永久调整箱 */
145
- public permAdjSub?: string | null;
146
- /** 永久创建托盘 */
147
- public permCreLod?: string | null;
148
- /** 永久创建箱 */
149
- public permCreSub?: string | null;
150
- /** 仓库名称 */
151
- public whDsc?: string | null;
152
- /** 仓库编号 */
153
- public whId?: string | null;
154
-
155
- public constructor(obj?: WhDTO) {
156
- keys(obj ?? {}).forEach((key: PropertyKey) => {
157
- switch (key) {
158
- case 'activeFlg':
159
- case 'adrId':
160
- case 'adrnam':
161
- case 'comCod':
162
- case 'defWhFlg':
163
- case 'id':
164
- case 'orgcod':
165
- case 'permAdjLod':
166
- case 'permAdjSub':
167
- case 'permCreLod':
168
- case 'permCreSub':
169
- case 'whDsc':
170
- case 'whId':
171
- Reflect.set(this, key, Reflect.get(obj ?? {}, key));
172
- break;
173
- default:
174
- break;
175
- }
176
- });
177
- }
178
- }
179
-
180
- /**
181
- * 获取对象的属性名数组.
182
- * @param obj 对象.
183
- */
184
- export function keys<C extends object>(obj: C): Array<keyof C> {
185
- const type = typeof obj;
186
-
187
- if (!(obj != null && (type === 'object' || type === 'function'))) {
188
- return [];
189
- }
190
-
191
- return Reflect.ownKeys(obj) as Array<keyof C>;
192
- }
1
+ export class IPage<T0> {
2
+ /** Current. */
3
+ public current?: number | null;
4
+ /** Pages. */
5
+ public pages?: number | null;
6
+ /** Records. */
7
+ public records?: Array<T0> | null;
8
+ /** Size. */
9
+ public size?: number | null;
10
+ /** Total. */
11
+ public total?: number | null;
12
+
13
+ public constructor(obj?: IPage<T0>) {
14
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
15
+ switch (key) {
16
+ case 'current':
17
+ case 'pages':
18
+ case 'records':
19
+ case 'size':
20
+ case 'total':
21
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
22
+ break;
23
+ default:
24
+ break;
25
+ }
26
+ });
27
+ }
28
+ }
29
+
30
+ /** 用户. */
31
+ export class SysUser {
32
+ /** Activiti Sync. */
33
+ public activitiSync?: number | null;
34
+ /** 头像. */
35
+ public avatar?: string | null;
36
+ /** Birthday. */
37
+ public birthday?: string | null;
38
+ /** Client Id. */
39
+ public clientId?: string | null;
40
+ /** Create By. */
41
+ public createBy?: string | null;
42
+ /** Create Time. */
43
+ public createTime?: string | null;
44
+ /** Del Flag. */
45
+ public delFlag?: number | null;
46
+ /** Depart Ids. */
47
+ public departIds?: string | null;
48
+ /** 邮件. */
49
+ public email?: string | null;
50
+ /** Home Path. */
51
+ public homePath?: string | null;
52
+ /** Id. */
53
+ public id?: string | null;
54
+ /** Org Code. */
55
+ public orgCode?: string | null;
56
+ /** Org Code Txt. */
57
+ public orgCodeTxt?: string | null;
58
+ /** Password. */
59
+ public password?: string | null;
60
+ /** 电话. */
61
+ public phone?: string | null;
62
+ /** Post. */
63
+ public post?: string | null;
64
+ /** 姓名. */
65
+ public realname?: string | null;
66
+ /** Rel Tenant Ids. */
67
+ public relTenantIds?: string | null;
68
+ /** Salt. */
69
+ public salt?: string | null;
70
+ /** Sex. */
71
+ public sex?: number | null;
72
+ /** 状态. */
73
+ public status?: number | null;
74
+ /** Telephone. */
75
+ public telephone?: string | null;
76
+ /** Update By. */
77
+ public updateBy?: string | null;
78
+ /** Update Time. */
79
+ public updateTime?: string | null;
80
+ /** User Identity. */
81
+ public userIdentity?: number | null;
82
+ /** 账号. */
83
+ public username?: string | null;
84
+ /** 工号. */
85
+ public workNo?: string | null;
86
+
87
+ public constructor(obj?: SysUser) {
88
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
89
+ switch (key) {
90
+ case 'activitiSync':
91
+ case 'avatar':
92
+ case 'birthday':
93
+ case 'clientId':
94
+ case 'createBy':
95
+ case 'createTime':
96
+ case 'delFlag':
97
+ case 'departIds':
98
+ case 'email':
99
+ case 'homePath':
100
+ case 'id':
101
+ case 'orgCode':
102
+ case 'orgCodeTxt':
103
+ case 'password':
104
+ case 'phone':
105
+ case 'post':
106
+ case 'realname':
107
+ case 'relTenantIds':
108
+ case 'salt':
109
+ case 'sex':
110
+ case 'status':
111
+ case 'telephone':
112
+ case 'updateBy':
113
+ case 'updateTime':
114
+ case 'userIdentity':
115
+ case 'username':
116
+ case 'workNo':
117
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
118
+ break;
119
+ default:
120
+ break;
121
+ }
122
+ });
123
+ }
124
+ }
125
+
126
+ /** 仓库数据传输对象 */
127
+ export class WhDTO {
128
+ /** 是否可用 */
129
+ public activeFlg?: number | null;
130
+ /** 地址编号 */
131
+ public adrId?: string | null;
132
+ /** 地址名 */
133
+ public adrnam?: string | null;
134
+ /** 公司代码 */
135
+ public comCod?: string | null;
136
+ /** 默认仓库 */
137
+ public defWhFlg?: number | null;
138
+ /** 主键. */
139
+ public id?: string | null;
140
+ /** 所属地/国编号 */
141
+ public orgcod?: string | null;
142
+ /** 永久调整托盘 */
143
+ public permAdjLod?: string | null;
144
+ /** 永久调整箱 */
145
+ public permAdjSub?: string | null;
146
+ /** 永久创建托盘 */
147
+ public permCreLod?: string | null;
148
+ /** 永久创建箱 */
149
+ public permCreSub?: string | null;
150
+ /** 仓库名称 */
151
+ public whDsc?: string | null;
152
+ /** 仓库编号 */
153
+ public whId?: string | null;
154
+
155
+ public constructor(obj?: WhDTO) {
156
+ keys(obj ?? {}).forEach((key: PropertyKey) => {
157
+ switch (key) {
158
+ case 'activeFlg':
159
+ case 'adrId':
160
+ case 'adrnam':
161
+ case 'comCod':
162
+ case 'defWhFlg':
163
+ case 'id':
164
+ case 'orgcod':
165
+ case 'permAdjLod':
166
+ case 'permAdjSub':
167
+ case 'permCreLod':
168
+ case 'permCreSub':
169
+ case 'whDsc':
170
+ case 'whId':
171
+ Reflect.set(this, key, Reflect.get(obj ?? {}, key));
172
+ break;
173
+ default:
174
+ break;
175
+ }
176
+ });
177
+ }
178
+ }
179
+
180
+ /**
181
+ * 获取对象的属性名数组.
182
+ * @param obj 对象.
183
+ */
184
+ export function keys<C extends object>(obj: C): Array<keyof C> {
185
+ const type = typeof obj;
186
+
187
+ if (!(obj != null && (type === 'object' || type === 'function'))) {
188
+ return [];
189
+ }
190
+
191
+ return Reflect.ownKeys(obj) as Array<keyof C>;
192
+ }
package/dist/api/api.ts CHANGED
@@ -1 +1 @@
1
- export { WMSAPI as WMS } from './WMS';
1
+ export { WMSAPI as WMS } from './WMS';
package/dist/api/def.ts CHANGED
@@ -1 +1 @@
1
- export { WMSDEF as WMS } from './WMS';
1
+ export { WMSDEF as WMS } from './WMS';
package/dist/api/index.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * as API from './api';
2
- export * as DEF from './def';
1
+ export * as API from './api';
2
+ export * as DEF from './def';
@@ -89,6 +89,6 @@ export const useAppStore = defineStore('app', {
89
89
  * 打开更新弹窗.
90
90
  * @param version 最新版本.
91
91
  */
92
- openKgUpdatePopup(version: number) {},
92
+ openKgUpdatePopup(version: string) {},
93
93
  },
94
94
  });
package/dist/util/kg.ts CHANGED
@@ -99,22 +99,32 @@ export class Kg {
99
99
  }
100
100
 
101
101
  // 当前版本
102
- const oldVersion: number = Number(plus.runtime.versionCode);
102
+ const oldVersionSegments: Array<string> = (plus.runtime.version || '').split('.');
103
+ const major: number = Number(oldVersionSegments[0]);
104
+ const minor: number = Number(oldVersionSegments[1]);
105
+ const patch: number = Number(oldVersionSegments[2]);
103
106
 
104
107
  try {
105
108
  const newVersion = await API.WMS.CommonController.GetLatestApkVersion({}, { timeout: 5 * 1000 });
106
109
 
110
+ // 最新版本
111
+ const newVersionSegments = newVersion.split('.');
112
+ const _major: number = Number(newVersionSegments[0]);
113
+ const _minor: number = Number(newVersionSegments[1]);
114
+ const _patch: number = Number(newVersionSegments[2]);
115
+
116
+ // 有新版本
117
+ if (_major > major || (_major == major && _minor > minor) || (_major == major && _minor == minor && _patch > patch)) {
118
+ appStore.openKgUpdatePopup(newVersion);
119
+ return true;
120
+ }
107
121
  // 无新版本
108
- if (newVersion === 0 || oldVersion >= newVersion) {
122
+ else {
109
123
  if (isShowToast) {
110
124
  uni.showToast({ title: '已是最新版本.', icon: 'none' });
111
125
  }
112
126
  return false;
113
127
  }
114
-
115
- // 有新版本
116
- appStore.openKgUpdatePopup(newVersion);
117
- return true;
118
128
  } catch (e) {
119
129
  // 接口请求失败
120
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/uni",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "scripts": {
5
5
  "build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
6
6
  "------ -------------------------------------------": "",