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.
- package/.editorconfig +9 -9
- package/README.md +60 -60
- package/babel.config.json +34 -34
- package/eslint.config.mjs +7 -7
- package/lib/api/auth/index.d.ts +21 -21
- package/lib/api/auth/index.js +199 -199
- package/lib/api/auth/types.d.ts +86 -86
- package/lib/api/auth/types.js +9 -9
- package/lib/api/cms/index.d.ts +20 -20
- package/lib/api/cms/index.js +161 -161
- package/lib/api/cms/types.d.ts +200 -200
- package/lib/api/cms/types.js +1 -1
- package/lib/api/constant.d.ts +5 -5
- package/lib/api/constant.js +6 -6
- package/lib/api/dict/index.d.ts +18 -18
- package/lib/api/dict/index.js +34 -34
- package/lib/api/dict/types.d.ts +28 -28
- package/lib/api/dict/types.js +1 -1
- package/lib/api/dicts.d.ts +18 -18
- package/lib/api/dicts.js +67 -67
- package/lib/api/files/index.d.ts +25 -25
- package/lib/api/files/index.js +135 -135
- package/lib/api/files/types.d.ts +38 -38
- package/lib/api/files/types.js +1 -1
- package/lib/api/index.d.ts +4 -4
- package/lib/api/index.js +6 -6
- package/lib/api/myorgan/types.d.ts +22 -22
- package/lib/api/myorgan/types.js +1 -1
- package/lib/api/region/index.d.ts +7 -7
- package/lib/api/region/index.js +19 -19
- package/lib/api/region/types.d.ts +19 -19
- package/lib/api/region/types.js +1 -1
- package/lib/api/storage/index.d.ts +10 -10
- package/lib/api/storage/index.js +43 -43
- package/lib/api/storage/types.d.ts +28 -28
- package/lib/api/storage/types.js +1 -1
- package/lib/api/types.d.ts +42 -42
- package/lib/api/types.js +1 -1
- package/lib/app.mpx.d.ts +1 -1
- package/lib/components/auth-user/jmash-update-user.mpx.d.ts +1 -1
- package/lib/components/auth-user/jmash-user.mpx.d.ts +1 -1
- package/lib/components/cms/jmash-cms-acticle-list.mpx.d.ts +1 -1
- package/lib/components/cms/jmash-cms-article-item.mpx.d.ts +1 -1
- package/lib/components/cms/jmash-cms-article-view.mpx.d.ts +1 -0
- package/lib/components/cms/jmash-cms-article.mpx.d.ts +1 -1
- package/lib/components/cms/jmash-cms-like.mpx.d.ts +1 -1
- package/lib/components/common/jmash-upload-picture.mpx.d.ts +1 -0
- package/lib/components/core/jmash-login.mpx.d.ts +1 -0
- package/lib/index.d.ts +21 -21
- package/lib/index.js +14 -14
- package/lib/packages/pages/cms/cms-article-list.mpx.d.ts +1 -1
- package/lib/pages/index.mpx.d.ts +1 -0
- package/lib/store/user.d.ts +31 -31
- package/lib/store/user.js +227 -227
- package/lib/utils/common.d.ts +35 -35
- package/lib/utils/common.js +166 -166
- package/lib/utils/config.d.ts +5 -5
- package/lib/utils/config.js +29 -29
- package/lib/utils/db.d.ts +21 -21
- package/lib/utils/db.js +84 -84
- package/lib/utils/grpc.d.ts +5 -5
- package/lib/utils/grpc.js +20 -20
- package/lib/utils/net.d.ts +7 -7
- package/lib/utils/net.js +15 -15
- package/lib/utils/request.d.ts +2 -2
- package/lib/utils/request.js +123 -123
- package/mpx.config.js +27 -27
- package/package.json +1 -1
- package/postcss.config.js +11 -11
- package/project.config.json +24 -24
- package/project.private.config.json +13 -13
- package/public/index.html +15 -15
- package/src/api/auth/index.ts +227 -227
- package/src/api/auth/types.ts +166 -166
- package/src/api/cms/index.ts +218 -218
- package/src/api/cms/types.ts +379 -379
- package/src/api/constant.ts +6 -6
- package/src/api/dict/index.ts +44 -44
- package/src/api/dict/types.ts +49 -49
- package/src/api/dicts.ts +72 -72
- package/src/api/files/index.ts +163 -163
- package/src/api/files/types.ts +67 -67
- package/src/api/index.ts +11 -11
- package/src/api/myorgan/types.ts +42 -42
- package/src/api/region/index.ts +23 -23
- package/src/api/region/types.ts +36 -36
- package/src/api/storage/index.ts +62 -62
- package/src/api/storage/types.ts +54 -54
- package/src/api/types.ts +72 -72
- package/src/app.mpx +71 -71
- package/src/components/auth-user/jmash-logout.mpx +91 -91
- package/src/components/auth-user/jmash-update-user.mpx +386 -386
- package/src/components/auth-user/jmash-update-user.web.mpx +366 -366
- package/src/components/auth-user/jmash-user.mpx +359 -359
- package/src/components/cms/jmash-cms-acticle-list.mpx +182 -182
- package/src/components/cms/jmash-cms-article-item.mpx +241 -241
- package/src/components/cms/jmash-cms-article-view.mpx +131 -131
- package/src/components/cms/jmash-cms-article.mpx +68 -68
- package/src/components/cms/jmash-cms-like.mpx +151 -151
- package/src/components/common/jmash-avatar-edit.mpx +153 -153
- package/src/components/common/jmash-cascader-region.mpx +112 -112
- package/src/components/common/jmash-menu.mpx +129 -129
- package/src/components/common/jmash-none-data.mpx +82 -82
- package/src/components/common/jmash-pic-swiper.mpx +71 -71
- package/src/components/common/jmash-popup.mpx +137 -137
- package/src/components/common/jmash-search.mpx +126 -126
- package/src/components/common/jmash-single-btn.mpx +53 -53
- package/src/components/common/jmash-stepper.mpx +214 -214
- package/src/components/common/jmash-tab-bar.mpx +50 -50
- package/src/components/common/jmash-textarea.mpx +88 -88
- package/src/components/common/jmash-top-navigation.mpx +203 -203
- package/src/components/common/jmash-upload-picture.mpx +129 -126
- package/src/components/core/jmash-cms-protocol.mpx +66 -66
- package/src/components/core/jmash-login.ali.mpx +284 -284
- package/src/components/core/jmash-login.mpx +348 -348
- package/src/components/core/jmash-login.web.mpx +421 -421
- package/src/components/core/jmash-popup-login.ali.mpx +311 -311
- package/src/components/core/jmash-popup-login.mpx +415 -415
- package/src/components/core/jmash-popup-login.web.mpx +389 -389
- package/src/custom-tab-bar/index.mpx +10 -10
- package/src/global.d.ts +11 -11
- package/src/index.ts +71 -71
- package/src/packages/index.mpx +10 -10
- package/src/packages/pages/auth/cms-protocol.mpx +31 -31
- package/src/packages/pages/auth/login.mpx +59 -59
- package/src/packages/pages/auth/update-user.mpx +17 -17
- package/src/packages/pages/cms/cms-article-list.mpx +164 -164
- package/src/packages/pages/cms/cms-article.mpx +32 -32
- package/src/pages/basic-component.mpx +30 -30
- package/src/pages/half-home.mpx +58 -58
- package/src/pages/home.mpx +52 -52
- package/src/pages/home2.mpx +47 -47
- package/src/pages/index.mpx +13 -3
- package/src/pages/tabbar/home.mpx +77 -77
- package/src/pages/tabbar/my.mpx +80 -80
- package/src/store/user.ts +270 -270
- package/src/styles/index.scss +20 -20
- package/src/styles/vars.scss +27 -27
- package/src/utils/common.ts +179 -179
- package/src/utils/config.ts +35 -35
- package/src/utils/db.ts +100 -100
- package/src/utils/grpc.ts +21 -21
- package/src/utils/net.ts +18 -18
- package/src/utils/request.ts +134 -134
- package/static/ali/mini.project.json +4 -4
- package/static/dd/project.config.json +15 -15
- package/static/swan/project.swan.json +14 -14
- package/static/tt/project.config.json +11 -11
- package/static/wx/project.config.json +40 -40
- package/uno.config.js +9 -9
package/lib/api/auth/types.d.ts
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
export interface TokenModel {
|
|
2
|
-
accessToken: string;
|
|
3
|
-
expiresIn: number;
|
|
4
|
-
refreshToken: string;
|
|
5
|
-
tokenType: string;
|
|
6
|
-
}
|
|
7
|
-
export declare enum OpensType {
|
|
8
|
-
wechat = 0,
|
|
9
|
-
ali_pay = 1,
|
|
10
|
-
union_pay = 2
|
|
11
|
-
}
|
|
12
|
-
export interface LoginReq {
|
|
13
|
-
appId: string;
|
|
14
|
-
loginCode: string;
|
|
15
|
-
componentAppid?: string;
|
|
16
|
-
opensType?: OpensType;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* 登录请求参数
|
|
20
|
-
*/
|
|
21
|
-
export interface WebLoginReq {
|
|
22
|
-
tenant?: string;
|
|
23
|
-
directoryId?: string;
|
|
24
|
-
scope?: string;
|
|
25
|
-
userName: string;
|
|
26
|
-
encodePwd: string;
|
|
27
|
-
captchaId?: string;
|
|
28
|
-
captchaCode?: string;
|
|
29
|
-
clientId?: string;
|
|
30
|
-
}
|
|
31
|
-
export interface LoginRes {
|
|
32
|
-
cacheKey?: string;
|
|
33
|
-
token: TokenModel;
|
|
34
|
-
status: boolean;
|
|
35
|
-
message: string;
|
|
36
|
-
}
|
|
37
|
-
export interface PhoneRegisterReq {
|
|
38
|
-
tenant?: string;
|
|
39
|
-
appId: string;
|
|
40
|
-
loginCode?: string;
|
|
41
|
-
phoneCode: string;
|
|
42
|
-
nickName?: string;
|
|
43
|
-
avatar?: string;
|
|
44
|
-
componentAppid?: string;
|
|
45
|
-
opensType?: OpensType;
|
|
46
|
-
}
|
|
47
|
-
export interface PhoneReplaceReq {
|
|
48
|
-
tenant?: string;
|
|
49
|
-
appId: string;
|
|
50
|
-
phoneCode: string;
|
|
51
|
-
componentAppid?: string;
|
|
52
|
-
opensType?: OpensType;
|
|
53
|
-
}
|
|
54
|
-
export interface RefreshTokenReq {
|
|
55
|
-
tenant: string;
|
|
56
|
-
refreshToken: string;
|
|
57
|
-
clientId: string;
|
|
58
|
-
}
|
|
59
|
-
export interface UserInfo {
|
|
60
|
-
userId: string;
|
|
61
|
-
loginName: string;
|
|
62
|
-
nickName: string;
|
|
63
|
-
realName: string;
|
|
64
|
-
avatar: string;
|
|
65
|
-
mobilePhone: string;
|
|
66
|
-
mobilePhoneIns: string;
|
|
67
|
-
storage: string;
|
|
68
|
-
unifiedId: string;
|
|
69
|
-
}
|
|
70
|
-
export interface RolesPerms {
|
|
71
|
-
roleCodes: string[];
|
|
72
|
-
permCodes: string[];
|
|
73
|
-
}
|
|
74
|
-
export interface UpdateUserReq {
|
|
75
|
-
tenant?: string;
|
|
76
|
-
requestId?: string;
|
|
77
|
-
updateMask?: string;
|
|
78
|
-
nickName?: string;
|
|
79
|
-
avatar?: string;
|
|
80
|
-
realName?: string;
|
|
81
|
-
gender?: string;
|
|
82
|
-
birthDate?: string;
|
|
83
|
-
}
|
|
84
|
-
export interface UserInfoReq {
|
|
85
|
-
tenant?: string;
|
|
86
|
-
}
|
|
1
|
+
export interface TokenModel {
|
|
2
|
+
accessToken: string;
|
|
3
|
+
expiresIn: number;
|
|
4
|
+
refreshToken: string;
|
|
5
|
+
tokenType: string;
|
|
6
|
+
}
|
|
7
|
+
export declare enum OpensType {
|
|
8
|
+
wechat = 0,
|
|
9
|
+
ali_pay = 1,
|
|
10
|
+
union_pay = 2
|
|
11
|
+
}
|
|
12
|
+
export interface LoginReq {
|
|
13
|
+
appId: string;
|
|
14
|
+
loginCode: string;
|
|
15
|
+
componentAppid?: string;
|
|
16
|
+
opensType?: OpensType;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 登录请求参数
|
|
20
|
+
*/
|
|
21
|
+
export interface WebLoginReq {
|
|
22
|
+
tenant?: string;
|
|
23
|
+
directoryId?: string;
|
|
24
|
+
scope?: string;
|
|
25
|
+
userName: string;
|
|
26
|
+
encodePwd: string;
|
|
27
|
+
captchaId?: string;
|
|
28
|
+
captchaCode?: string;
|
|
29
|
+
clientId?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface LoginRes {
|
|
32
|
+
cacheKey?: string;
|
|
33
|
+
token: TokenModel;
|
|
34
|
+
status: boolean;
|
|
35
|
+
message: string;
|
|
36
|
+
}
|
|
37
|
+
export interface PhoneRegisterReq {
|
|
38
|
+
tenant?: string;
|
|
39
|
+
appId: string;
|
|
40
|
+
loginCode?: string;
|
|
41
|
+
phoneCode: string;
|
|
42
|
+
nickName?: string;
|
|
43
|
+
avatar?: string;
|
|
44
|
+
componentAppid?: string;
|
|
45
|
+
opensType?: OpensType;
|
|
46
|
+
}
|
|
47
|
+
export interface PhoneReplaceReq {
|
|
48
|
+
tenant?: string;
|
|
49
|
+
appId: string;
|
|
50
|
+
phoneCode: string;
|
|
51
|
+
componentAppid?: string;
|
|
52
|
+
opensType?: OpensType;
|
|
53
|
+
}
|
|
54
|
+
export interface RefreshTokenReq {
|
|
55
|
+
tenant: string;
|
|
56
|
+
refreshToken: string;
|
|
57
|
+
clientId: string;
|
|
58
|
+
}
|
|
59
|
+
export interface UserInfo {
|
|
60
|
+
userId: string;
|
|
61
|
+
loginName: string;
|
|
62
|
+
nickName: string;
|
|
63
|
+
realName: string;
|
|
64
|
+
avatar: string;
|
|
65
|
+
mobilePhone: string;
|
|
66
|
+
mobilePhoneIns: string;
|
|
67
|
+
storage: string;
|
|
68
|
+
unifiedId: string;
|
|
69
|
+
}
|
|
70
|
+
export interface RolesPerms {
|
|
71
|
+
roleCodes: string[];
|
|
72
|
+
permCodes: string[];
|
|
73
|
+
}
|
|
74
|
+
export interface UpdateUserReq {
|
|
75
|
+
tenant?: string;
|
|
76
|
+
requestId?: string;
|
|
77
|
+
updateMask?: string;
|
|
78
|
+
nickName?: string;
|
|
79
|
+
avatar?: string;
|
|
80
|
+
realName?: string;
|
|
81
|
+
gender?: string;
|
|
82
|
+
birthDate?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface UserInfoReq {
|
|
85
|
+
tenant?: string;
|
|
86
|
+
}
|
package/lib/api/auth/types.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export var OpensType;
|
|
2
|
-
(function (OpensType) {
|
|
3
|
-
//微信
|
|
4
|
-
OpensType[OpensType["wechat"] = 0] = "wechat";
|
|
5
|
-
//支付宝
|
|
6
|
-
OpensType[OpensType["ali_pay"] = 1] = "ali_pay";
|
|
7
|
-
//云闪付
|
|
8
|
-
OpensType[OpensType["union_pay"] = 2] = "union_pay";
|
|
9
|
-
})(OpensType || (OpensType = {}));
|
|
1
|
+
export var OpensType;
|
|
2
|
+
(function (OpensType) {
|
|
3
|
+
//微信
|
|
4
|
+
OpensType[OpensType["wechat"] = 0] = "wechat";
|
|
5
|
+
//支付宝
|
|
6
|
+
OpensType[OpensType["ali_pay"] = 1] = "ali_pay";
|
|
7
|
+
//云闪付
|
|
8
|
+
OpensType[OpensType["union_pay"] = 2] = "union_pay";
|
|
9
|
+
})(OpensType || (OpensType = {}));
|
package/lib/api/cms/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
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
|
-
declare class CmsApiImpl {
|
|
4
|
-
findCmsSiteList(tenant: string): Promise<ResponseData<CmsSiteList>>;
|
|
5
|
-
findCmsSite(data: CmsSiteKey): Promise<ResponseData<CmsSiteModel>>;
|
|
6
|
-
findCmsChannelList(data: CmsChannelReq): Promise<ResponseData<CmsChannelList>>;
|
|
7
|
-
findCmsChannelById(data: CmsChannelKey): Promise<ResponseData<CmsChannelModel>>;
|
|
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>>;
|
|
18
|
-
}
|
|
19
|
-
declare const cmsApi: CmsApiImpl;
|
|
20
|
-
export { cmsApi };
|
|
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
|
+
declare class CmsApiImpl {
|
|
4
|
+
findCmsSiteList(tenant: string): Promise<ResponseData<CmsSiteList>>;
|
|
5
|
+
findCmsSite(data: CmsSiteKey): Promise<ResponseData<CmsSiteModel>>;
|
|
6
|
+
findCmsChannelList(data: CmsChannelReq): Promise<ResponseData<CmsChannelList>>;
|
|
7
|
+
findCmsChannelById(data: CmsChannelKey): Promise<ResponseData<CmsChannelModel>>;
|
|
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>>;
|
|
18
|
+
}
|
|
19
|
+
declare const cmsApi: CmsApiImpl;
|
|
20
|
+
export { cmsApi };
|
package/lib/api/cms/index.js
CHANGED
|
@@ -1,161 +1,161 @@
|
|
|
1
|
-
import { grpc } from "../../utils/grpc";
|
|
2
|
-
import mpx from "@mpxjs/core";
|
|
3
|
-
// 获取网站内容信息
|
|
4
|
-
class CmsApiImpl {
|
|
5
|
-
// 查询企业官网、微网站列表
|
|
6
|
-
findCmsSiteList(tenant) {
|
|
7
|
-
return mpx.xfetch.fetch({
|
|
8
|
-
url: "/v1/front/cms/cms_site/list/" + tenant,
|
|
9
|
-
method: "GET",
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
// 查询网站站点
|
|
13
|
-
findCmsSite(data) {
|
|
14
|
-
const tenant = data.tenant ? data.tenant : data.organTenant;
|
|
15
|
-
return mpx.xfetch.fetch({
|
|
16
|
-
url: "/v1/front/cms/cms_site/id/" + tenant + "/" + data.siteId,
|
|
17
|
-
method: "GET",
|
|
18
|
-
header: {
|
|
19
|
-
"Grpc-Metadata-Tenant": tenant,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
// 查询列表信息网站栏目 (没有传递别名就是将所有的栏目信息查询出来,给了栏目别名查询传递别名的栏目信息)
|
|
24
|
-
findCmsChannelList(data) {
|
|
25
|
-
grpc.clearEmpty(data);
|
|
26
|
-
if (data) {
|
|
27
|
-
data.hasStatus = data.status !== undefined;
|
|
28
|
-
data.hasIsOpen = data.isOpen !== undefined;
|
|
29
|
-
}
|
|
30
|
-
return mpx.xfetch.fetch({
|
|
31
|
-
url: "/v1/front/cms/cms_channel/list/" + data.tenant,
|
|
32
|
-
method: "GET",
|
|
33
|
-
data,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
// 查询网站栏目
|
|
37
|
-
findCmsChannelById(data) {
|
|
38
|
-
return mpx.xfetch.fetch({
|
|
39
|
-
url: `/v1/cms/cms_channel/id/${data.tenant}/${data.channelId}`,
|
|
40
|
-
method: "GET",
|
|
41
|
-
header: {
|
|
42
|
-
"Grpc-Metadata-Tenant": data.tenant,
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
// 根据栏目别名查询翻页信息信息主表-单页栏目内容
|
|
47
|
-
findCmsContentInfo(data) {
|
|
48
|
-
const config = getApp().globalData.config;
|
|
49
|
-
data.tenant = data.tenant || config.tenant;
|
|
50
|
-
grpc.clearEmpty(data);
|
|
51
|
-
return mpx.xfetch.fetch({
|
|
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/" +
|
|
61
|
-
data.tenant +
|
|
62
|
-
"/" +
|
|
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 +
|
|
119
|
-
"/" +
|
|
120
|
-
data.interactId,
|
|
121
|
-
method: "GET",
|
|
122
|
-
});
|
|
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
|
-
}
|
|
159
|
-
}
|
|
160
|
-
const cmsApi = new CmsApiImpl();
|
|
161
|
-
export { cmsApi };
|
|
1
|
+
import { grpc } from "../../utils/grpc";
|
|
2
|
+
import mpx from "@mpxjs/core";
|
|
3
|
+
// 获取网站内容信息
|
|
4
|
+
class CmsApiImpl {
|
|
5
|
+
// 查询企业官网、微网站列表
|
|
6
|
+
findCmsSiteList(tenant) {
|
|
7
|
+
return mpx.xfetch.fetch({
|
|
8
|
+
url: "/v1/front/cms/cms_site/list/" + tenant,
|
|
9
|
+
method: "GET",
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
// 查询网站站点
|
|
13
|
+
findCmsSite(data) {
|
|
14
|
+
const tenant = data.tenant ? data.tenant : data.organTenant;
|
|
15
|
+
return mpx.xfetch.fetch({
|
|
16
|
+
url: "/v1/front/cms/cms_site/id/" + tenant + "/" + data.siteId,
|
|
17
|
+
method: "GET",
|
|
18
|
+
header: {
|
|
19
|
+
"Grpc-Metadata-Tenant": tenant,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
// 查询列表信息网站栏目 (没有传递别名就是将所有的栏目信息查询出来,给了栏目别名查询传递别名的栏目信息)
|
|
24
|
+
findCmsChannelList(data) {
|
|
25
|
+
grpc.clearEmpty(data);
|
|
26
|
+
if (data) {
|
|
27
|
+
data.hasStatus = data.status !== undefined;
|
|
28
|
+
data.hasIsOpen = data.isOpen !== undefined;
|
|
29
|
+
}
|
|
30
|
+
return mpx.xfetch.fetch({
|
|
31
|
+
url: "/v1/front/cms/cms_channel/list/" + data.tenant,
|
|
32
|
+
method: "GET",
|
|
33
|
+
data,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
// 查询网站栏目
|
|
37
|
+
findCmsChannelById(data) {
|
|
38
|
+
return mpx.xfetch.fetch({
|
|
39
|
+
url: `/v1/cms/cms_channel/id/${data.tenant}/${data.channelId}`,
|
|
40
|
+
method: "GET",
|
|
41
|
+
header: {
|
|
42
|
+
"Grpc-Metadata-Tenant": data.tenant,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
// 根据栏目别名查询翻页信息信息主表-单页栏目内容
|
|
47
|
+
findCmsContentInfo(data) {
|
|
48
|
+
const config = getApp().globalData.config;
|
|
49
|
+
data.tenant = data.tenant || config.tenant;
|
|
50
|
+
grpc.clearEmpty(data);
|
|
51
|
+
return mpx.xfetch.fetch({
|
|
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/" +
|
|
61
|
+
data.tenant +
|
|
62
|
+
"/" +
|
|
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 +
|
|
119
|
+
"/" +
|
|
120
|
+
data.interactId,
|
|
121
|
+
method: "GET",
|
|
122
|
+
});
|
|
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
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const cmsApi = new CmsApiImpl();
|
|
161
|
+
export { cmsApi };
|