jmash-core-mp 0.1.21 → 0.1.22

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.
Files changed (150) hide show
  1. package/.editorconfig +9 -9
  2. package/README.md +60 -60
  3. package/babel.config.json +34 -34
  4. package/eslint.config.mjs +7 -7
  5. package/lib/api/auth/index.d.ts +21 -21
  6. package/lib/api/auth/index.js +199 -199
  7. package/lib/api/auth/types.d.ts +86 -86
  8. package/lib/api/auth/types.js +9 -9
  9. package/lib/api/cms/index.d.ts +20 -20
  10. package/lib/api/cms/index.js +161 -161
  11. package/lib/api/cms/types.d.ts +200 -200
  12. package/lib/api/cms/types.js +1 -1
  13. package/lib/api/constant.d.ts +5 -5
  14. package/lib/api/constant.js +6 -6
  15. package/lib/api/dict/index.d.ts +18 -18
  16. package/lib/api/dict/index.js +34 -34
  17. package/lib/api/dict/types.d.ts +28 -28
  18. package/lib/api/dict/types.js +1 -1
  19. package/lib/api/dicts.d.ts +18 -18
  20. package/lib/api/dicts.js +67 -67
  21. package/lib/api/files/index.d.ts +25 -25
  22. package/lib/api/files/index.js +135 -135
  23. package/lib/api/files/types.d.ts +38 -38
  24. package/lib/api/files/types.js +1 -1
  25. package/lib/api/index.d.ts +4 -4
  26. package/lib/api/index.js +6 -6
  27. package/lib/api/myorgan/types.d.ts +22 -22
  28. package/lib/api/myorgan/types.js +1 -1
  29. package/lib/api/region/index.d.ts +7 -7
  30. package/lib/api/region/index.js +19 -19
  31. package/lib/api/region/types.d.ts +19 -19
  32. package/lib/api/region/types.js +1 -1
  33. package/lib/api/storage/index.d.ts +10 -10
  34. package/lib/api/storage/index.js +43 -43
  35. package/lib/api/storage/types.d.ts +28 -28
  36. package/lib/api/storage/types.js +1 -1
  37. package/lib/api/types.d.ts +42 -42
  38. package/lib/api/types.js +1 -1
  39. package/lib/app.mpx.d.ts +1 -1
  40. package/lib/components/auth-user/jmash-update-user.mpx.d.ts +1 -1
  41. package/lib/components/auth-user/jmash-user.mpx.d.ts +1 -1
  42. package/lib/components/cms/jmash-cms-acticle-list.mpx.d.ts +1 -1
  43. package/lib/components/cms/jmash-cms-article-item.mpx.d.ts +1 -1
  44. package/lib/components/cms/jmash-cms-article-view.mpx.d.ts +1 -0
  45. package/lib/components/cms/jmash-cms-article.mpx.d.ts +1 -1
  46. package/lib/components/cms/jmash-cms-like.mpx.d.ts +1 -1
  47. package/lib/components/common/jmash-upload-picture.mpx.d.ts +1 -0
  48. package/lib/components/core/jmash-login.mpx.d.ts +1 -0
  49. package/lib/index.d.ts +21 -21
  50. package/lib/index.js +14 -14
  51. package/lib/packages/pages/cms/cms-article-list.mpx.d.ts +1 -1
  52. package/lib/pages/index.mpx.d.ts +1 -0
  53. package/lib/store/user.d.ts +31 -31
  54. package/lib/store/user.js +227 -227
  55. package/lib/utils/common.d.ts +35 -35
  56. package/lib/utils/common.js +166 -166
  57. package/lib/utils/config.d.ts +5 -5
  58. package/lib/utils/config.js +29 -29
  59. package/lib/utils/db.d.ts +21 -21
  60. package/lib/utils/db.js +84 -84
  61. package/lib/utils/grpc.d.ts +5 -5
  62. package/lib/utils/grpc.js +20 -20
  63. package/lib/utils/net.d.ts +7 -7
  64. package/lib/utils/net.js +15 -15
  65. package/lib/utils/request.d.ts +2 -2
  66. package/lib/utils/request.js +123 -123
  67. package/mpx.config.js +27 -27
  68. package/package.json +1 -1
  69. package/postcss.config.js +11 -11
  70. package/project.config.json +24 -24
  71. package/project.private.config.json +13 -13
  72. package/public/index.html +15 -15
  73. package/src/api/auth/index.ts +227 -227
  74. package/src/api/auth/types.ts +166 -166
  75. package/src/api/cms/index.ts +218 -218
  76. package/src/api/cms/types.ts +379 -379
  77. package/src/api/constant.ts +6 -6
  78. package/src/api/dict/index.ts +44 -44
  79. package/src/api/dict/types.ts +49 -49
  80. package/src/api/dicts.ts +72 -72
  81. package/src/api/files/index.ts +163 -163
  82. package/src/api/files/types.ts +67 -67
  83. package/src/api/index.ts +11 -11
  84. package/src/api/myorgan/types.ts +42 -42
  85. package/src/api/region/index.ts +23 -23
  86. package/src/api/region/types.ts +36 -36
  87. package/src/api/storage/index.ts +62 -62
  88. package/src/api/storage/types.ts +54 -54
  89. package/src/api/types.ts +72 -72
  90. package/src/app.mpx +71 -71
  91. package/src/components/auth-user/jmash-logout.mpx +91 -91
  92. package/src/components/auth-user/jmash-update-user.mpx +386 -386
  93. package/src/components/auth-user/jmash-update-user.web.mpx +366 -366
  94. package/src/components/auth-user/jmash-user.mpx +359 -359
  95. package/src/components/cms/jmash-cms-acticle-list.mpx +182 -182
  96. package/src/components/cms/jmash-cms-article-item.mpx +241 -241
  97. package/src/components/cms/jmash-cms-article-view.mpx +131 -131
  98. package/src/components/cms/jmash-cms-article.mpx +68 -68
  99. package/src/components/cms/jmash-cms-like.mpx +151 -151
  100. package/src/components/common/jmash-avatar-edit.mpx +153 -153
  101. package/src/components/common/jmash-cascader-region.mpx +112 -112
  102. package/src/components/common/jmash-menu.mpx +129 -129
  103. package/src/components/common/jmash-none-data.mpx +82 -82
  104. package/src/components/common/jmash-pic-swiper.mpx +71 -71
  105. package/src/components/common/jmash-popup.mpx +137 -137
  106. package/src/components/common/jmash-search.mpx +126 -126
  107. package/src/components/common/jmash-single-btn.mpx +53 -53
  108. package/src/components/common/jmash-stepper.mpx +214 -214
  109. package/src/components/common/jmash-tab-bar.mpx +50 -50
  110. package/src/components/common/jmash-textarea.mpx +88 -88
  111. package/src/components/common/jmash-top-navigation.mpx +203 -203
  112. package/src/components/common/jmash-upload-picture.mpx +129 -126
  113. package/src/components/core/jmash-cms-protocol.mpx +66 -66
  114. package/src/components/core/jmash-login.ali.mpx +284 -284
  115. package/src/components/core/jmash-login.mpx +348 -348
  116. package/src/components/core/jmash-login.web.mpx +421 -421
  117. package/src/components/core/jmash-popup-login.ali.mpx +311 -311
  118. package/src/components/core/jmash-popup-login.mpx +415 -415
  119. package/src/components/core/jmash-popup-login.web.mpx +389 -389
  120. package/src/custom-tab-bar/index.mpx +10 -10
  121. package/src/global.d.ts +11 -11
  122. package/src/index.ts +71 -71
  123. package/src/packages/index.mpx +10 -10
  124. package/src/packages/pages/auth/cms-protocol.mpx +31 -31
  125. package/src/packages/pages/auth/login.mpx +59 -59
  126. package/src/packages/pages/auth/update-user.mpx +17 -17
  127. package/src/packages/pages/cms/cms-article-list.mpx +164 -164
  128. package/src/packages/pages/cms/cms-article.mpx +32 -32
  129. package/src/pages/basic-component.mpx +30 -30
  130. package/src/pages/half-home.mpx +58 -58
  131. package/src/pages/home.mpx +52 -52
  132. package/src/pages/home2.mpx +47 -47
  133. package/src/pages/index.mpx +13 -3
  134. package/src/pages/tabbar/home.mpx +77 -77
  135. package/src/pages/tabbar/my.mpx +80 -80
  136. package/src/store/user.ts +270 -270
  137. package/src/styles/index.scss +20 -20
  138. package/src/styles/vars.scss +27 -27
  139. package/src/utils/common.ts +179 -179
  140. package/src/utils/config.ts +35 -35
  141. package/src/utils/db.ts +100 -100
  142. package/src/utils/grpc.ts +21 -21
  143. package/src/utils/net.ts +18 -18
  144. package/src/utils/request.ts +134 -134
  145. package/static/ali/mini.project.json +4 -4
  146. package/static/dd/project.config.json +15 -15
  147. package/static/swan/project.swan.json +14 -14
  148. package/static/tt/project.config.json +11 -11
  149. package/static/wx/project.config.json +40 -40
  150. package/uno.config.js +9 -9
