@lingxiteam/assets 0.9.30 → 0.11.30-alpha-2
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/IconSvg/index.js +7 -13
- package/es/error/errorCatch/index.js +0 -0
- package/es/error/errorDisplay/Mobile/Drawer/Drawer.js +104 -0
- package/es/error/errorDisplay/Mobile/Drawer/Drawer.less +177 -0
- package/es/error/errorDisplay/Mobile/Drawer/index.js +132 -0
- package/es/error/errorDisplay/Mobile/ErrorMsg/index.js +199 -0
- package/es/error/errorDisplay/Mobile/Modal/Modal.js +43 -0
- package/es/error/errorDisplay/Mobile/Modal/Modal.less +146 -0
- package/es/error/errorDisplay/Mobile/Modal/index.js +119 -0
- package/es/error/errorDisplay/Mobile/defaultGlobalConfig.js +12 -0
- package/es/error/errorDisplay/SVGstring.js +6 -0
- package/es/error/errorDisplay/Web/Drawer/Drawer.js +232 -0
- package/es/error/errorDisplay/Web/Drawer/Drawer.less +354 -0
- package/es/error/errorDisplay/Web/Drawer/DrawerConnect.js +203 -0
- package/es/error/errorDisplay/Web/Drawer/index.js +124 -0
- package/es/error/errorDisplay/Web/ErrorMsg/index.js +241 -0
- package/es/error/errorDisplay/Web/Notification/Notice.js +151 -0
- package/es/error/errorDisplay/Web/Notification/Notification.js +129 -0
- package/es/error/errorDisplay/Web/Notification/Notification.less +134 -0
- package/es/error/errorDisplay/Web/Notification/index.js +84 -0
- package/es/error/errorDisplay/Web/defaultGlobalConfig.js +12 -0
- package/es/error/errorDisplay/animation.less +112 -0
- package/es/error/errorDisplay/compUtils.js +16 -0
- package/es/error/errorDisplay/const.js +44 -0
- package/es/error/errorDisplay/http.js +103 -0
- package/es/error/errorDisplay/variables.less +1 -0
- package/es/error/index.js +3 -0
- package/es/images/ico-back.png +0 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/security/const.d.ts +14 -0
- package/es/security/const.js +16 -0
- package/es/security/encipher/aes.d.ts +2 -0
- package/es/security/encipher/aes.js +26 -0
- package/es/security/encipher/des.d.ts +2 -0
- package/es/security/encipher/des.js +25 -0
- package/es/security/encipher/rsa.d.ts +2 -0
- package/es/security/encipher/rsa.js +17 -0
- package/es/security/{sign.d.ts → encipher/sign.d.ts} +0 -0
- package/es/security/{sign.js → encipher/sign.js} +27 -50
- package/es/security/fetch.d.ts +6 -2
- package/es/security/fetch.js +193 -19
- package/es/security/httpEncryption.js +22 -17
- package/es/security/index.d.ts +11 -4
- package/es/security/index.js +5 -1
- package/es/utils/url.d.ts +1 -0
- package/es/utils/url.js +24 -0
- package/lib/index.js +13 -4
- package/package.json +4 -2
package/es/security/fetch.js
CHANGED
|
@@ -1,31 +1,205 @@
|
|
|
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
|
+
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); } }
|
|
4
|
+
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); }); }; }
|
|
5
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
1
6
|
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
7
|
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
|
-
|
|
7
|
-
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
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); }
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
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."); }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
import { createHttpSignStr } from './encipher/sign';
|
|
18
|
+
import { RSAEncrypt, RSADecrypt } from './encipher/rsa';
|
|
19
|
+
import { AESEncrypt, AESDecrypt } from './encipher/aes';
|
|
20
|
+
import { DESEncrypt, DESDecrypt } from './encipher/des';
|
|
21
|
+
import { MODE, signKey, aesKey, rsaPublicKey, rsaPrivKey, desKey, securityHeaderKey } from './const';
|
|
22
|
+
// import { store } from './store';
|
|
8
23
|
var originFetch = window.fetch;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
24
|
+
// const debugData = store('debugData');
|
|
25
|
+
// (window as any).debugData = debugData;
|
|
26
|
+
var LXREQ = {};
|
|
27
|
+
window.LXREQ = LXREQ;
|
|
28
|
+
function encryptedStr(str, type) {
|
|
29
|
+
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
30
|
+
if (type === MODE.AES) {
|
|
31
|
+
var _config$aesOptions, _config$aesOptions2;
|
|
32
|
+
return AESEncrypt(str, ((_config$aesOptions = config.aesOptions) === null || _config$aesOptions === void 0 ? void 0 : _config$aesOptions.key) || aesKey, (_config$aesOptions2 = config.aesOptions) === null || _config$aesOptions2 === void 0 ? void 0 : _config$aesOptions2.encrypt);
|
|
33
|
+
} else if (type === MODE.RSA) {
|
|
34
|
+
var _config$rsaOptions, _config$rsaOptions2;
|
|
35
|
+
return RSAEncrypt(str, ((_config$rsaOptions = config.rsaOptions) === null || _config$rsaOptions === void 0 ? void 0 : _config$rsaOptions.publicKey) || rsaPublicKey, (_config$rsaOptions2 = config.rsaOptions) === null || _config$rsaOptions2 === void 0 ? void 0 : _config$rsaOptions2.encrypt);
|
|
36
|
+
} else if (type === MODE.DES) {
|
|
37
|
+
var _config$desOptions, _config$desOptions2;
|
|
38
|
+
return DESEncrypt(str, ((_config$desOptions = config.desOptions) === null || _config$desOptions === void 0 ? void 0 : _config$desOptions.key) || desKey, (_config$desOptions2 = config.desOptions) === null || _config$desOptions2 === void 0 ? void 0 : _config$desOptions2.encrypt);
|
|
39
|
+
}
|
|
40
|
+
return str;
|
|
41
|
+
}
|
|
42
|
+
function decryptedStr(str, type) {
|
|
43
|
+
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
44
|
+
if (type === MODE.AES) {
|
|
45
|
+
var _config$aesOptions3, _config$aesOptions4;
|
|
46
|
+
return AESDecrypt(str, ((_config$aesOptions3 = config.aesOptions) === null || _config$aesOptions3 === void 0 ? void 0 : _config$aesOptions3.key) || aesKey, (_config$aesOptions4 = config.aesOptions) === null || _config$aesOptions4 === void 0 ? void 0 : _config$aesOptions4.decrypt);
|
|
47
|
+
} else if (type === MODE.RSA) {
|
|
48
|
+
var _config$rsaOptions3, _config$rsaOptions4;
|
|
49
|
+
return RSADecrypt(str, ((_config$rsaOptions3 = config.rsaOptions) === null || _config$rsaOptions3 === void 0 ? void 0 : _config$rsaOptions3.privKey) || rsaPrivKey, (_config$rsaOptions4 = config.rsaOptions) === null || _config$rsaOptions4 === void 0 ? void 0 : _config$rsaOptions4.decrypt) || '';
|
|
50
|
+
} else if (type === MODE.DES) {
|
|
51
|
+
var _config$desOptions3, _config$desOptions4;
|
|
52
|
+
return DESDecrypt(str, ((_config$desOptions3 = config.desOptions) === null || _config$desOptions3 === void 0 ? void 0 : _config$desOptions3.key) || desKey, (_config$desOptions4 = config.desOptions) === null || _config$desOptions4 === void 0 ? void 0 : _config$desOptions4.decrypt);
|
|
53
|
+
}
|
|
54
|
+
return str;
|
|
55
|
+
}
|
|
56
|
+
// 统一请求参数加密
|
|
57
|
+
function encrypted(url, opts, type) {
|
|
58
|
+
var config = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
59
|
+
var reqId = arguments.length > 4 ? arguments[4] : undefined;
|
|
60
|
+
var isFormData = opts.body instanceof FormData;
|
|
61
|
+
var headerReqId = reqId ? {
|
|
62
|
+
'LX-REQ-ID': "LXREQ.".concat(reqId)
|
|
63
|
+
} : {};
|
|
64
|
+
// search 部分加密
|
|
65
|
+
var encryptedUrl = url.indexOf('?') !== -1 ? url.replace(/(?!\?)([^?])+$/g, function (search) {
|
|
66
|
+
var params = search.split('&').map(function (param) {
|
|
67
|
+
var _param$split = param.split('='),
|
|
68
|
+
_param$split2 = _slicedToArray(_param$split, 2),
|
|
69
|
+
k = _param$split2[0],
|
|
70
|
+
v = _param$split2[1];
|
|
71
|
+
return "".concat(encodeURIComponent(k), "=").concat(encodeURIComponent(encryptedStr(v, type, config)));
|
|
72
|
+
});
|
|
73
|
+
return params.join('&');
|
|
74
|
+
}) : url;
|
|
75
|
+
// body参数加密
|
|
76
|
+
var encryptedOpts = Object.assign({}, opts);
|
|
77
|
+
encryptedOpts.headers = _objectSpread(_objectSpread(_objectSpread({}, opts.headers), headerReqId), {}, _defineProperty({}, securityHeaderKey, type));
|
|
78
|
+
if (isFormData) {
|
|
79
|
+
// formData 加密
|
|
80
|
+
var formData = new FormData();
|
|
81
|
+
var reqBody = opts.body;
|
|
82
|
+
var _iterator = _createForOfIteratorHelper(reqBody.keys()),
|
|
83
|
+
_step;
|
|
84
|
+
try {
|
|
85
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
86
|
+
var key = _step.value;
|
|
87
|
+
var value = reqBody.get(key);
|
|
88
|
+
formData.append(key, encryptedStr(value, type, config));
|
|
89
|
+
}
|
|
90
|
+
} catch (err) {
|
|
91
|
+
_iterator.e(err);
|
|
92
|
+
} finally {
|
|
93
|
+
_iterator.f();
|
|
94
|
+
}
|
|
95
|
+
encryptedOpts.body = formData;
|
|
96
|
+
} else if (opts.body) {
|
|
97
|
+
// 文本加密
|
|
98
|
+
encryptedOpts.body = encryptedStr(opts.body, type, config);
|
|
99
|
+
}
|
|
100
|
+
return [encryptedUrl, encryptedOpts];
|
|
101
|
+
}
|
|
102
|
+
// 将解密数据
|
|
103
|
+
// function debugRecords(id: string, value: any) {
|
|
104
|
+
// // sessionStorage.setItem(id, JSON.stringify(value));
|
|
105
|
+
// Object.defineProperty(LXREQ, id, {
|
|
106
|
+
// get() {
|
|
107
|
+
// // debugData.show(id)
|
|
108
|
+
// return '';
|
|
109
|
+
// },
|
|
110
|
+
// });
|
|
111
|
+
// }
|
|
16
112
|
var fetch = function fetch(url) {
|
|
17
113
|
var fetchOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
18
|
-
var config = arguments.length > 2 ? arguments[2] :
|
|
19
|
-
|
|
114
|
+
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
20
115
|
var opts = _objectSpread({}, fetchOptions);
|
|
21
|
-
|
|
22
|
-
|
|
116
|
+
var optSecurityHeaderKey = (opts.headers || {})[securityHeaderKey];
|
|
117
|
+
var isDebug = (config === null || config === void 0 ? void 0 : config.debug) || window.lxDebug || !!window.localStorage.getItem('lxDebug') || true;
|
|
118
|
+
// ------ 参数签名(默认) ------
|
|
119
|
+
if (
|
|
120
|
+
// 配置开启加密
|
|
121
|
+
(config.mode === MODE.SIGN_KEY || config.mode === MODE.SIGN) && (fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.disabledSignKey) !== true ||
|
|
122
|
+
// 请求头开启加密
|
|
123
|
+
optSecurityHeaderKey === '1.0') {
|
|
23
124
|
var _config$signKeyOption;
|
|
24
|
-
|
|
25
|
-
|
|
125
|
+
opts.headers = _objectSpread(_objectSpread({}, opts.headers), {}, _defineProperty({}, (config === null || config === void 0 ? void 0 : (_config$signKeyOption = config.signKeyOptions) === null || _config$signKeyOption === void 0 ? void 0 : _config$signKeyOption.key) || signKey, createHttpSignStr(url, fetchOptions)));
|
|
126
|
+
return originFetch(url, opts);
|
|
26
127
|
}
|
|
128
|
+
// ------ 参数加密 ------
|
|
129
|
+
if ((config.mode === MODE.RSA || config.mode === MODE.AES) && (fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.disabledEncrypted) !== true || optSecurityHeaderKey === '2.0' || optSecurityHeaderKey === '3.0' || optSecurityHeaderKey === '4.0') {
|
|
130
|
+
// 标记请求ID,用于获取解密数据
|
|
131
|
+
var reqId = "XA".concat(+new Date());
|
|
132
|
+
// search和body加密
|
|
133
|
+
var _encrypted = encrypted(url, opts, config.mode || optSecurityHeaderKey, config, reqId),
|
|
134
|
+
_encrypted2 = _slicedToArray(_encrypted, 2),
|
|
135
|
+
encryptedUrl = _encrypted2[0],
|
|
136
|
+
encryptedOpts = _encrypted2[1];
|
|
137
|
+
return originFetch(encryptedUrl, encryptedOpts).then( /*#__PURE__*/function () {
|
|
138
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {
|
|
139
|
+
var securityType, respResult, result, json, blob;
|
|
140
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
141
|
+
while (1) {
|
|
142
|
+
switch (_context.prev = _context.next) {
|
|
143
|
+
case 0:
|
|
144
|
+
// 响应解密
|
|
145
|
+
securityType = response.headers.get(securityHeaderKey);
|
|
146
|
+
if (!(securityType && response.body)) {
|
|
147
|
+
_context.next = 22;
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
_context.next = 4;
|
|
151
|
+
return response.text();
|
|
152
|
+
case 4:
|
|
153
|
+
respResult = _context.sent;
|
|
154
|
+
_context.prev = 5;
|
|
155
|
+
result = decryptedStr(respResult, securityType, config);
|
|
156
|
+
_context.next = 18;
|
|
157
|
+
break;
|
|
158
|
+
case 9:
|
|
159
|
+
_context.prev = 9;
|
|
160
|
+
_context.t0 = _context["catch"](5);
|
|
161
|
+
console.error('--------解密失败--------');
|
|
162
|
+
console.error("\u8BF7\u6C42ID\uFF1A".concat(reqId));
|
|
163
|
+
console.error("\u8BF7\u6C42\u5730\u5740\uFF1A".concat(url));
|
|
164
|
+
console.error("\u89E3\u5BC6\u65B9\u5F0F\uFF1A".concat(securityType));
|
|
165
|
+
console.error("\u89E3\u5BC6\u62A5\u6587\uFF1A".concat(respResult));
|
|
166
|
+
console.error("\u5931\u8D25\u539F\u56E0\uFF1A".concat(_context.t0));
|
|
167
|
+
return _context.abrupt("return", new Response(null, {
|
|
168
|
+
status: 400,
|
|
169
|
+
statusText: String(_context.t0)
|
|
170
|
+
}));
|
|
171
|
+
case 18:
|
|
172
|
+
// 开启调试模式,记录解密数据
|
|
173
|
+
if (isDebug || true) {
|
|
174
|
+
// debugRecords(reqId, result);
|
|
175
|
+
}
|
|
176
|
+
// 覆盖响应值
|
|
27
177
|
|
|
178
|
+
try {
|
|
179
|
+
json = JSON.parse(result);
|
|
180
|
+
} catch (e) {
|
|
181
|
+
json = result;
|
|
182
|
+
console.warn("reqId: ".concat(reqId, " \u8F6C\u6362JSON\u5931\u8D25, \u5185\u5BB9\u4E3A"), result);
|
|
183
|
+
}
|
|
184
|
+
blob = new Blob([JSON.stringify(json, null, 2)], {
|
|
185
|
+
type: 'application/json'
|
|
186
|
+
});
|
|
187
|
+
return _context.abrupt("return", new Response(blob));
|
|
188
|
+
case 22:
|
|
189
|
+
return _context.abrupt("return", response);
|
|
190
|
+
case 23:
|
|
191
|
+
case "end":
|
|
192
|
+
return _context.stop();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}, _callee, null, [[5, 9]]);
|
|
196
|
+
}));
|
|
197
|
+
return function (_x2) {
|
|
198
|
+
return _ref.apply(this, arguments);
|
|
199
|
+
};
|
|
200
|
+
}());
|
|
201
|
+
}
|
|
202
|
+
// 其他
|
|
28
203
|
return originFetch(url, opts);
|
|
29
204
|
};
|
|
30
|
-
|
|
31
205
|
export default fetch;
|
|
@@ -1,66 +1,71 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
|
-
|
|
3
2
|
/*
|
|
4
3
|
* @Author: 张国永 zhang.guoyong2@iwhalecloud.com
|
|
5
4
|
* @Date: 2022-08-08 15:08:58
|
|
6
5
|
* @Description: 一个简单的http请求安全加密处理
|
|
7
6
|
*/
|
|
7
|
+
|
|
8
8
|
// TODO 支持XMLHttpRequest拦截、参数混淆、响应拦截
|
|
9
|
+
|
|
9
10
|
// 使用方式1: 使用fetch请求模块,start({ mode: signKey }),适应经过封装的fetch模块
|
|
10
11
|
// 使用方式2: 使用fetch请求模块,将window.fetch 替换成 fetch,适应自己封装的fetch模块
|
|
11
12
|
// 使用方式3: 不使用fetch请求模块,使用createHttpSignStr自己获取签名,自行在header上添加参数
|
|
12
|
-
import { createHttpSignStr } from './sign'; // eslint-disable-next-line import/no-named-as-default, import/no-named-as-default-member
|
|
13
13
|
|
|
14
|
+
import { createHttpSignStr } from './encipher/sign';
|
|
15
|
+
// eslint-disable-next-line import/no-named-as-default, import/no-named-as-default-member
|
|
14
16
|
import fetch from './fetch';
|
|
15
17
|
var isHttpEncryption = false;
|
|
16
18
|
var originFetch = window.fetch;
|
|
17
|
-
|
|
18
19
|
function start(_ref) {
|
|
19
20
|
var _ref$mode = _ref.mode,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
mode = _ref$mode === void 0 ? '1.0' : _ref$mode,
|
|
22
|
+
_ref$signKeyOptions = _ref.signKeyOptions,
|
|
23
|
+
signKeyOptions = _ref$signKeyOptions === void 0 ? {} : _ref$signKeyOptions,
|
|
24
|
+
_ref$aesOptions = _ref.aesOptions,
|
|
25
|
+
aesOptions = _ref$aesOptions === void 0 ? {} : _ref$aesOptions,
|
|
26
|
+
_ref$desOptions = _ref.desOptions,
|
|
27
|
+
desOptions = _ref$desOptions === void 0 ? {} : _ref$desOptions,
|
|
28
|
+
_ref$rsaOptions = _ref.rsaOptions,
|
|
29
|
+
rsaOptions = _ref$rsaOptions === void 0 ? {} : _ref$rsaOptions;
|
|
24
30
|
if (!mode) {
|
|
25
31
|
console.error('http加密开启失败,缺少mode参数');
|
|
26
32
|
return false;
|
|
27
33
|
}
|
|
28
|
-
|
|
29
34
|
if (isHttpEncryption) return true;
|
|
30
|
-
|
|
31
35
|
switch (mode) {
|
|
32
|
-
case 'signKey':
|
|
36
|
+
case 'signKey': // 兼容旧数据
|
|
37
|
+
case '1.0':
|
|
38
|
+
case '2.0':
|
|
39
|
+
case '3.0':
|
|
40
|
+
case '4.0':
|
|
33
41
|
{
|
|
34
42
|
if (typeof window.fetch === 'function') {
|
|
35
43
|
isHttpEncryption = true;
|
|
36
|
-
|
|
37
44
|
window.fetch = function (url) {
|
|
38
45
|
var fetchOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
39
46
|
return fetch(url, fetchOptions, {
|
|
40
47
|
mode: mode,
|
|
41
|
-
signKeyOptions: signKeyOptions
|
|
48
|
+
signKeyOptions: signKeyOptions,
|
|
49
|
+
aesOptions: aesOptions,
|
|
50
|
+
desOptions: desOptions,
|
|
51
|
+
rsaOptions: rsaOptions
|
|
42
52
|
});
|
|
43
53
|
};
|
|
44
54
|
} else {
|
|
45
55
|
console.error('http加密开启失败,目前仅支持window.fetch方式');
|
|
46
56
|
}
|
|
47
|
-
|
|
48
57
|
break;
|
|
49
58
|
}
|
|
50
|
-
|
|
51
59
|
default:
|
|
52
60
|
console.error("http\u52A0\u5BC6\u5F00\u542F\u5931\u8D25\uFF0C\u4E0D\u652F\u6301".concat(mode, "\u6A21\u5F0F"));
|
|
53
61
|
break;
|
|
54
62
|
}
|
|
55
|
-
|
|
56
63
|
return isHttpEncryption;
|
|
57
64
|
}
|
|
58
|
-
|
|
59
65
|
function stop() {
|
|
60
66
|
isHttpEncryption = false;
|
|
61
67
|
window.fetch = originFetch;
|
|
62
68
|
}
|
|
63
|
-
|
|
64
69
|
export default {
|
|
65
70
|
start: start,
|
|
66
71
|
stop: stop,
|
package/es/security/index.d.ts
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
httpEncryption: {
|
|
3
|
-
start: ({ mode, signKeyOptions }: {
|
|
3
|
+
start: ({ mode, signKeyOptions, aesOptions, desOptions, rsaOptions }: {
|
|
4
4
|
mode?: string | undefined;
|
|
5
5
|
signKeyOptions?: {} | undefined;
|
|
6
|
+
aesOptions?: {} | undefined;
|
|
7
|
+
desOptions?: {} | undefined;
|
|
8
|
+
rsaOptions?: {} | undefined;
|
|
6
9
|
}) => boolean;
|
|
7
10
|
stop: () => void;
|
|
8
11
|
fetch: (url: any, fetchOptions?: any, config?: {
|
|
9
|
-
mode
|
|
10
|
-
signKeyOptions
|
|
11
|
-
|
|
12
|
+
mode?: string | undefined;
|
|
13
|
+
signKeyOptions?: any;
|
|
14
|
+
aesOptions?: any;
|
|
15
|
+
desOptions?: any;
|
|
16
|
+
rsaOptions?: any;
|
|
17
|
+
debug?: boolean | undefined;
|
|
18
|
+
}) => Promise<Response>;
|
|
12
19
|
createHttpSignStr: (url: string, options: any) => string;
|
|
13
20
|
};
|
|
14
21
|
sign: {
|
package/es/security/index.js
CHANGED
package/es/utils/url.d.ts
CHANGED
package/es/utils/url.js
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1
7
|
export var obj2QueryString = function obj2QueryString(params) {
|
|
2
8
|
var queryString = Object.keys(params).map(function (key) {
|
|
3
9
|
return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(params[key]));
|
|
4
10
|
}).join('&');
|
|
5
11
|
return queryString;
|
|
12
|
+
};
|
|
13
|
+
export var getSearchObj = function getSearchObj() {
|
|
14
|
+
var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location.href;
|
|
15
|
+
var urlArr = url.split('?');
|
|
16
|
+
if (urlArr.length === 1) return {};
|
|
17
|
+
var search = urlArr.pop() || '';
|
|
18
|
+
var objs = search.split('&');
|
|
19
|
+
var obj = {};
|
|
20
|
+
objs.forEach(function (value) {
|
|
21
|
+
var _value$split = value.split('='),
|
|
22
|
+
_value$split2 = _slicedToArray(_value$split, 2),
|
|
23
|
+
k = _value$split2[0],
|
|
24
|
+
v = _value$split2[1];
|
|
25
|
+
if (v) {
|
|
26
|
+
obj[decodeURIComponent(k)] = decodeURIComponent(v);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return obj;
|
|
6
30
|
};
|
package/lib/index.js
CHANGED
|
@@ -3,20 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "ErrorMsg", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _error.ErrorMsg;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
exports.IconNormalCheckSvg = exports.IconCheckSvg = void 0;
|
|
13
|
+
Object.defineProperty(exports, "MobileErrorMsg", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _error.MobileErrorMsg;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
7
19
|
Object.defineProperty(exports, "security", {
|
|
8
20
|
enumerable: true,
|
|
9
21
|
get: function get() {
|
|
10
22
|
return _security.default;
|
|
11
23
|
}
|
|
12
24
|
});
|
|
13
|
-
|
|
14
25
|
var _img = require("./utils/img");
|
|
15
|
-
|
|
16
26
|
var _security = _interopRequireDefault(require("./security"));
|
|
17
|
-
|
|
27
|
+
var _error = require("./error");
|
|
18
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
29
|
var IconCheckSvg = (0, _img.getSvgImageBase64)("<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg width=\"22px\" height=\"22px\" viewBox=\"0 0 22 22\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><title>\u5168\u5C40\u6837\u5F0F:20/\u539F\u5B50\u7EA7\u63A7\u4EF6/\u590D\u9009/\u72B6\u6001:#\u9009\u4E2D</title><g id=\"\u63A7\u4EF6\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g id=\"system-complete\"><path d=\"M11,0 C17.075904,0 22,4.92409598 22,11 C22,17.075904 17.0734732,22 11,22 C4.92652679,22 0,17.0734732 0,11 C0,4.92652679 4.92409598,0 11,0 Z\" id=\"Shape\" fill=\"#1890FF\"></path><path d=\"M9.42871875,12.9681652 L7.2069029,10.7463493 C6.90006126,10.4395077 6.40257267,10.4395077 6.09573103,10.7463493 C5.78889035,11.05319 5.78889035,11.550677 6.09573103,11.8575177 C6.09573161,11.8575183 6.0957322,11.8575189 6.09573278,11.8575195 L8.72212536,14.4838955 C9.11265701,14.8744045 9.74581424,14.874407 10.136349,14.483901 L10.5404063,14.0798527 L10.5404063,14.0798527 L16.2813591,8.33795955 C16.588183,8.03108543 16.5881626,7.53359119 16.2813136,7.22674219 C15.974472,6.91990055 15.4769834,6.91990055 15.1701417,7.22674219 L9.42871875,12.9681652 L9.42871875,12.9681652 Z\" id=\"Path\" fill=\"#FFFFFF\"></path></g></g></svg>");
|
|
21
30
|
exports.IconCheckSvg = IconCheckSvg;
|
|
22
31
|
var IconNormalCheckSvg = (0, _img.getSvgImageBase64)("<?xml version=\"1.0\" encoding=\"UTF-8\"?><svg width=\"22px\" height=\"22px\" viewBox=\"0 0 22 22\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><title>\u5168\u5C40\u6837\u5F0F:20/\u539F\u5B50\u7EA7\u63A7\u4EF6/\u590D\u9009/\u72B6\u6001:\u672A\u9009\u4E2D</title><g id=\"\u63A7\u4EF6\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g id=\"\u5143\u7D20/\u9009\u62E9/\u672A\u9009\u4E2D\"><path d=\"M11,22 C4.93492502,22 0,17.0653546 0,10.999496 C0,4.9337633 4.93492502,0 11,0 C17.065075,0 22,4.93464539 22,10.999496 C22,17.0644725 17.0660846,22 11,22\" id=\"Fill\" fill=\"#FFFFFF\"></path><path d=\"M11,0.5 C13.8998633,0.5 16.5248731,1.67505184 18.4249106,3.57508938 C20.3249482,5.47512693 21.5,8.10013672 21.5,11 C21.5,13.8995696 20.3245821,16.5243277 18.4245965,18.4243132 C16.5242275,20.3246822 13.8989967,21.5 11,21.5 C8.10129687,21.5 5.47631792,20.324316 3.57600094,18.4239991 C1.67568396,16.5236821 0.5,13.8987031 0.5,11 C0.5,8.10100334 1.67531776,5.47577251 3.57568679,3.57540349 C5.47567234,1.67541793 8.10043037,0.5 11,0.5 Z\" id=\"Shape\" stroke=\"#CCCCCC\"></path></g></g></svg>");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingxiteam/assets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.30-alpha-2",
|
|
4
4
|
"description": "灵犀低代码平台移动端 - 工具类",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"gitHead": "bcd338198e2c14459538542d10600ab03abc92f2",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"js
|
|
38
|
+
"crypto-js": "^4.1.1",
|
|
39
|
+
"js-sha256": "^0.9.0",
|
|
40
|
+
"jsencrypt": "^3.1.0"
|
|
39
41
|
}
|
|
40
42
|
}
|