@kmkf-fe-packages/kmkf-utils 2.10.9-beta.0 → 2.10.9-beta.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.
@@ -105,6 +105,10 @@ export declare const DATA_SPLIT_COMPONENT_FIELDS_MAP: {
105
105
  JST_REISSUE_GOODS: string[];
106
106
  JKY_SYSTEM_ORDER: string[];
107
107
  PICTURE_PRO: string[];
108
+ DXD_SYSTEM_ORDER: string[];
109
+ DXD_LOGISTICS: string[];
110
+ DXD_GOODS: string[];
111
+ DXD_SUPPLIERS: string[];
108
112
  };
109
113
  export declare const SEARCH_OPTIONS: {
110
114
  label: string;
@@ -177,7 +177,11 @@ export var DATA_SPLIT_COMPONENT_FIELDS_MAP = {
177
177
  JST_GOODS: ["jstGoods"],
178
178
  JST_REISSUE_GOODS: ["jstReissueGoods"],
179
179
  JKY_SYSTEM_ORDER: ["jkySystemShowOrder"],
180
- PICTURE_PRO: ["pictureProList"]
180
+ PICTURE_PRO: ["pictureProList"],
181
+ DXD_SYSTEM_ORDER: ["dxdSystemShowOrder"],
182
+ DXD_LOGISTICS: ["dxdLogisticsList"],
183
+ DXD_GOODS: ["dxdGoods"],
184
+ DXD_SUPPLIERS: ["dxdSuppliers"]
181
185
  };
182
186
  export var SEARCH_OPTIONS = [{
183
187
  label: "关键字",
@@ -0,0 +1,22 @@
1
+ interface SupplierOption {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ /**
6
+ * 大希地供应商数据存储(单例):仿照 ExpressData 的单例 + 存储模式,
7
+ * 自带 fetchData 拉 /qy/open/suppliers,组装成两个数据:
8
+ * 1. supplierOptions —— 所有供应商下拉 options(label=supplierName, value=supplierCode)
9
+ * 2. skuCodeSupplierMap —— skuCode -> 该 skuCode 对应的供应商 options(多个供应商含同一 skuCode 时合并)
10
+ */
11
+ declare class DxdSuppliersData {
12
+ private static instance;
13
+ supplierOptions: SupplierOption[];
14
+ skuCodeSupplierMap: Record<string, SupplierOption[]>;
15
+ codeToNameMap: Record<string, string>;
16
+ static getInstance(): DxdSuppliersData;
17
+ fetchData: () => Promise<void>;
18
+ getSupplierOptions: () => SupplierOption[];
19
+ getSuppliersBySkuCode: (skuCode: string) => SupplierOption[];
20
+ getSupplierNameByCode: (code: string, returnCurrentValue?: boolean) => string;
21
+ }
22
+ export default DxdSuppliersData;
@@ -0,0 +1,103 @@
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+ 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, _toPropertyKey(descriptor.key), descriptor); } }
7
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
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
+ import request from "../request";
12
+ /**
13
+ * 大希地供应商数据存储(单例):仿照 ExpressData 的单例 + 存储模式,
14
+ * 自带 fetchData 拉 /qy/open/suppliers,组装成两个数据:
15
+ * 1. supplierOptions —— 所有供应商下拉 options(label=supplierName, value=supplierCode)
16
+ * 2. skuCodeSupplierMap —— skuCode -> 该 skuCode 对应的供应商 options(多个供应商含同一 skuCode 时合并)
17
+ */
18
+ var DxdSuppliersData = /*#__PURE__*/function () {
19
+ function DxdSuppliersData() {
20
+ var _this = this;
21
+ _classCallCheck(this, DxdSuppliersData);
22
+ _defineProperty(this, "supplierOptions", []);
23
+ _defineProperty(this, "skuCodeSupplierMap", {});
24
+ _defineProperty(this, "codeToNameMap", {});
25
+ _defineProperty(this, "fetchData", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
26
+ var _res$data, res, suppliers, supplierOptions, skuCodeSupplierMap, codeToNameMap;
27
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
28
+ while (1) switch (_context.prev = _context.next) {
29
+ case 0:
30
+ _context.prev = 0;
31
+ _context.next = 3;
32
+ return request({
33
+ url: "/qy/gdfw/daxidi/erp/supplier/list",
34
+ method: "post",
35
+ data: {}
36
+ });
37
+ case 3:
38
+ res = _context.sent;
39
+ suppliers = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.suppliers) || [];
40
+ supplierOptions = [];
41
+ skuCodeSupplierMap = {};
42
+ codeToNameMap = {};
43
+ suppliers.forEach(function (s) {
44
+ var option = {
45
+ label: s.supplierName,
46
+ value: s.supplierCode
47
+ };
48
+ supplierOptions.push(option);
49
+ codeToNameMap[s.supplierCode] = s.supplierName;
50
+ (s.skuCodeList || []).forEach(function (skuCode) {
51
+ if (!skuCodeSupplierMap[skuCode]) {
52
+ skuCodeSupplierMap[skuCode] = [];
53
+ }
54
+ // 同一供应商可能对同一 skuCode 重复出现,按 value 去重
55
+ if (!skuCodeSupplierMap[skuCode].some(function (o) {
56
+ return o.value === option.value;
57
+ })) {
58
+ skuCodeSupplierMap[skuCode].push(option);
59
+ }
60
+ });
61
+ });
62
+ _this.supplierOptions = supplierOptions;
63
+ _this.skuCodeSupplierMap = skuCodeSupplierMap;
64
+ _this.codeToNameMap = codeToNameMap;
65
+ _context.next = 17;
66
+ break;
67
+ case 14:
68
+ _context.prev = 14;
69
+ _context.t0 = _context["catch"](0);
70
+ console.error("DxdSuppliersData 拉取供应商数据失败", _context.t0);
71
+ case 17:
72
+ case "end":
73
+ return _context.stop();
74
+ }
75
+ }, _callee, null, [[0, 14]]);
76
+ })));
77
+ _defineProperty(this, "getSupplierOptions", function () {
78
+ return _this.supplierOptions;
79
+ });
80
+ _defineProperty(this, "getSuppliersBySkuCode", function (skuCode) {
81
+ return _this.skuCodeSupplierMap[skuCode] || [];
82
+ });
83
+ _defineProperty(this, "getSupplierNameByCode", function (code) {
84
+ var _this$codeToNameMap$c;
85
+ var returnCurrentValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
86
+ return (_this$codeToNameMap$c = _this.codeToNameMap[code]) !== null && _this$codeToNameMap$c !== void 0 ? _this$codeToNameMap$c : returnCurrentValue ? code : "";
87
+ });
88
+ }
89
+ _createClass(DxdSuppliersData, null, [{
90
+ key: "getInstance",
91
+ value: function getInstance() {
92
+ if (!DxdSuppliersData.instance) {
93
+ DxdSuppliersData.instance = new DxdSuppliersData();
94
+ }
95
+ return DxdSuppliersData.instance;
96
+ }
97
+
98
+ // 拉取供应商数据并组装成 supplierOptions + skuCodeSupplierMap
99
+ }]);
100
+ return DxdSuppliersData;
101
+ }();
102
+ _defineProperty(DxdSuppliersData, "instance", null);
103
+ export default DxdSuppliersData;
@@ -66,6 +66,12 @@ declare enum TComponentType {
66
66
  BS_SEND_GOOD = "BS_SEND_GOOD",
67
67
  BS_SYSTEM_ORDER = "BS_SYSTEM_ORDER",
68
68
  KM_SYSTEM_ORDER = "KM_SYSTEM_ORDER",
69
+ DXD_SYSTEM_ORDER = "DXD_SYSTEM_ORDER",
70
+ DXD_SEND_GOOD = "DXD_SEND_GOOD",
71
+ DXD_LOGISTICS = "DXD_LOGISTICS",
72
+ DXD_SHOP = "DXD_SHOP",
73
+ DXD_GOODS = "DXD_GOODS",
74
+ DXD_SUPPLIERS = "DXD_SUPPLIERS",
69
75
  BS_SIGNING_TIME = "BS_SIGNING_TIME",
70
76
  BS_SEND_TIME = "BS_SEND_TIME",
71
77
  BS_TRADE_PAYMENT_TIME = "BS_TRADE_PAYMENT_TIME",
@@ -1,6 +1,8 @@
1
1
  export { default as ExpressData } from "./expressData";
2
2
  export { default as ExpressInterceptData } from "./expressInterceptData";
3
3
  export { default as PlatData } from "./platData";
4
+ export { default as DxdSuppliersData } from "./dxdSuppliersData";
5
+ export { DxdShopDataCenter } from "./utils/DxdShopData";
4
6
  export { default as LogisticsAddressData } from "./logisticsAddressData";
5
7
  export { default as LabelData } from "./labelData";
6
8
  export { default as request } from "./request";
package/dist/esm/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  export { default as ExpressData } from "./expressData";
2
2
  export { default as ExpressInterceptData } from "./expressInterceptData";
3
3
  export { default as PlatData } from "./platData";
4
+ export { default as DxdSuppliersData } from "./dxdSuppliersData";
5
+ export { DxdShopDataCenter } from "./utils/DxdShopData";
4
6
  export { default as LogisticsAddressData } from "./logisticsAddressData";
5
7
  export { default as LabelData } from "./labelData";
6
8
  export { default as request } from "./request";
@@ -0,0 +1,3 @@
1
+ export * from "./logisticsData";
2
+ export * from "./warehouseData";
3
+ export * from "./shopData";
@@ -0,0 +1,3 @@
1
+ export * from "./logisticsData";
2
+ export * from "./warehouseData";
3
+ export * from "./shopData";
@@ -0,0 +1,6 @@
1
+ declare type DxdReturnLogisticsOrderResponse = {
2
+ platformOrderNo: string;
3
+ };
4
+ export declare const getLogisticsDataAsync: () => Promise<any[]>;
5
+ export declare const queryReturnLogisticsOrder: (returnLogisticsNo: string) => Promise<import("../../request").serverProps<DxdReturnLogisticsOrderResponse>>;
6
+ export default getLogisticsDataAsync;
@@ -0,0 +1,45 @@
1
+ import request from "../../request";
2
+ export var getLogisticsDataAsync = function getLogisticsDataAsync() {
3
+ return request({
4
+ url: "/qy/gdfw/daxidi/erp/logistics/list",
5
+ method: "get",
6
+ data: {}
7
+ }).then(function (res) {
8
+ var _res$data;
9
+ console.log("getLogisticsDataAsync", res);
10
+ var list = [];
11
+ var logistics = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.logistics) || [];
12
+ // DXD 物流按月卡维度返回:同一 logisticsCode 可能对应多个 monthCardNo,
13
+ // 故下拉 value 用 monthCardNo(唯一),label 用 monthCardName,并保留 logisticsCode/Name。
14
+ logistics.map(function (_ref) {
15
+ var logisticsCode = _ref.logisticsCode,
16
+ logisticsName = _ref.logisticsName,
17
+ cardNo = _ref.cardNo,
18
+ cardName = _ref.cardName;
19
+ list.push({
20
+ label: cardName,
21
+ value: cardNo,
22
+ expressCode: logisticsCode,
23
+ expressName: logisticsName
24
+ });
25
+ });
26
+ var valueMap = {};
27
+ list.forEach(function (item) {
28
+ valueMap[item.value] = item; // 每次遇到相同的 monthCardNo,更新为最新的对象
29
+ });
30
+
31
+ return Object.values(valueMap);
32
+ });
33
+ };
34
+
35
+ // DXD 根据退货物流单号查询平台订单号
36
+ export var queryReturnLogisticsOrder = function queryReturnLogisticsOrder(returnLogisticsNo) {
37
+ return request({
38
+ url: "/qy/gdfw/daxidi/erp/return/logistics/order",
39
+ method: "post",
40
+ data: {
41
+ returnLogisticsNo: returnLogisticsNo
42
+ }
43
+ });
44
+ };
45
+ export default getLogisticsDataAsync;
@@ -0,0 +1,7 @@
1
+ declare type ShopType = {
2
+ label: string;
3
+ value: string;
4
+ disabled: boolean;
5
+ };
6
+ export declare const getShopDataAsync: () => Promise<ShopType[]>;
7
+ export default getShopDataAsync;
@@ -0,0 +1,22 @@
1
+ import request from "../../request";
2
+ // 大希地店铺列表(/qy/open/shops,无分页,直接返回 shops 数组)
3
+ export var getShopDataAsync = function getShopDataAsync() {
4
+ return request({
5
+ url: "/qy/gdfw/daxidi/erp/shop/list",
6
+ method: "get",
7
+ data: {}
8
+ }).then(function (res) {
9
+ var _res$data;
10
+ var shops = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.shops) || [];
11
+ return shops.map(function (_ref) {
12
+ var shopCode = _ref.shopCode,
13
+ shopName = _ref.shopName;
14
+ return {
15
+ label: shopName,
16
+ value: shopCode,
17
+ disabled: false
18
+ };
19
+ });
20
+ });
21
+ };
22
+ export default getShopDataAsync;
@@ -0,0 +1,2 @@
1
+ export declare const getWarehouseDataAsync: () => Promise<any[]>;
2
+ export default getWarehouseDataAsync;
@@ -0,0 +1,27 @@
1
+ import request from "../../request";
2
+ export var getWarehouseDataAsync = function getWarehouseDataAsync() {
3
+ return request({
4
+ url: "/qy/gdfw/daxidi/erp/warehouse/list",
5
+ method: "get",
6
+ data: {}
7
+ }).then(function (res) {
8
+ var _res$data;
9
+ var list = [];
10
+ var warehouses = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.warehouses) || [];
11
+ warehouses.map(function (_ref) {
12
+ var warehouseCode = _ref.warehouseCode,
13
+ warehouseName = _ref.warehouseName;
14
+ list.push({
15
+ label: warehouseName,
16
+ value: warehouseCode
17
+ });
18
+ });
19
+ var valueMap = {};
20
+ list.forEach(function (item) {
21
+ valueMap[item.value] = item; // 每次遇到相同的 code,更新为最新的对象
22
+ });
23
+
24
+ return Object.values(valueMap);
25
+ });
26
+ };
27
+ export default getWarehouseDataAsync;
@@ -10,6 +10,7 @@ export * as WLN from "./WLN";
10
10
  export * as orderSubForm from "./orderSubForm";
