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.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 53);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -91,16 +91,50 @@ module.exports =
|
|
|
91
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
92
|
|
|
93
93
|
"use strict";
|
|
94
|
-
/* harmony import */ var _eoss_design_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
94
|
+
/* harmony import */ var _eoss_design_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
|
95
95
|
/* harmony import */ var _eoss_design_color__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_eoss_design_color__WEBPACK_IMPORTED_MODULE_0__);
|
|
96
96
|
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; };
|
|
97
97
|
|
|
98
98
|
/* eslint-disable indent */
|
|
99
99
|
// import { authCenter } from '../config/api';
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
// import CryptoJS from 'crypto-js'
|
|
102
102
|
var sm2 = __webpack_require__(8).sm2;
|
|
103
|
-
|
|
103
|
+
// /**
|
|
104
|
+
// * esEncrypt
|
|
105
|
+
// * @desc:sm2加密
|
|
106
|
+
// * @author huangbo
|
|
107
|
+
// * @date 2022年5月7日
|
|
108
|
+
// * @param {string} [data] - 被加密的字符串
|
|
109
|
+
// * @param {string} [key] - 公钥
|
|
110
|
+
// **/
|
|
111
|
+
// const encryptDes = (message, key) => {
|
|
112
|
+
// const keyHex = CryptoJS.enc.Utf8.parse(key);
|
|
113
|
+
// const encrypted = CryptoJS.DES.encrypt(message, keyHex, {
|
|
114
|
+
// mode: CryptoJS.mode.ECB,
|
|
115
|
+
// padding: CryptoJS.pad.Pkcs7
|
|
116
|
+
// });
|
|
117
|
+
// return encrypted.toString();
|
|
118
|
+
// }
|
|
119
|
+
// /**
|
|
120
|
+
// * esEncrypt
|
|
121
|
+
// * @desc:sm2加密
|
|
122
|
+
// * @author huangbo
|
|
123
|
+
// * @date 2022年5月7日
|
|
124
|
+
// * @param {string} [data] - 被加密的字符串
|
|
125
|
+
// * @param {string} [key] - 公钥
|
|
126
|
+
// **/
|
|
127
|
+
// const decryptDes = (ciphertext, key) => {
|
|
128
|
+
// const keyHex = CryptoJS.enc.Utf8.parse(key);
|
|
129
|
+
// // direct decrypt ciphertext
|
|
130
|
+
// const decrypted = CryptoJS.DES.decrypt({
|
|
131
|
+
// ciphertext: CryptoJS.enc.Base64.parse(ciphertext)
|
|
132
|
+
// }, keyHex, {
|
|
133
|
+
// mode: CryptoJS.mode.ECB,
|
|
134
|
+
// padding: CryptoJS.pad.Pkcs7
|
|
135
|
+
// });
|
|
136
|
+
// return decrypted.toString(CryptoJS.enc.Utf8);
|
|
137
|
+
// }
|
|
104
138
|
/**
|
|
105
139
|
* esEncrypt
|
|
106
140
|
* @desc:sm2加密
|
|
@@ -1302,6 +1336,23 @@ var openAttachment = function openAttachment(data) {
|
|
|
1302
1336
|
}
|
|
1303
1337
|
}
|
|
1304
1338
|
};
|
|
1339
|
+
/**
|
|
1340
|
+
* jsGoPayrollIndexAct
|
|
1341
|
+
* @desc:原生app打开工资条页面
|
|
1342
|
+
* @date 2024年1月11日
|
|
1343
|
+
* @author liufan
|
|
1344
|
+
*/
|
|
1345
|
+
var jsGoPayrollIndexAct = function jsGoPayrollIndexAct(id) {
|
|
1346
|
+
var u = navigator.userAgent;
|
|
1347
|
+
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
|
|
1348
|
+
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
|
|
1349
|
+
if (isAndroid) {
|
|
1350
|
+
window.AndroidWebView.jsGoPayrollIndexAct(id);
|
|
1351
|
+
} else if (isiOS) {
|
|
1352
|
+
window.webkit.messageHandlers.jsGoPayrollIndexAct.postMessage(id);
|
|
1353
|
+
}
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1305
1356
|
/**
|
|
1306
1357
|
* deepClone
|
|
1307
1358
|
* @desc:深拷贝
|
|
@@ -1359,6 +1410,21 @@ var exclAttribute = function exclAttribute(_ref4) {
|
|
|
1359
1410
|
}
|
|
1360
1411
|
return obj;
|
|
1361
1412
|
};
|
|
1413
|
+
/**
|
|
1414
|
+
* 获取UUID
|
|
1415
|
+
* @desc:generateUUID
|
|
1416
|
+
* @author liufan
|
|
1417
|
+
* @date 2024年1月12日
|
|
1418
|
+
**/
|
|
1419
|
+
var generateUUID = function generateUUID() {
|
|
1420
|
+
var d = new Date().getTime();
|
|
1421
|
+
var uuid = 'xxxxxxxxxxxxxxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
1422
|
+
var r = (d + Math.random() * 16) % 16 | 0;
|
|
1423
|
+
d = Math.floor(d / 16);
|
|
1424
|
+
return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
|
|
1425
|
+
});
|
|
1426
|
+
return uuid;
|
|
1427
|
+
};
|
|
1362
1428
|
/* harmony default export */ __webpack_exports__["a"] = ({
|
|
1363
1429
|
esEncrypt: esEncrypt,
|
|
1364
1430
|
esDecode: esDecode,
|
|
@@ -1402,7 +1468,9 @@ var exclAttribute = function exclAttribute(_ref4) {
|
|
|
1402
1468
|
getTypeName: getTypeName,
|
|
1403
1469
|
replenish: replenish,
|
|
1404
1470
|
identical: identical,
|
|
1405
|
-
|
|
1471
|
+
jsGoPayrollIndexAct: jsGoPayrollIndexAct,
|
|
1472
|
+
exportXls: exportXls,
|
|
1473
|
+
generateUUID: generateUUID
|
|
1406
1474
|
});
|
|
1407
1475
|
|
|
1408
1476
|
/***/ }),
|
|
@@ -1525,187 +1593,176 @@ module.exports = require("element-ui/lib/theme-chalk/table.css");
|
|
|
1525
1593
|
"use strict";
|
|
1526
1594
|
|
|
1527
1595
|
// EXTERNAL MODULE: external "axios"
|
|
1528
|
-
var external_axios_ = __webpack_require__(
|
|
1596
|
+
var external_axios_ = __webpack_require__(6);
|
|
1529
1597
|
var external_axios_default = /*#__PURE__*/__webpack_require__.n(external_axios_);
|
|
1530
1598
|
|
|
1531
1599
|
// EXTERNAL MODULE: external "eoss-mobile-vant"
|
|
1532
|
-
var external_eoss_mobile_vant_ = __webpack_require__(
|
|
1600
|
+
var external_eoss_mobile_vant_ = __webpack_require__(4);
|
|
1533
1601
|
|
|
1534
1602
|
// EXTERNAL MODULE: ./src/utils/util.js
|
|
1535
1603
|
var util = __webpack_require__(0);
|
|
1536
1604
|
|
|
1537
1605
|
// EXTERNAL MODULE: external "qs"
|
|
1538
|
-
var external_qs_ = __webpack_require__(
|
|
1606
|
+
var external_qs_ = __webpack_require__(7);
|
|
1539
1607
|
var external_qs_default = /*#__PURE__*/__webpack_require__.n(external_qs_);
|
|
1540
1608
|
|
|
1541
1609
|
// CONCATENATED MODULE: ./src/utils/axios.js
|
|
1542
1610
|
|
|
1543
|
-
// import Vue from 'vue';
|
|
1544
1611
|
|
|
1545
1612
|
|
|
1546
1613
|
|
|
1547
1614
|
var apiUrl = util["a" /* default */].getStorage('host');
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
headers: {
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
config.data = external_qs_default.a.stringify(data);
|
|
1615
|
+
|
|
1616
|
+
var axios_ajax = function ajax(url) {
|
|
1617
|
+
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1618
|
+
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1619
|
+
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
1620
|
+
var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
|
|
1621
|
+
|
|
1622
|
+
var http = external_axios_default.a.create({
|
|
1623
|
+
baseURL: apiUrl,
|
|
1624
|
+
timeout: 60000,
|
|
1625
|
+
headers: {
|
|
1626
|
+
// clientKey: 'csjk'
|
|
1627
|
+
},
|
|
1628
|
+
withCredentials: false
|
|
1629
|
+
});
|
|
1630
|
+
http.interceptors.request.use(function (config) {
|
|
1631
|
+
if (type === 'post' && format) {
|
|
1632
|
+
config.data = external_qs_default.a.stringify(params);
|
|
1633
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1634
|
+
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
1635
|
+
}
|
|
1570
1636
|
} else {
|
|
1571
|
-
config.headers['
|
|
1572
|
-
|
|
1573
|
-
Object.assign(data, config.data);
|
|
1574
|
-
config.data = external_qs_default.a.stringify(data);
|
|
1637
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1638
|
+
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
1575
1639
|
}
|
|
1640
|
+
config.data = params;
|
|
1576
1641
|
}
|
|
1577
|
-
} else {
|
|
1578
|
-
Object.assign(config.params, data);
|
|
1579
|
-
config.headers['Content-Type'] = 'application/json;';
|
|
1580
|
-
}
|
|
1581
|
-
if (util["a" /* default */].getStorage('token')) {
|
|
1582
|
-
config.headers.Authorization = util["a" /* default */].getStorage('token');
|
|
1583
|
-
}
|
|
1584
|
-
if (util["a" /* default */].getStorage('deviceId')) {
|
|
1585
|
-
config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
|
|
1586
|
-
}
|
|
1587
1642
|
|
|
1588
|
-
|
|
1643
|
+
if (util["a" /* default */].getStorage('token')) {
|
|
1644
|
+
config.headers.Authorization = util["a" /* default */].getStorage('token');
|
|
1645
|
+
}
|
|
1646
|
+
if (util["a" /* default */].getStorage('deviceId')) {
|
|
1647
|
+
config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
|
|
1648
|
+
}
|
|
1589
1649
|
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
config.baseURL = 'https://release.cdgzjg.cn/';
|
|
1595
|
-
}
|
|
1596
|
-
if (config.url.search('affairs/getHandleInfosnew.json') !== -1) {
|
|
1597
|
-
config.headers = {
|
|
1598
|
-
token: sessionStorage.getItem('token'),
|
|
1599
|
-
oueside_token: sessionStorage.getItem('token'),
|
|
1600
|
-
deviceId: '432a320f99793e39',
|
|
1601
|
-
Authorization: sessionStorage.getItem('token')
|
|
1602
|
-
};
|
|
1603
|
-
}
|
|
1604
|
-
if (config.url.search('/getmyAccount.json') !== -1) {
|
|
1605
|
-
delete config.params.userId;
|
|
1606
|
-
}
|
|
1607
|
-
if (config.url.search('/sso2/authCenter') !== -1) {
|
|
1608
|
-
delete config.headers.clientKey;
|
|
1609
|
-
delete config.headers.deviceId;
|
|
1610
|
-
}
|
|
1611
|
-
if (config.url.search('/appInfo') !== -1) {
|
|
1612
|
-
config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
|
|
1613
|
-
delete config.headers.clientKey;
|
|
1614
|
-
}
|
|
1615
|
-
if (config.url.search('getPresetCustomInfo') !== -1 || config.url.search('registerNew') !== -1) {
|
|
1616
|
-
// config.baseURL = "/api";
|
|
1617
|
-
config.headers.token = util["a" /* default */].getStorage('token');
|
|
1618
|
-
}
|
|
1619
|
-
if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
|
|
1620
|
-
delete config.headers.deviceId;
|
|
1621
|
-
}
|
|
1622
|
-
// if(config.url.search('getVehicleMaintenanceInfoForAPP') !== -1 ) {
|
|
1623
|
-
// delete config.headers.deviceId
|
|
1624
|
-
// delete config.headers.Authorization
|
|
1625
|
-
// delete config.headers.clientKey
|
|
1626
|
-
// }
|
|
1627
|
-
if (config.url.search('/bpm') !== -1) {
|
|
1628
|
-
// config.baseURL = "/api";
|
|
1629
|
-
// config.headers.Authorization = $.getStorage('token');
|
|
1630
|
-
// config.headers.Deviceunique = $.getStorage('deviceunique');
|
|
1631
|
-
// config.headers.Ssid = $.getStorage('ssid');
|
|
1632
|
-
// delete config.headers.deviceId;
|
|
1633
|
-
// delete config.headers.clientKey;
|
|
1634
|
-
}
|
|
1635
|
-
return config;
|
|
1636
|
-
}, function (error) {
|
|
1637
|
-
return Promise.error(error);
|
|
1638
|
-
});
|
|
1639
|
-
// 响应拦截器
|
|
1640
|
-
http.interceptors.response.use(function (response) {
|
|
1641
|
-
if (response.status === 200) {
|
|
1642
|
-
if (response.data.rCode === 64 || response.data.rCode === 27) {
|
|
1643
|
-
util["a" /* default */].H5TokenInvalid();
|
|
1644
|
-
} else {
|
|
1645
|
-
return Promise.resolve(response.data);
|
|
1650
|
+
var a = '/config/';
|
|
1651
|
+
|
|
1652
|
+
if (config.url.search(a) !== -1 && config.url.search('appInfo') === -1) {
|
|
1653
|
+
config.headers.clientKey = util["a" /* default */].getStorage('clientKey') || 'csjk2';
|
|
1646
1654
|
}
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
case 504:
|
|
1686
|
-
error.message = '网络超时';
|
|
1687
|
-
break;
|
|
1688
|
-
case 505:
|
|
1689
|
-
error.message = 'http版本不支持该请求';
|
|
1690
|
-
break;
|
|
1691
|
-
default:
|
|
1692
|
-
error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
|
|
1655
|
+
if (config.url.search('api/financePhone/') !== -1) {
|
|
1656
|
+
config.baseURL = 'https://release.cdgzjg.cn/';
|
|
1657
|
+
}
|
|
1658
|
+
if (config.url.search('affairs/getHandleInfosnew.json') !== -1) {
|
|
1659
|
+
config.headers = {
|
|
1660
|
+
token: sessionStorage.getItem('token'),
|
|
1661
|
+
oueside_token: sessionStorage.getItem('token'),
|
|
1662
|
+
deviceId: '432a320f99793e39',
|
|
1663
|
+
Authorization: sessionStorage.getItem('token')
|
|
1664
|
+
};
|
|
1665
|
+
}
|
|
1666
|
+
if (config.url.search('/getmyAccount.json') !== -1) {
|
|
1667
|
+
delete config.params.userId;
|
|
1668
|
+
}
|
|
1669
|
+
if (config.url.search('/sso2/authCenter') !== -1) {
|
|
1670
|
+
delete config.headers.clientKey;
|
|
1671
|
+
delete config.headers.deviceId;
|
|
1672
|
+
}
|
|
1673
|
+
if (config.url.search('/appInfo') !== -1) {
|
|
1674
|
+
config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
|
|
1675
|
+
delete config.headers.clientKey;
|
|
1676
|
+
}
|
|
1677
|
+
if (config.url.search('getPresetCustomInfo') !== -1 || config.url.search('registerNew') !== -1) {
|
|
1678
|
+
config.headers.token = util["a" /* default */].getStorage('token');
|
|
1679
|
+
}
|
|
1680
|
+
if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
|
|
1681
|
+
delete config.headers.deviceId;
|
|
1682
|
+
}
|
|
1683
|
+
return config;
|
|
1684
|
+
}, function (error) {
|
|
1685
|
+
return Promise.error(error);
|
|
1686
|
+
});
|
|
1687
|
+
http.interceptors.response.use(function (response) {
|
|
1688
|
+
if (response.status === 200) {
|
|
1689
|
+
if (response.data.rCode === 64 || response.data.rCode === 27) {
|
|
1690
|
+
util["a" /* default */].H5TokenInvalid();
|
|
1691
|
+
} else {
|
|
1692
|
+
return Promise.resolve(response.data);
|
|
1693
1693
|
}
|
|
1694
1694
|
} else {
|
|
1695
|
-
|
|
1695
|
+
return Promise.reject(response.data);
|
|
1696
1696
|
}
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1697
|
+
}, function (error) {
|
|
1698
|
+
if (error && error.response) {
|
|
1699
|
+
if (error.response.status) {
|
|
1700
|
+
switch (error.response.status) {
|
|
1701
|
+
case 400:
|
|
1702
|
+
error.message = '错误请求';
|
|
1703
|
+
break;
|
|
1704
|
+
case 401:
|
|
1705
|
+
error.message = '未授权,请重新登录';
|
|
1706
|
+
break;
|
|
1707
|
+
case 403:
|
|
1708
|
+
error.message = '登录过期,请重新登录';
|
|
1709
|
+
util["a" /* default */].removeStorage('userId');
|
|
1710
|
+
break;
|
|
1711
|
+
case 404:
|
|
1712
|
+
error.message = '网络请求不存在';
|
|
1713
|
+
break;
|
|
1714
|
+
case 405:
|
|
1715
|
+
error.message = '请求方法错误';
|
|
1716
|
+
break;
|
|
1717
|
+
case 408:
|
|
1718
|
+
error.message = '请求超时';
|
|
1719
|
+
break;
|
|
1720
|
+
case 500:
|
|
1721
|
+
error.message = '服务器端出错';
|
|
1722
|
+
break;
|
|
1723
|
+
case 501:
|
|
1724
|
+
error.message = '网络未实现';
|
|
1725
|
+
break;
|
|
1726
|
+
case 502:
|
|
1727
|
+
error.message = '网络错误';
|
|
1728
|
+
break;
|
|
1729
|
+
case 503:
|
|
1730
|
+
error.message = '服务不可用';
|
|
1731
|
+
break;
|
|
1732
|
+
case 504:
|
|
1733
|
+
error.message = '网络超时';
|
|
1734
|
+
break;
|
|
1735
|
+
case 505:
|
|
1736
|
+
error.message = 'http版本不支持该请求';
|
|
1737
|
+
break;
|
|
1738
|
+
default:
|
|
1739
|
+
error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
|
|
1740
|
+
}
|
|
1741
|
+
} else {
|
|
1742
|
+
error.message = '接口出现问题,无法请求';
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
Object(external_eoss_mobile_vant_["Toast"])({
|
|
1746
|
+
message: error.message,
|
|
1747
|
+
duration: 1500,
|
|
1748
|
+
forbidClick: true
|
|
1749
|
+
});
|
|
1750
|
+
return Promise.reject(error);
|
|
1702
1751
|
});
|
|
1703
|
-
|
|
1704
|
-
|
|
1752
|
+
if (type === 'get' || type === 'GET') {
|
|
1753
|
+
return http.get(url, params, headers, format);
|
|
1754
|
+
} else {
|
|
1755
|
+
return http.post(url, params, headers, format);
|
|
1756
|
+
}
|
|
1757
|
+
};
|
|
1758
|
+
|
|
1759
|
+
// 响应拦截器
|
|
1705
1760
|
|
|
1706
1761
|
var base = {
|
|
1707
1762
|
get: function get(url) {
|
|
1708
1763
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1764
|
+
var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1765
|
+
var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
1709
1766
|
|
|
1710
1767
|
if (params.params && url.search('registerNew') === -1) {
|
|
1711
1768
|
params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
|
|
@@ -1722,19 +1779,17 @@ var base = {
|
|
|
1722
1779
|
params.userId = 'u1b9f3ce4731649e0b665af015d74c19b';
|
|
1723
1780
|
}
|
|
1724
1781
|
}
|
|
1725
|
-
return
|
|
1782
|
+
return axios_ajax(url, {
|
|
1726
1783
|
params: params
|
|
1727
|
-
});
|
|
1784
|
+
}, headers, format);
|
|
1728
1785
|
},
|
|
1729
|
-
post: function post(url) {
|
|
1730
|
-
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1731
|
-
|
|
1786
|
+
post: function post(url, params, headers, format) {
|
|
1732
1787
|
if (params.params) {
|
|
1733
1788
|
params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
|
|
1734
1789
|
} else {
|
|
1735
1790
|
params.userId = params.userId || util["a" /* default */].getStorage('userId');
|
|
1736
1791
|
}
|
|
1737
|
-
return
|
|
1792
|
+
return axios_ajax(url, params, headers, format, 'post');
|
|
1738
1793
|
}
|
|
1739
1794
|
};
|
|
1740
1795
|
/* harmony default export */ var axios = (base);
|
|
@@ -1744,19 +1799,19 @@ var http_request = function request(options) {
|
|
|
1744
1799
|
var fn = void 0;
|
|
1745
1800
|
switch (options.type) {
|
|
1746
1801
|
case 'post':
|
|
1747
|
-
fn = axios.post(options.url, options.params);
|
|
1802
|
+
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1748
1803
|
break;
|
|
1749
1804
|
case 'POST':
|
|
1750
|
-
fn = axios.post(options.url, options.params);
|
|
1805
|
+
fn = axios.post(options.url, options.params, options.headers, options.format);
|
|
1751
1806
|
break;
|
|
1752
1807
|
case 'get':
|
|
1753
|
-
fn = axios.get(options.url, options.params);
|
|
1808
|
+
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1754
1809
|
break;
|
|
1755
1810
|
case 'GET':
|
|
1756
|
-
fn = axios.get(options.url, options.params);
|
|
1811
|
+
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1757
1812
|
break;
|
|
1758
1813
|
default:
|
|
1759
|
-
fn = axios.get(options.url, options.params);
|
|
1814
|
+
fn = axios.get(options.url, options.params, options.headers = {});
|
|
1760
1815
|
}
|
|
1761
1816
|
return fn;
|
|
1762
1817
|
};
|
|
@@ -1816,18 +1871,18 @@ var http_request = function request(options) {
|
|
|
1816
1871
|
/***/ 4:
|
|
1817
1872
|
/***/ (function(module, exports) {
|
|
1818
1873
|
|
|
1819
|
-
module.exports = require("
|
|
1874
|
+
module.exports = require("eoss-mobile-vant");
|
|
1820
1875
|
|
|
1821
1876
|
/***/ }),
|
|
1822
1877
|
|
|
1823
1878
|
/***/ 5:
|
|
1824
1879
|
/***/ (function(module, exports) {
|
|
1825
1880
|
|
|
1826
|
-
module.exports = require("eoss-
|
|
1881
|
+
module.exports = require("@eoss-design/color");
|
|
1827
1882
|
|
|
1828
1883
|
/***/ }),
|
|
1829
1884
|
|
|
1830
|
-
/***/
|
|
1885
|
+
/***/ 53:
|
|
1831
1886
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1832
1887
|
|
|
1833
1888
|
"use strict";
|
|
@@ -2691,14 +2746,14 @@ main.install = function (Vue) {
|
|
|
2691
2746
|
/***/ 6:
|
|
2692
2747
|
/***/ (function(module, exports) {
|
|
2693
2748
|
|
|
2694
|
-
module.exports = require("
|
|
2749
|
+
module.exports = require("axios");
|
|
2695
2750
|
|
|
2696
2751
|
/***/ }),
|
|
2697
2752
|
|
|
2698
2753
|
/***/ 7:
|
|
2699
2754
|
/***/ (function(module, exports) {
|
|
2700
2755
|
|
|
2701
|
-
module.exports = require("
|
|
2756
|
+
module.exports = require("qs");
|
|
2702
2757
|
|
|
2703
2758
|
/***/ }),
|
|
2704
2759
|
|