jmash-diy-mp 0.1.0

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 (77) hide show
  1. package/.editorconfig +9 -0
  2. package/README.md +57 -0
  3. package/babel.config.json +34 -0
  4. package/eslint.config.mjs +7 -0
  5. package/lib/api/diy/comp/index.d.ts +17 -0
  6. package/lib/api/diy/comp/index.js +115 -0
  7. package/lib/api/diy/comp/types.d.ts +46 -0
  8. package/lib/api/diy/comp/types.js +1 -0
  9. package/lib/api/diy/page/index.d.ts +11 -0
  10. package/lib/api/diy/page/index.js +64 -0
  11. package/lib/api/diy/page/types.d.ts +33 -0
  12. package/lib/api/diy/page/types.js +1 -0
  13. package/lib/api/diy/types.d.ts +95 -0
  14. package/lib/api/diy/types.js +32 -0
  15. package/lib/index.d.ts +5 -0
  16. package/lib/index.js +3 -0
  17. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/api/auth/index.d.ts +21 -0
  18. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/api/auth/types.d.ts +86 -0
  19. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/api/cms/index.d.ts +9 -0
  20. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/api/files/index.d.ts +25 -0
  21. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/api/files/types.d.ts +38 -0
  22. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/components/auth-user/jmash-update-user.mpx.d.ts +1 -0
  23. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/components/core/jmash-login.mpx.d.ts +1 -0
  24. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/store/user.d.ts +31 -0
  25. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/types/core.d.ts +41 -0
  26. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/utils/config.d.ts +3 -0
  27. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/utils/db.d.ts +21 -0
  28. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/utils/grpc.d.ts +5 -0
  29. package/lib/node_modules/.pnpm/jmash-core-mp@0.1.8_typescript@4.9.5/node_modules/jmash-core-mp/src/utils/net.d.ts +7 -0
  30. package/lib/src/api/diy/comp/index.d.ts +17 -0
  31. package/lib/src/api/diy/comp/types.d.ts +46 -0
  32. package/lib/src/api/diy/page/index.d.ts +11 -0
  33. package/lib/src/api/diy/page/types.d.ts +33 -0
  34. package/lib/src/api/diy/types.d.ts +95 -0
  35. package/lib/src/components/custom/custom-view.mpx.d.ts +1 -0
  36. package/lib/src/components/custom/organ-custom-view.mpx.d.ts +1 -0
  37. package/lib/src/components/organ/organ-contact-view.mpx.d.ts +1 -0
  38. package/lib/src/components/organ/organ-map-view.mpx.d.ts +1 -0
  39. package/lib/src/components/organ/organ-notice-view.mpx.d.ts +1 -0
  40. package/lib/src/index.d.ts +5 -0
  41. package/lib/src/pages/index.mpx.d.ts +1 -0
  42. package/mpx.config.js +26 -0
  43. package/package.json +73 -0
  44. package/postcss.config.js +11 -0
  45. package/project.config.json +25 -0
  46. package/project.private.config.json +14 -0
  47. package/public/index.html +15 -0
  48. package/src/api/diy/comp/index.ts +161 -0
  49. package/src/api/diy/comp/types.ts +87 -0
  50. package/src/api/diy/page/index.ts +80 -0
  51. package/src/api/diy/page/types.ts +64 -0
  52. package/src/api/diy/types.ts +197 -0
  53. package/src/app.mpx +40 -0
  54. package/src/components/basic/basic-image-view.mpx +156 -0
  55. package/src/components/basic/basic-none-data.mpx +58 -0
  56. package/src/components/basic/basic-text-view.mpx +62 -0
  57. package/src/components/basic/basic-title-view.mpx +120 -0
  58. package/src/components/basic/basic-video-view.mpx +116 -0
  59. package/src/components/custom/basic-custom-view.mpx +61 -0
  60. package/src/components/custom/custom-view-list.mpx +80 -0
  61. package/src/components/custom/custom-view.mpx +44 -0
  62. package/src/components/custom/organ-custom-view.mpx +62 -0
  63. package/src/components/organ/organ-contact-view.mpx +76 -0
  64. package/src/components/organ/organ-map-view.mpx +93 -0
  65. package/src/components/organ/organ-notice-view.mpx +176 -0
  66. package/src/global.d.ts +11 -0
  67. package/src/index.ts +34 -0
  68. package/src/pages/custom.mpx +34 -0
  69. package/src/pages/index.mpx +27 -0
  70. package/src/styles/index.scss +1 -0
  71. package/src/styles/vars.scss +27 -0
  72. package/static/ali/mini.project.json +4 -0
  73. package/static/dd/project.config.json +15 -0
  74. package/static/swan/project.swan.json +14 -0
  75. package/static/tt/project.config.json +11 -0
  76. package/static/wx/project.config.json +42 -0
  77. package/uno.config.js +9 -0