11
11
  export * as SKX from "./SKX";
12
12
  export * as JKY from "./JKY";
13
+ export * as DXD from "./DXD";
13
14
  export * from "./workOrder";
14
15
  export * from "./constants";
15
16
  export declare const queryWdtAddressData: (instance?: WdtAddressData) => Promise<void>;
@@ -23,6 +23,8 @@ import * as _SKX from "./SKX";
23
23
  export { _SKX as SKX };
24
24
  import * as _JKY from "./JKY";
25
25
  export { _JKY as JKY };
26
+ import * as _DXD from "./DXD";
27
+ export { _DXD as DXD };
26
28
  export * from "./workOrder";
27
29
  export * from "./constants";
28
30
  var transformData = function transformData(list) {
@@ -12,7 +12,12 @@ export var setCacheOmsOrderInfo = function setCacheOmsOrderInfo(_ref) {
12
12
  // itemValue,
13
13
  // });
14
14
  var cacheOmsOrderInfo = JSON.parse(sessionStorage.getItem("cacheOmsOrderInfo") || "{}");
15
- sessionStorage.setItem("cacheOmsOrderInfo", JSON.stringify(_objectSpread(_objectSpread({}, cacheOmsOrderInfo), {}, _defineProperty({}, itemKey, itemValue))));
15
+ try {
16
+ sessionStorage.setItem("cacheOmsOrderInfo", JSON.stringify(_objectSpread(_objectSpread({}, cacheOmsOrderInfo), {}, _defineProperty({}, itemKey, itemValue))));
17
+ } catch (e) {
18
+ // 数据量过大(超过5MB)时不保存,避免 QuotaExceededError
19
+ console.warn("setCacheOmsOrderInfo: 存储空间不足,跳过缓存", e);
20
+ }
16
21
  };
17
22
  export var setCacheOrderInfo = function setCacheOrderInfo(_ref2) {
18
23
  var itemKey = _ref2.itemKey,
@@ -24,5 +29,10 @@ export var setCacheOrderInfo = function setCacheOrderInfo(_ref2) {
24
29
  // ext,
25
30
  // });
26
31
  var cacheOrderInfo = JSON.parse(sessionStorage.getItem("cacheOrderInfo") || "{}");
27
- sessionStorage.setItem("cacheOrderInfo", JSON.stringify(_objectSpread(_objectSpread(_objectSpread({}, cacheOrderInfo), ext !== null && ext !== void 0 ? ext : {}), {}, _defineProperty({}, itemKey, itemValue))));
32
+ try {
33
+ sessionStorage.setItem("cacheOrderInfo", JSON.stringify(_objectSpread(_objectSpread(_objectSpread({}, cacheOrderInfo), ext !== null && ext !== void 0 ? ext : {}), {}, _defineProperty({}, itemKey, itemValue))));
34
+ } catch (e) {
35
+ // 数据量过大(超过5MB)时不保存,避免 QuotaExceededError
36
+ console.warn("setCacheOrderInfo: 存储空间不足,跳过缓存", e);
37
+ }
28
38
  };
@@ -0,0 +1,15 @@
1
+ interface OptionsItem {
2
+ label: string;
3
+ value: string | number;
4
+ disabled: boolean;
5
+ }
6
+ declare class ShopData {
7
+ private shopData;
8
+ fetchData: () => Promise<void>;
9
+ getShopData: () => OptionsItem[];
10
+ setShopData: (val: OptionsItem[]) => OptionsItem[];
11
+ }
12
+ export declare class DxdShopDataCenter {
13
+ static getInstance(): ShopData;
14
+ }
15
+ export {};
@@ -0,0 +1,49 @@
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 _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, _toPropertyKey(descriptor.key), descriptor); } }
6
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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
+ import { DXD } from "../servers/index";
12
+ var ShopData = /*#__PURE__*/_createClass(function ShopData() {
13
+ var _this = this;
14
+ _classCallCheck(this, ShopData);
15
+ _defineProperty(this, "shopData", []);
16
+ _defineProperty(this, "fetchData", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
17
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
18
+ while (1) switch (_context.prev = _context.next) {
19
+ case 0:
20
+ _context.next = 2;
21
+ return DXD.getShopDataAsync().then(function (list) {
22
+ _this.shopData = list;
23
+ });
24
+ case 2:
25
+ case "end":
26
+ return _context.stop();
27
+ }
28
+ }, _callee);
29
+ })));
30
+ _defineProperty(this, "getShopData", function () {
31
+ return _this.shopData;
32
+ });
33
+ _defineProperty(this, "setShopData", function (val) {
34
+ return _this.shopData = val;
35
+ });
36
+ });
37
+ var instance = new ShopData();
38
+ export var DxdShopDataCenter = /*#__PURE__*/function () {
39
+ function DxdShopDataCenter() {
40
+ _classCallCheck(this, DxdShopDataCenter);
41
+ }
42
+ _createClass(DxdShopDataCenter, null, [{
43
+ key: "getInstance",
44
+ value: function getInstance() {
45
+ return instance;
46
+ }
47
+ }]);
48
+ return DxdShopDataCenter;
49
+ }();
@@ -8,7 +8,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
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
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
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
- import { BSE3, WDT, KM, GY, JST, JY, JKY, WLN } from "../servers/index";
11
+ import { BSE3, WDT, KM, GY, JST, JY, JKY, WLN, DXD } from "../servers/index";
12
12
  var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
13
13
  var _this = this;
14
14
  _classCallCheck(this, SendData);
@@ -72,7 +72,8 @@ var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
72
72
  jst: JST,
73
73
  jy: JY,
74
74
  jky: JKY,
75
- wln: WLN
75
+ wln: WLN,
76
+ dxd: DXD
76
77
  }[this.platform];
77
78
  });
78
79
  export var SendDataCenter = /*#__PURE__*/function () {
@@ -91,6 +92,7 @@ export var SendDataCenter = /*#__PURE__*/function () {
91
92
  if (platform === "JY_SEND_GOOD") platform = "jy";
92
93
  if (platform === "JKY_SEND_GOOD") platform = "jky";
93
94
  if (platform === "WLN_SEND_GOOD") platform = "wln";
95
+ if (platform === "DXD_SEND_GOOD") platform = "dxd";
94
96
  if (!this.instanceMap.has(platform)) {
95
97
  this.instanceMap.set(platform, new SendData(platform));
96
98
  }