jmash-core-mp 0.1.13 → 0.1.14

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 +187 -187
  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 -198
  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 +131 -131
  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 +40 -40
  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 +41 -41
  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/cms-acticle-list.mpx.d.ts +1 -0
  43. package/lib/components/cms/jmash-cms-acticle-list.mpx.d.ts +1 -1
  44. package/lib/components/cms/jmash-cms-article-item.mpx.d.ts +1 -0
  45. package/lib/components/cms/jmash-cms-article-view.mpx.d.ts +1 -0
  46. package/lib/components/cms/jmash-cms-article.mpx.d.ts +1 -1
  47. package/lib/components/cms/jmash-cms-like.mpx.d.ts +1 -0
  48. package/lib/components/core/jmash-login.mpx.d.ts +1 -1
  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 -0
  52. package/lib/store/user.d.ts +31 -31
  53. package/lib/store/user.js +224 -224
  54. package/lib/types/core.d.ts +41 -41
  55. package/lib/types/core.js +1 -1
  56. package/lib/utils/common.d.ts +35 -35
  57. package/lib/utils/common.js +163 -163
  58. package/lib/utils/config.d.ts +3 -3
  59. package/lib/utils/config.js +30 -30
  60. package/lib/utils/db.d.ts +21 -21
  61. package/lib/utils/db.js +84 -84
  62. package/lib/utils/grpc.d.ts +5 -5
  63. package/lib/utils/grpc.js +20 -20
  64. package/lib/utils/net.d.ts +7 -7
  65. package/lib/utils/net.js +15 -15
  66. package/lib/utils/request.d.ts +2 -2
  67. package/lib/utils/request.js +122 -122
  68. package/mpx.config.js +27 -27
  69. package/package.json +1 -1
  70. package/postcss.config.js +11 -11
  71. package/project.config.json +24 -24
  72. package/project.private.config.json +13 -13
  73. package/public/index.html +15 -15
  74. package/src/api/auth/index.ts +215 -215
  75. package/src/api/auth/types.ts +166 -166
  76. package/src/api/cms/index.ts +218 -218
  77. package/src/api/cms/types.ts +379 -375
  78. package/src/api/constant.ts +6 -6
  79. package/src/api/dict/index.ts +44 -44
  80. package/src/api/dict/types.ts +49 -49
  81. package/src/api/dicts.ts +72 -72
  82. package/src/api/files/index.ts +159 -159
  83. package/src/api/files/types.ts +67 -67
  84. package/src/api/index.ts +11 -11
  85. package/src/api/myorgan/types.ts +42 -42
  86. package/src/api/region/index.ts +23 -23
  87. package/src/api/region/types.ts +36 -36
  88. package/src/api/storage/index.ts +59 -59
  89. package/src/api/storage/types.ts +54 -54
  90. package/src/api/types.ts +70 -70
  91. package/src/app.mpx +72 -72
  92. package/src/components/auth-user/jmash-logout.mpx +91 -91
  93. package/src/components/auth-user/jmash-update-user.mpx +381 -381
  94. package/src/components/auth-user/jmash-update-user.web.mpx +365 -365
  95. package/src/components/auth-user/jmash-user.mpx +356 -355
  96. package/src/components/cms/jmash-cms-acticle-list.mpx +182 -181
  97. package/src/components/cms/jmash-cms-article-item.mpx +241 -0
  98. package/src/components/cms/jmash-cms-article-view.mpx +132 -0
  99. package/src/components/cms/jmash-cms-article.mpx +68 -68
  100. package/src/components/cms/jmash-cms-like.mpx +151 -0
  101. package/src/components/common/jmash-avatar-edit.mpx +153 -153
  102. package/src/components/common/jmash-cascader-region.mpx +112 -112
  103. package/src/components/common/jmash-menu.mpx +129 -129
  104. package/src/components/common/jmash-none-data.mpx +77 -77
  105. package/src/components/common/jmash-pic-swiper.mpx +71 -71
  106. package/src/components/common/jmash-popup.mpx +137 -137
  107. package/src/components/common/jmash-search.mpx +126 -126
  108. package/src/components/common/jmash-single-btn.mpx +53 -53
  109. package/src/components/common/jmash-stepper.mpx +214 -214
  110. package/src/components/common/jmash-tab-bar.mpx +50 -50
  111. package/src/components/common/jmash-textarea.mpx +88 -88
  112. package/src/components/common/jmash-top-navigation.mpx +203 -203
  113. package/src/components/common/jmash-upload-picture.mpx +170 -170
  114. package/src/components/core/jmash-cms-protocol.mpx +66 -66
  115. package/src/components/core/jmash-login.ali.mpx +284 -284
  116. package/src/components/core/jmash-login.mpx +348 -348
  117. package/src/components/core/jmash-login.web.mpx +421 -421
  118. package/src/components/core/jmash-popup-login.ali.mpx +311 -311
  119. package/src/components/core/jmash-popup-login.mpx +415 -415
  120. package/src/components/core/jmash-popup-login.web.mpx +389 -389
  121. package/src/custom-tab-bar/index.mpx +10 -10
  122. package/src/global.d.ts +11 -11
  123. package/src/index.ts +71 -71
  124. package/src/packages/index.mpx +10 -9
  125. package/src/packages/pages/auth/cms-protocol.mpx +30 -30
  126. package/src/packages/pages/auth/login.mpx +58 -58
  127. package/src/packages/pages/auth/update-user.mpx +17 -17
  128. package/src/packages/pages/cms/cms-article-list.mpx +164 -0
  129. package/src/packages/pages/cms/cms-article.mpx +31 -31
  130. package/src/pages/basic-component.mpx +30 -30
  131. package/src/pages/half-home.mpx +58 -58
  132. package/src/pages/home.mpx +52 -49
  133. package/src/pages/index.mpx +43 -43
  134. package/src/pages/tabbar/home.mpx +71 -71
  135. package/src/pages/tabbar/my.mpx +80 -80
  136. package/src/store/user.ts +268 -268
  137. package/src/styles/index.scss +20 -20
  138. package/src/styles/vars.scss +27 -27
  139. package/src/utils/common.ts +176 -176
  140. package/src/utils/config.ts +31 -31
  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
