eoss-mobiles 0.2.13 → 0.2.15
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/lib/checkbox.js +260 -199
- package/lib/config/api.js +4 -1
- package/lib/date.js +3 -3
- package/lib/eoss-mobile.common.js +746 -249
- package/lib/flow.js +362 -277
- package/lib/index.js +1 -1
- package/lib/notice-bar.js +2 -2
- package/lib/picker.js +260 -199
- package/lib/pull-refresh.js +2 -2
- package/lib/radio.js +260 -199
- package/lib/retrial-auth.js +2457 -0
- package/lib/selector.js +294 -233
- package/lib/table-column.js +260 -199
- package/lib/table.js +227 -172
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/retrial-auth.css +1 -0
- package/lib/utils/axios.js +140 -154
- package/lib/utils/http.js +5 -5
- package/lib/utils/util.js +71 -2
- package/package.json +1 -1
- package/packages/date/src/main.vue +1 -1
- package/packages/flow/src/components/Handle.vue +4 -1
- package/packages/flow/src/components/Opinion.vue +39 -3
- package/packages/flow/src/components/StartFlow.vue +3 -3
- package/packages/flow/src/main.vue +6 -0
- package/packages/retrial-auth/index.js +5 -0
- package/packages/retrial-auth/src/main.vue +257 -0
- package/packages/selector/src/selector-tree.vue +1 -1
- package/packages/selector/src/tree.vue +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/retrial-auth.css +1 -0
- package/packages/theme-chalk/src/index.scss +1 -0
- package/packages/theme-chalk/src/retrial-auth.scss +28 -0
- package/src/config/api.js +3 -0
- package/src/index.js +4 -1
- package/src/utils/axios.js +156 -174
- package/src/utils/http.js +15 -5
- package/src/utils/util.js +164 -84
package/lib/table-column.js
CHANGED
|
@@ -90,16 +90,50 @@ module.exports =
|
|
|
90
90
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
91
91
|
|
|
92
92
|
"use strict";
|
|
93
|
-
/* harmony import */ var _eoss_design_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
93
|
+
/* harmony import */ var _eoss_design_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
|
94
94
|
/* harmony import */ var _eoss_design_color__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_eoss_design_color__WEBPACK_IMPORTED_MODULE_0__);
|
|
95
95
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
96
96
|
|
|
97
97
|
/* eslint-disable indent */
|
|
98
98
|
// import { authCenter } from '../config/api';
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
// import CryptoJS from 'crypto-js'
|
|
101
101
|
var sm2 = __webpack_require__(8).sm2;
|
|
102
|
-
|
|
102
|
+
// /**
|
|
103
|
+
// * esEncrypt
|
|
104
|
+
// * @desc:sm2加密
|
|
105
|
+
// * @author huangbo
|
|
106
|
+
// * @date 2022年5月7日
|
|
107
|
+
// * @param {string} [data] - 被加密的字符串
|
|
108
|
+
// * @param {string} [key] - 公钥
|
|
109
|
+
// **/
|
|
110
|
+
// const encryptDes = (message, key) => {
|
|
111
|
+
// const keyHex = CryptoJS.enc.Utf8.parse(key);
|
|
112
|
+
// const encrypted = CryptoJS.DES.encrypt(message, keyHex, {
|
|
113
|
+
// mode: CryptoJS.mode.ECB,
|
|
114
|
+
// padding: CryptoJS.pad.Pkcs7
|
|
115
|
+
// });
|
|
116
|
+
// return encrypted.toString();
|
|
117
|
+
// }
|
|
118
|
+
// /**
|
|
119
|
+
// * esEncrypt
|
|
120
|
+
// * @desc:sm2加密
|
|
121
|
+
// * @author huangbo
|
|
122
|
+
// * @date 2022年5月7日
|
|
123
|
+
// * @param {string} [data] - 被加密的字符串
|
|
124
|
+
// * @param {string} [key] - 公钥
|
|
125
|
+
// **/
|
|
126
|
+
// const decryptDes = (ciphertext, key) => {
|
|
127
|
+
// const keyHex = CryptoJS.enc.Utf8.parse(key);
|
|
128
|
+
// // direct decrypt ciphertext
|
|
129
|
+
// const decrypted = CryptoJS.DES.decrypt({
|
|
130
|
+
// ciphertext: CryptoJS.enc.Base64.parse(ciphertext)
|
|
131
|
+
// }, keyHex, {
|
|
132
|
+
// mode: CryptoJS.mode.ECB,
|
|
133
|
+
// padding: CryptoJS.pad.Pkcs7
|
|
134
|
+
// });
|
|
135
|
+
// return decrypted.toString(CryptoJS.enc.Utf8);
|
|
136
|
+
// }
|
|
103
137
|
/**
|
|
104
138
|
* esEncrypt
|
|
105
139
|
* @desc:sm2加密
|
|
@@ -1301,6 +1335,23 @@ var openAttachment = function openAttachment(data) {
|
|
|
1301
1335
|
}
|
|
1302
1336
|
}
|
|
1303
1337
|
};
|
|
1338
|
+
/**
|
|
1339
|
+
* jsGoPayrollIndexAct
|
|
1340
|
+
* @desc:原生app打开工资条页面
|
|
1341
|
+
* @date 2024年1月11日
|
|
1342
|
+
* @author liufan
|
|
1343
|
+
*/
|
|
1344
|
+
var jsGoPayrollIndexAct = function jsGoPayrollIndexAct(id) {
|
|
1345
|
+
var u = navigator.userAgent;
|
|
1346
|
+
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
|
|
1347
|
+
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
|
|
1348
|
+
if (isAndroid) {
|
|
1349
|
+
window.AndroidWebView.jsGoPayrollIndexAct(id);
|
|
1350
|
+
} else if (isiOS) {
|
|
1351
|
+
window.webkit.messageHandlers.jsGoPayrollIndexAct.postMessage(id);
|
|
1352
|
+
}
|
|
1353
|
+
};
|
|
1354
|
+
|
|
1304
1355
|
/**
|
|
1305
1356
|
* deepClone
|
|
1306
1357
|
* @desc:深拷贝
|
|
@@ -1358,6 +1409,21 @@ var exclAttribute = function exclAttribute(_ref4) {
|
|
|
1358
1409
|
}
|
|
1359
1410
|
return obj;
|
|
1360
1411
|
};
|
|
1412
|
+
/**
|
|
1413
|
+
* 获取UUID
|
|
1414
|
+
* @desc:generateUUID
|
|
1415
|
+
* @author liufan
|
|
1416
|
+
* @date 2024年1月12日
|
|
1417
|
+
**/
|
|
1418
|
+
var generateUUID = function generateUUID() {
|
|
1419
|
+
var d = new Date().getTime();
|
|
1420
|
+
var uuid = 'xxxxxxxxxxxxxxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
1421
|
+
var r = (d + Math.random() * 16) % 16 | 0;
|
|
1422
|
+
d = Math.floor(d / 16);
|
|
1423
|
+
return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
|
|
1424
|
+
});
|
|
1425
|
+
return uuid;
|
|
1426
|
+
};
|
|
1361
1427
|
/* harmony default export */ __webpack_exports__["a"] = ({
|
|
1362
1428
|
esEncrypt: esEncrypt,
|
|
1363
1429
|
esDecode: esDecode,
|
|
@@ -1401,7 +1467,9 @@ var exclAttribute = function exclAttribute(_ref4) {
|
|
|
1401
1467
|
getTypeName: getTypeName,
|
|
1402
1468
|
replenish: replenish,
|
|
1403
1469
|
identical: identical,
|
|
1404
|
-
|
|
1470
|
+
jsGoPayrollIndexAct: jsGoPayrollIndexAct,
|
|
1471
|
+
exportXls: exportXls,
|
|
1472
|
+
generateUUID: generateUUID
|
|
1405
1473
|
});
|
|
1406
1474
|
|
|
1407
1475
|
/***/ }),
|
|
@@ -1513,41 +1581,47 @@ function normalizeComponent(
|
|
|
1513
1581
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1514
1582
|
|
|
1515
1583
|
"use strict";
|
|
1516
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return
|
|
1517
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1518
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return
|
|
1519
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1520
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1521
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1522
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1523
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1524
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1525
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1526
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1527
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1528
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1529
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1530
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1531
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1532
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1533
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1534
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1535
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1536
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1537
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1538
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1539
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1540
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1541
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1542
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1584
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return initRetrialAuth; });
|
|
1585
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getRetrialAuthCode; });
|
|
1586
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return codeRetrialAuth; });
|
|
1587
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return selectObject; });
|
|
1588
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return findSysCode; });
|
|
1589
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return commonOpion; });
|
|
1590
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getHandleInfoHtml; });
|
|
1591
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getNodeInfoHtml; });
|
|
1592
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return taskHandleHtml; });
|
|
1593
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return taskHandleHtmlImg; });
|
|
1594
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return registerNew; });
|
|
1595
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getNodeInfo; });
|
|
1596
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return toStartFlow; });
|
|
1597
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return taskRejectHtml; });
|
|
1598
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return toTaskRejectHtml; });
|
|
1599
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return handleTaskRead; });
|
|
1600
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return taskReadHtml; });
|
|
1601
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return toStartTaskRead; });
|
|
1602
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return toStartTaskReadHtml; });
|
|
1603
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return toTaskTransferIndex; });
|
|
1604
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return findSysCodes; });
|
|
1605
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getNotificationMsg; });
|
|
1606
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return toTaskUnionExamine; });
|
|
1607
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return taskUnionExamine; });
|
|
1608
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return toTaskTakeAdvice; });
|
|
1609
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return taskTakeAdvice; });
|
|
1610
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return toTaskStartDraft; });
|
|
1611
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return taskStartDraft; });
|
|
1612
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return toTaskUnionSeal; });
|
|
1613
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return taskUnionSeal; });
|
|
1543
1614
|
/* unused harmony export toTwoOfficesDispatch */
|
|
1544
1615
|
/* unused harmony export twoOfficesDispatch */
|
|
1545
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
1616
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isCanStartSubFlow; });
|
|
1546
1617
|
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
1547
1618
|
|
|
1548
1619
|
var activiti = '/bpm';
|
|
1549
1620
|
var pending = '/bpm';
|
|
1550
1621
|
var mecp = _utils_util__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].getStorage('flowPath') || '';
|
|
1622
|
+
var initRetrialAuth = '/sso2/retrialAuth/initRetrialAuth'; // 初始化二级身份权限验证页面
|
|
1623
|
+
var getRetrialAuthCode = '/sso2/retrialAuth/getRetrialAuthCode'; // 获取二级身份验证验证码
|
|
1624
|
+
var codeRetrialAuth = '/sso2/retrialAuth/codeRetrialAuth'; // 二级身份验证-验证码验证
|
|
1551
1625
|
// 获取机构/用户/角色/群组等选择器
|
|
1552
1626
|
var selectObject = '/api/v1/mecpSys/selectObject.json';
|
|
1553
1627
|
// // 获取代码表数据
|
|
@@ -1631,187 +1705,176 @@ var isCanStartSubFlow = activiti + '/task/taskHandle/isCanStartSubFlow.dhtml';
|
|
|
1631
1705
|
"use strict";
|
|
1632
1706
|
|
|
1633
1707
|
// EXTERNAL MODULE: external "axios"
|
|
1634
|
-
var external_axios_ = __webpack_require__(
|
|
1708
|
+
var external_axios_ = __webpack_require__(6);
|
|
1635
1709
|
var external_axios_default = /*#__PURE__*/__webpack_require__.n(external_axios_);
|
|
1636
1710
|
|
|
1637
1711
|
// EXTERNAL MODULE: external "eoss-mobile-vant"
|
|
1638
|
-
var external_eoss_mobile_vant_ = __webpack_require__(
|
|
1712
|
+
var external_eoss_mobile_vant_ = __webpack_require__(4);
|
|
1639
1713
|
|
|
1640
1714
|
// EXTERNAL MODULE: ./src/utils/util.js
|
|
1641
1715
|
var util = __webpack_require__(0);
|
|
1642
1716
|
|
|
1643
1717
|
// EXTERNAL MODULE: external "qs"
|
|
1644
|
-
var external_qs_ = __webpack_require__(
|
|
1718
|
+
var external_qs_ = __webpack_require__(7);
|
|
1645
1719
|
var external_qs_default = /*#__PURE__*/__webpack_require__.n(external_qs_);
|
|
1646
1720
|
|
|
1647
1721
|
// CONCATENATED MODULE: ./src/utils/axios.js
|
|
1648
1722
|
|
|
1649
|
-
// import Vue from 'vue';
|
|
1650
1723
|
|
|
1651
1724
|
|
|
1652
1725
|
|
|
1653
1726
|
var apiUrl = util["a" /* default */].getStorage('host');
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
headers: {
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
config.data = external_qs_default.a.stringify(data);
|
|
1727
|
+
|
|
1728
|
+
var axios_ajax = function ajax(url) {
|
|
1729
|
+
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1730
|
+
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1731
|
+
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
1732
|
+
var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
|
|
1733
|
+
|
|
1734
|
+
var http = external_axios_default.a.create({
|
|
1735
|
+
baseURL: apiUrl,
|
|
1736
|
+
timeout: 60000,
|
|
1737
|
+
headers: {
|
|
1738
|
+
// clientKey: 'csjk'
|
|
1739
|
+
},
|
|
1740
|
+
withCredentials: false
|
|
1741
|
+
});
|
|
1742
|
+
http.interceptors.request.use(function (config) {
|
|
1743
|
+
if (type === 'post' && format) {
|
|
1744
|
+
config.data = external_qs_default.a.stringify(params);
|
|
1745
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1746
|
+
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
1747
|
+
}
|
|
1676
1748
|
} else {
|
|
1677
|
-
config.headers['
|
|
1678
|
-
|
|
1679
|
-
Object.assign(data, config.data);
|
|
1680
|
-
config.data = external_qs_default.a.stringify(data);
|
|
1749
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1750
|
+
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
1681
1751
|
}
|
|
1752
|
+
config.data = params;
|
|
1682
1753
|
}
|
|
1683
|
-
} else {
|
|
1684
|
-
Object.assign(config.params, data);
|
|
1685
|
-
config.headers['Content-Type'] = 'application/json;';
|
|
1686
|
-
}
|
|
1687
|
-
if (util["a" /* default */].getStorage('token')) {
|
|
1688
|
-
config.headers.Authorization = util["a" /* default */].getStorage('token');
|
|
1689
|
-
}
|
|
1690
|
-
if (util["a" /* default */].getStorage('deviceId')) {
|
|
1691
|
-
config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
|
|
1692
|
-
}
|
|
1693
1754
|
|
|
1694
|
-
|
|
1755
|
+
if (util["a" /* default */].getStorage('token')) {
|
|
1756
|
+
config.headers.Authorization = util["a" /* default */].getStorage('token');
|
|
1757
|
+
}
|
|
1758
|
+
if (util["a" /* default */].getStorage('deviceId')) {
|
|
1759
|
+
config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
|
|
1760
|
+
}
|
|
1695
1761
|
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
config.baseURL = 'https://release.cdgzjg.cn/';
|
|
1701
|
-
}
|
|
1702
|
-
if (config.url.search('affairs/getHandleInfosnew.json') !== -1) {
|
|
1703
|
-
config.headers = {
|
|
1704
|
-
token: sessionStorage.getItem('token'),
|
|
1705
|
-
oueside_token: sessionStorage.getItem('token'),
|
|
1706
|
-
deviceId: '432a320f99793e39',
|
|
1707
|
-
Authorization: sessionStorage.getItem('token')
|
|
1708
|
-
};
|
|
1709
|
-
}
|
|
1710
|
-
if (config.url.search('/getmyAccount.json') !== -1) {
|
|
1711
|
-
delete config.params.userId;
|
|
1712
|
-
}
|
|
1713
|
-
if (config.url.search('/sso2/authCenter') !== -1) {
|
|
1714
|
-
delete config.headers.clientKey;
|
|
1715
|
-
delete config.headers.deviceId;
|
|
1716
|
-
}
|
|
1717
|
-
if (config.url.search('/appInfo') !== -1) {
|
|
1718
|
-
config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
|
|
1719
|
-
delete config.headers.clientKey;
|
|
1720
|
-
}
|
|
1721
|
-
if (config.url.search('getPresetCustomInfo') !== -1 || config.url.search('registerNew') !== -1) {
|
|
1722
|
-
// config.baseURL = "/api";
|
|
1723
|
-
config.headers.token = util["a" /* default */].getStorage('token');
|
|
1724
|
-
}
|
|
1725
|
-
if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
|
|
1726
|
-
delete config.headers.deviceId;
|
|
1727
|
-
}
|
|
1728
|
-
// if(config.url.search('getVehicleMaintenanceInfoForAPP') !== -1 ) {
|
|
1729
|
-
// delete config.headers.deviceId
|
|
1730
|
-
// delete config.headers.Authorization
|
|
1731
|
-
// delete config.headers.clientKey
|
|
1732
|
-
// }
|
|
1733
|
-
if (config.url.search('/bpm') !== -1) {
|
|
1734
|
-
// config.baseURL = "/api";
|
|
1735
|
-
// config.headers.Authorization = $.getStorage('token');
|
|
1736
|
-
// config.headers.Deviceunique = $.getStorage('deviceunique');
|
|
1737
|
-
// config.headers.Ssid = $.getStorage('ssid');
|
|
1738
|
-
// delete config.headers.deviceId;
|
|
1739
|
-
// delete config.headers.clientKey;
|
|
1740
|
-
}
|
|
1741
|
-
return config;
|
|
1742
|
-
}, function (error) {
|
|
1743
|
-
return Promise.error(error);
|
|
1744
|
-
});
|
|
1745
|
-
// 响应拦截器
|
|
1746
|
-
http.interceptors.response.use(function (response) {
|
|
1747
|
-
if (response.status === 200) {
|
|
1748
|
-
if (response.data.rCode === 64 || response.data.rCode === 27) {
|
|
1749
|
-
util["a" /* default */].H5TokenInvalid();
|
|
1750
|
-
} else {
|
|
1751
|
-
return Promise.resolve(response.data);
|
|
1762
|
+
var a = '/config/';
|
|
1763
|
+
|
|
1764
|
+
if (config.url.search(a) !== -1 && config.url.search('appInfo') === -1) {
|
|
1765
|
+
config.headers.clientKey = util["a" /* default */].getStorage('clientKey') || 'csjk2';
|
|
1752
1766
|
}
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
case 504:
|
|
1792
|
-
error.message = '网络超时';
|
|
1793
|
-
break;
|
|
1794
|
-
case 505:
|
|
1795
|
-
error.message = 'http版本不支持该请求';
|
|
1796
|
-
break;
|
|
1797
|
-
default:
|
|
1798
|
-
error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
|
|
1767
|
+
if (config.url.search('api/financePhone/') !== -1) {
|
|
1768
|
+
config.baseURL = 'https://release.cdgzjg.cn/';
|
|
1769
|
+
}
|
|
1770
|
+
if (config.url.search('affairs/getHandleInfosnew.json') !== -1) {
|
|
1771
|
+
config.headers = {
|
|
1772
|
+
token: sessionStorage.getItem('token'),
|
|
1773
|
+
oueside_token: sessionStorage.getItem('token'),
|
|
1774
|
+
deviceId: '432a320f99793e39',
|
|
1775
|
+
Authorization: sessionStorage.getItem('token')
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
if (config.url.search('/getmyAccount.json') !== -1) {
|
|
1779
|
+
delete config.params.userId;
|
|
1780
|
+
}
|
|
1781
|
+
if (config.url.search('/sso2/authCenter') !== -1) {
|
|
1782
|
+
delete config.headers.clientKey;
|
|
1783
|
+
delete config.headers.deviceId;
|
|
1784
|
+
}
|
|
1785
|
+
if (config.url.search('/appInfo') !== -1) {
|
|
1786
|
+
config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
|
|
1787
|
+
delete config.headers.clientKey;
|
|
1788
|
+
}
|
|
1789
|
+
if (config.url.search('getPresetCustomInfo') !== -1 || config.url.search('registerNew') !== -1) {
|
|
1790
|
+
config.headers.token = util["a" /* default */].getStorage('token');
|
|
1791
|
+
}
|
|
1792
|
+
if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
|
|
1793
|
+
delete config.headers.deviceId;
|
|
1794
|
+
}
|
|
1795
|
+
return config;
|
|
1796
|
+
}, function (error) {
|
|
1797
|
+
return Promise.error(error);
|
|
1798
|
+
});
|
|
1799
|
+
http.interceptors.response.use(function (response) {
|
|
1800
|
+
if (response.status === 200) {
|
|
1801
|
+
if (response.data.rCode === 64 || response.data.rCode === 27) {
|
|
1802
|
+
util["a" /* default */].H5TokenInvalid();
|
|
1803
|
+
} else {
|
|
1804
|
+
return Promise.resolve(response.data);
|
|
1799
1805
|
}
|
|
1800
1806
|
} else {
|
|
1801
|
-
|
|
1807
|
+
return Promise.reject(response.data);
|
|
1802
1808
|
}
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1809
|
+
}, function (error) {
|
|
1810
|
+
if (error && error.response) {
|
|
1811
|
+
if (error.response.status) {
|
|
1812
|
+
switch (error.response.status) {
|
|
1813
|
+
case 400:
|
|
1814
|
+
error.message = '错误请求';
|
|
1815
|
+
break;
|
|
1816
|
+
case 401:
|
|
1817
|
+
error.message = '未授权,请重新登录';
|
|
1818
|
+
break;
|
|
1819
|
+
case 403:
|
|
1820
|
+
error.message = '登录过期,请重新登录';
|
|
1821
|
+
util["a" /* default */].removeStorage('userId');
|
|
1822
|
+
break;
|
|
1823
|
+
case 404:
|
|
1824
|
+
error.message = '网络请求不存在';
|
|
1825
|
+
break;
|
|
1826
|
+
case 405:
|
|
1827
|
+
error.message = '请求方法错误';
|
|
1828
|
+
break;
|
|
1829
|
+
case 408:
|
|
1830
|
+
error.message = '请求超时';
|
|
1831
|
+
break;
|
|
1832
|
+
case 500:
|
|
1833
|
+
error.message = '服务器端出错';
|
|
1834
|
+
break;
|
|
1835
|
+
case 501:
|
|
1836
|
+
error.message = '网络未实现';
|
|
1837
|
+
break;
|
|
1838
|
+
case 502:
|
|
1839
|
+
error.message = '网络错误';
|
|
1840
|
+
break;
|
|
1841
|
+
case 503:
|
|
1842
|
+
error.message = '服务不可用';
|
|
1843
|
+
break;
|
|
1844
|
+
case 504:
|
|
1845
|
+
error.message = '网络超时';
|
|
1846
|
+
break;
|
|
1847
|
+
case 505:
|
|
1848
|
+
error.message = 'http版本不支持该请求';
|
|
1849
|
+
break;
|
|
1850
|
+
default:
|
|
1851
|
+
error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
|
|
1852
|
+
}
|
|
1853
|
+
} else {
|
|
1854
|
+
error.message = '接口出现问题,无法请求';
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
Object(external_eoss_mobile_vant_["Toast"])({
|
|
1858
|
+
message: error.message,
|
|
1859
|
+
duration: 1500,
|
|
1860
|
+
forbidClick: true
|
|
1861
|
+
});
|
|
1862
|
+
return Promise.reject(error);
|
|
1808
1863
|
});
|
|
1809
|
-
|
|
1810
|
-
|
|
1864
|
+
if (type === 'get' || type === 'GET') {
|
|
1865
|
+
return http.get(url, params, headers, format);
|
|
1866
|
+
} else {
|
|
1867
|
+
return http.post(url, params, headers, format);
|
|
1868
|
+
}
|
|
1869
|
+
};
|
|
1870
|
+
|
|
1871
|
+
// 响应拦截器
|
|
1811
1872
|
|
|
1812
1873
|
var base = {
|
|
1813
1874
|
get: function get(url) {
|
|
1814
1875
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1876
|
+
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1877
|
+
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
1815
1878
|
|
|
1816
1879
|
if (params.params && url.search('registerNew') === -1) {
|
|
1817
1880
|
params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
|
|
@@ -1828,19 +1891,17 @@ var base = {
|
|
|
1828
1891
|
params.userId = 'u1b9f3ce4731649e0b665af015d74c19b';
|
|
1829
1892
|
}
|
|
1830
1893
|
}
|
|
1831
|
-
return
|
|
1894
|
+
return axios_ajax(url, {
|
|
1832
1895
|
params: params
|
|
1833
|
-
});
|
|
1896
|
+
}, headers, format);
|
|
1834
1897
|
},
|
|
1835
|
-
post: function post(url) {
|
|
1836
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1837
|
-
|
|
1898
|
+
post: function post(url, params, headers, format) {
|
|
1838
1899
|
if (params.params) {
|
|
1839
1900
|
params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
|
|
1840
1901
|
} else {
|
|
1841
1902
|
params.userId = params.userId || util["a" /* default */].getStorage('userId');
|
|
1842
1903
|
}
|
|
1843
|
-
return
|
|
1904
|
+
return axios_ajax(url, params, headers, format, 'post');
|
|
1844
1905
|
}
|
|
1845
1906
|
};
|
|
1846
1907
|
/* harmony default export */ var axios = (base);
|
|
@@ -1850,19 +1911,19 @@ var http_request = function request(options) {
|
|
|
1850
1911
|
var fn = void 0;
|
|
1851
1912
|
switch (options.type) {
|
|
1852
1913
|
case 'post':
|
|
1853
|
-
fn = axios.post(options.url, options.params);
|
|
1914
|
+
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1854
1915
|
break;
|
|
1855
1916
|
case 'POST':
|
|
1856
|
-
fn = axios.post(options.url, options.params);
|
|
1917
|
+
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1857
1918
|
break;
|
|
1858
1919
|
case 'get':
|
|
1859
|
-
fn = axios.get(options.url, options.params);
|
|
1920
|
+
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1860
1921
|
break;
|
|
1861
1922
|
case 'GET':
|
|
1862
|
-
fn = axios.get(options.url, options.params);
|
|
1923
|
+
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1863
1924
|
break;
|
|
1864
1925
|
default:
|
|
1865
|
-
fn = axios.get(options.url, options.params);
|
|
1926
|
+
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1866
1927
|
}
|
|
1867
1928
|
return fn;
|
|
1868
1929
|
};
|
|
@@ -1921,25 +1982,25 @@ var http_request = function request(options) {
|
|
|
1921
1982
|
/* 4 */
|
|
1922
1983
|
/***/ (function(module, exports) {
|
|
1923
1984
|
|
|
1924
|
-
module.exports = require("
|
|
1985
|
+
module.exports = require("eoss-mobile-vant");
|
|
1925
1986
|
|
|
1926
1987
|
/***/ }),
|
|
1927
1988
|
/* 5 */
|
|
1928
1989
|
/***/ (function(module, exports) {
|
|
1929
1990
|
|
|
1930
|
-
module.exports = require("eoss-
|
|
1991
|
+
module.exports = require("@eoss-design/color");
|
|
1931
1992
|
|
|
1932
1993
|
/***/ }),
|
|
1933
1994
|
/* 6 */
|
|
1934
1995
|
/***/ (function(module, exports) {
|
|
1935
1996
|
|
|
1936
|
-
module.exports = require("
|
|
1997
|
+
module.exports = require("axios");
|
|
1937
1998
|
|
|
1938
1999
|
/***/ }),
|
|
1939
2000
|
/* 7 */
|
|
1940
2001
|
/***/ (function(module, exports) {
|
|
1941
2002
|
|
|
1942
|
-
module.exports = require("
|
|
2003
|
+
module.exports = require("qs");
|
|
1943
2004
|
|
|
1944
2005
|
/***/ }),
|
|
1945
2006
|
/* 8 */
|
|
@@ -3348,7 +3409,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
3348
3409
|
var _this = this;
|
|
3349
3410
|
|
|
3350
3411
|
var params = {
|
|
3351
|
-
url: item.url || api["
|
|
3412
|
+
url: item.url || api["c" /* findSysCode */],
|
|
3352
3413
|
type: item.method || 'get',
|
|
3353
3414
|
params: _extends({
|
|
3354
3415
|
ccCode: item.sysAppCode,
|