jmash-diy-mp 0.1.1 → 0.1.2
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/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/api/auth/index.d.ts +21 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/api/auth/types.d.ts +86 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/api/cms/index.d.ts +20 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/api/cms/types.d.ts +200 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/api/files/index.d.ts +25 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/api/types.d.ts +41 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/components/auth-user/jmash-update-user.mpx.d.ts +1 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/components/cms/jmash-cms-article.mpx.d.ts +1 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/components/core/jmash-login.mpx.d.ts +1 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/packages/pages/cms/cms-article-list.mpx.d.ts +1 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/store/user.d.ts +31 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/utils/config.d.ts +3 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/utils/db.d.ts +21 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/utils/grpc.d.ts +5 -0
- package/lib/node_modules/.pnpm/jmash-core-mp@0.1.14_typescript@4.9.5/node_modules/jmash-core-mp/src/utils/net.d.ts +7 -0
- package/package.json +1 -1
- package/src/components/basic/basic-title-view.mpx +4 -0
- package/src/components/custom/basic-custom-view.mpx +4 -0
- package/src/components/custom/organ-custom-view.mpx +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ResponseData } from "../../api/types";
|
|
2
|
+
import type { LoginReq, LoginRes, RolesPerms, WebLoginReq, TokenModel, PhoneRegisterReq, PhoneReplaceReq, UpdateUserReq, UserInfoReq, UserInfo } from "./types";
|
|
3
|
+
declare class AuthApi {
|
|
4
|
+
mpLogin(data: LoginReq): Promise<ResponseData<LoginRes>>;
|
|
5
|
+
mpPhoneRegister(data: PhoneRegisterReq): Promise<ResponseData<LoginRes>>;
|
|
6
|
+
replaceBindphone(data: PhoneReplaceReq): Promise<ResponseData<string>>;
|
|
7
|
+
webLogin(data: WebLoginReq): Promise<ResponseData<TokenModel>>;
|
|
8
|
+
refreshToken(): Promise<ResponseData<TokenModel>>;
|
|
9
|
+
userInfo(): Promise<ResponseData<UserInfo>>;
|
|
10
|
+
userRolesPerms(): Promise<ResponseData<RolesPerms>>;
|
|
11
|
+
allowRunAsUser(): Promise<ResponseData<any[]>>;
|
|
12
|
+
runAsUser(userId: string): Promise<ResponseData<any>>;
|
|
13
|
+
updateUser(data: any): Promise<ResponseData<any>>;
|
|
14
|
+
updatePwd(encodeOldPwd: string, encodeNewPwd: string): Promise<ResponseData<any>>;
|
|
15
|
+
deptTree(deptId?: string, tenant?: string): Promise<ResponseData<any[]>>;
|
|
16
|
+
jobTree(jobId?: string, tenant?: string): Promise<ResponseData<any[]>>;
|
|
17
|
+
updateUserInfo(data: UpdateUserReq): Promise<ResponseData<UserInfo>>;
|
|
18
|
+
findUserInfo(data: UserInfoReq): Promise<ResponseData<UserInfo>>;
|
|
19
|
+
}
|
|
20
|
+
export declare const authApi: AuthApi;
|
|
21
|
+
export {};
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +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 };
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +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 };
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
}
|
|
22
|
+
export interface EventBase {
|
|
23
|
+
changedTouches?: any;
|
|
24
|
+
currentTarget: EventTarget;
|
|
25
|
+
target?: EventTarget;
|
|
26
|
+
type?: string;
|
|
27
|
+
detail?: any;
|
|
28
|
+
touches: any;
|
|
29
|
+
}
|
|
30
|
+
export interface EventTarget {
|
|
31
|
+
dataset: any;
|
|
32
|
+
id: string | number;
|
|
33
|
+
offsetLeft?: number;
|
|
34
|
+
offsetTop?: number;
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LoginRes, RolesPerms, TokenModel, UserInfo } from "../api/auth/types";
|
|
2
|
+
import { ResponseData } from "../api/types";
|
|
3
|
+
interface UserState {
|
|
4
|
+
userInfo: UserInfo;
|
|
5
|
+
roleCodes: string[];
|
|
6
|
+
permCodes: string[];
|
|
7
|
+
accessToken: string;
|
|
8
|
+
expiresDate: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const useUserStore: import("@mpxjs/pinia").StoreDefinition<"user", UserState, {}, {
|
|
11
|
+
/** 登录检查 */
|
|
12
|
+
loginOnlyAC(): Promise<boolean>;
|
|
13
|
+
/** 登录检查并跳转登录 */
|
|
14
|
+
loginAC(backurl: string, tabbar: boolean, loginurl?: string): Promise<boolean>;
|
|
15
|
+
/** 静默登录 */
|
|
16
|
+
silentLogin(): Promise<LoginRes>;
|
|
17
|
+
mpRegister(phoneCode: string, nickName?: string, avatar?: string): Promise<LoginRes>;
|
|
18
|
+
webLogin(userName: string, pwd: string): Promise<LoginRes>;
|
|
19
|
+
loginProcess(resp: ResponseData<LoginRes>): LoginRes;
|
|
20
|
+
loginSuccess(token: TokenModel): TokenModel;
|
|
21
|
+
logout(): void;
|
|
22
|
+
/** 检查登录是否有效? */
|
|
23
|
+
checkLogin(): boolean;
|
|
24
|
+
isTokenExpires(): boolean;
|
|
25
|
+
checkRole(role: string): boolean;
|
|
26
|
+
getUserInfo(cache?: boolean): Promise<UserInfo>;
|
|
27
|
+
setUserInfo(userInfo: UserInfo): void;
|
|
28
|
+
getRolePerm(cache?: boolean): Promise<RolesPerms>;
|
|
29
|
+
refreshToken(): Promise<boolean>;
|
|
30
|
+
}>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TokenModel, UserInfo } from "../api/auth/types";
|
|
2
|
+
declare class LocalStorage {
|
|
3
|
+
getToken(): string;
|
|
4
|
+
getUserTenant(): string;
|
|
5
|
+
getOrganTenant(tenant: string): string;
|
|
6
|
+
isTokenExpires(): boolean;
|
|
7
|
+
getRefreshToken(): string;
|
|
8
|
+
removeRefreshToken(): void;
|
|
9
|
+
getTokenExpiresDate(): number;
|
|
10
|
+
setToken(data: TokenModel): void;
|
|
11
|
+
clearStorage(): void;
|
|
12
|
+
getBearerToken(): string;
|
|
13
|
+
getUserInfo(): any;
|
|
14
|
+
setUserInfo(data: UserInfo): void;
|
|
15
|
+
getRoleCodes(): any;
|
|
16
|
+
setRoleCodes(codes: string[]): void;
|
|
17
|
+
getPermCodes(): any;
|
|
18
|
+
setPermCodes(codes: string[]): void;
|
|
19
|
+
}
|
|
20
|
+
declare const db: LocalStorage;
|
|
21
|
+
export { db };
|
package/package.json
CHANGED
|
@@ -20,6 +20,10 @@ import { config } from "jmash-core-mp";
|
|
|
20
20
|
import { BusiDataModel, CompModel, PageModel, CompEventModel } from "../../api/diy/types";
|
|
21
21
|
|
|
22
22
|
createComponent({
|
|
23
|
+
options: {
|
|
24
|
+
styleIsolation: "apply-shared",
|
|
25
|
+
multipleSlots: true,
|
|
26
|
+
},
|
|
23
27
|
properties: {
|
|
24
28
|
// 是否自定义左侧图标
|
|
25
29
|
leftIcon: {
|
|
@@ -26,6 +26,10 @@ import { createComponent } from '@mpxjs/core';
|
|
|
26
26
|
import { PageModel, CompModel, BusiDataModel } from "../../api/diy/types";
|
|
27
27
|
|
|
28
28
|
createComponent({
|
|
29
|
+
options: {
|
|
30
|
+
styleIsolation: "apply-shared",
|
|
31
|
+
multipleSlots: true,
|
|
32
|
+
},
|
|
29
33
|
properties: {
|
|
30
34
|
compModel: {
|
|
31
35
|
type: Object,
|
|
@@ -26,6 +26,10 @@ import { createComponent } from '@mpxjs/core';
|
|
|
26
26
|
import { PageModel, CompModel, OrganDataModel } from "../../api/diy/types";
|
|
27
27
|
|
|
28
28
|
createComponent({
|
|
29
|
+
options: {
|
|
30
|
+
styleIsolation: "apply-shared",
|
|
31
|
+
multipleSlots: true,
|
|
32
|
+
},
|
|
29
33
|
properties: {
|
|
30
34
|
compModel: {
|
|
31
35
|
type: Object,
|