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/src/utils/net.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { sm2 } from "sm-crypto";
|
|
2
|
-
|
|
3
|
-
// net工具类
|
|
4
|
-
class NetUtil {
|
|
5
|
-
private publicKey: string =
|
|
6
|
-
"04ad5161202264bb7c201f4cc39d6fb00fed81fc2cec1b3f23ddfb933d3f32977be40e4285cff6da4bad65933777c135b95f41846363086e34624ff73b3685e84c";
|
|
7
|
-
|
|
8
|
-
//加密.
|
|
9
|
-
encrypt(data: string): string {
|
|
10
|
-
return sm2.doEncrypt(data, this.publicKey);
|
|
11
|
-
}
|
|
12
|
-
//解密
|
|
13
|
-
decrypt(data: string): string {
|
|
14
|
-
return sm2.doDecrypt(data, this.publicKey);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
const net = new NetUtil();
|
|
18
|
-
export { net };
|
|
1
|
+
import { sm2 } from "sm-crypto";
|
|
2
|
+
|
|
3
|
+
// net工具类
|
|
4
|
+
class NetUtil {
|
|
5
|
+
private publicKey: string =
|
|
6
|
+
"04ad5161202264bb7c201f4cc39d6fb00fed81fc2cec1b3f23ddfb933d3f32977be40e4285cff6da4bad65933777c135b95f41846363086e34624ff73b3685e84c";
|
|
7
|
+
|
|
8
|
+
//加密.
|
|
9
|
+
encrypt(data: string): string {
|
|
10
|
+
return sm2.doEncrypt(data, this.publicKey);
|
|
11
|
+
}
|
|
12
|
+
//解密
|
|
13
|
+
decrypt(data: string): string {
|
|
14
|
+
return sm2.doDecrypt(data, this.publicKey);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const net = new NetUtil();
|
|
18
|
+
export { net };
|
package/src/utils/request.ts
CHANGED
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
import type { TokenModel } from "../api/auth/types";
|
|
2
|
-
|
|
3
|
-
import { db } from "../utils/db";
|
|
4
|
-
import { grpc } from "../utils/grpc";
|
|
5
|
-
|
|
6
|
-
import mpx from "@mpxjs/core";
|
|
7
|
-
import mpxFetch from "@mpxjs/fetch";
|
|
8
|
-
mpx.use(mpxFetch);
|
|
9
|
-
|
|
10
|
-
let isRefreshing = false;
|
|
11
|
-
type TokenCallBackFunc = (token: string) => void;
|
|
12
|
-
let requests: TokenCallBackFunc[] = [];
|
|
13
|
-
//是否登出.
|
|
14
|
-
let isLogout = false;
|
|
15
|
-
|
|
16
|
-
mpx.xfetch.interceptors.request.use(function (config) {
|
|
17
|
-
if (!config.url.startsWith("http")) {
|
|
18
|
-
const appconfig = getApp().globalData.config;
|
|
19
|
-
config.url = appconfig.baseUrl + config.url;
|
|
20
|
-
}
|
|
21
|
-
//console.log("request:", config);
|
|
22
|
-
// Grpc Gateway 清理默认值,Enum,时间等不能空;
|
|
23
|
-
grpc.clearEmpty(config.params);
|
|
24
|
-
grpc.clearEmpty(config.data);
|
|
25
|
-
if (!config.header) {
|
|
26
|
-
config.header = {};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
//配置其他认证请求头信息
|
|
30
|
-
if (
|
|
31
|
-
config.header.Authorization !== null &&
|
|
32
|
-
config.header.Authorization !== undefined &&
|
|
33
|
-
config.header.Authorization === false
|
|
34
|
-
) {
|
|
35
|
-
delete config.header.Authorization;
|
|
36
|
-
return config;
|
|
37
|
-
}
|
|
38
|
-
const auth =
|
|
39
|
-
config.header.Authorization && config.header.Authorization !== null
|
|
40
|
-
? (config.header.Authorization as string)
|
|
41
|
-
: "";
|
|
42
|
-
if (auth && auth.length > 0 && !auth.startsWith("Bearer ")) {
|
|
43
|
-
return config;
|
|
44
|
-
}
|
|
45
|
-
// 请求设置token和租户
|
|
46
|
-
const expire = db.isTokenExpires();
|
|
47
|
-
if (!expire && db.getToken()) {
|
|
48
|
-
config.header["Authorization"] = "Bearer " + db.getToken();
|
|
49
|
-
const organTenant = db.getOrganTenant(config.tenant);
|
|
50
|
-
if (organTenant && config.header.GrpcMetadataTenant !== false) {
|
|
51
|
-
config.header["Grpc-Metadata-Tenant"] = organTenant;
|
|
52
|
-
} else {
|
|
53
|
-
delete config.header["Grpc-Metadata-Tenant"];
|
|
54
|
-
}
|
|
55
|
-
//console.log("header:", config.header);
|
|
56
|
-
} else if (!db.getRefreshToken()) {
|
|
57
|
-
console.log("not token request. ");
|
|
58
|
-
return config;
|
|
59
|
-
} else {
|
|
60
|
-
console.log("token expire", expire);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const isRefreshToken = config.url.endsWith("/v1/rbac/auth/refresh_token");
|
|
64
|
-
//Token已过期或即将过期.
|
|
65
|
-
if (!isRefreshToken && expire) {
|
|
66
|
-
if (!isRefreshing) {
|
|
67
|
-
isRefreshing = true;
|
|
68
|
-
// 刷新token
|
|
69
|
-
refreshToken(db.getRefreshToken())
|
|
70
|
-
.then((res) => {
|
|
71
|
-
// token 刷新后将数组的方法重新执行
|
|
72
|
-
console.log("refreshToken-res", res);
|
|
73
|
-
db.setToken(res.data);
|
|
74
|
-
requests.forEach((cb) => cb(res.data.accessToken));
|
|
75
|
-
requests = []; // 刷新完清空
|
|
76
|
-
})
|
|
77
|
-
.catch(() => {
|
|
78
|
-
db.clearStorage();
|
|
79
|
-
})
|
|
80
|
-
.finally(() => {
|
|
81
|
-
isRefreshing = false;
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
const retry = new Promise<any>((resolve) => {
|
|
85
|
-
/* (token) => {...}这个函数就是回调函数*/
|
|
86
|
-
requests.push((token) => {
|
|
87
|
-
config.header.Authorization = "Bearer " + token;
|
|
88
|
-
resolve(config);
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
return retry;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// 也可以返回promise
|
|
95
|
-
return config;
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
mpx.xfetch.interceptors.response.use(function (res) {
|
|
99
|
-
// console.log(“response:”,res);
|
|
100
|
-
if (res.statusCode === 200) {
|
|
101
|
-
return res;
|
|
102
|
-
} else if (res.statusCode === 401) {
|
|
103
|
-
// token 过期,重新登录
|
|
104
|
-
if (!isLogout) {
|
|
105
|
-
isLogout = true;
|
|
106
|
-
mpx.showToast({
|
|
107
|
-
title: "当前页面已失效,请重新登录",
|
|
108
|
-
icon: "none",
|
|
109
|
-
});
|
|
110
|
-
db.clearStorage();
|
|
111
|
-
isLogout = false;
|
|
112
|
-
}
|
|
113
|
-
return Promise.reject(res);
|
|
114
|
-
}
|
|
115
|
-
// 返回promise,通过catch ,处理 code,message.
|
|
116
|
-
return Promise.reject(res);
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
//刷新Token
|
|
120
|
-
function refreshToken(refreshToken: string) {
|
|
121
|
-
const appconfig = getApp().globalData.config;
|
|
122
|
-
return mpx.xfetch.fetch<TokenModel>({
|
|
123
|
-
url: appconfig.baseUrl + "/v1/front/rbac/auth/refresh_token",
|
|
124
|
-
method: "POST",
|
|
125
|
-
data: {
|
|
126
|
-
data: { refreshToken: refreshToken },
|
|
127
|
-
tenant: appconfig.tenant,
|
|
128
|
-
clientId: appconfig.appId,
|
|
129
|
-
},
|
|
130
|
-
header: { Authorization: false },
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export { mpxFetch };
|
|
1
|
+
import type { TokenModel } from "../api/auth/types";
|
|
2
|
+
|
|
3
|
+
import { db } from "../utils/db";
|
|
4
|
+
import { grpc } from "../utils/grpc";
|
|
5
|
+
|
|
6
|
+
import mpx from "@mpxjs/core";
|
|
7
|
+
import mpxFetch from "@mpxjs/fetch";
|
|
8
|
+
mpx.use(mpxFetch);
|
|
9
|
+
|
|
10
|
+
let isRefreshing = false;
|
|
11
|
+
type TokenCallBackFunc = (token: string) => void;
|
|
12
|
+
let requests: TokenCallBackFunc[] = [];
|
|
13
|
+
//是否登出.
|
|
14
|
+
let isLogout = false;
|
|
15
|
+
|
|
16
|
+
mpx.xfetch.interceptors.request.use(function (config) {
|
|
17
|
+
if (!config.url.startsWith("http")) {
|
|
18
|
+
const appconfig = getApp().globalData.config;
|
|
19
|
+
config.url = appconfig.baseUrl + config.url;
|
|
20
|
+
}
|
|
21
|
+
//console.log("request:", config);
|
|
22
|
+
// Grpc Gateway 清理默认值,Enum,时间等不能空;
|
|
23
|
+
grpc.clearEmpty(config.params);
|
|
24
|
+
grpc.clearEmpty(config.data);
|
|
25
|
+
if (!config.header) {
|
|
26
|
+
config.header = {};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//配置其他认证请求头信息
|
|
30
|
+
if (
|
|
31
|
+
config.header.Authorization !== null &&
|
|
32
|
+
config.header.Authorization !== undefined &&
|
|
33
|
+
config.header.Authorization === false
|
|
34
|
+
) {
|
|
35
|
+
delete config.header.Authorization;
|
|
36
|
+
return config;
|
|
37
|
+
}
|
|
38
|
+
const auth =
|
|
39
|
+
config.header.Authorization && config.header.Authorization !== null
|
|
40
|
+
? (config.header.Authorization as string)
|
|
41
|
+
: "";
|
|
42
|
+
if (auth && auth.length > 0 && !auth.startsWith("Bearer ")) {
|
|
43
|
+
return config;
|
|
44
|
+
}
|
|
45
|
+
// 请求设置token和租户
|
|
46
|
+
const expire = db.isTokenExpires();
|
|
47
|
+
if (!expire && db.getToken()) {
|
|
48
|
+
config.header["Authorization"] = "Bearer " + db.getToken();
|
|
49
|
+
const organTenant = db.getOrganTenant(config.tenant);
|
|
50
|
+
if (organTenant && config.header.GrpcMetadataTenant !== false) {
|
|
51
|
+
config.header["Grpc-Metadata-Tenant"] = organTenant;
|
|
52
|
+
} else {
|
|
53
|
+
delete config.header["Grpc-Metadata-Tenant"];
|
|
54
|
+
}
|
|
55
|
+
//console.log("header:", config.header);
|
|
56
|
+
} else if (!db.getRefreshToken()) {
|
|
57
|
+
console.log("not token request. ");
|
|
58
|
+
return config;
|
|
59
|
+
} else {
|
|
60
|
+
console.log("token expire", expire);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const isRefreshToken = config.url.endsWith("/v1/rbac/auth/refresh_token");
|
|
64
|
+
//Token已过期或即将过期.
|
|
65
|
+
if (!isRefreshToken && expire) {
|
|
66
|
+
if (!isRefreshing) {
|
|
67
|
+
isRefreshing = true;
|
|
68
|
+
// 刷新token
|
|
69
|
+
refreshToken(db.getRefreshToken())
|
|
70
|
+
.then((res) => {
|
|
71
|
+
// token 刷新后将数组的方法重新执行
|
|
72
|
+
console.log("refreshToken-res", res);
|
|
73
|
+
db.setToken(res.data);
|
|
74
|
+
requests.forEach((cb) => cb(res.data.accessToken));
|
|
75
|
+
requests = []; // 刷新完清空
|
|
76
|
+
})
|
|
77
|
+
.catch(() => {
|
|
78
|
+
db.clearStorage();
|
|
79
|
+
})
|
|
80
|
+
.finally(() => {
|
|
81
|
+
isRefreshing = false;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
const retry = new Promise<any>((resolve) => {
|
|
85
|
+
/* (token) => {...}这个函数就是回调函数*/
|
|
86
|
+
requests.push((token) => {
|
|
87
|
+
config.header.Authorization = "Bearer " + token;
|
|
88
|
+
resolve(config);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
return retry;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// 也可以返回promise
|
|
95
|
+
return config;
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
mpx.xfetch.interceptors.response.use(function (res) {
|
|
99
|
+
// console.log(“response:”,res);
|
|
100
|
+
if (res.statusCode === 200) {
|
|
101
|
+
return res;
|
|
102
|
+
} else if (res.statusCode === 401) {
|
|
103
|
+
// token 过期,重新登录
|
|
104
|
+
if (!isLogout) {
|
|
105
|
+
isLogout = true;
|
|
106
|
+
mpx.showToast({
|
|
107
|
+
title: "当前页面已失效,请重新登录",
|
|
108
|
+
icon: "none",
|
|
109
|
+
});
|
|
110
|
+
db.clearStorage();
|
|
111
|
+
isLogout = false;
|
|
112
|
+
}
|
|
113
|
+
return Promise.reject(res);
|
|
114
|
+
}
|
|
115
|
+
// 返回promise,通过catch ,处理 code,message.
|
|
116
|
+
return Promise.reject(res);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
//刷新Token
|
|
120
|
+
function refreshToken(refreshToken: string) {
|
|
121
|
+
const appconfig = getApp().globalData.config;
|
|
122
|
+
return mpx.xfetch.fetch<TokenModel>({
|
|
123
|
+
url: appconfig.baseUrl + "/v1/front/rbac/auth/refresh_token",
|
|
124
|
+
method: "POST",
|
|
125
|
+
data: {
|
|
126
|
+
data: { refreshToken: refreshToken },
|
|
127
|
+
tenant: appconfig.tenant,
|
|
128
|
+
clientId: appconfig.appId,
|
|
129
|
+
},
|
|
130
|
+
header: { Authorization: false },
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export { mpxFetch };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"enableAppxNg": true,
|
|
3
|
-
"component2": true
|
|
4
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"enableAppxNg": true,
|
|
3
|
+
"component2": true
|
|
4
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
"setting": {
|
|
3
|
-
"newFeature": true,
|
|
4
|
-
"urlCheck": true,
|
|
5
|
-
"es6": false,
|
|
6
|
-
"postcss": false,
|
|
7
|
-
"minified": false,
|
|
8
|
-
"checkSiteMap": false,
|
|
9
|
-
"autoAudits": false
|
|
10
|
-
},
|
|
11
|
-
"appid": "wx2a8b3d689b8959eb",
|
|
12
|
-
"projectname": "jmash-core-mp",
|
|
13
|
-
"description": "Jmash Core MPX小程序",
|
|
14
|
-
"condition": {}
|
|
15
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"setting": {
|
|
3
|
+
"newFeature": true,
|
|
4
|
+
"urlCheck": true,
|
|
5
|
+
"es6": false,
|
|
6
|
+
"postcss": false,
|
|
7
|
+
"minified": false,
|
|
8
|
+
"checkSiteMap": false,
|
|
9
|
+
"autoAudits": false
|
|
10
|
+
},
|
|
11
|
+
"appid": "wx2a8b3d689b8959eb",
|
|
12
|
+
"projectname": "jmash-core-mp",
|
|
13
|
+
"description": "Jmash Core MPX小程序",
|
|
14
|
+
"condition": {}
|
|
15
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilation-args": {
|
|
3
|
-
"common": {
|
|
4
|
-
"ignoreTransJs": true,
|
|
5
|
-
"ignoreUglify": true
|
|
6
|
-
},
|
|
7
|
-
"options": [],
|
|
8
|
-
"selected": -3
|
|
9
|
-
},
|
|
10
|
-
"projectname": "jmash-core-mp",
|
|
11
|
-
"setting": {
|
|
12
|
-
"urlCheck": true
|
|
13
|
-
}
|
|
14
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilation-args": {
|
|
3
|
+
"common": {
|
|
4
|
+
"ignoreTransJs": true,
|
|
5
|
+
"ignoreUglify": true
|
|
6
|
+
},
|
|
7
|
+
"options": [],
|
|
8
|
+
"selected": -3
|
|
9
|
+
},
|
|
10
|
+
"projectname": "jmash-core-mp",
|
|
11
|
+
"setting": {
|
|
12
|
+
"urlCheck": true
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"setting": {
|
|
3
|
-
"urlCheck": true,
|
|
4
|
-
"es6": false,
|
|
5
|
-
"postcss": false,
|
|
6
|
-
"minified": false,
|
|
7
|
-
"newFeature": true
|
|
8
|
-
},
|
|
9
|
-
"appid": "testAppId",
|
|
10
|
-
"projectname": "jmash-core-mp"
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"setting": {
|
|
3
|
+
"urlCheck": true,
|
|
4
|
+
"es6": false,
|
|
5
|
+
"postcss": false,
|
|
6
|
+
"minified": false,
|
|
7
|
+
"newFeature": true
|
|
8
|
+
},
|
|
9
|
+
"appid": "testAppId",
|
|
10
|
+
"projectname": "jmash-core-mp"
|
|
11
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"setting": {
|
|
3
|
-
"newFeature": true,
|
|
4
|
-
"urlCheck": true,
|
|
5
|
-
"es6": false,
|
|
6
|
-
"postcss": true,
|
|
7
|
-
"minified": false,
|
|
8
|
-
"checkSiteMap": false,
|
|
9
|
-
"autoAudits": false,
|
|
10
|
-
"compileWorklet": false,
|
|
11
|
-
"uglifyFileName": false,
|
|
12
|
-
"uploadWithSourceMap": true,
|
|
13
|
-
"enhance": false,
|
|
14
|
-
"packNpmManually": false,
|
|
15
|
-
"packNpmRelationList": [],
|
|
16
|
-
"minifyWXSS": true,
|
|
17
|
-
"minifyWXML": true,
|
|
18
|
-
"localPlugins": false,
|
|
19
|
-
"disableUseStrict": false,
|
|
20
|
-
"useCompilerPlugins": false,
|
|
21
|
-
"condition": false,
|
|
22
|
-
"swc": false,
|
|
23
|
-
"disableSWC": true,
|
|
24
|
-
"babelSetting": {
|
|
25
|
-
"ignore": [],
|
|
26
|
-
"disablePlugins": [],
|
|
27
|
-
"outputPath": ""
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"appid": "wx2a8b3d689b8959eb",
|
|
31
|
-
"projectname": "jmash-core-mp",
|
|
32
|
-
"description": "Jmash Core MPX小程序",
|
|
33
|
-
"condition": {},
|
|
34
|
-
"compileType": "miniprogram",
|
|
35
|
-
"simulatorPluginLibVersion": {},
|
|
36
|
-
"packOptions": {
|
|
37
|
-
"ignore": [],
|
|
38
|
-
"include": []
|
|
39
|
-
},
|
|
40
|
-
"editorSetting": {}
|
|
1
|
+
{
|
|
2
|
+
"setting": {
|
|
3
|
+
"newFeature": true,
|
|
4
|
+
"urlCheck": true,
|
|
5
|
+
"es6": false,
|
|
6
|
+
"postcss": true,
|
|
7
|
+
"minified": false,
|
|
8
|
+
"checkSiteMap": false,
|
|
9
|
+
"autoAudits": false,
|
|
10
|
+
"compileWorklet": false,
|
|
11
|
+
"uglifyFileName": false,
|
|
12
|
+
"uploadWithSourceMap": true,
|
|
13
|
+
"enhance": false,
|
|
14
|
+
"packNpmManually": false,
|
|
15
|
+
"packNpmRelationList": [],
|
|
16
|
+
"minifyWXSS": true,
|
|
17
|
+
"minifyWXML": true,
|
|
18
|
+
"localPlugins": false,
|
|
19
|
+
"disableUseStrict": false,
|
|
20
|
+
"useCompilerPlugins": false,
|
|
21
|
+
"condition": false,
|
|
22
|
+
"swc": false,
|
|
23
|
+
"disableSWC": true,
|
|
24
|
+
"babelSetting": {
|
|
25
|
+
"ignore": [],
|
|
26
|
+
"disablePlugins": [],
|
|
27
|
+
"outputPath": ""
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"appid": "wx2a8b3d689b8959eb",
|
|
31
|
+
"projectname": "jmash-core-mp",
|
|
32
|
+
"description": "Jmash Core MPX小程序",
|
|
33
|
+
"condition": {},
|
|
34
|
+
"compileType": "miniprogram",
|
|
35
|
+
"simulatorPluginLibVersion": {},
|
|
36
|
+
"packOptions": {
|
|
37
|
+
"ignore": [],
|
|
38
|
+
"include": []
|
|
39
|
+
},
|
|
40
|
+
"editorSetting": {}
|
|
41
41
|
}
|
package/uno.config.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const { defineConfig } = require('unocss')
|
|
2
|
-
const presetMpx = require('@mpxjs/unocss-base')
|
|
3
|
-
|
|
4
|
-
module.exports = defineConfig({
|
|
5
|
-
include: [/\.mpx($|\?)/],
|
|
6
|
-
presets: [
|
|
7
|
-
presetMpx()
|
|
8
|
-
]
|
|
9
|
-
})
|
|
1
|
+
const { defineConfig } = require('unocss')
|
|
2
|
+
const presetMpx = require('@mpxjs/unocss-base')
|
|
3
|
+
|
|
4
|
+
module.exports = defineConfig({
|
|
5
|
+
include: [/\.mpx($|\?)/],
|
|
6
|
+
presets: [
|
|
7
|
+
presetMpx()
|
|
8
|
+
]
|
|
9
|
+
})
|