@@ -1,200 +1,200 @@
1
- export interface CmsSiteList {
2
- results: Array<CmsSiteModel>;
3
- }
4
- export interface CmsSiteKey {
5
- tenant?: string;
6
- organTenant?: string;
7
- siteId: string;
8
- }
9
- export interface CmsSiteModel {
10
- siteId?: string;
11
- siteName?: string;
12
- siteLogo?: string;
13
- keyword?: string;
14
- description?: string;
15
- contactPerson?: string;
16
- contactPhone?: string;
17
- dueTime?: string;
18
- status?: string;
19
- siteType?: string;
20
- isComment?: boolean;
21
- isCommentReview?: boolean;
22
- mobileProductPath?: string;
23
- pcProductPath?: string;
24
- channelList?: Array<CmsChannelModel>;
25
- address?: string;
26
- geoLongitude: number;
27
- geoLatitude: number;
28
- email: string;
29
- }
30
- export interface CmsChannelReq {
31
- tenant?: string;
32
- siteId?: string;
33
- alias?: string;
34
- status?: boolean;
35
- hasStatus?: boolean;
36
- isOpen?: boolean;
37
- hasIsOpen?: boolean;
38
- channelId?: string;
39
- }
40
- export interface CmsChannelList {
41
- results: Array<CmsChannelModel>;
42
- }
43
- export interface CmsChannelModel {
44
- channelId: string;
45
- siteId?: string;
46
- modelCode?: string;
47
- channelName: string;
48
- alias?: string;
49
- parentId?: string;
50
- seoTitle?: string;
51
- seoDescription?: string;
52
- status?: boolean;
53
- children?: Array<CmsChannelModel>;
54
- isOpen?: boolean;
55
- isSelect?: boolean;
56
- url: string;
57
- type?: string;
58
- }
59
- export interface CmsChannelKey {
60
- tenant?: string;
61
- channelId: string;
62
- }
63
- export interface CmsInfoPage {
64
- results: Array<CmsInfoModel>;
65
- curPage?: number;
66
- pageSize?: number;
67
- totalSize?: number;
68
- subTotalDto?: CmsInfoModelTotal;
69
- totalDto?: CmsInfoModelTotal;
70
- pageCount?: number;
71
- }
72
- export interface CmsInfoModelTotal {
73
- totalSize?: number;
74
- }
75
- export interface CmsInfoReq {
76
- tenant?: string;
77
- curPage?: number;
78
- pageSize?: number;
79
- siteId?: string;
80
- channelId?: string;
81
- channelAlias?: string;
82
- likeInfoTitle?: string;
83
- deleted?: boolean;
84
- hasStatus?: boolean;
85
- status?: string;
86
- hasIsImg?: boolean;
87
- isImg?: boolean;
88
- }
89
- export interface CmsInfoKey {
90
- tenant?: string;
91
- infoId?: string;
92
- }
93
- export interface CmsInfoModel {
94
- infoId?: string;
95
- modelCode?: string;
96
- infoTitle: string;
97
- subTitle?: string;
98
- imgUrl?: string;
99
- author?: string;
100
- intro?: string;
101
- top?: number;
102
- status?: string;
103
- publishDate?: string;
104
- dueTime?: string;
105
- channelId: Array<string>;
106
- sourceName?: string;
107
- siteId: string;
108
- address?: string;
109
- }
110
- export interface CmsInfoContentReq {
111
- tenant?: string;
112
- infoId?: string;
113
- }
114
- export interface CmsInfoContentModel {
115
- imagePath?: Array<string>;
116
- videoPath?: Array<string>;
117
- contentId?: string;
118
- infoId?: string;
119
- infoContent?: string;
120
- infoType?: string;
121
- orderBy?: number;
122
- infoContentList?: {
123
- path: string;
124
- }[];
125
- }
126
- export interface CmsInfoContentList {
127
- results: Array<CmsInfoContentModel>;
128
- }
129
- export interface CmsContentInfoReq {
130
- tenant?: string;
131
- siteId?: string;
132
- channelAlias: string;
133
- }
134
- export interface CmsContentInfoModel {
135
- cmsInfo?: CmsInfoModel;
136
- infoContentResults?: Array<CmsInfoContentModel>;
137
- }
138
- export interface CmsInfoKey {
139
- tenant?: string;
140
- infoId?: string;
141
- }
142
- export interface CmsInfoContentReq {
143
- tenant?: string;
144
- infoId?: string;
145
- }
146
- export interface CmsInfoContentList {
147
- results: Array<CmsInfoContentModel>;
148
- }
149
- export interface CmsInfoFileReq {
150
- tenant?: string;
151
- infoId?: string;
152
- }
153
- export interface CmsInfoFileModel {
154
- fileId?: string;
155
- infoId?: string;
156
- fileName?: string;
157
- fileType?: string;
158
- filePath?: string;
159
- fileSize?: string;
160
- fileExt?: string;
161
- fileWidth?: number;
162
- fileHeight?: number;
163
- videoTime?: number;
164
- intro?: string;
165
- }
166
- export interface CmsInfoFileList {
167
- results: Array<CmsInfoFileModel>;
168
- }
169
- export interface FrontInteractKey {
170
- tenant?: string;
171
- interactId?: string;
172
- }
173
- export interface FrontInteractModel {
174
- interactId?: string;
175
- likeCount: number;
176
- browseCount: number;
177
- }
178
- export interface FrontLikeKey {
179
- tenant: string;
180
- relationId: string;
181
- }
182
- export interface FrontLikeCreateReq {
183
- tenant: string;
184
- requestId?: string;
185
- likeType?: string;
186
- relationId?: string;
187
- action?: boolean;
188
- }
189
- export interface FrontLikeModel {
190
- likeId?: string;
191
- }
192
- export interface FrontBrowseRecordCreateReq {
193
- tenant?: string;
194
- requestId?: string;
195
- type?: string;
196
- relationId?: string;
197
- }
198
- export interface FrontBrowseRecordModel {
199
- browseId?: string;
200
- }
1
+ export interface CmsSiteList {
2
+ results: Array<CmsSiteModel>;
3
+ }
4
+ export interface CmsSiteKey {
5
+ tenant?: string;
6
+ organTenant?: string;
7
+ siteId: string;
8
+ }
9
+ export interface CmsSiteModel {
10
+ siteId?: string;
11
+ siteName?: string;
12
+ siteLogo?: string;
13
+ keyword?: string;
14
+ description?: string;
15
+ contactPerson?: string;
16
+ contactPhone?: string;
17
+ dueTime?: string;
18
+ status?: string;
19
+ siteType?: string;
20
+ isComment?: boolean;
21
+ isCommentReview?: boolean;
22
+ mobileProductPath?: string;
23
+ pcProductPath?: string;
24
+ channelList?: Array<CmsChannelModel>;
25
+ address?: string;
26
+ geoLongitude: number;
27
+ geoLatitude: number;
28
+ email: string;
29
+ }
30
+ export interface CmsChannelReq {
31
+ tenant?: string;
32
+ siteId?: string;
33
+ alias?: string;
34
+ status?: boolean;
35
+ hasStatus?: boolean;
36
+ isOpen?: boolean;
37
+ hasIsOpen?: boolean;
38
+ channelId?: string;
39
+ }
40
+ export interface CmsChannelList {
41
+ results: Array<CmsChannelModel>;
42
+ }
43
+ export interface CmsChannelModel {
44
+ channelId: string;
45
+ siteId?: string;
46
+ modelCode?: string;
47
+ channelName: string;
48
+ alias?: string;
49
+ parentId?: string;
50
+ seoTitle?: string;
51
+ seoDescription?: string;
52
+ status?: boolean;
53
+ children?: Array<CmsChannelModel>;
54
+ isOpen?: boolean;
55
+ isSelect?: boolean;
56
+ url: string;
57
+ type?: string;
58
+ }
59
+ export interface CmsChannelKey {
60
+ tenant?: string;
61
+ channelId: string;
62
+ }
63
+ export interface CmsInfoPage {
64
+ results: Array<CmsInfoModel>;
65
+ curPage?: number;
66
+ pageSize?: number;
67
+ totalSize?: number;
68
+ subTotalDto?: CmsInfoModelTotal;
69
+ totalDto?: CmsInfoModelTotal;
70
+ pageCount?: number;
71
+ }
72
+ export interface CmsInfoModelTotal {
73
+ totalSize?: number;
74
+ }
75
+ export interface CmsInfoReq {
76
+ tenant?: string;
77
+ curPage?: number;
78
+ pageSize?: number;
79
+ siteId?: string;
80
+ channelId?: string;
81
+ channelAlias?: string;
82
+ likeInfoTitle?: string;
83
+ deleted?: boolean;
84
+ hasStatus?: boolean;
85
+ status?: string;
86
+ hasIsImg?: boolean;
87
+ isImg?: boolean;
88
+ }
89
+ export interface CmsInfoKey {
90
+ tenant?: string;
91
+ infoId?: string;
92
+ }
93
+ export interface CmsInfoModel {
94
+ infoId?: string;
95
+ modelCode?: string;
96
+ infoTitle: string;
97
+ subTitle?: string;
98
+ imgUrl?: string;
99
+ author?: string;
100
+ intro?: string;
101
+ top?: number;
102
+ status?: string;
103
+ publishDate?: string;
104
+ dueTime?: string;
105
+ channelId: Array<string>;
106
+ sourceName?: string;
107
+ siteId: string;
108
+ address?: string;
109
+ }
110
+ export interface CmsInfoContentReq {
111
+ tenant?: string;
112
+ infoId?: string;
113
+ }
114
+ export interface CmsInfoContentModel {
115
+ imagePath?: Array<string>;
116
+ videoPath?: Array<string>;
117
+ contentId?: string;
118
+ infoId?: string;
119
+ infoContent?: string;
120
+ infoType?: string;
121
+ orderBy?: number;
122
+ infoContentList?: {
123
+ path: string;
124
+ }[];
125
+ }
126
+ export interface CmsInfoContentList {
127
+ results: Array<CmsInfoContentModel>;
128
+ }
129
+ export interface CmsContentInfoReq {
130
+ tenant?: string;
131
+ siteId?: string;
132
+ channelAlias: string;
133
+ }
134
+ export interface CmsContentInfoModel {
135
+ cmsInfo?: CmsInfoModel;
136
+ infoContentResults?: Array<CmsInfoContentModel>;
137
+ }
138
+ export interface CmsInfoKey {
139
+ tenant?: string;
140
+ infoId?: string;
141
+ }
142
+ export interface CmsInfoContentReq {
143
+ tenant?: string;
144
+ infoId?: string;
145
+ }
146
+ export interface CmsInfoContentList {
147
+ results: Array<CmsInfoContentModel>;
148
+ }
149
+ export interface CmsInfoFileReq {
150
+ tenant?: string;
151
+ infoId?: string;
152
+ }
153
+ export interface CmsInfoFileModel {
154
+ fileId?: string;
155
+ infoId?: string;
156
+ fileName?: string;
157
+ fileType?: string;
158
+ filePath?: string;
159
+ fileSize?: string;
160
+ fileExt?: string;
161
+ fileWidth?: number;
162
+ fileHeight?: number;
163
+ videoTime?: number;
164
+ intro?: string;
165
+ }
166
+ export interface CmsInfoFileList {
167
+ results: Array<CmsInfoFileModel>;
168
+ }
169
+ export interface FrontInteractKey {
170
+ tenant?: string;
171
+ interactId?: string;
172
+ }
173
+ export interface FrontInteractModel {
174
+ interactId?: string;
175
+ likeCount: number;
176
+ browseCount: number;
177
+ }
178
+ export interface FrontLikeKey {
179
+ tenant: string;
180
+ relationId: string;
181
+ }
182
+ export interface FrontLikeCreateReq {
183
+ tenant: string;
184
+ requestId?: string;
185
+ likeType?: string;
186
+ relationId?: string;
187
+ action?: boolean;
188
+ }
189
+ export interface FrontLikeModel {
190
+ likeId?: string;
191
+ }
192
+ export interface FrontBrowseRecordCreateReq {
193
+ tenant?: string;
194
+ requestId?: string;
195
+ type?: string;
196
+ relationId?: string;
197
+ }
198
+ export interface FrontBrowseRecordModel {
199
+ browseId?: string;
200
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,5 +1,5 @@
1
- declare class Constant {
2
- static readonly MODULE_RBAC = "rbac";
3
- static readonly ENUM_GENDER = "jmash.protobuf.Gender";
4
- }
5
- export { Constant };
1
+ declare class Constant {
2
+ static readonly MODULE_RBAC = "rbac";
3
+ static readonly ENUM_GENDER = "jmash.protobuf.Gender";
4
+ }
5
+ export { Constant };
@@ -1,6 +1,6 @@
1
- class Constant {
2
- static MODULE_RBAC = "rbac"; // rbac
3
- // 性别
4
- static ENUM_GENDER = "jmash.protobuf.Gender";
5
- }
6
- export { Constant };
1
+ class Constant {
2
+ static MODULE_RBAC = "rbac"; // rbac
3
+ // 性别
4
+ static ENUM_GENDER = "jmash.protobuf.Gender";
5
+ }
6
+ export { Constant };
@@ -1,18 +1,18 @@
1
- import { ResponseData } from "../../api/types";
2
- import { EnumRes, DictEntryReq, DictEntryList } from "./types";
3
- declare class DictApiImpl {
4
- /**
5
- * 枚举
6
- * @param data 查询条件
7
- * @returns 返回Promise<Entry[]>的对象
8
- */
9
- enumApi(module: string, className: string, type?: number): Promise<ResponseData<EnumRes>>;
10
- /**
11
- * 普通字典
12
- * @param data 查询条件
13
- * @returns 返回Promise<Entry[]>的对象
14
- */
15
- dictEntryApi(data: DictEntryReq): Promise<ResponseData<DictEntryList>>;
16
- }
17
- declare const dictApi: DictApiImpl;
18
- export { dictApi };
1
+ import { ResponseData } from "../../api/types";
2
+ import { EnumRes, DictEntryReq, DictEntryList } from "./types";
3
+ declare class DictApiImpl {
4
+ /**
5
+ * 枚举
6
+ * @param data 查询条件
7
+ * @returns 返回Promise<Entry[]>的对象
8
+ */
9
+ enumApi(module: string, className: string, type?: number): Promise<ResponseData<EnumRes>>;
10
+ /**
11
+ * 普通字典
12
+ * @param data 查询条件
13
+ * @returns 返回Promise<Entry[]>的对象
14
+ */
15
+ dictEntryApi(data: DictEntryReq): Promise<ResponseData<DictEntryList>>;
16
+ }
17
+ declare const dictApi: DictApiImpl;
18
+ export { dictApi };
@@ -1,34 +1,34 @@
1
- import mpx from "@mpxjs/core";
2
- class DictApiImpl {
3
- /**
4
- * 枚举
5
- * @param data 查询条件
6
- * @returns 返回Promise<Entry[]>的对象
7
- */
8
- enumApi(module, className, type) {
9
- const data = { className, type };
10
- return mpx.xfetch.fetch({
11
- url: "/v1/" + module + "/enum/entry",
12
- method: "GET",
13
- data,
14
- });
15
- }
16
- /**
17
- * 普通字典
18
- * @param data 查询条件
19
- * @returns 返回Promise<Entry[]>的对象
20
- */
21
- dictEntryApi(data) {
22
- if (data) {
23
- data.hasEnable = data.enable !== undefined;
24
- }
25
- const config = getApp().globalData.config;
26
- return mpx.xfetch.fetch({
27
- url: "/v1/dict/dict_entry/list/" + config.tenant,
28
- method: "GET",
29
- data,
30
- });
31
- }
32
- }
33
- const dictApi = new DictApiImpl();
34
- export { dictApi };
1
+ import mpx from "@mpxjs/core";
2
+ class DictApiImpl {
3
+ /**
4
+ * 枚举
5
+ * @param data 查询条件
6
+ * @returns 返回Promise<Entry[]>的对象
7
+ */
8
+ enumApi(module, className, type) {
9
+ const data = { className, type };
10
+ return mpx.xfetch.fetch({
11
+ url: "/v1/" + module + "/enum/entry",
12
+ method: "GET",
13
+ data,
14
+ });
15
+ }
16
+ /**
17
+ * 普通字典
18
+ * @param data 查询条件
19
+ * @returns 返回Promise<Entry[]>的对象
20
+ */
21
+ dictEntryApi(data) {
22
+ if (data) {
23
+ data.hasEnable = data.enable !== undefined;
24
+ }
25
+ const config = getApp().globalData.config;
26
+ return mpx.xfetch.fetch({
27
+ url: "/v1/dict/dict_entry/list/" + config.tenant,
28
+ method: "GET",
29
+ data,
30
+ });
31
+ }
32
+ }
33
+ const dictApi = new DictApiImpl();
34
+ export { dictApi };
@@ -1,28 +1,28 @@
1
- export interface Entry {
2
- key?: string;
3
- value?: string;
4
- }
5
- export interface EnumEntryReq {
6
- className?: string;
7
- type?: number;
8
- }
9
- export interface EnumRes {
10
- values: Array<Entry>;
11
- }
12
- export interface DictEntryModel {
13
- typeCode?: string;
14
- dictCode?: string;
15
- dictName?: string;
16
- listOrder?: number;
17
- enable?: boolean;
18
- description?: string;
19
- }
20
- export interface DictEntryList {
21
- results: Array<DictEntryModel>;
22
- }
23
- export interface DictEntryReq {
24
- typeCode?: string;
25
- dictCode?: string;
26
- hasEnable?: boolean;
27
- enable?: boolean;
28
- }
1
+ export interface Entry {
2
+ key?: string;
3
+ value?: string;
4
+ }
5
+ export interface EnumEntryReq {
6
+ className?: string;
7
+ type?: number;
8
+ }
9
+ export interface EnumRes {
10
+ values: Array<Entry>;
11
+ }
12
+ export interface DictEntryModel {
13
+ typeCode?: string;
14
+ dictCode?: string;
15
+ dictName?: string;
16
+ listOrder?: number;
17
+ enable?: boolean;
18
+ description?: string;
19
+ }
20
+ export interface DictEntryList {
21
+ results: Array<DictEntryModel>;
22
+ }
23
+ export interface DictEntryReq {
24
+ typeCode?: string;
25
+ dictCode?: string;
26
+ hasEnable?: boolean;
27
+ enable?: boolean;
28
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,18 +1,18 @@
1
- import { Entry, DictEntryModel } from "./dict/types";
2
- export declare class EnumDict {
3
- module: string;
4
- enumClass: string;
5
- type: number;
6
- values: Entry[];
7
- constructor(module: string, enumClass: string, type?: number);
8
- useEnumValues(): Promise<Entry[]>;
9
- getEnumValue(key: string): string;
10
- }
11
- export declare class EntryDict {
12
- typeCode: string;
13
- enable?: boolean;
14
- values: DictEntryModel[];
15
- constructor(typeCode: string, enable?: boolean);
16
- useDictValues(): Promise<DictEntryModel[]>;
17
- getDictValue(key: string): string;
18
- }
1
+ import { Entry, DictEntryModel } from "./dict/types";
2
+ export declare class EnumDict {
3
+ module: string;
4
+ enumClass: string;
5
+ type: number;
6
+ values: Entry[];
7
+ constructor(module: string, enumClass: string, type?: number);
8
+ useEnumValues(): Promise<Entry[]>;
9
+ getEnumValue(key: string): string;
10
+ }
11
+ export declare class EntryDict {
12
+ typeCode: string;
13
+ enable?: boolean;
14
+ values: DictEntryModel[];
15
+ constructor(typeCode: string, enable?: boolean);
16
+ useDictValues(): Promise<DictEntryModel[]>;
17
+ getDictValue(key: string): string;
18
+ }