jmash-diy-mp 0.1.1 → 0.1.3

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 (31) hide show
  1. package/lib/components/basic/basic-image-view.mpx.d.ts +1 -0
  2. package/lib/components/basic/basic-text-view.mpx.d.ts +1 -0
  3. package/lib/components/basic/basic-video-view.mpx.d.ts +1 -0
  4. package/lib/components/custom/custom-view.mpx.d.ts +1 -0
  5. package/lib/components/organ/organ-contact-view.mpx.d.ts +1 -0
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. package/package.json +1 -1
  22. package/src/components/basic/basic-image-view.mpx +10 -1
  23. package/src/components/basic/basic-text-view.mpx +10 -4
  24. package/src/components/basic/basic-title-view.mpx +30 -21
  25. package/src/components/basic/basic-video-view.mpx +9 -4
  26. package/src/components/custom/basic-custom-view.mpx +11 -11
  27. package/src/components/custom/custom-view.mpx +6 -4
  28. package/src/components/custom/organ-custom-view.mpx +13 -13
  29. package/src/components/organ/organ-contact-view.mpx +8 -3
  30. package/src/components/organ/organ-map-view.mpx +6 -0
  31. package/src/components/organ/organ-notice-view.mpx +7 -1
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -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,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,3 @@
1
+ import { AppConfig } from "../api/types";
2
+ declare const config: AppConfig;
3
+ export { config };
@@ -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 };
@@ -0,0 +1,5 @@
1
+ declare class GrpcUtil {
2
+ clearEmpty(params: any): void;
3
+ }
4
+ declare const grpc: GrpcUtil;
5
+ export { grpc };
@@ -0,0 +1,7 @@
1
+ declare class NetUtil {
2
+ private publicKey;
3
+ encrypt(data: string): string;
4
+ decrypt(data: string): string;
5
+ }
6
+ declare const net: NetUtil;
7
+ export { net };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmash-diy-mp",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "private": false,
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -1,4 +1,9 @@
1
1
  <template>
2
+ <!-- title组件 -->
3
+ <basic-title-view wx:if="{{ compModel.compData.showTitle }}" title="{{ compModel.compName }}"
4
+ pageModel="{{ pageModel }}" compModel="{{ compModel }}" busiDataModel="{{ busiDataModel }}" />
5
+
6
+ <!-- 图片组件 -->
2
7
  <view class="vcard-album-grid" wx:if="{{ imageUrlArr.length > 0 }}">
3
8
  <view wx:if="{{ isGrid }}" class="main-grid-custom">
4
9
  <view class="grid-item" wx:for="{{ imageUrlArr }}" wx:for-item="item" wx:for-index="index" wx:key="index">
@@ -23,7 +28,7 @@
23
28
  mode="widthFix" wx:for="{{ imageUrlArr }}" wx:for-item="item" wx:key="index" />
24
29
  </view>
25
30
  </view>
26
- <basic-none-data wx:else></basic-none-data>
31
+ <basic-none-data wx:else />
27
32
  </template>
28
33
 
29
34
  <script lang="ts">
@@ -33,14 +38,17 @@ import { config, EventBase } from "jmash-core-mp";
33
38
 
