Commit f02c7f20 authored by 何虹's avatar 何虹 💬

编译成es5

parent 8a18c7ac
...@@ -8,16 +8,13 @@ ...@@ -8,16 +8,13 @@
else else
root["hsWebHttpClient"] = factory(); root["hsWebHttpClient"] = factory();
})(self, function() { })(self, function() {
return /******/ (() => { // webpackBootstrap return /******/ (function() { // webpackBootstrap
/******/ var __webpack_modules__ = ([ /******/ var __webpack_modules__ = ([
/* 0 */ /* 0 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */ });
/* harmony import */ var _root__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); /* harmony import */ var _root__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
/* harmony import */ var _packages_modules_billflow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28); /* harmony import */ var _packages_modules_billflow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28);
/* harmony import */ var _packages_modules_webChartConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31); /* harmony import */ var _packages_modules_webChartConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31);
...@@ -53,23 +50,20 @@ root_prototype_keys.forEach(k => { ...@@ -53,23 +50,20 @@ root_prototype_keys.forEach(k => {
api[`${k}`] = root_prototype[k] api[`${k}`] = root_prototype[k]
} }
}) })
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (api); /* harmony default export */ __webpack_exports__["default"] = (api);
/***/ }), /***/ }),
/* 1 */ /* 1 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */ });
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);
class Root { class Root {
filterEmptyValue(obj) { filterEmptyValue (obj) {
if (!obj) return if (!obj) return
const emptyValues = [null, undefined, 'null', 'undefined', NaN] const emptyValues = [null, undefined, 'null', 'undefined', NaN]
for (const k in obj) { for (const k in obj) {
...@@ -81,25 +75,28 @@ class Root { ...@@ -81,25 +75,28 @@ class Root {
} }
} }
} }
get(url, params, headers, config) { get (url, params, headers, config) {
return this.request('get', url, null, params, headers, config) return this.request('get', url, null, params, headers, config)
} }
post(url, data, params, headers, config) { post (url, data, params, headers, config) {
return this.request('post', url, data, params, headers, config) return this.request('post', url, data, params, headers, config)
} }
put(url, data, params, headers, config) { put (url, data, params, headers, config) {
return this.request('put', url, data, params, headers, config) return this.request('put', url, data, params, headers, config)
} }
delete(url, data, params, headers, config) { delete (url, data, params, headers, config) {
return this.request('delete', url, data, params, headers, config) return this.request('delete', url, data, params, headers, config)
} }
requestConfig(config) { requestConfig (config) {
return axios__WEBPACK_IMPORTED_MODULE_0___default()(config) return axios__WEBPACK_IMPORTED_MODULE_0___default()(config)
} }
request(method, url, data, params, headers = null, config = {}) { request (method, url, data, params, headers = null, config = {}) {
this.filterEmptyValue(data) this.filterEmptyValue(data)
// 公共头设置 // 公共头设置
const aixosCtx = { method, url, ...config } const aixosCtx = { method, url,...config }
// if (config) {
// Object.assign(aixosCtx, config)
// }
params && (aixosCtx.params = params) params && (aixosCtx.params = params)
if (aixosCtx.params && aixosCtx.params.token) delete aixosCtx.params.token if (aixosCtx.params && aixosCtx.params.token) delete aixosCtx.params.token
if (aixosCtx.params && aixosCtx.params._user_info) delete aixosCtx.params._user_info if (aixosCtx.params && aixosCtx.params._user_info) delete aixosCtx.params._user_info
...@@ -110,18 +107,18 @@ class Root { ...@@ -110,18 +107,18 @@ class Root {
} }
} }
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Root); /* harmony default export */ __webpack_exports__["default"] = (Root);
/***/ }), /***/ }),
/* 2 */ /* 2 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
module.exports = __webpack_require__(3); module.exports = __webpack_require__(3);
/***/ }), /***/ }),
/* 3 */ /* 3 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -181,7 +178,7 @@ module.exports.default = axios; ...@@ -181,7 +178,7 @@ module.exports.default = axios;
/***/ }), /***/ }),
/* 4 */ /* 4 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -539,7 +536,7 @@ module.exports = { ...@@ -539,7 +536,7 @@ module.exports = {
/***/ }), /***/ }),
/* 5 */ /* 5 */
/***/ ((module) => { /***/ (function(module) {
"use strict"; "use strict";
...@@ -557,7 +554,7 @@ module.exports = function bind(fn, thisArg) { ...@@ -557,7 +554,7 @@ module.exports = function bind(fn, thisArg) {
/***/ }), /***/ }),
/* 6 */ /* 6 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -659,7 +656,7 @@ module.exports = Axios; ...@@ -659,7 +656,7 @@ module.exports = Axios;
/***/ }), /***/ }),
/* 7 */ /* 7 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -736,7 +733,7 @@ module.exports = function buildURL(url, params, paramsSerializer) { ...@@ -736,7 +733,7 @@ module.exports = function buildURL(url, params, paramsSerializer) {
/***/ }), /***/ }),
/* 8 */ /* 8 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -795,7 +792,7 @@ module.exports = InterceptorManager; ...@@ -795,7 +792,7 @@ module.exports = InterceptorManager;
/***/ }), /***/ }),
/* 9 */ /* 9 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -881,7 +878,7 @@ module.exports = function dispatchRequest(config) { ...@@ -881,7 +878,7 @@ module.exports = function dispatchRequest(config) {
/***/ }), /***/ }),
/* 10 */ /* 10 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -908,7 +905,7 @@ module.exports = function transformData(data, headers, fns) { ...@@ -908,7 +905,7 @@ module.exports = function transformData(data, headers, fns) {
/***/ }), /***/ }),
/* 11 */ /* 11 */
/***/ ((module) => { /***/ (function(module) {
"use strict"; "use strict";
...@@ -920,7 +917,7 @@ module.exports = function isCancel(value) { ...@@ -920,7 +917,7 @@ module.exports = function isCancel(value) {
/***/ }), /***/ }),
/* 12 */ /* 12 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1025,7 +1022,7 @@ module.exports = defaults; ...@@ -1025,7 +1022,7 @@ module.exports = defaults;
/***/ }), /***/ }),
/* 13 */ /* 13 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1044,7 +1041,7 @@ module.exports = function normalizeHeaderName(headers, normalizedName) { ...@@ -1044,7 +1041,7 @@ module.exports = function normalizeHeaderName(headers, normalizedName) {
/***/ }), /***/ }),
/* 14 */ /* 14 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1230,7 +1227,7 @@ module.exports = function xhrAdapter(config) { ...@@ -1230,7 +1227,7 @@ module.exports = function xhrAdapter(config) {
/***/ }), /***/ }),
/* 15 */ /* 15 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1262,7 +1259,7 @@ module.exports = function settle(resolve, reject, response) { ...@@ -1262,7 +1259,7 @@ module.exports = function settle(resolve, reject, response) {
/***/ }), /***/ }),
/* 16 */ /* 16 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1287,7 +1284,7 @@ module.exports = function createError(message, config, code, request, response) ...@@ -1287,7 +1284,7 @@ module.exports = function createError(message, config, code, request, response)
/***/ }), /***/ }),
/* 17 */ /* 17 */
/***/ ((module) => { /***/ (function(module) {
"use strict"; "use strict";
...@@ -1336,7 +1333,7 @@ module.exports = function enhanceError(error, config, code, request, response) { ...@@ -1336,7 +1333,7 @@ module.exports = function enhanceError(error, config, code, request, response) {
/***/ }), /***/ }),
/* 18 */ /* 18 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1396,7 +1393,7 @@ module.exports = ( ...@@ -1396,7 +1393,7 @@ module.exports = (
/***/ }), /***/ }),
/* 19 */ /* 19 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1423,7 +1420,7 @@ module.exports = function buildFullPath(baseURL, requestedURL) { ...@@ -1423,7 +1420,7 @@ module.exports = function buildFullPath(baseURL, requestedURL) {
/***/ }), /***/ }),
/* 20 */ /* 20 */
/***/ ((module) => { /***/ (function(module) {
"use strict"; "use strict";
...@@ -1444,7 +1441,7 @@ module.exports = function isAbsoluteURL(url) { ...@@ -1444,7 +1441,7 @@ module.exports = function isAbsoluteURL(url) {
/***/ }), /***/ }),
/* 21 */ /* 21 */
/***/ ((module) => { /***/ (function(module) {
"use strict"; "use strict";
...@@ -1465,7 +1462,7 @@ module.exports = function combineURLs(baseURL, relativeURL) { ...@@ -1465,7 +1462,7 @@ module.exports = function combineURLs(baseURL, relativeURL) {
/***/ }), /***/ }),
/* 22 */ /* 22 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1525,7 +1522,7 @@ module.exports = function parseHeaders(headers) { ...@@ -1525,7 +1522,7 @@ module.exports = function parseHeaders(headers) {
/***/ }), /***/ }),
/* 23 */ /* 23 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1600,7 +1597,7 @@ module.exports = ( ...@@ -1600,7 +1597,7 @@ module.exports = (
/***/ }), /***/ }),
/* 24 */ /* 24 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1694,7 +1691,7 @@ module.exports = function mergeConfig(config1, config2) { ...@@ -1694,7 +1691,7 @@ module.exports = function mergeConfig(config1, config2) {
/***/ }), /***/ }),
/* 25 */ /* 25 */
/***/ ((module) => { /***/ (function(module) {
"use strict"; "use strict";
...@@ -1720,7 +1717,7 @@ module.exports = Cancel; ...@@ -1720,7 +1717,7 @@ module.exports = Cancel;
/***/ }), /***/ }),
/* 26 */ /* 26 */
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict"; "use strict";
...@@ -1784,7 +1781,7 @@ module.exports = CancelToken; ...@@ -1784,7 +1781,7 @@ module.exports = CancelToken;
/***/ }), /***/ }),
/* 27 */ /* 27 */
/***/ ((module) => { /***/ (function(module) {
"use strict"; "use strict";
...@@ -1818,13 +1815,10 @@ module.exports = function spread(callback) { ...@@ -1818,13 +1815,10 @@ module.exports = function spread(callback) {
/***/ }), /***/ }),
/* 28 */ /* 28 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */ });
/* harmony import */ var _common_commonModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29); /* harmony import */ var _common_commonModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29);
// 单据流类 // 单据流类
...@@ -1862,30 +1856,30 @@ class Billflow { ...@@ -1862,30 +1856,30 @@ class Billflow {
return this.requestClient.post(url, data) return this.requestClient.post(url, data)
} }
} }
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Billflow); /* harmony default export */ __webpack_exports__["default"] = (Billflow);
/***/ }), /***/ }),
/* 29 */ /* 29 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "WEB_QUERY": () => /* binding */ WEB_QUERY, /* harmony export */ "WEB_QUERY": function() { return /* binding */ WEB_QUERY; },
/* harmony export */ "WEB_QUERY_QUERY": () => /* binding */ WEB_QUERY_QUERY, /* harmony export */ "WEB_QUERY_QUERY": function() { return /* binding */ WEB_QUERY_QUERY; },
/* harmony export */ "WEB_QUERY_QUERY_VALUE": () => /* binding */ WEB_QUERY_QUERY_VALUE, /* harmony export */ "WEB_QUERY_QUERY_VALUE": function() { return /* binding */ WEB_QUERY_QUERY_VALUE; },
/* harmony export */ "WEB_QUERY_PAGE": () => /* binding */ WEB_QUERY_PAGE, /* harmony export */ "WEB_QUERY_PAGE": function() { return /* binding */ WEB_QUERY_PAGE; },
/* harmony export */ "SQL_GQL": () => /* binding */ SQL_GQL, /* harmony export */ "SQL_GQL": function() { return /* binding */ SQL_GQL; },
/* harmony export */ "SQL_GQL_SAVE": () => /* binding */ SQL_GQL_SAVE, /* harmony export */ "SQL_GQL_SAVE": function() { return /* binding */ SQL_GQL_SAVE; },
/* harmony export */ "TOOL_API": () => /* binding */ TOOL_API, /* harmony export */ "TOOL_API": function() { return /* binding */ TOOL_API; },
/* harmony export */ "AUDIT_BILLS": () => /* binding */ AUDIT_BILLS, /* harmony export */ "AUDIT_BILLS": function() { return /* binding */ AUDIT_BILLS; },
/* harmony export */ "UN_AUDIT_BILLS": () => /* binding */ UN_AUDIT_BILLS, /* harmony export */ "UN_AUDIT_BILLS": function() { return /* binding */ UN_AUDIT_BILLS; },
/* harmony export */ "CLOSE_BILLS": () => /* binding */ CLOSE_BILLS, /* harmony export */ "CLOSE_BILLS": function() { return /* binding */ CLOSE_BILLS; },
/* harmony export */ "UN_CLOSE_BILLS": () => /* binding */ UN_CLOSE_BILLS, /* harmony export */ "UN_CLOSE_BILLS": function() { return /* binding */ UN_CLOSE_BILLS; },
/* harmony export */ "SEND_BILLS": () => /* binding */ SEND_BILLS, /* harmony export */ "SEND_BILLS": function() { return /* binding */ SEND_BILLS; },
/* harmony export */ "UN_SEND_BILLS": () => /* binding */ UN_SEND_BILLS, /* harmony export */ "UN_SEND_BILLS": function() { return /* binding */ UN_SEND_BILLS; },
/* harmony export */ "REJECT_BILLS": () => /* binding */ REJECT_BILLS /* harmony export */ "REJECT_BILLS": function() { return /* binding */ REJECT_BILLS; }
/* harmony export */ }); /* harmony export */ });
/* harmony import */ var _commonProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30); /* harmony import */ var _commonProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
...@@ -1908,18 +1902,18 @@ const REJECT_BILLS = `${_commonProxy__WEBPACK_IMPORTED_MODULE_0__.COMMON_UTIL_PR ...@@ -1908,18 +1902,18 @@ const REJECT_BILLS = `${_commonProxy__WEBPACK_IMPORTED_MODULE_0__.COMMON_UTIL_PR
/***/ }), /***/ }),
/* 30 */ /* 30 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "OAUTH_PROXY": () => /* binding */ OAUTH_PROXY, /* harmony export */ "OAUTH_PROXY": function() { return /* binding */ OAUTH_PROXY; },
/* harmony export */ "TOOL_PROXY": () => /* binding */ TOOL_PROXY, /* harmony export */ "TOOL_PROXY": function() { return /* binding */ TOOL_PROXY; },
/* harmony export */ "HSRIGHT_TOOL_PROXY": () => /* binding */ HSRIGHT_TOOL_PROXY, /* harmony export */ "HSRIGHT_TOOL_PROXY": function() { return /* binding */ HSRIGHT_TOOL_PROXY; },
/* harmony export */ "COMMON_UTIL_PROXY": () => /* binding */ COMMON_UTIL_PROXY, /* harmony export */ "COMMON_UTIL_PROXY": function() { return /* binding */ COMMON_UTIL_PROXY; },
/* harmony export */ "COMMON_PROXY": () => /* binding */ COMMON_PROXY, /* harmony export */ "COMMON_PROXY": function() { return /* binding */ COMMON_PROXY; },
/* harmony export */ "GQL_PROXY": () => /* binding */ GQL_PROXY, /* harmony export */ "GQL_PROXY": function() { return /* binding */ GQL_PROXY; },
/* harmony export */ "FILE_RESOURCE_PROXY": () => /* binding */ FILE_RESOURCE_PROXY /* harmony export */ "FILE_RESOURCE_PROXY": function() { return /* binding */ FILE_RESOURCE_PROXY; }
/* harmony export */ }); /* harmony export */ });
const OAUTH_PROXY = 'OAUTH_PROXY'// `http://${api}/HSRight/api/` const OAUTH_PROXY = 'OAUTH_PROXY'// `http://${api}/HSRight/api/`
const TOOL_PROXY = 'TOOL_PROXY' // `http://${api}/Tool/api/` const TOOL_PROXY = 'TOOL_PROXY' // `http://${api}/Tool/api/`
...@@ -1932,13 +1926,10 @@ const FILE_RESOURCE_PROXY = 'FILE_RESOURCE_PROXY'// `http://${api}/fileresource/ ...@@ -1932,13 +1926,10 @@ const FILE_RESOURCE_PROXY = 'FILE_RESOURCE_PROXY'// `http://${api}/fileresource/
/***/ }), /***/ }),
/* 31 */ /* 31 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */ });
/* harmony import */ var _common_commonModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29); /* harmony import */ var _common_commonModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29);
/* harmony import */ var hs_util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32); /* harmony import */ var hs_util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32);
/* harmony import */ var hs_util_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(hs_util_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var hs_util_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(hs_util_js__WEBPACK_IMPORTED_MODULE_1__);
...@@ -2108,12 +2099,12 @@ class Control { ...@@ -2108,12 +2099,12 @@ class Control {
return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_PAGE, postData) return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_PAGE, postData)
} }
} }
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Control); /* harmony default export */ __webpack_exports__["default"] = (Control);
/***/ }), /***/ }),
/* 32 */ /* 32 */
/***/ ((module) => { /***/ (function(module) {
(function webpackUniversalModuleDefinition(root, factory) { (function webpackUniversalModuleDefinition(root, factory) {
if(true) if(true)
...@@ -21956,13 +21947,10 @@ class TypeObject { ...@@ -21956,13 +21947,10 @@ class TypeObject {
/***/ }), /***/ }),
/* 33 */ /* 33 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */ });
/* harmony import */ var _common_commonModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29); /* harmony import */ var _common_commonModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29);
class RestFul { class RestFul {
...@@ -22029,18 +22017,15 @@ class RestFul { ...@@ -22029,18 +22017,15 @@ class RestFul {
return this.requestClient.delete(url_, bodyData, parms) return this.requestClient.delete(url_, bodyData, parms)
} }
} }
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RestFul); /* harmony default export */ __webpack_exports__["default"] = (RestFul);
/***/ }), /***/ }),
/* 34 */ /* 34 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */ });
/* harmony import */ var _common_commonProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30); /* harmony import */ var _common_commonProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
...@@ -22102,18 +22087,15 @@ class System { ...@@ -22102,18 +22087,15 @@ class System {
return this.restfulClient.queryList(data) return this.restfulClient.queryList(data)
} }
} }
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (System); /* harmony default export */ __webpack_exports__["default"] = (System);
/***/ }), /***/ }),
/* 35 */ /* 35 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */ });
/* harmony import */ var _common_commonModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29); /* harmony import */ var _common_commonModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29);
class WebQuery { class WebQuery {
...@@ -22128,18 +22110,15 @@ class WebQuery { ...@@ -22128,18 +22110,15 @@ class WebQuery {
return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_PAGE, data, params, header) return this.requestClient.post(_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.WEB_QUERY_PAGE, data, params, header)
} }
} }
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WebQuery); /* harmony default export */ __webpack_exports__["default"] = (WebQuery);
/***/ }), /***/ }),
/* 36 */ /* 36 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => __WEBPACK_DEFAULT_EXPORT__
/* harmony export */ });
/* harmony import */ var _common_commonProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30); /* harmony import */ var _common_commonProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
...@@ -22157,7 +22136,7 @@ class Ref { ...@@ -22157,7 +22136,7 @@ class Ref {
return this.requestClient.get(url, parms) return this.requestClient.get(url, parms)
} }
} }
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Ref); /* harmony default export */ __webpack_exports__["default"] = (Ref);
/***/ }) /***/ })
...@@ -22188,44 +22167,44 @@ class Ref { ...@@ -22188,44 +22167,44 @@ class Ref {
/******/ /******/
/************************************************************************/ /************************************************************************/
/******/ /* webpack/runtime/compat get default export */ /******/ /* webpack/runtime/compat get default export */
/******/ (() => { /******/ !function() {
/******/ // getDefaultExport function for compatibility with non-harmony modules /******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => { /******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ? /******/ var getter = module && module.__esModule ?
/******/ () => module['default'] : /******/ function() { return module['default']; } :
/******/ () => module; /******/ function() { return module; };
/******/ __webpack_require__.d(getter, { a: getter }); /******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter; /******/ return getter;
/******/ }; /******/ };
/******/ })(); /******/ }();
/******/ /******/
/******/ /* webpack/runtime/define property getters */ /******/ /* webpack/runtime/define property getters */
/******/ (() => { /******/ !function() {
/******/ // define getter functions for harmony exports /******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => { /******/ __webpack_require__.d = function(exports, definition) {
/******/ for(var key in definition) { /******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ } /******/ }
/******/ } /******/ }
/******/ }; /******/ };
/******/ })(); /******/ }();
/******/ /******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => { /******/ !function() {
/******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ })(); /******/ }();
/******/ /******/
/******/ /* webpack/runtime/make namespace object */ /******/ /* webpack/runtime/make namespace object */
/******/ (() => { /******/ !function() {
/******/ // define __esModule on exports /******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => { /******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ } /******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ }; /******/ };
/******/ })(); /******/ }();
/******/ /******/
/************************************************************************/ /************************************************************************/
/******/ // module exports must be returned from runtime so entry inlining is disabled /******/ // module exports must be returned from runtime so entry inlining is disabled
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "hswebhttpclient", "name": "hswebhttpclient",
"version": "1.0.3", "version": "1.0.3",
"description": "dync中httpClient基础插件", "description": "dync中httpClient基础插件",
"main": "./src/index.js", "main": "./dist/hsWebHttpClient.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack", "build": "webpack",
......
import axios from 'axios' import axios from 'axios'
class Root { class Root {
filterEmptyValue(obj) { filterEmptyValue (obj) {
if (!obj) return if (!obj) return
const emptyValues = [null, undefined, 'null', 'undefined', NaN] const emptyValues = [null, undefined, 'null', 'undefined', NaN]
for (const k in obj) { for (const k in obj) {
...@@ -12,25 +12,28 @@ class Root { ...@@ -12,25 +12,28 @@ class Root {
} }
} }
} }
get(url, params, headers, config) { get (url, params, headers, config) {
return this.request('get', url, null, params, headers, config) return this.request('get', url, null, params, headers, config)
} }
post(url, data, params, headers, config) { post (url, data, params, headers, config) {
return this.request('post', url, data, params, headers, config) return this.request('post', url, data, params, headers, config)
} }
put(url, data, params, headers, config) { put (url, data, params, headers, config) {
return this.request('put', url, data, params, headers, config) return this.request('put', url, data, params, headers, config)
} }
delete(url, data, params, headers, config) { delete (url, data, params, headers, config) {
return this.request('delete', url, data, params, headers, config) return this.request('delete', url, data, params, headers, config)
} }
requestConfig(config) { requestConfig (config) {
return axios(config) return axios(config)
} }
request(method, url, data, params, headers = null, config = {}) { request (method, url, data, params, headers = null, config = {}) {
this.filterEmptyValue(data) this.filterEmptyValue(data)
// 公共头设置 // 公共头设置
const aixosCtx = { method, url, ...config } const aixosCtx = { method, url,...config }
// if (config) {
// Object.assign(aixosCtx, config)
// }
params && (aixosCtx.params = params) params && (aixosCtx.params = params)
if (aixosCtx.params && aixosCtx.params.token) delete aixosCtx.params.token if (aixosCtx.params && aixosCtx.params.token) delete aixosCtx.params.token
if (aixosCtx.params && aixosCtx.params._user_info) delete aixosCtx.params._user_info if (aixosCtx.params && aixosCtx.params._user_info) delete aixosCtx.params._user_info
......
...@@ -2,6 +2,7 @@ const TerserPlugin = require('terser-webpack-plugin') // 引入压缩插件 ...@@ -2,6 +2,7 @@ const TerserPlugin = require('terser-webpack-plugin') // 引入压缩插件
module.exports = { module.exports = {
mode: 'none', // 因为默认是production 默认会进行压缩 mode: 'none', // 因为默认是production 默认会进行压缩
target: ['web', 'es5'],//← ← ←就是这个
entry: { entry: {
"hsWebHttpClient": "./src/index.js", "hsWebHttpClient": "./src/index.js",
"hsWebHttpClient.min": "./src/index.js" "hsWebHttpClient.min": "./src/index.js"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment