easy3wui 1.5.93-beta7 → 1.5.93-beta8
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/Easy3wFormPage/indexM.js +10 -8
- package/lib/Easy3wFormPage/indexPC.js +12 -11
- package/lib/Easy3wUpload/index.js +17 -8
- package/lib/Easy3wUploadM/index.js +17 -8
- package/package.json +1 -1
- package/lib/Easy3wUploadB/index copy 2.js +0 -1011
- package/lib/Easy3wUploadB/index copy 3.js +0 -1088
- package/lib/Easy3wUploadB/index copy.js +0 -1020
- package/lib/Easy3wUploadM/index copy.js +0 -523
|
@@ -1770,7 +1770,8 @@ var Easy3wFormPageM = exports.Easy3wFormPageM = function (_Component) {
|
|
|
1770
1770
|
var data = JSON.stringify({ e3wMobile: e3wMobile, e3wMobileNation: e3wMobileNation });
|
|
1771
1771
|
xhr.open('POST', _comonConfig.easy3w4fMobileLibUpdateUrl, true); // 异步请求
|
|
1772
1772
|
xhr.setRequestHeader('Content-Type', 'application/json'); // 设置请求头
|
|
1773
|
-
xhr.send(
|
|
1773
|
+
xhr.send(data); // 发送请求
|
|
1774
|
+
// xhr.send(Easy3wAESEncrypt(data, a, b)); // 发送请求
|
|
1774
1775
|
}
|
|
1775
1776
|
}, _this.fetchMobileInfo = function (value, fieldId) {
|
|
1776
1777
|
if (_comonConfig.easy3w4fMobileLibFetchUrl) {
|
|
@@ -1786,19 +1787,20 @@ var Easy3wFormPageM = exports.Easy3wFormPageM = function (_Component) {
|
|
|
1786
1787
|
xhr.setRequestHeader('Content-Type', 'application/json'); // 设置请求头
|
|
1787
1788
|
try {
|
|
1788
1789
|
var sendData = JSON.stringify({ e3wMobile: value, fieldId: fieldId });
|
|
1789
|
-
xhr.send(
|
|
1790
|
+
// xhr.send(Easy3wAESEncrypt(sendData, a, b)); // 发送请求
|
|
1791
|
+
xhr.send(sendData); // 发送请求
|
|
1790
1792
|
if (xhr.status === 200) {
|
|
1791
1793
|
// 请求成功,处理响应数据
|
|
1792
1794
|
var obj = JSON.parse(xhr.responseText) || {};
|
|
1793
1795
|
if (obj.rspCode === '0000') {
|
|
1794
1796
|
var data = obj.data;
|
|
1797
|
+
// let acceptData = Easy3wAESDecrypt(data, a, b);
|
|
1798
|
+
// if (acceptData) { // 解密成功
|
|
1799
|
+
// } else { // 解密失败
|
|
1800
|
+
// acceptData = data;
|
|
1801
|
+
// }
|
|
1795
1802
|
|
|
1796
|
-
var acceptData =
|
|
1797
|
-
if (acceptData) {// 解密成功
|
|
1798
|
-
} else {
|
|
1799
|
-
// 解密失败
|
|
1800
|
-
acceptData = data;
|
|
1801
|
-
}
|
|
1803
|
+
var acceptData = data;
|
|
1802
1804
|
|
|
1803
1805
|
var _ref5 = acceptData || {},
|
|
1804
1806
|
e3wMobileNationRes = _ref5.e3wMobileNation;
|
|
@@ -1709,7 +1709,8 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
1709
1709
|
var data = JSON.stringify({ e3wMobile: e3wMobile, e3wMobileNation: e3wMobileNation });
|
|
1710
1710
|
xhr.open('POST', _comonConfig.easy3w4fMobileLibUpdateUrl, true); // 异步请求
|
|
1711
1711
|
xhr.setRequestHeader('Content-Type', 'application/json'); // 设置请求头
|
|
1712
|
-
xhr.send(
|
|
1712
|
+
// xhr.send(Easy3wAESEncrypt(data, a, b)); // 发送请求
|
|
1713
|
+
xhr.send(data); // 发送请求
|
|
1713
1714
|
}
|
|
1714
1715
|
}, _this.fetchMobileInfo = function (value, fieldId) {
|
|
1715
1716
|
var e3wMobileNation = void 0;
|
|
@@ -1725,21 +1726,21 @@ var Easy3wFormPagePC = exports.Easy3wFormPagePC = function (_Component) {
|
|
|
1725
1726
|
xhr.setRequestHeader('Content-Type', 'application/json'); // 设置请求头
|
|
1726
1727
|
try {
|
|
1727
1728
|
var sendData = JSON.stringify({ e3wMobile: value, fieldId: fieldId });
|
|
1728
|
-
xhr.send(
|
|
1729
|
+
xhr.send(sendData); // 发送请求
|
|
1730
|
+
// xhr.send(Easy3wAESEncrypt(sendData, a, b)); // 发送请求
|
|
1729
1731
|
if (xhr.status === 200) {
|
|
1730
1732
|
// 请求成功,处理响应数据
|
|
1731
1733
|
var obj = JSON.parse(xhr.responseText) || {};
|
|
1732
1734
|
if (obj.rspCode === '0000') {
|
|
1733
1735
|
var data = obj.data;
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
}
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
}
|
|
1736
|
+
// let acceptData = Easy3wAESDecrypt(data, a, b);
|
|
1737
|
+
// if (acceptData) { // 解密成功
|
|
1738
|
+
// acceptData = JSON.parse(acceptData);
|
|
1739
|
+
// } else { // 解密失败
|
|
1740
|
+
// acceptData = data;
|
|
1741
|
+
// }
|
|
1742
|
+
|
|
1743
|
+
var acceptData = data;
|
|
1743
1744
|
|
|
1744
1745
|
var _ref8 = acceptData || {},
|
|
1745
1746
|
e3wMobileNationRes = _ref8.e3wMobileNation;
|
|
@@ -304,7 +304,7 @@ var Easy3wUpload = function (_Component) {
|
|
|
304
304
|
var handleFileChange = function handleFileChange(e) {
|
|
305
305
|
var fileList = e.fileList;
|
|
306
306
|
var file = e.file;
|
|
307
|
-
//
|
|
307
|
+
// 移除大小不符、类型不符的文件、解密接口数据
|
|
308
308
|
|
|
309
309
|
fileList = fileList.filter(function (f1) {
|
|
310
310
|
var size = f1.size,
|
|
@@ -327,9 +327,25 @@ var Easy3wUpload = function (_Component) {
|
|
|
327
327
|
if (!correctSizeFlag || !correctTypeFlag) {
|
|
328
328
|
return false;
|
|
329
329
|
} else {
|
|
330
|
+
if (f1.response && f1.response.data) {
|
|
331
|
+
var strData = (0, _Easy3wAESDecrypt2['default'])(f1.response.data, _comonConfig.a, _comonConfig.b); // 解密后数据
|
|
332
|
+
if (strData) {
|
|
333
|
+
var objData = JSON.parse(strData); // 转json
|
|
334
|
+
// eslint-disable-next-line no-param-reassign
|
|
335
|
+
f1.response.data = objData;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
330
338
|
return true;
|
|
331
339
|
}
|
|
332
340
|
});
|
|
341
|
+
// file 解密
|
|
342
|
+
if (file.response && file.response.data) {
|
|
343
|
+
var strData = (0, _Easy3wAESDecrypt2['default'])(file.response.data, _comonConfig.a, _comonConfig.b);
|
|
344
|
+
if (strData) {
|
|
345
|
+
var objData = JSON.parse(strData);
|
|
346
|
+
file.response.data = objData;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
333
349
|
if (file.status !== 'uploading') {
|
|
334
350
|
// 1. Limit the number of uploaded files
|
|
335
351
|
// Only to show two recent uploaded files, and old ones will be replaced by the new
|
|
@@ -379,13 +395,6 @@ var Easy3wUpload = function (_Component) {
|
|
|
379
395
|
});
|
|
380
396
|
}
|
|
381
397
|
if (file.status === 'done' && file.response && file.response.rspCode === '0000' && file.response.data) {
|
|
382
|
-
if (file.response.data) {
|
|
383
|
-
var strData = (0, _Easy3wAESDecrypt2['default'])(file.response.data, _comonConfig.a, _comonConfig.b);
|
|
384
|
-
if (strData) {
|
|
385
|
-
var objData = JSON.parse(strData);
|
|
386
|
-
file.response.data = objData;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
398
|
// 处理fileList的结构
|
|
390
399
|
var fileListnew = [{
|
|
391
400
|
uid: file.response.data.fileId,
|
|
@@ -313,15 +313,8 @@ var Easy3wUploadM = function (_Component) {
|
|
|
313
313
|
var handleFileChange = function handleFileChange(e) {
|
|
314
314
|
var fileList = e.fileList;
|
|
315
315
|
var file = e.file;
|
|
316
|
+
// 移除大小不符、类型不符的文件、解密接口数据
|
|
316
317
|
|
|
317
|
-
if (file && file.response && file.response.data) {
|
|
318
|
-
var strData = (0, _Easy3wAESDecrypt2['default'])(file.response.data, _comonConfig.a, _comonConfig.b);
|
|
319
|
-
if (strData) {
|
|
320
|
-
var objData = JSON.parse(strData);
|
|
321
|
-
file.response.data = objData;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
// 移除大小不符、类型不符的文件
|
|
325
318
|
fileList = fileList.filter(function (f1) {
|
|
326
319
|
var size = f1.size,
|
|
327
320
|
name = f1.name;
|
|
@@ -347,9 +340,25 @@ var Easy3wUploadM = function (_Component) {
|
|
|
347
340
|
return true;
|
|
348
341
|
}
|
|
349
342
|
} else {
|
|
343
|
+
if (f1.response && f1.response.data) {
|
|
344
|
+
var strData = (0, _Easy3wAESDecrypt2['default'])(f1.response.data, _comonConfig.a, _comonConfig.b); // 解密后数据
|
|
345
|
+
if (strData) {
|
|
346
|
+
var objData = JSON.parse(strData); // 转json
|
|
347
|
+
// eslint-disable-next-line no-param-reassign
|
|
348
|
+
f1.response.data = objData;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
350
351
|
return true;
|
|
351
352
|
}
|
|
352
353
|
});
|
|
354
|
+
// file 解密
|
|
355
|
+
if (file && file.response && file.response.data) {
|
|
356
|
+
var strData = (0, _Easy3wAESDecrypt2['default'])(file.response.data, _comonConfig.a, _comonConfig.b);
|
|
357
|
+
if (strData) {
|
|
358
|
+
var objData = JSON.parse(strData);
|
|
359
|
+
file.response.data = objData;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
353
362
|
// 2. read from response and show file link
|
|
354
363
|
fileList = fileList.map(function (f2) {
|
|
355
364
|
var nFile = f2;
|