34
39
  createComponent({
35
40
  properties: {
41
+ // 页面数据
36
42
  pageModel: {
37
43
  type: Object,
38
44
  value: {} as PageModel
39
45
  },
46
+ // 组件数据
40
47
  compModel: {
41
48
  type: Object,
42
49
  value: {} as CompModel
43
50
  },
51
+ // 业务数据
44
52
  busiDataModel: {
45
53
  type: Object,
46
54
  value: {} as BusiDataModel
@@ -150,6 +158,7 @@ createComponent({
150
158
  {
151
159
  "component": true,
152
160
  "usingComponents": {
161
+ "basic-title-view": "./basic-title-view",
153
162
  "basic-none-data": "./basic-none-data"
154
163
  }
155
164
  }
@@ -1,11 +1,16 @@
1
1
  <template>
2
+ <!-- title组件 -->
3
+ <basic-title-view wx:if="{{ compModel.compData.showTitle }}" title="{{ compModel.compName }}"
4
+ pageModel="{{ pageModel }}" compModel="{{ compModel }}" busiDataModel="{{ busiDataModel }}" />
5
+
6
+ <!-- 文本组件 -->
2
7
  <view class="text-main" wx:if="{{ compModel.compData.text != '<p><br></p>' }}">
3
8
  <!-- TODO后期优化 <view wx:if="{{ compModel.compData.title !== '' }}" class="text-title">{{ compModel.compData.title }}</view>-->
4
9
  <view class="text-content">
5
10
  <rich-text nodes="{{ compModel.compData.text }}"></rich-text>
6
11
  </view>
7
12
  </view>
8
- <basic-none-data wx:else></basic-none-data>
13
+ <basic-none-data wx:else />
9
14
  </template>
10
15
 
11
16
  <script lang="ts">
@@ -14,17 +19,17 @@ import { BusiDataModel, CompModel, PageModel } from "../../api/diy/types";
14
19
 
15
20
  createComponent({
16
21
  properties: {
17
- //页面数据
22
+ // 页面数据
18
23
  pageModel: {
19
24
  type: Object,
20
25
  value: {} as PageModel
21
26
  },
22
- //组件数据
27
+ // 组件数据
23
28
  compModel: {
24
29
  type: Object,
25
30
  value: {} as CompModel
26
31
  },
27
- //业务数据
32
+ // 业务数据
28
33
  busiDataModel: {
29
34
  type: Object,
30
35
  value: {} as BusiDataModel
@@ -56,6 +61,7 @@ createComponent({
56
61
  {
57
62
  "component": true,
58
63
  "usingComponents": {
64
+ "basic-title-view": "./basic-title-view",
59
65
  "basic-none-data": "./basic-none-data"
60
66
  }
61
67
  }
@@ -9,8 +9,11 @@
9
9
  {{ title }}
10
10
  </view>
11
11
  <!-- 查看更多 -->
12
- <view class="main-right" wx:if="{{ showMore }}" bind:tap="handleClickMore">{{ moreText }}</view>
13
- <slot name="rightIcon"></slot>
12
+ <view class="main-right" wx:if="{{ showMore }}" bind:tap="handleClickMore">
13
+ <view>查看更多</view>
14
+ <view wx:if="{{ !rightIcon }}">></view>
15
+ <slot wx:else name="rightIcon"></slot>
16
+ </view>
14
17
  </view>
15
18
  </template>
16
19
 
@@ -20,17 +23,11 @@ import { config } from "jmash-core-mp";
20
23
  import { BusiDataModel, CompModel, PageModel, CompEventModel } from "../../api/diy/types";
21
24
 
22
25
  createComponent({
26
+ options: {
27
+ styleIsolation: "apply-shared",
28
+ multipleSlots: true,
29
+ },
23
30
  properties: {
24
- // 是否自定义左侧图标
25
- leftIcon: {
26
- type: Boolean,
27
- default: false
28
- },
29
- // 标题
30
- title: {
31
- type: String,
32
- default: ""
33
- },
34
31
  // 页面数据
35
32
  pageModel: {
36
33
  type: Object,
@@ -46,15 +43,25 @@ createComponent({
46
43
  type: Object,
47
44
  value: {} as BusiDataModel
48
45
  },
46
+ // 标题
47
+ title: {
48
+ type: String,
49
+ default: ""
50
+ },
49
51
  // 是否显示查看更多
50
52
  showMore: {
51
53
  type: Boolean,
52
54
  value: false
53
55
  },
54
- // 查看更多文本
55
- moreText: {
56
- type: String,
57
- value: "查看更多"
56
+ // 是否自定义左侧图标
57
+ leftIcon: {
58
+ type: Boolean,
59
+ default: false
60
+ },
61
+ // 是否自定义右侧图标
62
+ rightIcon: {
63
+ type: Boolean,
64
+ default: false
58
65
  },
59
66
  },
60
67
  setup(props) {
@@ -82,9 +89,9 @@ createComponent({
82
89
  compModel: this.compModel,
83
90
  busiDataModel: this.busiDataModel
84
91
  } as CompEventModel;
85
- console.log("点击查看更多(DiyClickMore):", eventData);
86
- this.triggerEvent("DiyClickMore", eventData);
87
- }
92
+ console.log("点击查看更多(clickMore):", eventData);
93
+ this.triggerEvent("clickMore", eventData);
94
+ },
88
95
  },
89
96
  })
90
97
  </script>
@@ -102,7 +109,7 @@ createComponent({
102
109
  flex: 1;
103
110
  display: flex;
104
111
  align-items: center;
105
- justify-content: flex-start;
112
+ gap: 16rpx;
106
113
  color: #333333;
107
114
  font-size: 30rpx;
108
115
  font-weight: 600;
@@ -110,11 +117,13 @@ createComponent({
110
117
  .main-left-image {
111
118
  width: 8rpx;
112
119
  height: 30rpx;
113
- margin-right: 16rpx;
114
120
  }
115
121
  }
116
122
 
117
123
  .main-right {
124
+ display: flex;
125
+ align-items: center;
126
+ gap: 10rpx;
118
127
  height: 80rpx;
119
128
  color: #999999;
120
129
  font-size: 24rpx;
@@ -1,4 +1,8 @@
1
1
  <template>
2
+ <!-- title组件 -->
3
+ <basic-title-view wx:if="{{ compModel.compData.showTitle }}" title="{{ compModel.compName }}"
4
+ pageModel="{{ pageModel }}" compModel="{{ compModel }}" busiDataModel="{{ busiDataModel }}" />
5
+
2
6
  <!-- 卡片 视频介绍 查看 -->
3
7
  <view class="basic-video" style="height: {{ height }}px;" wx:if="{{ compData.videoUrl }}">
4
8
  <view class="main-video">
@@ -6,7 +10,7 @@
6
10
  src="{{ videoUrl }}"></video>
7
11
  </view>
8
12
  </view>
9
- <basic-none-data wx:else></basic-none-data>
13
+ <basic-none-data wx:else />
10
14
  </template>
11
15
 
12
16
  <script lang="ts">
@@ -16,17 +20,17 @@ import { config } from "jmash-core-mp";
16
20
 
17
21
  createComponent({
18
22
  properties: {
19
- //页面数据
23
+ // 页面数据
20
24
  pageModel: {
21
25
  type: Object,
22
26
  value: {} as PageModel
23
27
  },
24
- //组件数据
28
+ // 组件数据
25
29
  compModel: {
26
30
  type: Object,
27
31
  value: {} as CompModel
28
32
  },
29
- //业务数据
33
+ // 业务数据
30
34
  busiDataModel: {
31
35
  type: Object,
32
36
  value: {} as BusiDataModel
@@ -110,6 +114,7 @@ createComponent({
110
114
  {
111
115
  "component": true,
112
116
  "usingComponents": {
117
+ "basic-title-view": "./basic-title-view",
113
118
  "basic-none-data": "./basic-none-data"
114
119
  }
115
120
  }
@@ -1,8 +1,4 @@
1
1
  <template>
2
- <!-- title组件 -->
3
- <basic-title-view wx:if="{{ compModel.compData.showTitle }}" title="{{ compModel.compName }}"
4
- pageModel="{{ pageModel }}" compModel="{{ compModel }}" busiDataModel="{{ busiDataModel }}"
5
- bind:pagesMore="onMoreEvent" showMore="{{ compModel.compData.showMore }}" />
6
2
 
7
3
  <!-- 文本组件 -->
8
4
  <basic-text-view wx:if="{{ compModel.compCode === 'text' }}" pageModel="{{ pageModel }}" compModel="{{ compModel }}"
@@ -26,16 +22,22 @@ import { createComponent } from '@mpxjs/core';
26
22
  import { PageModel, CompModel, BusiDataModel } from "../../api/diy/types";
27
23
 
28
24
  createComponent({
25
+ options: {
26
+ styleIsolation: "apply-shared",
27
+ multipleSlots: true,
28
+ },
29
29
  properties: {
30
- compModel: {
31
- type: Object,
32
- value: {} as CompModel
33
- },
30
+ // 页面数据
34
31
  pageModel: {
35
32
  type: Object,
36
33
  value: {} as PageModel
37
34
  },
38
- //业务数据
35
+ // 组件数据
36
+ compModel: {
37
+ type: Object,
38
+ value: {} as CompModel
39
+ },
40
+ // 业务数据
39
41
  busiDataModel: {
40
42
  type: Object,
41
43
  value: {} as BusiDataModel
@@ -47,12 +49,10 @@ createComponent({
47
49
  })
48
50
  </script>
49
51
 
50
-
51
52
  <script type="application/json">
52
53
  {
53
54
  "component": true,
54
55
  "usingComponents": {
55
- "basic-title-view": "../basic/basic-title-view",
56
56
  "basic-text-view": "../basic/basic-text-view",
57
57
  "basic-image-view": "../basic/basic-image-view",
58
58
  "basic-video-view": "../basic/basic-video-view",
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
 
3
3
  <!-- 基础组件 -->
4
- <basic-custom-view wx:if="{{ compModel.compType == 'BASIC' }}" pageModel="{{ pageModel }}" compModel="{{ compModel }}"
5
- busiDataModel="{{ busiDataModel }}" />
4
+ <basic-custom-view wx:if="{{ compModel.compType === 'BASIC' }}" pageModel="{{ pageModel }}"
5
+ compModel="{{ compModel }}" busiDataModel="{{ busiDataModel }}" />
6
6
  <!-- 组织组件 -->
7
- <organ-custom-view wx:if="{{ compModel.compType == 'ORGAN' }}" pageModel="{{ pageModel }}" compModel="{{ compModel }}"
8
- busiDataModel="{{ busiDataModel }}" />
7
+ <organ-custom-view wx:if="{{ compModel.compType === 'ORGAN' }}" pageModel="{{ pageModel }}"
8
+ compModel="{{ compModel }}" busiDataModel="{{ busiDataModel }}" />
9
9
 
10
10
  </template>
11
11
 
@@ -15,10 +15,12 @@ import { PageModel, CompModel, BusiDataModel } from "../../api/diy/types";
15
15
 
16
16
  createComponent({
17
17
  properties: {
18
+ // 页面数据
18
19
  pageModel: {
19
20
  type: Object,
20
21
  value: {} as PageModel
21
22
  },
23
+ // 组件数据
22
24
  compModel: {
23
25
  type: Object,
24
26
  value: {} as CompModel
@@ -1,8 +1,4 @@
1
1
  <template>
2
- <!-- title组件 -->
3
- <basic-title-view wx:if="{{ compModel.compData.showTitle }}" title="{{ compModel.compName }}"
4
- pageModel="{{ pageModel }}" compModel="{{ compModel }}" busiDataModel="{{ busiDataModel }}"
5
- bind:pagesMore="onMoreEvent" showMore="{{ compModel.compData.showMore }}" />
6
2
 
7
3
  <!-- 通知组件 -->
8
4
  <organ-notice-view wx:if="{{ compModel.compCode === 'notice' }}" pageModel="{{ pageModel }}"
@@ -26,34 +22,38 @@ import { createComponent } from '@mpxjs/core';
26
22
  import { PageModel, CompModel, OrganDataModel } from "../../api/diy/types";
27
23
 
28
24
  createComponent({
25
+ options: {
26
+ styleIsolation: "apply-shared",
27
+ multipleSlots: true,
28
+ },
29
29
  properties: {
30
- compModel: {
31
- type: Object,
32
- value: {} as CompModel
33
- },
30
+ // 页面数据
34
31
  pageModel: {
35
32
  type: Object,
36
33
  value: {} as PageModel
37
34
  },
38
- //业务数据
35
+ // 组件数据
36
+ compModel: {
37
+ type: Object,
38
+ value: {} as CompModel
39
+ },
40
+ // 业务数据
39
41
  busiDataModel: {
40
42
  type: Object,
41
43
  value: {} as OrganDataModel
42
44
  },
43
45
  },
44
46
  setup(props) {
45
- console.log("props ==>", props);
46
- return {}
47
+ console.log("Organ-props ==>", props.compModel.compCode, props.compModel.compName, props);
48
+ return { props }
47
49
  }
48
50
  })
49
51
  </script>
50
52
 
51
-
52
53
  <script type="application/json">
53
54
  {
54
55
  "component": true,
55
56
  "usingComponents": {
56
- "basic-title-view": "../basic/basic-title-view",
57
57
  "organ-map-view": "../organ/organ-map-view",
58
58
  "organ-contact-view": "../organ/organ-contact-view",
59
59
  "organ-notice-view": "../organ/organ-notice-view",
@@ -1,4 +1,8 @@
1
1
  <template>
2
+ <!-- title组件 -->
3
+ <basic-title-view wx:if="{{ compModel.compData.showTitle }}" title="{{ compModel.compName }}"
4
+ pageModel="{{ pageModel }}" compModel="{{ compModel }}" busiDataModel="{{ busiDataModel }}" />
5
+
2
6
  <!-- 合作招商预览组件-手机号 -->
3
7
  <view class="vcard-map">
4
8
  <view class="item" data-mobilePhone="{{ compData.mobilePhone }}" bind:tap="oncall">
@@ -14,17 +18,17 @@ import { CompModel, PageModel, OrganDataModel } from "../../api/diy/types";
14
18
 
15
19
  createComponent({
16
20
  properties: {
17
- //页面数据
21
+ // 页面数据
18
22
  pageModel: {
19
23
  type: Object,
20
24
  value: {} as PageModel
21
25
  },
22
- //组件数据
26
+ // 组件数据
23
27
  compModel: {
24
28
  type: Object,
25
29
  value: {} as CompModel
26
30
  },
27
- //业务数据
31
+ // 业务数据
28
32
  busiDataModel: {
29
33
  type: Object,
30
34
  value: {} as OrganDataModel
@@ -70,6 +74,7 @@ createComponent({
70
74
  {
71
75
  "component": true,
72
76
  "usingComponents": {
77
+ "basic-title-view": "../basic/basic-title-view",
73
78
  "cube-icon": "@mpxjs/mpx-cube-ui/lib/components/icon/index"
74
79
  }
75
80
  }
@@ -1,4 +1,9 @@
1
1
  <template>
2
+ <!-- title组件 -->
3
+ <basic-title-view wx:if="{{ compModel.compData.showTitle }}" title="{{ compModel.compName }}"
4
+ pageModel="{{ pageModel }}" compModel="{{ compModel }}" busiDataModel="{{ busiDataModel }}" />
5
+
6
+ <!-- 地图组件-地址、电话 -->
2
7
  <view class="vcard-map">
3
8
  <view class="item" data-latitude="{{ busiDataModel.latitude }}" data-longitude="{{ busiDataModel.longitude }}"
4
9
  bind:tap="onlocation">
@@ -101,6 +106,7 @@ createComponent({
101
106
  {
102
107
  "component": true,
103
108
  "usingComponents": {
109
+ "basic-title-view": "../basic/basic-title-view",
104
110
  "cube-icon": "@mpxjs/mpx-cube-ui/lib/components/icon/index"
105
111
  }
106
112
  }
@@ -1,4 +1,8 @@
1
1
  <template>
2
+ <!-- title组件 -->
3
+ <basic-title-view wx:if="{{ compModel.compData.showTitle }}" title="{{ compModel.compName }}"
4
+ pageModel="{{ pageModel }}" compModel="{{ compModel }}" busiDataModel="{{ busiDataModel }}" />
5
+
2
6
  <!-- 通知栏组件 -->
3
7
  <view class="notify-view">
4
8
  <view class="notice-bar">
@@ -186,6 +190,8 @@ createComponent({
186
190
  <script type="application/json">
187
191
  {
188
192
  "component": true,
189
- "usingComponents": {}
193
+ "usingComponents": {
194
+ "basic-title-view": "../basic/basic-title-view",
195
+ }
190
196
  }
191
197
  </script>