jmash-core-mp 0.1.9 → 0.1.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.
- package/lib/api/auth/index.d.ts +1 -1
- package/lib/api/cms/index.d.ts +13 -2
- package/lib/api/cms/index.js +122 -3
- package/lib/api/cms/types.d.ts +142 -7
- package/lib/api/dict/index.d.ts +1 -1
- package/lib/api/files/index.d.ts +1 -1
- package/lib/api/region/index.d.ts +1 -1
- package/lib/api/storage/index.d.ts +10 -0
- package/lib/api/storage/index.js +40 -0
- package/lib/api/storage/types.d.ts +28 -0
- package/lib/api/storage/types.js +1 -0
- package/lib/api/types.d.ts +27 -0
- package/lib/components/cms/jmash-cms-acticle-list.mpx.d.ts +1 -0
- package/lib/components/cms/jmash-cms-article.mpx.d.ts +1 -0
- package/lib/index.d.ts +9 -1
- package/lib/index.js +3 -0
- package/lib/store/user.d.ts +1 -1
- package/lib/utils/common.d.ts +35 -0
- package/lib/utils/common.js +163 -0
- package/lib/utils/config.d.ts +1 -1
- package/lib/utils/config.js +1 -1
- package/package.json +1 -1
- package/src/api/auth/index.ts +1 -1
- package/src/api/cms/index.ts +164 -4
- package/src/api/cms/types.ts +268 -13
- package/src/api/dict/index.ts +1 -1
- package/src/api/files/index.ts +1 -1
- package/src/api/region/index.ts +1 -1
- package/src/api/storage/index.ts +59 -0
- package/src/api/storage/types.ts +54 -0
- package/src/api/types.ts +51 -1
- package/src/components/auth-user/jmash-user.mpx +355 -355
- package/src/components/cms/jmash-cms-acticle-list.mpx +182 -0
- package/src/components/cms/jmash-cms-article.mpx +69 -0
- package/src/components/core/jmash-popup-login.ali.mpx +1 -1
- package/src/index.ts +55 -1
- package/src/packages/index.mpx +2 -1
- package/src/packages/pages/cms/cms-article.mpx +32 -0
- package/src/pages/home.mpx +9 -3
- package/src/store/user.ts +1 -1
- package/src/utils/common.ts +176 -0
- package/src/utils/config.ts +2 -2
- package/src/types/core.ts +0 -70
package/lib/api/auth/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResponseData } from "../../types
|
|
1
|
+
import { ResponseData } from "../../api/types";
|
|
2
2
|
import type { LoginReq, LoginRes, RolesPerms, WebLoginReq, TokenModel, PhoneRegisterReq, PhoneReplaceReq, UpdateUserReq, UserInfoReq, UserInfo } from "./types";
|
|
3
3
|
declare class AuthApi {
|
|
4
4
|
mpLogin(data: LoginReq): Promise<ResponseData<LoginRes>>;
|
package/lib/api/cms/index.d.ts
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import { CmsSiteList, CmsChannelReq, CmsChannelList, CmsContentInfoReq, CmsContentInfoModel } from "./types";
|
|
2
|
-
import { ResponseData } from "../../types
|
|
1
|
+
import { CmsSiteKey, CmsSiteList, CmsSiteModel, CmsChannelReq, CmsChannelList, CmsInfoReq, CmsInfoPage, CmsInfoKey, CmsInfoModel, CmsInfoContentReq, CmsInfoContentList, CmsContentInfoReq, CmsContentInfoModel, CmsInfoFileReq, CmsInfoFileList, FrontInteractKey, FrontInteractModel, FrontLikeKey, FrontLikeModel, FrontLikeCreateReq, FrontBrowseRecordCreateReq, FrontBrowseRecordModel, CmsChannelKey, CmsChannelModel } from "./types";
|
|
2
|
+
import { ResponseData } from "../../api/types";
|
|
3
3
|
declare class CmsApiImpl {
|
|
4
4
|
findCmsSiteList(tenant: string): Promise<ResponseData<CmsSiteList>>;
|
|
5
|
+
findCmsSite(data: CmsSiteKey): Promise<ResponseData<CmsSiteModel>>;
|
|
5
6
|
findCmsChannelList(data: CmsChannelReq): Promise<ResponseData<CmsChannelList>>;
|
|
7
|
+
findCmsChannelById(data: CmsChannelKey): Promise<ResponseData<CmsChannelModel>>;
|
|
6
8
|
findCmsContentInfo(data: CmsContentInfoReq): Promise<ResponseData<CmsContentInfoModel>>;
|
|
9
|
+
findCmsSingleInfo(data: CmsChannelKey): Promise<ResponseData<CmsInfoModel>>;
|
|
10
|
+
findCmsInfoPage(data: CmsInfoReq): Promise<ResponseData<CmsInfoPage>>;
|
|
11
|
+
findCmsInfoById(data: CmsInfoKey): Promise<ResponseData<CmsInfoModel>>;
|
|
12
|
+
findCmsInfoContent(data: CmsInfoContentReq): Promise<ResponseData<CmsInfoContentList>>;
|
|
13
|
+
cmsInfoFile(data: CmsInfoFileReq): Promise<ResponseData<CmsInfoFileList>>;
|
|
14
|
+
cmsInfoInteractId(data: FrontInteractKey): Promise<ResponseData<FrontInteractModel>>;
|
|
15
|
+
isLike(data: FrontLikeKey): Promise<ResponseData<string>>;
|
|
16
|
+
frontLike(data: FrontLikeCreateReq): Promise<ResponseData<FrontLikeModel>>;
|
|
17
|
+
createfrontBrowseRecord(data: FrontBrowseRecordCreateReq): Promise<ResponseData<FrontBrowseRecordModel>>;
|
|
7
18
|
}
|
|
8
19
|
declare const cmsApi: CmsApiImpl;
|
|
9
20
|
export { cmsApi };
|
package/lib/api/cms/index.js
CHANGED
|
@@ -10,6 +10,17 @@ class CmsApiImpl {
|
|
|
10
10
|
method: "GET",
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
+
// 查询网站站点
|
|
14
|
+
findCmsSite(data) {
|
|
15
|
+
const tenant = data.tenant ? data.tenant : data.organTenant;
|
|
16
|
+
return mpx.xfetch.fetch({
|
|
17
|
+
url: "/v1/front/cms/cms_site/id/" + tenant + "/" + data.siteId,
|
|
18
|
+
method: "GET",
|
|
19
|
+
header: {
|
|
20
|
+
"Grpc-Metadata-Tenant": tenant,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}
|
|
13
24
|
// 查询列表信息网站栏目 (没有传递别名就是将所有的栏目信息查询出来,给了栏目别名查询传递别名的栏目信息)
|
|
14
25
|
findCmsChannelList(data) {
|
|
15
26
|
grpc.clearEmpty(data);
|
|
@@ -23,20 +34,128 @@ class CmsApiImpl {
|
|
|
23
34
|
data,
|
|
24
35
|
});
|
|
25
36
|
}
|
|
37
|
+
// 查询网站栏目
|
|
38
|
+
findCmsChannelById(data) {
|
|
39
|
+
return mpx.xfetch.fetch({
|
|
40
|
+
url: `/v1/cms/cms_channel/id/${data.tenant}/${data.channelId}`,
|
|
41
|
+
method: "GET",
|
|
42
|
+
header: {
|
|
43
|
+
"Grpc-Metadata-Tenant": data.tenant,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
26
47
|
// 根据栏目别名查询翻页信息信息主表-单页栏目内容
|
|
27
48
|
findCmsContentInfo(data) {
|
|
28
49
|
data.tenant = data.tenant || config.tenant;
|
|
29
50
|
grpc.clearEmpty(data);
|
|
30
51
|
return mpx.xfetch.fetch({
|
|
31
|
-
url:
|
|
52
|
+
url: `/v1/front/cms/cms_info/alias/${data.tenant}/${data.siteId}/${data.channelAlias}`,
|
|
53
|
+
method: "GET",
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
// 根据栏目id查询单页模型的信息主表-单页栏目内容
|
|
57
|
+
findCmsSingleInfo(data) {
|
|
58
|
+
grpc.clearEmpty(data);
|
|
59
|
+
return mpx.xfetch.fetch({
|
|
60
|
+
url: "/v1/front/cms/cms_info/single_page_info/" +
|
|
32
61
|
data.tenant +
|
|
33
62
|
"/" +
|
|
34
|
-
data.
|
|
63
|
+
data.channelId,
|
|
64
|
+
method: "GET",
|
|
65
|
+
header: {
|
|
66
|
+
"Grpc-Metadata-Tenant": data.tenant,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
// 查询翻页信息信息列表
|
|
71
|
+
findCmsInfoPage(data) {
|
|
72
|
+
if (data) {
|
|
73
|
+
data.hasStatus = data.status !== undefined;
|
|
74
|
+
data.hasIsImg = data.isImg !== undefined;
|
|
75
|
+
}
|
|
76
|
+
grpc.clearEmpty(data);
|
|
77
|
+
return mpx.xfetch.fetch({
|
|
78
|
+
url: "/v1/front/cms/cms_info/page/" + data.tenant,
|
|
79
|
+
method: "GET",
|
|
80
|
+
data,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// 查询翻页信息信息列表
|
|
84
|
+
findCmsInfoById(data) {
|
|
85
|
+
grpc.clearEmpty(data);
|
|
86
|
+
return mpx.xfetch.fetch({
|
|
87
|
+
url: "/v1/front/cms/cms_info/id/" + data.tenant + "/" + data.infoId,
|
|
88
|
+
method: "GET",
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// 查询列表信息信息内容
|
|
92
|
+
findCmsInfoContent(data) {
|
|
93
|
+
grpc.clearEmpty(data);
|
|
94
|
+
return mpx.xfetch.fetch({
|
|
95
|
+
url: "/v1/front/cms/cms_info_content/list/" + data.tenant,
|
|
96
|
+
method: "GET",
|
|
97
|
+
data,
|
|
98
|
+
header: {
|
|
99
|
+
"Grpc-Metadata-Tenant": data.tenant,
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
// 查询列表信息信息附件表
|
|
104
|
+
cmsInfoFile(data) {
|
|
105
|
+
return mpx.xfetch.fetch({
|
|
106
|
+
url: "/v1/front/cms/cms_info_file/list/" + data.tenant,
|
|
107
|
+
method: "GET",
|
|
108
|
+
data,
|
|
109
|
+
header: {
|
|
110
|
+
"Grpc-Metadata-Tenant": data.tenant,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// 查询信息互动表
|
|
115
|
+
cmsInfoInteractId(data) {
|
|
116
|
+
return mpx.xfetch.fetch({
|
|
117
|
+
url: "/v1/front/front/front_info_interact/id/" +
|
|
118
|
+
data.tenant +
|
|
35
119
|
"/" +
|
|
36
|
-
data.
|
|
120
|
+
data.interactId,
|
|
37
121
|
method: "GET",
|
|
38
122
|
});
|
|
39
123
|
}
|
|
124
|
+
// 查看是否点赞
|
|
125
|
+
isLike(data) {
|
|
126
|
+
return mpx.xfetch.fetch({
|
|
127
|
+
url: "/v1/front/front/front_like/is_like/" +
|
|
128
|
+
data.tenant +
|
|
129
|
+
"/" +
|
|
130
|
+
data.relationId,
|
|
131
|
+
method: "GET",
|
|
132
|
+
header: {
|
|
133
|
+
"Grpc-Metadata-Tenant": data.tenant,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
// 点赞/取消点赞
|
|
138
|
+
frontLike(data) {
|
|
139
|
+
return mpx.xfetch.fetch({
|
|
140
|
+
url: "/v1/front/front/front_like",
|
|
141
|
+
method: "POST",
|
|
142
|
+
data,
|
|
143
|
+
header: {
|
|
144
|
+
"Grpc-Metadata-Tenant": data.tenant,
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// 浏览
|
|
149
|
+
createfrontBrowseRecord(data) {
|
|
150
|
+
return mpx.xfetch.fetch({
|
|
151
|
+
url: "/v1/front/front/front_browse_record",
|
|
152
|
+
method: "POST",
|
|
153
|
+
data,
|
|
154
|
+
header: {
|
|
155
|
+
"Grpc-Metadata-Tenant": data.tenant,
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
}
|
|
40
159
|
}
|
|
41
160
|
const cmsApi = new CmsApiImpl();
|
|
42
161
|
export { cmsApi };
|
package/lib/api/cms/types.d.ts
CHANGED
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
export interface CmsSiteList {
|
|
2
2
|
results: Array<CmsSiteModel>;
|
|
3
3
|
}
|
|
4
|
+
export interface CmsSiteKey {
|
|
5
|
+
tenant?: string;
|
|
6
|
+
organTenant?: string;
|
|
7
|
+
siteId: string;
|
|
8
|
+
}
|
|
4
9
|
export interface CmsSiteModel {
|
|
5
10
|
siteId?: string;
|
|
6
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;
|
|
7
29
|
}
|
|
8
30
|
export interface CmsChannelReq {
|
|
9
31
|
tenant?: string;
|
|
@@ -15,6 +37,9 @@ export interface CmsChannelReq {
|
|
|
15
37
|
hasIsOpen?: boolean;
|
|
16
38
|
channelId?: string;
|
|
17
39
|
}
|
|
40
|
+
export interface CmsChannelList {
|
|
41
|
+
results: Array<CmsChannelModel>;
|
|
42
|
+
}
|
|
18
43
|
export interface CmsChannelModel {
|
|
19
44
|
channelId: string;
|
|
20
45
|
siteId?: string;
|
|
@@ -31,17 +56,39 @@ export interface CmsChannelModel {
|
|
|
31
56
|
url: string;
|
|
32
57
|
type?: string;
|
|
33
58
|
}
|
|
34
|
-
export interface
|
|
35
|
-
|
|
59
|
+
export interface CmsChannelKey {
|
|
60
|
+
tenant?: string;
|
|
61
|
+
channelId: string;
|
|
36
62
|
}
|
|
37
|
-
export interface
|
|
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 {
|
|
38
76
|
tenant?: string;
|
|
77
|
+
curPage?: number;
|
|
78
|
+
pageSize?: number;
|
|
39
79
|
siteId?: string;
|
|
40
|
-
|
|
80
|
+
channelId?: string;
|
|
81
|
+
channelAlias?: string;
|
|
82
|
+
likeInfoTitle?: string;
|
|
83
|
+
deleted?: boolean;
|
|
84
|
+
hasStatus?: boolean;
|
|
85
|
+
status?: string;
|
|
86
|
+
hasIsImg?: boolean;
|
|
87
|
+
isImg?: boolean;
|
|
41
88
|
}
|
|
42
|
-
export interface
|
|
43
|
-
|
|
44
|
-
|
|
89
|
+
export interface CmsInfoKey {
|
|
90
|
+
tenant?: string;
|
|
91
|
+
infoId?: string;
|
|
45
92
|
}
|
|
46
93
|
export interface CmsInfoModel {
|
|
47
94
|
infoId?: string;
|
|
@@ -58,6 +105,42 @@ export interface CmsInfoModel {
|
|
|
58
105
|
sourceName?: string;
|
|
59
106
|
siteId: string;
|
|
60
107
|
}
|
|
108
|
+
export interface CmsInfoContentReq {
|
|
109
|
+
tenant?: string;
|
|
110
|
+
infoId?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface CmsInfoContentModel {
|
|
113
|
+
imagePath?: Array<string>;
|
|
114
|
+
videoPath?: Array<string>;
|
|
115
|
+
contentId?: string;
|
|
116
|
+
infoId?: string;
|
|
117
|
+
infoContent?: string;
|
|
118
|
+
infoType?: string;
|
|
119
|
+
orderBy?: number;
|
|
120
|
+
}
|
|
121
|
+
export interface CmsInfoContentList {
|
|
122
|
+
results: Array<CmsInfoContentModel>;
|
|
123
|
+
}
|
|
124
|
+
export interface CmsContentInfoReq {
|
|
125
|
+
tenant?: string;
|
|
126
|
+
siteId?: string;
|
|
127
|
+
channelAlias: string;
|
|
128
|
+
}
|
|
129
|
+
export interface CmsContentInfoModel {
|
|
130
|
+
cmsInfo?: CmsInfoModel;
|
|
131
|
+
infoContentResults?: Array<CmsInfoContentModel>;
|
|
132
|
+
}
|
|
133
|
+
export interface CmsInfoKey {
|
|
134
|
+
tenant?: string;
|
|
135
|
+
infoId?: string;
|
|
136
|
+
}
|
|
137
|
+
export interface CmsInfoContentReq {
|
|
138
|
+
tenant?: string;
|
|
139
|
+
infoId?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface CmsInfoContentList {
|
|
142
|
+
results: Array<CmsInfoContentModel>;
|
|
143
|
+
}
|
|
61
144
|
export interface CmsInfoContentModel {
|
|
62
145
|
imagePath?: Array<string>;
|
|
63
146
|
videoPath?: Array<string>;
|
|
@@ -70,3 +153,55 @@ export interface CmsInfoContentModel {
|
|
|
70
153
|
path: string;
|
|
71
154
|
}[];
|
|
72
155
|
}
|
|
156
|
+
export interface CmsInfoFileReq {
|
|
157
|
+
tenant?: string;
|
|
158
|
+
infoId?: string;
|
|
159
|
+
}
|
|
160
|
+
export interface CmsInfoFileModel {
|
|
161
|
+
fileId?: string;
|
|
162
|
+
infoId?: string;
|
|
163
|
+
fileName?: string;
|
|
164
|
+
fileType?: string;
|
|
165
|
+
filePath?: string;
|
|
166
|
+
fileSize?: string;
|
|
167
|
+
fileExt?: string;
|
|
168
|
+
fileWidth?: number;
|
|
169
|
+
fileHeight?: number;
|
|
170
|
+
videoTime?: number;
|
|
171
|
+
intro?: string;
|
|
172
|
+
}
|
|
173
|
+
export interface CmsInfoFileList {
|
|
174
|
+
results: Array<CmsInfoFileModel>;
|
|
175
|
+
}
|
|
176
|
+
export interface FrontInteractKey {
|
|
177
|
+
tenant?: string;
|
|
178
|
+
interactId?: string;
|
|
179
|
+
}
|
|
180
|
+
export interface FrontInteractModel {
|
|
181
|
+
interactId?: string;
|
|
182
|
+
likeCount: number;
|
|
183
|
+
browseCount: number;
|
|
184
|
+
}
|
|
185
|
+
export interface FrontLikeKey {
|
|
186
|
+
tenant: string;
|
|
187
|
+
relationId: string;
|
|
188
|
+
}
|
|
189
|
+
export interface FrontLikeCreateReq {
|
|
190
|
+
tenant: string;
|
|
191
|
+
requestId?: string;
|
|
192
|
+
likeType?: string;
|
|
193
|
+
relationId?: string;
|
|
194
|
+
action?: boolean;
|
|
195
|
+
}
|
|
196
|
+
export interface FrontLikeModel {
|
|
197
|
+
likeId?: string;
|
|
198
|
+
}
|
|
199
|
+
export interface FrontBrowseRecordCreateReq {
|
|
200
|
+
tenant?: string;
|
|
201
|
+
requestId?: string;
|
|
202
|
+
type?: string;
|
|
203
|
+
relationId?: string;
|
|
204
|
+
}
|
|
205
|
+
export interface FrontBrowseRecordModel {
|
|
206
|
+
browseId?: string;
|
|
207
|
+
}
|
package/lib/api/dict/index.d.ts
CHANGED
package/lib/api/files/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ResponseData } from "../../api/types";
|
|
2
|
+
import { StorageOrganInfoReq, StorageOrganInfoList, StorageOrganBrowserUpdateReq, StorageOrganBrowserModel } from "./types";
|
|
3
|
+
declare class StorageApiImpl {
|
|
4
|
+
findMyOrganList(data: StorageOrganInfoReq): Promise<ResponseData<StorageOrganInfoList>>;
|
|
5
|
+
findStorageBrowserOrganList(data: StorageOrganInfoReq): Promise<ResponseData<StorageOrganInfoList>>;
|
|
6
|
+
findStorageOrganInfoList(data: StorageOrganInfoReq): Promise<ResponseData<StorageOrganInfoList>>;
|
|
7
|
+
updateStorageOrganBrowser(data: StorageOrganBrowserUpdateReq): Promise<ResponseData<StorageOrganBrowserModel>>;
|
|
8
|
+
}
|
|
9
|
+
declare const storageApi: StorageApiImpl;
|
|
10
|
+
export { storageApi };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import mpx from "@mpxjs/core";
|
|
2
|
+
import { grpc } from "../../utils/grpc";
|
|
3
|
+
import { config } from "../../utils/config";
|
|
4
|
+
class StorageApiImpl {
|
|
5
|
+
// 查询我的组织列表
|
|
6
|
+
findMyOrganList(data) {
|
|
7
|
+
grpc.clearEmpty(data);
|
|
8
|
+
return mpx.xfetch.fetch({
|
|
9
|
+
url: `/v1/storage/storage_organ/my_list/${config.tenant}?&serviceType[]=${data.serviceType}`,
|
|
10
|
+
method: "GET",
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
// 查询列表信息店铺用户浏览信息
|
|
14
|
+
findStorageBrowserOrganList(data) {
|
|
15
|
+
return mpx.xfetch.fetch({
|
|
16
|
+
url: `/v1/front/storage/storage_organ_browser/my_list/${config.tenant}?&serviceType[]=${data.serviceType}`,
|
|
17
|
+
method: "GET",
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
// 查询列表信息店铺用户浏览信息
|
|
21
|
+
findStorageOrganInfoList(data) {
|
|
22
|
+
return mpx.xfetch.fetch({
|
|
23
|
+
url: `/v1/storage/storage_organ_info/list/${config.tenant}?&serviceType[]=${data.serviceType}`,
|
|
24
|
+
method: "GET",
|
|
25
|
+
data: data,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
// 修改组织浏览信息
|
|
29
|
+
updateStorageOrganBrowser(data) {
|
|
30
|
+
data.tenant = config.tenant;
|
|
31
|
+
grpc.clearEmpty(data);
|
|
32
|
+
return mpx.xfetch.fetch({
|
|
33
|
+
url: "/v1/front/storage/storage_organ_browser/browse",
|
|
34
|
+
method: "PATCH",
|
|
35
|
+
data: data,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const storageApi = new StorageApiImpl();
|
|
40
|
+
export { storageApi };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface StorageOrganInfoReq {
|
|
2
|
+
serviceType: string;
|
|
3
|
+
likeOrganName?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface StorageOrganInfoList {
|
|
6
|
+
results: StorageOrganInfoModel[];
|
|
7
|
+
}
|
|
8
|
+
export interface StorageOrganInfoModel {
|
|
9
|
+
organName?: string;
|
|
10
|
+
logoUrl?: string;
|
|
11
|
+
createTime?: string;
|
|
12
|
+
remark?: string;
|
|
13
|
+
organTenant?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ShopBrowserUserList {
|
|
16
|
+
results: ShopBrowserUserModel[];
|
|
17
|
+
}
|
|
18
|
+
export interface ShopBrowserUserModel {
|
|
19
|
+
shopName?: string;
|
|
20
|
+
picUrl?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface StorageOrganBrowserUpdateReq {
|
|
23
|
+
tenant?: string;
|
|
24
|
+
requestId: string;
|
|
25
|
+
storageId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface StorageOrganBrowserModel {
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/api/types.d.ts
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/// <reference types="miniprogram-api-typings" />
|
|
2
|
+
/// <reference types="miniprogram-api-typings" />
|
|
3
|
+
export type ResponseData<T extends string | WechatMiniprogram.IAnyObject | ArrayBuffer = string | WechatMiniprogram.IAnyObject | ArrayBuffer> = WechatMiniprogram.RequestSuccessCallbackResult<T>;
|
|
4
|
+
export interface AppConfig {
|
|
5
|
+
tenant: string;
|
|
6
|
+
name: string;
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
resourceUrl: string;
|
|
9
|
+
appId: string;
|
|
10
|
+
componentAppid: string;
|
|
11
|
+
wechatComponentAppId: string;
|
|
12
|
+
wechatAppId: string;
|
|
13
|
+
wechatBiz: string;
|
|
14
|
+
siteId: string;
|
|
15
|
+
dev: boolean;
|
|
16
|
+
testNewUser: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ValidateData {
|
|
19
|
+
validate: boolean;
|
|
20
|
+
message: string;
|
|
21
|
+
}
|
|
1
22
|
export interface EventBase {
|
|
2
23
|
changedTouches?: any;
|
|
3
24
|
currentTarget: EventTarget;
|
|
@@ -12,3 +33,9 @@ export interface EventTarget {
|
|
|
12
33
|
offsetLeft?: number;
|
|
13
34
|
offsetTop?: number;
|
|
14
35
|
}
|
|
36
|
+
export interface CanvasResponse {
|
|
37
|
+
width?: number;
|
|
38
|
+
height?: number;
|
|
39
|
+
nodeCanvasType?: string;
|
|
40
|
+
node: any;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
export type { AppConfig, ResponseData, ValidateData, EventBase, EventTarget, CanvasResponse } from "./types
|
|
1
|
+
export type { AppConfig, ResponseData, ValidateData, EventBase, EventTarget, CanvasResponse, } from "./api/types";
|
|
2
|
+
export type { LoginReq, LoginRes, RolesPerms, WebLoginReq, TokenModel, PhoneRegisterReq, PhoneReplaceReq, UpdateUserReq, UserInfoReq, UserInfo, } from "./api/auth/types";
|
|
3
|
+
export type { CmsSiteList, CmsChannelReq, CmsChannelList, CmsContentInfoReq, CmsContentInfoModel, CmsInfoModel, CmsInfoContentModel, } from "./api/cms/types";
|
|
2
4
|
export type { Entry, DictEntryModel } from "./api/dict/types";
|
|
3
5
|
export { EntryDict, EnumDict } from "./api/dicts";
|
|
6
|
+
export type { FileInfo, FileBase64Req, FileDownInfo, FileWebReq, } from "./api/files/types";
|
|
7
|
+
export type { DictRegionList, DictRegionReq, DictRegionModel, } from "./api/region/types";
|
|
8
|
+
export type { StorageOrganInfoReq, StorageOrganInfoList, StorageOrganBrowserUpdateReq, StorageOrganBrowserModel, } from "./api/storage/types";
|
|
4
9
|
export { mpxFetch } from "./utils/request";
|
|
5
10
|
export { config } from "./utils/config";
|
|
6
11
|
export { grpc } from "./utils/grpc";
|
|
@@ -10,4 +15,7 @@ export { authApi } from "./api/auth";
|
|
|
10
15
|
export { cmsApi } from "./api/cms";
|
|
11
16
|
export { dictApi } from "./api/dict";
|
|
12
17
|
export { fileApi } from "./api/files";
|
|
18
|
+
export { regionApi } from "./api/region";
|
|
19
|
+
export { storageApi } from "./api/storage";
|
|
13
20
|
export { net } from "./utils/net";
|
|
21
|
+
export { getHeight, formatDateTime, validateRules, validateRequired, } from "./utils/common";
|
package/lib/index.js
CHANGED
|
@@ -8,4 +8,7 @@ export { authApi } from "./api/auth";
|
|
|
8
8
|
export { cmsApi } from "./api/cms";
|
|
9
9
|
export { dictApi } from "./api/dict";
|
|
10
10
|
export { fileApi } from "./api/files";
|
|
11
|
+
export { regionApi } from "./api/region";
|
|
12
|
+
export { storageApi } from "./api/storage";
|
|
11
13
|
export { net } from "./utils/net";
|
|
14
|
+
export { getHeight, formatDateTime, validateRules, validateRequired, } from "./utils/common";
|
package/lib/store/user.d.ts
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const getHeight: () => {
|
|
2
|
+
navigationPaddingHeight: number;
|
|
3
|
+
topHeight: number;
|
|
4
|
+
bottomHeight: number;
|
|
5
|
+
MenuButtonRight: number;
|
|
6
|
+
MenuButtonLeft: number;
|
|
7
|
+
MenuButtonTop: number;
|
|
8
|
+
MenuButtonBottom: number;
|
|
9
|
+
MenuButtonWidth: number;
|
|
10
|
+
MenuButtonHeight: number;
|
|
11
|
+
MenuButtonBounding: number;
|
|
12
|
+
screenWidth: number;
|
|
13
|
+
screenHeight: number;
|
|
14
|
+
computeHeightFn: (height: number, stackingHeight: number) => number;
|
|
15
|
+
addition: (height: number, addHeight: number) => number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* 格式化日期时间字符串
|
|
19
|
+
* @param dateTimeString 日期时间字符串
|
|
20
|
+
* @returns 格式化后的日期时间字符串
|
|
21
|
+
*/
|
|
22
|
+
export declare const formatDateTime: (dateTimeString: string, format?: any) => string;
|
|
23
|
+
/**
|
|
24
|
+
* 正则校验规则
|
|
25
|
+
* @param {string} value 需要校验的值
|
|
26
|
+
* @param {string} message 错误提示信息
|
|
27
|
+
* @param {string} rules 正则校验规则
|
|
28
|
+
*/
|
|
29
|
+
export declare const validateRules: (value: string, message: string, rules: any) => boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 校验必填项
|
|
32
|
+
* @param {string} value 需要校验的值
|
|
33
|
+
* @param {string} message 错误提示信息
|
|
34
|
+
*/
|
|
35
|
+
export declare const validateRequired: (value: string | number, message: string) => boolean;
|