package/lib/api/dicts.js CHANGED
@@ -1,67 +1,67 @@
1
- import { dictApi } from "./dict/index";
2
- //枚举字典类.
3
- export class EnumDict {
4
- //模块名
5
- module;
6
- //枚举类名
7
- enumClass;
8
- //枚举类型
9
- type;
10
- //枚举值
11
- values = [];
12
- constructor(module, enumClass, type = 0) {
13
- this.module = module;
14
- this.enumClass = enumClass;
15
- this.type = type;
16
- }
17
- useEnumValues() {
18
- return new Promise((resolve) => {
19
- dictApi
20
- .enumApi(this.module, this.enumClass, this.type)
21
- .then(({ data }) => {
22
- this.values.length = 0;
23
- this.values.push(...data.values);
24
- resolve(this.values);
25
- });
26
- });
27
- }
28
- getEnumValue(key) {
29
- for (const obj of this.values) {
30
- if (obj.key === key) {
31
- return obj.value;
32
- }
33
- }
34
- return "";
35
- }
36
- }
37
- // 普通字典类
38
- export class EntryDict {
39
- typeCode;
40
- enable;
41
- values = [];
42
- constructor(typeCode, enable = true) {
43
- // 字典类型编码
44
- this.typeCode = typeCode;
45
- // 是否启用
46
- this.enable = enable;
47
- }
48
- // 加载数据字典
49
- useDictValues() {
50
- return new Promise((resolve) => {
51
- const req = {
52
- typeCode: this.typeCode,
53
- enable: this.enable,
54
- };
55
- dictApi.dictEntryApi(req).then(({ data }) => {
56
- this.values.length = 0;
57
- this.values.push(...data.results);
58
- resolve(this.values);
59
- });
60
- });
61
- }
62
- //获取字典值
63
- getDictValue(key) {
64
- const entry = this.values.find((entrys) => entrys.dictCode === key);
65
- return entry?.dictName ? entry.dictName : "";
66
- }
67
- }
1
+ import { dictApi } from "./dict/index";
2
+ //枚举字典类.
3
+ export class EnumDict {
4
+ //模块名
5
+ module;
6
+ //枚举类名
7
+ enumClass;
8
+ //枚举类型
9
+ type;
10
+ //枚举值
11
+ values = [];
12
+ constructor(module, enumClass, type = 0) {
13
+ this.module = module;
14
+ this.enumClass = enumClass;
15
+ this.type = type;
16
+ }
17
+ useEnumValues() {
18
+ return new Promise((resolve) => {
19
+ dictApi
20
+ .enumApi(this.module, this.enumClass, this.type)
21
+ .then(({ data }) => {
22
+ this.values.length = 0;
23
+ this.values.push(...data.values);
24
+ resolve(this.values);
25
+ });
26
+ });
27
+ }
28
+ getEnumValue(key) {
29
+ for (const obj of this.values) {
30
+ if (obj.key === key) {
31
+ return obj.value;
32
+ }
33
+ }
34
+ return "";
35
+ }
36
+ }
37
+ // 普通字典类
38
+ export class EntryDict {
39
+ typeCode;
40
+ enable;
41
+ values = [];
42
+ constructor(typeCode, enable = true) {
43
+ // 字典类型编码
44
+ this.typeCode = typeCode;
45
+ // 是否启用
46
+ this.enable = enable;
47
+ }
48
+ // 加载数据字典
49
+ useDictValues() {
50
+ return new Promise((resolve) => {
51
+ const req = {
52
+ typeCode: this.typeCode,
53
+ enable: this.enable,
54
+ };
55
+ dictApi.dictEntryApi(req).then(({ data }) => {
56
+ this.values.length = 0;
57
+ this.values.push(...data.results);
58
+ resolve(this.values);
59
+ });
60
+ });
61
+ }
62
+ //获取字典值
63
+ getDictValue(key) {
64
+ const entry = this.values.find((entrys) => entrys.dictCode === key);
65
+ return entry?.dictName ? entry.dictName : "";
66
+ }
67
+ }
@@ -1,25 +1,25 @@
1
- import { FileInfo, FileBase64Req, FileDownInfo, FileWebReq } from "./types";
2
- import { ResponseData } from "../../api/types";
3
- declare class FileApi {
4
- baseApiUrl(): string;
5
- uploadUrl(): string;
6
- /**
7
- * url 获取图片Full路径
8
- * @param type resize 等比例缩放,white 补白,trans 补透明,clip 裁剪
9
- */
10
- imageUrl(imageUrl: string, width?: number, height?: number, type?: string): string;
11
- /**
12
- * Id 获取图片Full路径
13
- * @param type resize 等比例缩放,white 补白,trans 补透明,clip 裁剪
14
- */
15
- imageIdUrl(imageId: string, width?: number, height?: number, type?: string): string;
16
- fileUrl(fileUrl?: string): string;
17
- fileIdUrl(fileId?: string): string;
18
- uploadBase64File(base64: FileBase64Req): Promise<ResponseData<FileInfo>>;
19
- uploadFile(file: string): Promise<FileInfo>;
20
- downloadFile(url: string): Promise<FileDownInfo>;
21
- uploadWebFile(data: FileWebReq): Promise<ResponseData<FileInfo>>;
22
- deleteFile(filePath?: string): Promise<ResponseData<FileInfo>>;
23
- }
24
- declare const fileApi: FileApi;
25
- export { fileApi };
1
+ import { FileInfo, FileBase64Req, FileDownInfo, FileWebReq } from "./types";
2
+ import { ResponseData } from "../../api/types";
3
+ declare class FileApi {
4
+ baseApiUrl(): string;
5
+ uploadUrl(): string;
6
+ /**
7
+ * url 获取图片Full路径
8
+ * @param type resize 等比例缩放,white 补白,trans 补透明,clip 裁剪
9
+ */
10
+ imageUrl(imageUrl: string, width?: number, height?: number, type?: string): string;
11
+ /**
12
+ * Id 获取图片Full路径
13
+ * @param type resize 等比例缩放,white 补白,trans 补透明,clip 裁剪
14
+ */
15
+ imageIdUrl(imageId: string, width?: number, height?: number, type?: string): string;
16
+ fileUrl(fileUrl?: string): string;
17
+ fileIdUrl(fileId?: string): string;
18
+ uploadBase64File(base64: FileBase64Req): Promise<ResponseData<FileInfo>>;
19
+ uploadFile(file: string): Promise<FileInfo>;
20
+ downloadFile(url: string): Promise<FileDownInfo>;
21
+ uploadWebFile(data: FileWebReq): Promise<ResponseData<FileInfo>>;
22
+ deleteFile(filePath?: string): Promise<ResponseData<FileInfo>>;
23
+ }
24
+ declare const fileApi: FileApi;
25
+ export { fileApi };
@@ -1,131 +1,131 @@
1
- import { db } from "../../utils/db";
2
- import { grpc } from "../../utils/grpc";
3
- import { config } from "../../utils/config";
4
- import mpx from "@mpxjs/core";
5
- class FileApi {
6
- baseApiUrl() {
7
- let currentBaseURL = config.baseUrl;
8
- // 使用 slice() 方法
9
- if (currentBaseURL.slice(-1) === "/") {
10
- currentBaseURL = currentBaseURL.slice(0, -1);
11
- }
12
- return currentBaseURL;
13
- }
14
- // 上传Url
15
- uploadUrl() {
16
- return this.baseApiUrl() + "/v1/file/upload?tenant=" + config.tenant;
17
- }
18
- /**
19
- * url 获取图片Full路径
20
- * @param type resize 等比例缩放,white 补白,trans 补透明,clip 裁剪
21
- */
22
- imageUrl(imageUrl, width = 0, height = 0, type = "clip") {
23
- const regular = /^\//;
24
- if (regular.test(imageUrl)) {
25
- return (this.baseApiUrl() +
26
- `/v1/file/image/${type}/${width}/${height}` +
27
- imageUrl);
28
- }
29
- else {
30
- return (this.baseApiUrl() +
31
- `/v1/file/image/${type}/${width}/${height}/` +
32
- imageUrl);
33
- }
34
- }
35
- /**
36
- * Id 获取图片Full路径
37
- * @param type resize 等比例缩放,white 补白,trans 补透明,clip 裁剪
38
- */
39
- imageIdUrl(imageId, width = 0, height = 0, type = "clip") {
40
- return (this.baseApiUrl() +
41
- "/v1/file/image_id/" +
42
- config.tenant +
43
- `/${type}/${width}/${height}/` +
44
- imageId);
45
- }
46
- // url 获取文件Full路径
47
- fileUrl(fileUrl) {
48
- return this.baseApiUrl() + "/v1/file/path/" + fileUrl;
49
- }
50
- // Id 获取文件Full路径
51
- fileIdUrl(fileId) {
52
- return this.baseApiUrl() + "/v1/file/id/" + config.tenant + fileId;
53
- }
54
- // 上传文件
55
- uploadBase64File(base64) {
56
- base64.tenant = config.tenant;
57
- grpc.clearEmpty(base64);
58
- return mpx.xfetch.fetch({
59
- url: "/v1/file/base64upload",
60
- method: "POST",
61
- data: base64,
62
- });
63
- }
64
- // 上传文件
65
- uploadFile(file) {
66
- const p = mpx.uploadFile({
67
- url: this.uploadUrl(),
68
- filePath: file,
69
- name: "file",
70
- header: {
71
- "Content-Type": "multipart/form-data",
72
- Authorization: db.getBearerToken(),
73
- },
74
- });
75
- return p.then((res) => {
76
- console.log("uploadFile", res);
77
- if (res.statusCode === 200) {
78
- return JSON.parse(res.data);
79
- }
80
- else if (res.statusCode === 401) {
81
- // 清理登录信息
82
- mpx.clearStorage();
83
- throw new Error("登录过期,请重新登录");
84
- }
85
- else {
86
- mpx.showToast({
87
- title: res.errMsg,
88
- icon: "none",
89
- duration: 2000,
90
- });
91
- return JSON.parse(res.data);
92
- }
93
- });
94
- }
95
- // 上传文件
96
- downloadFile(url) {
97
- const p = mpx.downloadFile({
98
- url: url,
99
- header: {
100
- Authorization: db.getBearerToken(),
101
- },
102
- });
103
- return p.then((res) => {
104
- return {
105
- statusCode: res.statusCode,
106
- tempFilePath: res.tempFilePath,
107
- filePath: res.tempFilePath,
108
- };
109
- });
110
- }
111
- // 上传文件
112
- uploadWebFile(data) {
113
- // data.tenant = data.tenant ? config.tenant;
114
- grpc.clearEmpty(data);
115
- return mpx.xfetch.fetch({
116
- url: "/v1/file/webupload",
117
- method: "POST",
118
- data: data,
119
- });
120
- }
121
- // 删除文件
122
- deleteFile(filePath) {
123
- return mpx.xfetch.fetch({
124
- url: "/api/v1/files",
125
- method: "DELETE",
126
- data: { filePath: filePath },
127
- });
128
- }
129
- }
130
- const fileApi = new FileApi();
131
- export { fileApi };
1
+ import { db } from "../../utils/db";
2
+ import { grpc } from "../../utils/grpc";
3
+ import { config } from "../../utils/config";
4
+ import mpx from "@mpxjs/core";
5
+ class FileApi {
6
+ baseApiUrl() {
7
+ let currentBaseURL = config.baseUrl;
8
+ // 使用 slice() 方法
9
+ if (currentBaseURL.slice(-1) === "/") {
10
+ currentBaseURL = currentBaseURL.slice(0, -1);
11
+ }
12
+ return currentBaseURL;
13
+ }
14
+ // 上传Url
15
+ uploadUrl() {
16
+ return this.baseApiUrl() + "/v1/file/upload?tenant=" + config.tenant;
17
+ }
18
+ /**
19
+ * url 获取图片Full路径
20
+ * @param type resize 等比例缩放,white 补白,trans 补透明,clip 裁剪
21
+ */
22
+ imageUrl(imageUrl, width = 0, height = 0, type = "clip") {
23
+ const regular = /^\//;
24
+ if (regular.test(imageUrl)) {
25
+ return (this.baseApiUrl() +
26
+ `/v1/file/image/${type}/${width}/${height}` +
27
+ imageUrl);
28
+ }
29
+ else {
30
+ return (this.baseApiUrl() +
31
+ `/v1/file/image/${type}/${width}/${height}/` +
32
+ imageUrl);
33
+ }
34
+ }
35
+ /**
36
+ * Id 获取图片Full路径
37
+ * @param type resize 等比例缩放,white 补白,trans 补透明,clip 裁剪
38
+ */
39
+ imageIdUrl(imageId, width = 0, height = 0, type = "clip") {
40
+ return (this.baseApiUrl() +
41
+ "/v1/file/image_id/" +
42
+ config.tenant +
43
+ `/${type}/${width}/${height}/` +
44
+ imageId);
45
+ }
46
+ // url 获取文件Full路径
47
+ fileUrl(fileUrl) {
48
+ return this.baseApiUrl() + "/v1/file/path/" + fileUrl;
49
+ }
50
+ // Id 获取文件Full路径
51
+ fileIdUrl(fileId) {
52
+ return this.baseApiUrl() + "/v1/file/id/" + config.tenant + fileId;
53
+ }
54
+ // 上传文件
55
+ uploadBase64File(base64) {
56
+ base64.tenant = config.tenant;
57
+ grpc.clearEmpty(base64);
58
+ return mpx.xfetch.fetch({
59
+ url: "/v1/file/base64upload",
60
+ method: "POST",
61
+ data: base64,
62
+ });
63
+ }
64
+ // 上传文件
65
+ uploadFile(file) {
66
+ const p = mpx.uploadFile({
67
+ url: this.uploadUrl(),
68
+ filePath: file,
69
+ name: "file",
70
+ header: {
71
+ "Content-Type": "multipart/form-data",
72
+ Authorization: db.getBearerToken(),
73
+ },
74
+ });
75
+ return p.then((res) => {
76
+ console.log("uploadFile", res);
77
+ if (res.statusCode === 200) {
78
+ return JSON.parse(res.data);
79
+ }
80
+ else if (res.statusCode === 401) {
81
+ // 清理登录信息
82
+ mpx.clearStorage();
83
+ throw new Error("登录过期,请重新登录");
84
+ }
85
+ else {
86
+ mpx.showToast({
87
+ title: res.errMsg,
88
+ icon: "none",
89
+ duration: 2000,
90
+ });
91
+ return JSON.parse(res.data);
92
+ }
93
+ });
94
+ }
95
+ // 上传文件
96
+ downloadFile(url) {
97
+ const p = mpx.downloadFile({
98
+ url: url,
99
+ header: {
100
+ Authorization: db.getBearerToken(),
101
+ },
102
+ });
103
+ return p.then((res) => {
104
+ return {
105
+ statusCode: res.statusCode,
106
+ tempFilePath: res.tempFilePath,
107
+ filePath: res.tempFilePath,
108
+ };
109
+ });
110
+ }
111
+ // 上传文件
112
+ uploadWebFile(data) {
113
+ // data.tenant = data.tenant ? config.tenant;
114
+ grpc.clearEmpty(data);
115
+ return mpx.xfetch.fetch({
116
+ url: "/v1/file/webupload",
117
+ method: "POST",
118
+ data: data,
119
+ });
120
+ }
121
+ // 删除文件
122
+ deleteFile(filePath) {
123
+ return mpx.xfetch.fetch({
124
+ url: "/api/v1/files",
125
+ method: "DELETE",
126
+ data: { filePath: filePath },
127
+ });
128
+ }
129
+ }
130
+ const fileApi = new FileApi();
131
+ export { fileApi };
@@ -1,38 +1,38 @@
1
- /**
2
- * 文件API类型声明
3
- */
4
- export interface FileInfo {
5
- fileId: string;
6
- fileSrc: string;
7
- contentType: string;
8
- fileExt: string;
9
- fileWidth: number;
10
- fileHeight: number;
11
- fileSize: number;
12
- hashSha256: string;
13
- hashSm3: string;
14
- createDate: string;
15
- tempFilePath: string;
16
- }
17
- export interface FileBase64Req {
18
- tenant?: string;
19
- base64?: string;
20
- fileName?: string;
21
- contentType?: string;
22
- fileDir?: string;
23
- }
24
- export interface FileDownInfo {
25
- tempFilePath: string;
26
- filePath: string;
27
- statusCode: number;
28
- }
29
- export interface FileWebReq {
30
- tenant?: string;
31
- body?: string;
32
- fileName?: string;
33
- contentType?: string;
34
- fileDir?: string;
35
- fileSize?: number;
36
- requestId?: string;
37
- filePart?: number;
38
- }
1
+ /**
2
+ * 文件API类型声明
3
+ */
4
+ export interface FileInfo {
5
+ fileId: string;
6
+ fileSrc: string;
7
+ contentType: string;
8
+ fileExt: string;
9
+ fileWidth: number;
10
+ fileHeight: number;
11
+ fileSize: number;
12
+ hashSha256: string;
13
+ hashSm3: string;
14
+ createDate: string;
15
+ tempFilePath: string;
16
+ }
17
+ export interface FileBase64Req {
18
+ tenant?: string;
19
+ base64?: string;
20
+ fileName?: string;
21
+ contentType?: string;
22
+ fileDir?: string;
23
+ }
24
+ export interface FileDownInfo {
25
+ tempFilePath: string;
26
+ filePath: string;
27
+ statusCode: number;
28
+ }
29
+ export interface FileWebReq {
30
+ tenant?: string;
31
+ body?: string;
32
+ fileName?: string;
33
+ contentType?: string;
34
+ fileDir?: string;
35
+ fileSize?: number;
36
+ requestId?: string;
37
+ filePart?: number;
38
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { EnumDict } from "../api/dicts";
2
- export declare class Dict {
3
- static readonly genderDict: EnumDict;
4
- }
1
+ import { EnumDict } from "../api/dicts";
2
+ export declare class Dict {
3
+ static readonly genderDict: EnumDict;
4
+ }
package/lib/api/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { Constant } from "../api/constant";
2
- import { EnumDict } from "../api/dicts";
3
- export class Dict {
4
- // 性别
5
- static genderDict = new EnumDict(Constant.MODULE_RBAC, Constant.ENUM_GENDER);
6
- }
1
+ import { Constant } from "../api/constant";
2
+ import { EnumDict } from "../api/dicts";
3
+ export class Dict {
4
+ // 性别
5
+ static genderDict = new EnumDict(Constant.MODULE_RBAC, Constant.ENUM_GENDER);
6
+ }
@@ -1,22 +1,22 @@
1
- export interface BaseOrganModel {
2
- organId?: string;
3
- organName?: string;
4
- organCode?: string;
5
- pinYin?: string;
6
- userId?: string;
7
- shortName?: string;
8
- organType?: string;
9
- parentId?: string;
10
- logoUrl?: string;
11
- industry?: string;
12
- address?: string;
13
- geoLongitude?: string;
14
- geoLatitude?: string;
15
- contactPerson?: string;
16
- contactPersonMobile?: string;
17
- contactPersonMobileIns?: string;
18
- perfectStatus?: boolean;
19
- status?: string;
20
- tenant: string;
21
- memberInviteStatus: boolean;
22
- }
1
+ export interface BaseOrganModel {
2
+ organId?: string;
3
+ organName?: string;
4
+ organCode?: string;
5
+ pinYin?: string;
6
+ userId?: string;
7
+ shortName?: string;
8
+ organType?: string;
9
+ parentId?: string;
10
+ logoUrl?: string;
11
+ industry?: string;
12
+ address?: string;
13
+ geoLongitude?: string;
14
+ geoLatitude?: string;
15
+ contactPerson?: string;
16
+ contactPersonMobile?: string;
17
+ contactPersonMobileIns?: string;
18
+ perfectStatus?: boolean;
19
+ status?: string;
20
+ tenant: string;
21
+ memberInviteStatus: boolean;
22
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,7 +1,7 @@
1
- import { DictRegionList, DictRegionReq } from "./types";
2
- import { ResponseData } from "../../api/types";
3
- declare class RegionApiImpl {
4
- findList(query?: DictRegionReq): Promise<ResponseData<DictRegionList>>;
5
- }
6
- declare const regionApi: RegionApiImpl;
7
- export { regionApi };
1
+ import { DictRegionList, DictRegionReq } from "./types";
2
+ import { ResponseData } from "../../api/types";
3
+ declare class RegionApiImpl {
4
+ findList(query?: DictRegionReq): Promise<ResponseData<DictRegionList>>;
5
+ }
6
+ declare const regionApi: RegionApiImpl;
7
+ export { regionApi };
@@ -1,19 +1,19 @@
1
- import { grpc } from "../../utils/grpc";
2
- import { config } from "../../utils/config";
3
- import mpx from "@mpxjs/core";
4
- class RegionApiImpl {
5
- // 查询列表信息地区信息
6
- findList(query) {
7
- if (query) {
8
- query.hasEnable = query.enable !== undefined;
9
- }
10
- grpc.clearEmpty(query);
11
- return mpx.xfetch.fetch({
12
- url: "/v1/region/dict_region/list/" + config.tenant,
13
- method: "GET",
14
- data: query,
15
- });
16
- }
17
- }
18
- const regionApi = new RegionApiImpl();
19
- export { regionApi };
1
+ import { grpc } from "../../utils/grpc";
2
+ import { config } from "../../utils/config";
3
+ import mpx from "@mpxjs/core";
4
+ class RegionApiImpl {
5
+ // 查询列表信息地区信息
6
+ findList(query) {
7
+ if (query) {
8
+ query.hasEnable = query.enable !== undefined;
9
+ }
10
+ grpc.clearEmpty(query);
11
+ return mpx.xfetch.fetch({
12
+ url: "/v1/region/dict_region/list/" + config.tenant,
13
+ method: "GET",
14
+ data: query,
15
+ });
16
+ }
17
+ }
18
+ const regionApi = new RegionApiImpl();
19
+ export { regionApi };