udxcms 1.0.15 → 1.0.16
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/dist/api/common.js +54 -88
- package/dist/api/h5/axios.js +15 -20
- package/dist/api/h5/common.js +21 -37
- package/dist/api/index.js +20 -62
- package/dist/config/const.js +5 -8
- package/dist/config/index.js +1 -3
- package/dist/filter/dateyear.js +1 -4
- package/dist/filter/numberFormat.js +1 -4
- package/dist/index.js +35 -60
- package/dist/libs/localStorageConstant.js +18 -21
- package/dist/mixins/themeMixin-votex.js +1 -3
- package/dist/mixins/themeMixin.js +1 -3
- package/dist/router/Home.js +32 -70
- package/dist/router/index.js +1 -8
- package/dist/store/CmsStore.js +3 -5
- package/dist/store/CmsStoreH5.js +4 -6
- package/dist/store/index.js +2 -10
- package/dist/utils/EventBus.js +1 -4
- package/dist/utils/Session.js +1 -4
- package/dist/utils/Storage.js +2 -38
- package/dist/utils/apiEvent.js +2 -7
- package/dist/utils/axiosRetry.js +9 -14
- package/dist/utils/connect.js +21 -29
- package/dist/utils/http.js +17 -24
- package/dist/utils/index.js +97 -166
- package/dist/utils/isMobile.js +1 -4
- package/dist/utils/parse.js +3 -7
- package/dist/utils/pdf.js +3 -7
- package/package.json +1 -1
package/dist/utils/parse.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isJSON = isJSON;
|
|
4
|
-
exports.unwrapJSONStr = unwrapJSONStr;
|
|
5
1
|
/*
|
|
6
2
|
* @Author: lewis lewis@everylink.ai
|
|
7
3
|
* @Date: 2023-12-19 10:49:53
|
|
@@ -14,7 +10,7 @@ exports.unwrapJSONStr = unwrapJSONStr;
|
|
|
14
10
|
* 判断是否是json 字符串
|
|
15
11
|
* @param {*} jsonString 字符串
|
|
16
12
|
*/
|
|
17
|
-
function isJSON(jsonString) {
|
|
13
|
+
export function isJSON(jsonString) {
|
|
18
14
|
try {
|
|
19
15
|
const res = JSON.parse(jsonString);
|
|
20
16
|
if (typeof res === 'object' && res) {
|
|
@@ -31,13 +27,13 @@ function isJSON(jsonString) {
|
|
|
31
27
|
* 解包json字符串
|
|
32
28
|
* @param str 兼容格式 JSON.stringify的n层嵌套
|
|
33
29
|
*/
|
|
34
|
-
function unwrapJSONStr(str) {
|
|
30
|
+
export function unwrapJSONStr(str) {
|
|
35
31
|
if (typeof str === "string") {
|
|
36
32
|
return unwrapJSONStr(JSON.parse(str));
|
|
37
33
|
}
|
|
38
34
|
return str;
|
|
39
35
|
}
|
|
40
|
-
|
|
36
|
+
export default {
|
|
41
37
|
isJSON,
|
|
42
38
|
unwrapJSONStr
|
|
43
39
|
};
|
package/dist/utils/pdf.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Pdfembed = void 0;
|
|
4
1
|
/*
|
|
5
2
|
* @Author:
|
|
6
3
|
* @Date: 2020-12-17 19:28:53
|
|
@@ -16,7 +13,7 @@ exports.Pdfembed = void 0;
|
|
|
16
13
|
* MIT-style license: http://pipwerks.mit-license.org/
|
|
17
14
|
* UMD module pattern from https://github.com/umdjs/umd/blob/master/templates/returnExports.js
|
|
18
15
|
*/
|
|
19
|
-
const Pdfembed = function () {
|
|
16
|
+
export const Pdfembed = function () {
|
|
20
17
|
let nav = window.navigator, ua = window.navigator.userAgent, isIE = "ActiveXObject" in window, isModernBrowser = void 0 !== window.Promise, supportsPdfMimeType = void 0 !== nav.mimeTypes["application/pdf"], isMobileDevice = void 0 !== nav.platform && "MacIntel" === nav.platform && void 0 !== nav.maxTouchPoints && nav.maxTouchPoints > 1 || /Mobi|Tablet|Android|iPad|iPhone/.test(ua), isSafariDesktop = !isMobileDevice && void 0 !== nav.vendor && /Apple/.test(nav.vendor) && /Safari/.test(ua), isFirefoxWithPDFJS = !(isMobileDevice || !/irefox/.test(ua)) && parseInt(ua.split("rv:")[1].split(".")[0], 10) > 18, createAXO = function (type) {
|
|
21
18
|
var ax;
|
|
22
19
|
try {
|
|
@@ -75,7 +72,6 @@ const Pdfembed = function () {
|
|
|
75
72
|
supportsPDFs: supportsPDFs
|
|
76
73
|
};
|
|
77
74
|
};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
Pdfembed: exports.Pdfembed
|
|
75
|
+
export default {
|
|
76
|
+
Pdfembed
|
|
81
77
|
};
|