@@ -0,0 +1,25 @@
1
+ import { FileInfo, FileBase64Req, FileDownInfo, FileWebReq } from "./types";
2
+ import { ResponseData } from "../../types/core";
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,38 @@
1
+ /**
2
+ * 文件API类型声明
3
+ */
4
+ export interface FileInfo {
5
+ fileId: string;
6
+ fileSrc: string;
7
+ contentType: string;
8
+ fileExt: string;
9
+ fileWidth: number;
10
+ fileHeight: number;
11
+ fileSize: number;
12
+ hashSha256: string;
13
+ hashSm3: string;
14
+ createDate: string;
15
+ tempFilePath: string;
16
+ }
17
+ export interface FileBase64Req {
18
+ tenant?: string;
19
+ base64?: string;
20
+ fileName?: string;
21
+ contentType?: string;
22
+ fileDir?: string;
23
+ }
24
+ export interface FileDownInfo {
25
+ tempFilePath: string;
26
+ filePath: string;
27
+ statusCode: number;
28
+ }
29
+ export interface FileWebReq {
30
+ tenant?: string;
31
+ body?: string;
32
+ fileName?: string;
33
+ contentType?: string;
34
+ fileDir?: string;
35
+ fileSize?: number;
36
+ requestId?: string;
37
+ filePart?: number;
38
+ }
@@ -0,0 +1,31 @@
1
+ import { LoginRes, RolesPerms, TokenModel, UserInfo } from "../api/auth/types";
2
+ import { ResponseData } from "../types/core";
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,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,3 @@
1
+ import { AppConfig } from "../types/core";
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 };
@@ -0,0 +1,17 @@
1
+ import { ResponseData } from "jmash-core-mp";
2
+ import { DiyCompModel, DiyCompCreateReq, DiyCompList, DiyCompReq, DiyCompUpdateReq } from "./types";
3
+ import { CompModel } from "../types";
4
+ declare class DiyCompApiImpl {
5
+ convertModel(diyModel: DiyCompModel): CompModel;
6
+ convertModels(diyComps: Array<DiyCompModel>): Array<CompModel>;
7
+ findListByPage(pageId: string, vcardToken: string, tenant: string): Promise<ResponseData<DiyCompList>>;
8
+ findList(query: DiyCompReq, tenant: string): Promise<ResponseData<DiyCompList>>;
9
+ findById(compId: string, tenant: string): Promise<ResponseData<DiyCompModel>>;
10
+ create(data: DiyCompCreateReq, tenant: string): Promise<ResponseData<DiyCompModel>>;
11
+ move(compId: string, up: boolean, tenant: string): Promise<ResponseData<string>>;
12
+ moveTop(compId: string, top: boolean, tenant: string): Promise<ResponseData<string>>;
13
+ delete(compId: string, tenant: string): Promise<ResponseData<DiyCompModel>>;
14
+ update(data: DiyCompUpdateReq, tenant: string): Promise<ResponseData<DiyCompModel>>;
15
+ }
16
+ declare const diyCompApi: DiyCompApiImpl;
17
+ export { diyCompApi };
@@ -0,0 +1,46 @@
1
+ export interface DiyCompModel {
2
+ compId?: string;
3
+ pageId?: string;
4
+ compCode?: string;
5
+ compName?: string;
6
+ compType?: string;
7
+ compJson: string;
8
+ orderBy?: number;
9
+ }
10
+ export interface DiyCompCreateReq {
11
+ tenant?: string;
12
+ requestId?: string;
13
+ pageId?: string;
14
+ compCode?: string;
15
+ compName?: string;
16
+ compType?: string;
17
+ compJson?: string;
18
+ orderBy?: number;
19
+ }
20
+ export interface DiyCompList {
21
+ results: Array<DiyCompModel>;
22
+ }
23
+ export interface DiyCompReq {
24
+ createBy: string;
25
+ pageId: string;
26
+ vcardToken: string;
27
+ }
28
+ export interface DiyCompMoveKey {
29
+ tenant?: string;
30
+ compId?: string;
31
+ up?: boolean;
32
+ }
33
+ export interface DiyCompMoveTopKey {
34
+ tenant?: string;
35
+ compId?: string;
36
+ top?: boolean;
37
+ }
38
+ export interface DiyCompUpdateReq {
39
+ tenant?: string;
40
+ requestId?: string;
41
+ updateMask?: string;
42
+ compId?: string;
43
+ compName?: string;
44
+ compJson?: string;
45
+ }
46
+ export type DiyCompFormReq = (DiyCompCreateReq | DiyCompUpdateReq);
@@ -0,0 +1,11 @@
1
+ import { ResponseData } from "jmash-core-mp";
2
+ import { PageModel } from "../types";
3
+ import { DiyPageModel, DiyPageVcardReq, DiyPageUpdateReq } from "./types";
4
+ declare class DiyPageApiImpl {
5
+ convertModel(diyPageModel: DiyPageModel): PageModel;
6
+ findHomePage(vcardKey: string): Promise<ResponseData<DiyPageModel>>;
7
+ findDiyPageCandidate(query: DiyPageVcardReq): Promise<ResponseData<DiyPageModel>>;
8
+ update(data: DiyPageUpdateReq, tenant: string): Promise<ResponseData<DiyPageModel>>;
9
+ }
10
+ declare const diyPageApi: DiyPageApiImpl;
11
+ export { diyPageApi };
@@ -0,0 +1,33 @@
1
+ import { PageData } from "../types";
2
+ import { DiyCompModel } from "../comp/types";
3
+ export interface DiyPageModel {
4
+ pageId: string;
5
+ vcardId?: string;
6
+ pageName?: string;
7
+ pageCode?: string;
8
+ pageTemplate?: string;
9
+ pageImgUrl?: string;
10
+ pageData: PageData;
11
+ pageJson: string;
12
+ orderBy?: number;
13
+ compModels?: Array<DiyCompModel>;
14
+ }
15
+ export interface DiyPageVcardReq {
16
+ vcardKey?: string;
17
+ vcardToken?: string;
18
+ pageCode?: string;
19
+ hasComps?: boolean;
20
+ }
21
+ export interface DiyPageUpdateReq {
22
+ requestId: string;
23
+ updateMask: string;
24
+ tenant?: string;
25
+ pageId: string;
26
+ vcardId?: string;
27
+ pageName: string;
28
+ pageCode?: string;
29
+ pageTemplate: string;
30
+ pageImgUrl: string;
31
+ pageJson: string;
32
+ orderBy?: number;
33
+ }
@@ -0,0 +1,95 @@
1
+ export interface Comp {
2
+ compCode: CompCode;
3
+ compName: string;
4
+ compType: CompType;
5
+ compData: CompDataType;
6
+ }
7
+ export interface CompData {
8
+ showTitle: boolean;
9
+ titleStyle: TitleStyle;
10
+ init: boolean;
11
+ style?: any;
12
+ showMore?: boolean;
13
+ }
14
+ export type CompType = "BASIC" | "VCARD" | "ORGAN" | "MALL" | "OTHER";
15
+ export type TitleStyle = "left" | "center" | "right";
16
+ export interface ImageComp extends CompData {
17
+ style: ImageStyle;
18
+ imageUrls: Array<string>;
19
+ }
20
+ export declare enum ImageStyle {
21
+ swiper = "swiper",
22
+ flat = "flat",
23
+ grid = "grid"
24
+ }
25
+ export interface AudioComp extends CompData {
26
+ url: string;
27
+ autoPlay: boolean;
28
+ hidden: boolean;
29
+ external: boolean;
30
+ }
31
+ export interface VideoComp extends CompData {
32
+ imageUrl: string;
33
+ width: number;
34
+ height: number;
35
+ size: number;
36
+ duration: number;
37
+ videoUrl: string;
38
+ external: boolean;
39
+ }
40
+ export interface MapComp extends CompData {
41
+ }
42
+ export type CompCode = "text" | "image" | "video" | "audio" | "map";
43
+ export type CompDataType = MapComp | TextComp | ImageComp | VideoComp | AudioComp;
44
+ export interface TextComp extends CompData {
45
+ text: string;
46
+ }
47
+ export interface PageData {
48
+ theme: ThemeStyle;
49
+ edition: Edition;
50
+ themeIndex: number;
51
+ }
52
+ export declare enum ThemeStyle {
53
+ blue = 0,
54
+ red = 1,
55
+ gray = 2,
56
+ while = 3
57
+ }
58
+ export declare enum Edition {
59
+ com = 0,
60
+ gov = 1,
61
+ edu = 2
62
+ }
63
+ export interface PageModel {
64
+ pageId?: string;
65
+ vcardId?: string;
66
+ pageName?: string;
67
+ pageCode?: string;
68
+ pageTemplate?: string;
69
+ pageImgUrl?: string;
70
+ pageData?: PageData;
71
+ pageJson: string;
72
+ compModels?: Array<CompModel>;
73
+ }
74
+ export interface CompModel {
75
+ compId: string;
76
+ pageId: string;
77
+ compCode: CompCode;
78
+ compName: string;
79
+ compType: CompType;
80
+ compData: CompDataType;
81
+ orderBy: number;
82
+ }
83
+ export interface BusiDataModel {
84
+ }
85
+ export interface CompEventModel {
86
+ pageModel: PageModel;
87
+ compModel: CompModel;
88
+ busiDataModel: BusiDataModel;
89
+ }
90
+ export interface OrganDataModel extends BusiDataModel {
91
+ latitude: number;
92
+ longitude: number;
93
+ address: string;
94
+ mobilePhone: string;
95
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export type { DiyPageModel, DiyPageUpdateReq } from "./api/diy/page/types";
2
+ export type { DiyCompModel, DiyCompCreateReq, DiyCompList, DiyCompReq, DiyCompMoveKey, DiyCompMoveTopKey, DiyCompUpdateReq, } from "./api/diy/comp/types";
3
+ export { CompModel, PageModel, Edition, ThemeStyle, PageData, TextComp, CompData, CompDataType, CompCode, VideoComp, MapComp, ImageComp, AudioComp, ImageStyle, TitleStyle, CompType, Comp, BusiDataModel, OrganDataModel, CompEventModel, } from "./api/diy/types";
4
+ export { diyCompApi } from "./api/diy/comp";
5
+ export { diyPageApi } from "./api/diy/page";
@@ -0,0 +1 @@
1
+ export {};
package/mpx.config.js ADDED
@@ -0,0 +1,26 @@
1
+ const { defineConfig } = require('@vue/cli-service')
2
+ module.exports = defineConfig({
3
+ outputDir: `dist/${process.env.MPX_CURRENT_TARGET_MODE}`,
4
+ pluginOptions: {
5
+ mpx: {
6
+ plugin: {
7
+ srcMode: 'wx',
8
+ hackResolveBuildDependencies: ({ files, resolveDependencies }) => {
9
+ const path = require('path')
10
+ const packageJSONPath = path.resolve('package.json')
11
+ if (files.has(packageJSONPath)) files.delete(packageJSONPath)
12
+ if (resolveDependencies.files.has(packageJSONPath)) {
13
+ resolveDependencies.files.delete(packageJSONPath)
14
+ }
15
+ }
16
+ },
17
+ loader: {},
18
+ unocss: {}
19
+ }
20
+ },
21
+ /**
22
+ * 如果希望node_modules下的文件时对应的缓存可以失效,
23
+ * 可以将configureWebpack.snap.managedPaths修改为 []
24
+ */
25
+ configureWebpack(config) {}
26
+ })
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "jmash-diy-mp",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
7
+ "dependencies": {
8
+ "@mpxjs/api-proxy": "^2.10.0",
9
+ "@mpxjs/core": "^2.10.0",
10
+ "@mpxjs/fetch": "^2.10.0",
11
+ "@mpxjs/mpx-cube-ui": "^1.4.14",
12
+ "@mpxjs/pinia": "^2.10.0",
13
+ "@mpxjs/store": "^2.10.0",
14
+ "@mpxjs/utils": "^2.10.0",
15
+ "jmash-core-mp": "^0.1.8",
16
+ "pinia": "^2.0.14",
17
+ "vue": "^2.7.0",
18
+ "vue-demi": "^0.14.6",
19
+ "vue-i18n": "^8.27.2",
20
+ "vue-i18n-bridge": "^9.2.2",
21
+ "vue-router": "^3.1.3"
22
+ },
23
+ "devDependencies": {
24
+ "@babel/core": "^7.10.4",
25
+ "@babel/plugin-transform-runtime": "^7.10.4",
26
+ "@babel/preset-env": "^7.10.4",
27
+ "@babel/runtime-corejs3": "^7.10.4",
28
+ "@mpxjs/babel-plugin-inject-page-events": "^2.9.0",
29
+ "@mpxjs/eslint-config": "^2.0.3",
30
+ "@mpxjs/miniprogram-simulate": "^1.4.17",
31
+ "@mpxjs/mpx-cli-service": "^2.0.0",
32
+ "@mpxjs/mpx-jest": "^0.0.32",
33
+ "@mpxjs/size-report": "^2.10.0",
34
+ "@mpxjs/unocss-base": "^2.9.0",
35
+ "@mpxjs/unocss-plugin": "^2.9.0",
36
+ "@mpxjs/vue-cli-plugin-mpx": "^2.0.0",
37
+ "@mpxjs/vue-cli-plugin-mpx-eslint": "^2.0.0",
38
+ "@mpxjs/vue-cli-plugin-mpx-typescript": "^2.0.0",
39
+ "@mpxjs/vue-cli-plugin-mpx-unit-test": "^2.0.0",
40
+ "@mpxjs/vue-cli-plugin-mpx-utility-first-css": "^2.0.0",
41
+ "@mpxjs/webpack-plugin": "^2.10.0",
42
+ "@types/jest": "^27.5.1",
43
+ "@vue/cli-service": "~5.0.0",
44
+ "autoprefixer": "^10.2.4",
45
+ "babel-jest": "^27.4.5",
46
+ "eslint": "^9.0.0",
47
+ "jest": "^27.4.5",
48
+ "postcss": "^8.2.6",
49
+ "process": "^0.11.10",
50
+ "sass": "^1.99.0",
51
+ "sass-loader": "^16.0.7",
52
+ "stylus": "^0.55.0",
53
+ "stylus-loader": "^6.1.0",
54
+ "ts-jest": "^27.1.2",
55
+ "typescript": "^4.1.3",
56
+ "webpack": "^5.43.0"
57
+ },
58
+ "browserslist": [
59
+ "ios >= 8",
60
+ "chrome >= 47"
61
+ ],
62
+ "scripts": {
63
+ "tsc": "tsc --build",
64
+ "serve": "mpx-cli-service serve",
65
+ "build": "mpx-cli-service build && tsc --build ",
66
+ "lint": "eslint --ext .js,.ts,.mpx src/",
67
+ "build:ali": "mpx-cli-service build --targets=ali",
68
+ "build:web": "mpx-cli-service build --targets=web",
69
+ "serve:ali": "mpx-cli-service serve --targets=ali",
70
+ "serve:web": "mpx-cli-service serve --targets=web",
71
+ "test": "jest test/components"
72
+ }
73
+ }
@@ -0,0 +1,11 @@
1
+ const autoprefixer = require('autoprefixer')
2
+ const RN = ['android', 'ios', 'harmony']
3
+ const isRN = RN.includes(
4
+ process.env.MPX_CURRENT_TARGET_MODE
5
+ )
6
+ // RN环境下去除postcss的autoprefix插件
7
+ module.exports = {
8
+ plugins: [
9
+ !isRN && autoprefixer({ remove: false })
10
+ ].filter(Boolean)
11
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "setting": {
3
+ "es6": true,
4
+ "postcss": true,
5
+ "minified": true,
6
+ "uglifyFileName": false,
7
+ "enhance": true,
8
+ "packNpmRelationList": [],
9
+ "babelSetting": {
10
+ "ignore": [],
11
+ "disablePlugins": [],
12
+ "outputPath": ""
13
+ },
14
+ "useCompilerPlugins": false,
15
+ "minifyWXML": true
16
+ },
17
+ "compileType": "miniprogram",
18
+ "simulatorPluginLibVersion": {},
19
+ "packOptions": {
20
+ "ignore": [],
21
+ "include": []
22
+ },
23
+ "appid": "wx2a8b3d689b8959eb",
24
+ "editorSetting": {}
25
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "libVersion": "3.15.2",
3
+ "projectname": "jmash-diy-mp",
4
+ "setting": {
5
+ "urlCheck": true,
6
+ "coverView": true,
7
+ "lazyloadPlaceholderEnable": false,
8
+ "skylineRenderEnable": false,
9
+ "preloadBackgroundData": false,
10
+ "autoAudits": false,
11
+ "showShadowRootInWxmlPanel": true,
12
+ "compileHotReLoad": true
13
+ }
14
+ }
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport"
6
+ content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover">
7
+ <meta name="format-detection" content="telephone=no">
8
+ <meta name="x5-cache" content="disable">
9
+ <title></title>
10
+ </head>
11
+ <body>
12
+ <div id="app"></div>
13
+ <!-- built files will be auto injected -->
14
+ </body>
15
+ </html>