@zgfe/business-lib 1.1.29-visual.8 → 1.1.29
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/es/addToPanel/components/addPanel.js +21 -8
- package/es/addToPanel/components/radioGroup.js +3 -1
- package/es/addToPanel/components/styleList.js +22 -5
- package/es/addToPanel/demo/edit.js +12 -5
- package/es/addToPanel/demo/index.js +12 -5
- package/es/addToPanel/index.js +58 -21
- package/es/addToScene/addGroup.js +4 -0
- package/es/addToScene/demo/index.js +12 -5
- package/es/addToScene/index.js +40 -13
- package/es/assets/demo/index.js +2 -0
- package/es/assets/demo/input.js +12 -5
- package/es/assets/iconfont/iconfont.js +17 -10
- package/es/assets/theme.js +1 -0
- package/es/attrConditions/components/operateList.js +27 -10
- package/es/attrConditions/components/stringList.js +97 -68
- package/es/attrConditions/components/valuesList.js +40 -14
- package/es/attrConditions/demo/group.js +23 -11
- package/es/attrConditions/demo/index.js +26 -17
- package/es/attrConditions/group.js +48 -17
- package/es/attrConditions/index.js +49 -22
- package/es/attrConditions/types.js +1 -0
- package/es/attributeSelector/demo/disable.js +16 -8
- package/es/attributeSelector/demo/index.js +17 -8
- package/es/attributeSelector/index.js +45 -22
- package/es/attributeSelector/listPanel.js +46 -18
- package/es/attributeSelector/option.js +13 -3
- package/es/attributeSelector/types.js +5 -0
- package/es/attributeSelector/util.js +3 -0
- package/es/chart/demo/index.js +14 -5
- package/es/chart/index.js +44 -30
- package/es/chart/util/chartOptionConfig.d.ts +3 -3
- package/es/chart/util/chartOptionConfig.js +37 -13
- package/es/chart/util/data/china.js +4 -1
- package/es/chart/util/formatData.d.ts +2 -2
- package/es/chart/util/formatData.js +5 -0
- package/es/chart/util/formatOption.js +13 -0
- package/es/chart/util/mapUtil.js +26 -5
- package/es/config.js +2 -0
- package/es/constants/apis.d.ts +0 -1
- package/es/constants/apis.js +1 -2
- package/es/cycleTime/demo/disable.js +1 -0
- package/es/cycleTime/index.js +46 -19
- package/es/cycleTime/month.js +27 -8
- package/es/datePicker/datePicker.js +23 -5
- package/es/datePicker/demo/customType.js +22 -13
- package/es/datePicker/demo/day.js +22 -13
- package/es/datePicker/demo/index.js +21 -12
- package/es/datePicker/index.js +41 -18
- package/es/datePicker/utils.js +7 -0
- package/es/demoWrapper/content.d.ts +1 -2
- package/es/demoWrapper/content.js +64 -42
- package/es/demoWrapper/demo/index.js +4 -5
- package/es/demoWrapper/head.d.ts +1 -3
- package/es/demoWrapper/head.js +27 -25
- package/es/demoWrapper/index.js +36 -28
- package/es/dialog/demo/index.js +12 -5
- package/es/dialog/index.js +6 -4
- package/es/dnd/demo/data.js +28 -19
- package/es/dnd/demo/handle.js +28 -19
- package/es/dnd/index.js +45 -21
- package/es/dnd/item.js +30 -10
- package/es/eventSelector/demo/index.js +23 -12
- package/es/eventSelector/index.js +42 -14
- package/es/eventSelector/listPanel.js +73 -31
- package/es/eventSelector/option.js +11 -6
- package/es/icon/iconFont.js +13 -7
- package/es/index.d.ts +1 -2
- package/es/index.js +1 -2
- package/es/layout/analysisLayout/demo/index.js +6 -0
- package/es/layout/analysisLayout/index.d.ts +1 -1
- package/es/layout/analysisLayout/index.js +34 -16
- package/es/layout/detail/index.js +3 -1
- package/es/loginForm/index.js +18 -7
- package/es/searchInput/index.js +7 -2
- package/es/select/demo/children.js +16 -8
- package/es/select/demo/customLabel.js +2 -0
- package/es/select/demo/group.js +17 -8
- package/es/select/demo/index.js +19 -11
- package/es/select/demo/loading.js +18 -8
- package/es/select/demo/multiple.js +16 -8
- package/es/select/handle.js +34 -14
- package/es/select/index.js +59 -22
- package/es/select/option.js +30 -10
- package/es/select/overlay.js +62 -25
- package/es/table/demo/data/table.js +2 -0
- package/es/table/demo/index.js +39 -13
- package/es/table/demo/index2.js +15 -5
- package/es/table/demo/index3.js +28 -7
- package/es/table/index.js +33 -14
- package/es/targetConditionGroup/components/targetDimension.js +38 -12
- package/es/targetConditionGroup/demo/group.js +36 -21
- package/es/targetConditionGroup/demo/index.js +13 -5
- package/es/targetConditionGroup/index.js +84 -31
- package/es/targetSelector/demo/index.js +28 -15
- package/es/targetSelector/editBox.js +20 -5
- package/es/targetSelector/index.js +36 -15
- package/es/targetSelector/optionIcon.js +5 -1
- package/es/targetSelector/optionMenu.js +3 -0
- package/es/userCondition/conditionTypeList.js +12 -7
- package/es/userCondition/conditionWrap.js +2 -0
- package/es/userCondition/conditions/cdpCondition.js +97 -51
- package/es/userCondition/conditions/eventCondition.js +16 -6
- package/es/userCondition/conditions/periodCondition.js +26 -8
- package/es/userCondition/conditions/propCondition.js +61 -29
- package/es/userCondition/conditions/runTimesCondition.js +10 -5
- package/es/userCondition/conditions/tagsCondition.d.ts +1 -1
- package/es/userCondition/conditions/tagsCondition.js +33 -15
- package/es/userCondition/conditions/textDesc.js +67 -16
- package/es/userCondition/demo/index.js +21 -11
- package/es/userCondition/index.js +91 -51
- package/es/userCondition/orConditions.js +48 -11
- package/es/userCondition/relationLabel.js +4 -1
- package/es/userCondition/types.d.ts +1 -1
- package/es/userCondition/types.js +1 -0
- package/es/userCondition/util.js +13 -4
- package/es/userGroup/demo/group.js +23 -14
- package/es/userGroup/demo/index.js +15 -5
- package/es/userGroup/index.js +30 -12
- package/es/userTagsSelector/cascaderOverlay.js +51 -19
- package/es/userTagsSelector/components/search/index.js +2 -0
- package/es/userTagsSelector/demo/index.js +3 -0
- package/es/userTagsSelector/groups/groupOption.js +8 -6
- package/es/userTagsSelector/groups/index.js +30 -15
- package/es/userTagsSelector/index.js +35 -17
- package/es/userTagsSelector/multipleCheckPanel/checkOption.js +6 -3
- package/es/userTagsSelector/multipleCheckPanel/index.js +21 -8
- package/es/userTagsSelector/util.js +2 -0
- package/es/utils/ajax.js +71 -45
- package/es/utils/base64.js +22 -3
- package/es/utils/type.d.ts +1 -1
- package/es/utils/type.js +7 -4
- package/es/utils/util.js +16 -0
- package/package.json +2 -2
- package/es/socket/demo/demo.d.ts +0 -2
- package/es/socket/demo/demo.js +0 -139
- package/es/socket/demo/index.less +0 -27
- package/es/socket/index.d.ts +0 -31
- package/es/socket/index.js +0 -284
- package/es/socket/types.d.ts +0 -37
- package/es/socket/types.js +0 -26
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
1
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
|
|
8
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
|
|
9
11
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
+
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
+
|
|
15
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16
|
+
|
|
12
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
|
|
13
19
|
import React, { useState } from 'react';
|
|
14
20
|
import { Dropdown } from 'antd';
|
|
15
21
|
import SelectHandle from '../select/handle';
|
|
@@ -19,34 +25,42 @@ import { useMemo } from 'react';
|
|
|
19
25
|
import { util } from '../utils';
|
|
20
26
|
import _ from 'lodash';
|
|
21
27
|
export var classPrefix = 'biz-user-tags-selector';
|
|
28
|
+
|
|
22
29
|
var UserTagsSelect = function UserTagsSelect(props) {
|
|
23
30
|
var defaultValue = props.defaultValue,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
data = props.data,
|
|
32
|
+
labelFields = props.labelFields,
|
|
33
|
+
childFields = props.childFields,
|
|
34
|
+
keyFields = props.keyFields,
|
|
35
|
+
valueFields = props.valueFields;
|
|
36
|
+
|
|
29
37
|
var _useState = useState(util.isArray(defaultValue) ? defaultValue : []),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
currentValue = _useState2[0],
|
|
40
|
+
setCurrentValue = _useState2[1];
|
|
41
|
+
|
|
33
42
|
var _useState3 = useState(false),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
43
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
44
|
+
visible = _useState4[0],
|
|
45
|
+
setVisible = _useState4[1];
|
|
46
|
+
|
|
37
47
|
var handleValue = useMemo(function () {
|
|
38
48
|
return currentValue.map(function (item) {
|
|
39
49
|
var last = item[item.length - 1];
|
|
40
50
|
var pre = item[item.length - 2];
|
|
51
|
+
|
|
41
52
|
var res = _objectSpread(_objectSpread({}, last), {}, {
|
|
42
53
|
handleText: "".concat(pre[labelFields[labelFields.length - 2]], "\uFF1A").concat(last[labelFields[labelFields.length - 1]])
|
|
43
54
|
});
|
|
55
|
+
|
|
44
56
|
return res;
|
|
45
57
|
});
|
|
46
58
|
}, [currentValue]);
|
|
59
|
+
|
|
47
60
|
function onVisibleChange(visible) {
|
|
48
61
|
setVisible(visible);
|
|
49
62
|
}
|
|
63
|
+
|
|
50
64
|
function onDelete(data) {
|
|
51
65
|
var current = currentValue.slice();
|
|
52
66
|
var index = current.findIndex(function (item) {
|
|
@@ -57,10 +71,12 @@ var UserTagsSelect = function UserTagsSelect(props) {
|
|
|
57
71
|
props.onChange && props.onChange(current);
|
|
58
72
|
setCurrentValue(current);
|
|
59
73
|
}
|
|
74
|
+
|
|
60
75
|
function onChange(val) {
|
|
61
76
|
props.onChange && props.onChange(val);
|
|
62
77
|
setCurrentValue(val);
|
|
63
78
|
}
|
|
79
|
+
|
|
64
80
|
function renderOverlay() {
|
|
65
81
|
if (!data || !data.length) return /*#__PURE__*/React.createElement("span", {
|
|
66
82
|
style: {
|
|
@@ -78,6 +94,7 @@ var UserTagsSelect = function UserTagsSelect(props) {
|
|
|
78
94
|
onChange: onChange
|
|
79
95
|
});
|
|
80
96
|
}
|
|
97
|
+
|
|
81
98
|
return /*#__PURE__*/React.createElement("div", {
|
|
82
99
|
className: classPrefix
|
|
83
100
|
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
@@ -101,6 +118,7 @@ var UserTagsSelect = function UserTagsSelect(props) {
|
|
|
101
118
|
onDelete: onDelete
|
|
102
119
|
}))));
|
|
103
120
|
};
|
|
121
|
+
|
|
104
122
|
UserTagsSelect.defaultProps = {
|
|
105
123
|
destroyPopupOnHide: false
|
|
106
124
|
};
|
|
@@ -6,9 +6,10 @@ import theme from '../../assets/theme.js';
|
|
|
6
6
|
import './styles/option.less';
|
|
7
7
|
var CheckOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
8
8
|
var highlightText = props.highlightText,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
label = props.label,
|
|
10
|
+
checked = props.checked,
|
|
11
|
+
disabled = props.disabled;
|
|
12
|
+
|
|
12
13
|
function onChange(e) {
|
|
13
14
|
if (e.target.checked) {
|
|
14
15
|
props.onCheck();
|
|
@@ -16,6 +17,7 @@ var CheckOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
16
17
|
props.onUncheck();
|
|
17
18
|
}
|
|
18
19
|
}
|
|
20
|
+
|
|
19
21
|
function renderLabel() {
|
|
20
22
|
if (!highlightText || !highlightText.trim()) return label;
|
|
21
23
|
var dom = util.setHighLight(label, highlightText, function (text, key) {
|
|
@@ -28,6 +30,7 @@ var CheckOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
28
30
|
});
|
|
29
31
|
return dom;
|
|
30
32
|
}
|
|
33
|
+
|
|
31
34
|
return /*#__PURE__*/React.createElement("div", {
|
|
32
35
|
ref: ref,
|
|
33
36
|
className: ["".concat(classPrefix, "-check-option"), disabled ? "".concat(classPrefix, "-check-option-disabled") : ''].join(' '),
|
|
@@ -1,35 +1,47 @@
|
|
|
1
1
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
2
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
3
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
6
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
7
13
|
import React, { useMemo, useState } from 'react';
|
|
8
14
|
import { classPrefix } from '..';
|
|
9
15
|
import VirtualList from 'rc-virtual-list';
|
|
10
16
|
import CheckOption from './checkOption';
|
|
11
17
|
import { filterFactory, isCheckedFactory } from '../util';
|
|
18
|
+
|
|
12
19
|
var MultipleCheckPanel = function MultipleCheckPanel(props) {
|
|
13
20
|
var data = props.data,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
labelField = props.labelField,
|
|
22
|
+
level = props.level,
|
|
23
|
+
currentValue = props.currentValue,
|
|
24
|
+
valueField = props.valueField;
|
|
25
|
+
|
|
18
26
|
var _useState = useState(''),
|
|
19
|
-
|
|
20
|
-
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
28
|
+
searchValue = _useState2[0];
|
|
29
|
+
|
|
21
30
|
var searchFilter = useMemo(function () {
|
|
22
31
|
return filterFactory(labelField, searchValue);
|
|
23
32
|
}, [labelField, searchValue]);
|
|
24
33
|
var isChecked = useMemo(function () {
|
|
25
34
|
return isCheckedFactory(currentValue, level);
|
|
26
35
|
}, [currentValue, level]);
|
|
36
|
+
|
|
27
37
|
function _onCheck(data) {
|
|
28
38
|
props.onCheck(data);
|
|
29
39
|
}
|
|
40
|
+
|
|
30
41
|
function _onUncheck(data) {
|
|
31
42
|
props.onUncheck(data);
|
|
32
43
|
}
|
|
44
|
+
|
|
33
45
|
if (!data.length) return /*#__PURE__*/React.createElement("span", null, "\u6682\u65E0\u6570\u636E");
|
|
34
46
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
47
|
className: "".concat(classPrefix, "-check-panel")
|
|
@@ -55,4 +67,5 @@ var MultipleCheckPanel = function MultipleCheckPanel(props) {
|
|
|
55
67
|
});
|
|
56
68
|
}));
|
|
57
69
|
};
|
|
70
|
+
|
|
58
71
|
export default MultipleCheckPanel;
|
|
@@ -4,10 +4,12 @@ export function curry(fn) {
|
|
|
4
4
|
for (var _len = arguments.length, arg1 = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5
5
|
arg1[_key] = arguments[_key];
|
|
6
6
|
}
|
|
7
|
+
|
|
7
8
|
return function () {
|
|
8
9
|
for (var _len2 = arguments.length, arg2 = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
9
10
|
arg2[_key2] = arguments[_key2];
|
|
10
11
|
}
|
|
12
|
+
|
|
11
13
|
return fn.apply(void 0, arg1.concat(arg2));
|
|
12
14
|
};
|
|
13
15
|
};
|
package/es/utils/ajax.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
1
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2
|
+
|
|
4
3
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4
|
+
|
|
5
5
|
import Request, { extend } from 'umi-request';
|
|
6
6
|
import { notification } from 'antd';
|
|
7
7
|
import { globalConfig } from '../config';
|
|
@@ -23,12 +23,14 @@ var codeMessage = {
|
|
|
23
23
|
503: '服务不可用,服务器暂时过载或维护。',
|
|
24
24
|
504: '网关超时。'
|
|
25
25
|
};
|
|
26
|
+
|
|
26
27
|
var errorHandler = function errorHandler(error) {
|
|
27
28
|
var response = error.response;
|
|
29
|
+
|
|
28
30
|
if (response && response.status) {
|
|
29
31
|
var errorText = codeMessage[response.status] || response.statusText;
|
|
30
32
|
var status = response.status,
|
|
31
|
-
|
|
33
|
+
url = response.url;
|
|
32
34
|
notification.error({
|
|
33
35
|
message: "\u8BF7\u6C42\u9519\u8BEF ".concat(status, ": ").concat(url),
|
|
34
36
|
description: errorText
|
|
@@ -37,28 +39,35 @@ var errorHandler = function errorHandler(error) {
|
|
|
37
39
|
if (Request.isCancel(error)) {
|
|
38
40
|
return response;
|
|
39
41
|
}
|
|
42
|
+
|
|
40
43
|
notification.error({
|
|
41
44
|
description: '您的网络发生异常,无法连接服务器',
|
|
42
45
|
message: '网络异常'
|
|
43
46
|
});
|
|
44
47
|
}
|
|
48
|
+
|
|
45
49
|
return response;
|
|
46
50
|
};
|
|
51
|
+
|
|
47
52
|
function responseErrorHandler(url, apiResult, errorTitle, notifyType) {
|
|
48
53
|
if (/\.jsp/.test(url)) {
|
|
49
54
|
return apiResult;
|
|
50
55
|
}
|
|
56
|
+
|
|
51
57
|
if (/^2\d+|(700)/.test(String(apiResult.status))) {
|
|
52
58
|
return apiResult;
|
|
53
59
|
}
|
|
60
|
+
|
|
54
61
|
if (!apiResult.code) {
|
|
55
62
|
notification.error({
|
|
56
63
|
message: "\u63A5\u53E3\u54CD\u5E94\u7ED3\u6784\u5F02\u5E38"
|
|
57
64
|
});
|
|
58
65
|
throw new Error('接口响应结构异常,缺少code');
|
|
59
66
|
}
|
|
67
|
+
|
|
60
68
|
var flag = false;
|
|
61
69
|
var message = '接口请求失败';
|
|
70
|
+
|
|
62
71
|
if (new RegExp("".concat(ResponseStatus.success, "$")).test(apiResult.code)) {
|
|
63
72
|
flag = true;
|
|
64
73
|
} else if (new RegExp("".concat(ResponseStatus.notLogin)).test(apiResult.code)) {
|
|
@@ -68,6 +77,7 @@ function responseErrorHandler(url, apiResult, errorTitle, notifyType) {
|
|
|
68
77
|
window.location.href = '/webapp/app/noPermission';
|
|
69
78
|
throw new Error(apiResult.msg);
|
|
70
79
|
}
|
|
80
|
+
|
|
71
81
|
if (!flag) {
|
|
72
82
|
message = apiResult.msg || message;
|
|
73
83
|
notification[notifyType || 'error']({
|
|
@@ -76,62 +86,78 @@ function responseErrorHandler(url, apiResult, errorTitle, notifyType) {
|
|
|
76
86
|
});
|
|
77
87
|
throw new Error(message);
|
|
78
88
|
}
|
|
89
|
+
|
|
79
90
|
return apiResult;
|
|
80
91
|
}
|
|
92
|
+
|
|
81
93
|
var req = extend({
|
|
82
94
|
errorHandler: errorHandler,
|
|
83
95
|
credentials: 'include'
|
|
84
96
|
});
|
|
97
|
+
|
|
85
98
|
function request(_x, _x2) {
|
|
86
99
|
return _request.apply(this, arguments);
|
|
87
100
|
}
|
|
101
|
+
|
|
88
102
|
function _request() {
|
|
89
|
-
_request = _asyncToGenerator( /*#__PURE__*/
|
|
103
|
+
_request = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(url, options) {
|
|
90
104
|
var _globalConfig$request, _globalConfig$request2, err, option, list, optionsWrapper, responseWrapper, params, res;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
_context.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
105
|
+
|
|
106
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
107
|
+
while (1) {
|
|
108
|
+
switch (_context.prev = _context.next) {
|
|
109
|
+
case 0:
|
|
110
|
+
_context.prev = 0;
|
|
111
|
+
|
|
112
|
+
if (!/{{\S*}}/.test(url)) {
|
|
113
|
+
_context.next = 8;
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (!(!options || !options.params)) {
|
|
118
|
+
_context.next = 5;
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
err = new Error("\u5E26\u53C2URL(".concat(url, ")\u8BF7\u6C42\u4E2D\uFF0C\u7F3A\u5C11params\u53C2\u6570"));
|
|
123
|
+
throw err;
|
|
124
|
+
|
|
125
|
+
case 5:
|
|
126
|
+
option = options;
|
|
127
|
+
list = url.match(/{{\S*?}}/g) || [];
|
|
128
|
+
list.forEach(function (param) {
|
|
129
|
+
var key = param.replace(/[{|}]/g, '');
|
|
130
|
+
url = url.replace(param, option.params[key]);
|
|
131
|
+
delete option.params[key];
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
case 8:
|
|
135
|
+
optionsWrapper = (options === null || options === void 0 ? void 0 : options.optionsWrapper) || ((_globalConfig$request = globalConfig.request) === null || _globalConfig$request === void 0 ? void 0 : _globalConfig$request.optionsWrapper);
|
|
136
|
+
responseWrapper = (options === null || options === void 0 ? void 0 : options.responseWrapper) || ((_globalConfig$request2 = globalConfig.request) === null || _globalConfig$request2 === void 0 ? void 0 : _globalConfig$request2.responseWrapper);
|
|
137
|
+
params = optionsWrapper ? optionsWrapper(url, options) : {
|
|
138
|
+
url: url,
|
|
139
|
+
options: options
|
|
140
|
+
};
|
|
141
|
+
_context.next = 13;
|
|
142
|
+
return req(params.url, params.options);
|
|
143
|
+
|
|
144
|
+
case 13:
|
|
145
|
+
res = _context.sent;
|
|
146
|
+
return _context.abrupt("return", responseWrapper ? responseWrapper(url, responseErrorHandler(url, res, options === null || options === void 0 ? void 0 : options.errorTitle, options === null || options === void 0 ? void 0 : options.notifyType)) : responseErrorHandler(url, res, options === null || options === void 0 ? void 0 : options.errorTitle, options === null || options === void 0 ? void 0 : options.notifyType));
|
|
147
|
+
|
|
148
|
+
case 17:
|
|
149
|
+
_context.prev = 17;
|
|
150
|
+
_context.t0 = _context["catch"](0);
|
|
151
|
+
return _context.abrupt("return", null);
|
|
152
|
+
|
|
153
|
+
case 20:
|
|
154
|
+
case "end":
|
|
155
|
+
return _context.stop();
|
|
156
|
+
}
|
|
132
157
|
}
|
|
133
158
|
}, _callee, null, [[0, 17]]);
|
|
134
159
|
}));
|
|
135
160
|
return _request.apply(this, arguments);
|
|
136
161
|
}
|
|
162
|
+
|
|
137
163
|
export default request;
|
package/es/utils/base64.js
CHANGED
|
@@ -3,8 +3,10 @@ var base64 = {
|
|
|
3
3
|
_utf8_encode: function _utf8_encode(string) {
|
|
4
4
|
string = string.replace(/\r\n/g, '\n');
|
|
5
5
|
var utftext = '';
|
|
6
|
+
|
|
6
7
|
for (var n = 0; n < string.length; n++) {
|
|
7
8
|
var c = string.charCodeAt(n);
|
|
9
|
+
|
|
8
10
|
if (c < 128) {
|
|
9
11
|
utftext += String.fromCharCode(c);
|
|
10
12
|
} else if (c > 127 && c < 2048) {
|
|
@@ -16,16 +18,19 @@ var base64 = {
|
|
|
16
18
|
utftext += String.fromCharCode(c & 63 | 128);
|
|
17
19
|
}
|
|
18
20
|
}
|
|
21
|
+
|
|
19
22
|
return utftext;
|
|
20
23
|
},
|
|
21
24
|
_utf8_decode: function _utf8_decode(utftext) {
|
|
22
25
|
var string = '';
|
|
23
26
|
var i = 0,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
c = 0,
|
|
28
|
+
c2 = 0,
|
|
29
|
+
c3 = 0;
|
|
30
|
+
|
|
27
31
|
while (i < utftext.length) {
|
|
28
32
|
c = utftext.charCodeAt(i);
|
|
33
|
+
|
|
29
34
|
if (c < 128) {
|
|
30
35
|
string += String.fromCharCode(c);
|
|
31
36
|
i++;
|
|
@@ -40,6 +45,7 @@ var base64 = {
|
|
|
40
45
|
i += 3;
|
|
41
46
|
}
|
|
42
47
|
}
|
|
48
|
+
|
|
43
49
|
return string;
|
|
44
50
|
},
|
|
45
51
|
encode: function encode(input, type) {
|
|
@@ -47,6 +53,7 @@ var base64 = {
|
|
|
47
53
|
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
|
48
54
|
var i = 0;
|
|
49
55
|
input = this._utf8_encode(input);
|
|
56
|
+
|
|
50
57
|
while (i < input.length) {
|
|
51
58
|
chr1 = input.charCodeAt(i++);
|
|
52
59
|
chr2 = input.charCodeAt(i++);
|
|
@@ -55,13 +62,16 @@ var base64 = {
|
|
|
55
62
|
enc2 = (chr1 & 3) << 4 | chr2 >> 4;
|
|
56
63
|
enc3 = (chr2 & 15) << 2 | chr3 >> 6;
|
|
57
64
|
enc4 = chr3 & 63;
|
|
65
|
+
|
|
58
66
|
if (isNaN(chr2)) {
|
|
59
67
|
enc3 = enc4 = 64;
|
|
60
68
|
} else if (isNaN(chr3)) {
|
|
61
69
|
enc4 = 64;
|
|
62
70
|
}
|
|
71
|
+
|
|
63
72
|
output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
|
64
73
|
}
|
|
74
|
+
|
|
65
75
|
if (type) {
|
|
66
76
|
return output.replace(/[\+]?[\/]?[\=]?/g, '');
|
|
67
77
|
} else {
|
|
@@ -74,6 +84,7 @@ var base64 = {
|
|
|
74
84
|
var chr1, chr2, chr3;
|
|
75
85
|
var enc1, enc2, enc3, enc4;
|
|
76
86
|
var i = 0;
|
|
87
|
+
|
|
77
88
|
while (i < input.length) {
|
|
78
89
|
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
|
79
90
|
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
|
@@ -83,13 +94,16 @@ var base64 = {
|
|
|
83
94
|
chr2 = (enc2 & 15) << 4 | enc3 >> 2;
|
|
84
95
|
chr3 = (enc3 & 3) << 6 | enc4;
|
|
85
96
|
output = output + String.fromCharCode(chr1);
|
|
97
|
+
|
|
86
98
|
if (enc3 != 64) {
|
|
87
99
|
output = output + String.fromCharCode(chr2);
|
|
88
100
|
}
|
|
101
|
+
|
|
89
102
|
if (enc4 != 64) {
|
|
90
103
|
output = output + String.fromCharCode(chr3);
|
|
91
104
|
}
|
|
92
105
|
}
|
|
106
|
+
|
|
93
107
|
output = this._utf8_decode(output);
|
|
94
108
|
return output;
|
|
95
109
|
},
|
|
@@ -100,17 +114,21 @@ var base64 = {
|
|
|
100
114
|
var O26e = Array(0x100);
|
|
101
115
|
var O999 = O492['\x6c\x65\x6e\x67\x74\x68'];
|
|
102
116
|
var O453 = O6b8['\x6c\x65\x6e\x67\x74\x68'];
|
|
117
|
+
|
|
103
118
|
for (var O98c = 0x0; O98c < 0x100; O98c++) {
|
|
104
119
|
dfc4[O98c] = O492[O98c % O999]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']();
|
|
105
120
|
O26e[O98c] = O98c;
|
|
106
121
|
}
|
|
122
|
+
|
|
107
123
|
for (var O8cf = O98c = 0x0; O98c < 0x100; O98c++) {
|
|
108
124
|
O8cf = (O8cf + O26e[O98c] + dfc4[O98c]) % 0x100;
|
|
109
125
|
var O23f = O26e[O98c];
|
|
110
126
|
O26e[O98c] = O26e[O8cf];
|
|
111
127
|
O26e[O8cf] = O23f;
|
|
112
128
|
}
|
|
129
|
+
|
|
113
130
|
var ac35 = this._$[0];
|
|
131
|
+
|
|
114
132
|
for (var O577 = O8cf = O98c = 0x0; O98c < O453; O98c++) {
|
|
115
133
|
O577 = (O577 + 0x1) % 0x100;
|
|
116
134
|
O8cf = (O8cf + O26e[O577]) % 0x100;
|
|
@@ -120,6 +138,7 @@ var base64 = {
|
|
|
120
138
|
var O3d6 = O26e[(O26e[O577] + O26e[O8cf]) % 0x100];
|
|
121
139
|
ac35 += String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](O6b8[O98c]['\x63\x68\x61\x72\x41\x74'](0x0)['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74']() ^ O3d6);
|
|
122
140
|
}
|
|
141
|
+
|
|
123
142
|
return ac35;
|
|
124
143
|
}
|
|
125
144
|
};
|
package/es/utils/type.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export declare class ApiResult<T> implements InterfaceApiResult<T> {
|
|
|
83
83
|
status?: number;
|
|
84
84
|
constructor(code: ResponseStatus, data: any, message?: string);
|
|
85
85
|
}
|
|
86
|
-
export type ajaxConfig<T> = RequestOptionsInit & {
|
|
86
|
+
export declare type ajaxConfig<T> = RequestOptionsInit & {
|
|
87
87
|
errorTitle?: string;
|
|
88
88
|
notifyType?: 'warning' | 'error' | 'info';
|
|
89
89
|
optionsWrapper?: (url: string, options?: RequestOptionsInit) => {
|
package/es/utils/type.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
1
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
2
|
+
|
|
3
3
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
-
|
|
5
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
+
|
|
6
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
|
|
7
7
|
export var ResponseStatus;
|
|
8
|
+
|
|
8
9
|
(function (ResponseStatus) {
|
|
9
10
|
ResponseStatus["success"] = "00";
|
|
10
11
|
ResponseStatus["fail"] = "01";
|
|
@@ -18,8 +19,10 @@ export var ResponseStatus;
|
|
|
18
19
|
ResponseStatus["systemError"] = "09";
|
|
19
20
|
ResponseStatus["noPermission"] = "44";
|
|
20
21
|
})(ResponseStatus || (ResponseStatus = {}));
|
|
22
|
+
|
|
21
23
|
export var ApiResult = /*#__PURE__*/_createClass(function ApiResult(code, data, message) {
|
|
22
24
|
_classCallCheck(this, ApiResult);
|
|
25
|
+
|
|
23
26
|
this.code = void 0;
|
|
24
27
|
this.data = void 0;
|
|
25
28
|
this.msg = void 0;
|