eco-access-specifications 2.0.4 → 2.0.5
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/Component/LogComponent.js +3 -1
- package/lib/Utils/LogUtil.js +4 -1
- package/lib/index.min.js +1 -1
- package/lib/main/EcoService.js +2 -0
- package/lib/main/log.js +3 -0
- package/lib/main/require.js +2 -0
- package/lib/page/LogPage.js +1 -0
- package/package.json +1 -3
|
@@ -59,7 +59,9 @@ var BaseComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
59
59
|
}
|
|
60
60
|
}, {
|
|
61
61
|
key: "addLog",
|
|
62
|
-
value: function addLog(string) {
|
|
62
|
+
value: function addLog(string) {
|
|
63
|
+
console.log("log->".concat(string));
|
|
64
|
+
}
|
|
63
65
|
}]);
|
|
64
66
|
}(React.Component);
|
|
65
67
|
export default BaseComponent;
|
package/lib/Utils/LogUtil.js
CHANGED
|
@@ -39,7 +39,10 @@ var UnitUtil = /*#__PURE__*/function () {
|
|
|
39
39
|
}
|
|
40
40
|
}, {
|
|
41
41
|
key: "logDebug",
|
|
42
|
-
value: function logDebug() {
|
|
42
|
+
value: function logDebug() {
|
|
43
|
+
var _console;
|
|
44
|
+
(_console = console).log.apply(_console, arguments);
|
|
45
|
+
}
|
|
43
46
|
/**
|
|
44
47
|
* 时间转换
|
|
45
48
|
* @param dateTime
|
package/lib/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bleSpec}from"./main/specMethod";var appName="",Device={},Service={},addLog=function(){},Bluetooth={},localLog=function(){},bleSpecQueue=function(){},initSpecifications=function(e){appName=e.name,Device=e.Device,localLog=e.localLog,Service=e.Service,addLog=e.addLog,bleSpecQueue=bleSpec(Bluetooth=e.Bluetooth)};import{initSpecifications,bleSpecQueue}from"./global.js";import EcoService from"./main/EcoService.js";import{addLog,LogPage}from"./main/log.js";import{oneTrackReport,allTrackPoints}from"./eco-track-report/index.js";import{bleSpec}from"./main/specMethod";appName="",Device={},Service={},addLog=function(){},Bluetooth={},localLog=function(){},bleSpecQueue=function(){},initSpecifications=function(e){appName=e.name,Device=e.Device,localLog=e.localLog,Service=e.Service,addLog=e.addLog,bleSpecQueue=bleSpec(Bluetooth=e.Bluetooth)};import{initSpecifications,bleSpecQueue}from"./global.js";import EcoService from"./main/EcoService.js";import{addLog,LogPage}from"./main/log.js";import{oneTrackReport,allTrackPoints}from"./eco-track-report/index.js";export{appName,Device,Service,initSpecifications,addLog,Bluetooth,bleSpecQueue,localLog,LogPage,addLog,bleSpecQueue,initSpecifications,EcoService,oneTrackReport,allTrackPoints,appName,Device,Service,initSpecifications,addLog,Bluetooth,bleSpecQueue,localLog,LogPage,addLog,bleSpecQueue,initSpecifications,EcoService,oneTrackReport,allTrackPoints};
|
|
1
|
+
import{bleSpec}from"./main/specMethod";var appName="",Device={},Service={},addLog=function(){},Bluetooth={},localLog=function(){},bleSpecQueue=function(){},initSpecifications=function(e){appName=e.name,Device=e.Device,localLog=e.localLog,Service=e.Service,addLog=e.addLog,bleSpecQueue=bleSpec(Bluetooth=e.Bluetooth)};import{initSpecifications,bleSpecQueue}from"./global.js";import EcoService from"./main/EcoService.js";import{addLog,LogPage}from"./main/log.js";import{oneTrackReport,allTrackPoints}from"./eco-track-report/index.js";import{bleSpec}from"./main/specMethod";appName="",Device={},Service={},addLog=function(){},Bluetooth={},localLog=function(){},bleSpecQueue=function(){},initSpecifications=function(e){appName=e.name,Device=e.Device,localLog=e.localLog,Service=e.Service,addLog=e.addLog,bleSpecQueue=bleSpec(Bluetooth=e.Bluetooth)};import{initSpecifications,bleSpecQueue}from"./global.js";import EcoService from"./main/EcoService.js";import{addLog,LogPage}from"./main/log.js";import{oneTrackReport,allTrackPoints}from"./eco-track-report/index.js";import{bleSpec}from"./main/specMethod";appName="",Device={},Service={},addLog=function(){},Bluetooth={},localLog=function(){},bleSpecQueue=function(){},initSpecifications=function(e){appName=e.name,Device=e.Device,localLog=e.localLog,Service=e.Service,addLog=e.addLog,bleSpecQueue=bleSpec(Bluetooth=e.Bluetooth)};import{initSpecifications,bleSpecQueue}from"./global.js";import EcoService from"./main/EcoService.js";import{addLog,LogPage}from"./main/log.js";import{oneTrackReport,allTrackPoints}from"./eco-track-report/index.js";export{appName,Device,Service,initSpecifications,addLog,Bluetooth,bleSpecQueue,localLog,LogPage,addLog,bleSpecQueue,initSpecifications,EcoService,oneTrackReport,allTrackPoints,appName,Device,Service,initSpecifications,addLog,Bluetooth,bleSpecQueue,localLog,LogPage,addLog,bleSpecQueue,initSpecifications,EcoService,oneTrackReport,allTrackPoints,appName,Device,Service,initSpecifications,addLog,Bluetooth,bleSpecQueue,localLog,LogPage,addLog,bleSpecQueue,initSpecifications,EcoService,oneTrackReport,allTrackPoints};
|
package/lib/main/EcoService.js
CHANGED
|
@@ -16,9 +16,11 @@ var log = function log(path, params, success, failure, logLevel) {
|
|
|
16
16
|
var header = nowDateString();
|
|
17
17
|
if (success != undefined) {
|
|
18
18
|
string = "[ApiRequest] : \u2705Success." + "\n\u8BF7\u6C42\u8DEF\u5F84: ".concat(path) + "\n\u8BF7\u6C42\u53C2\u6570: ".concat(JSON.stringify(params)) + "\n\u54CD\u5E94\u7ED3\u679C: ".concat(JSON.stringify(success));
|
|
19
|
+
console.log(string);
|
|
19
20
|
addLog("".concat(header, " : ").concat(string));
|
|
20
21
|
} else {
|
|
21
22
|
string = "[ApiRequest] : \u274CFailure." + "\n\u8BF7\u6C42\u8DEF\u5F84: ".concat(path) + "\n\u8BF7\u6C42\u53C2\u6570: ".concat(JSON.stringify(params)) + "\n\u54CD\u5E94\u7ED3\u679C: ".concat(JSON.stringify(failure));
|
|
23
|
+
console.log(string);
|
|
22
24
|
addLog("".concat(header, " : ").concat(string));
|
|
23
25
|
}
|
|
24
26
|
};
|
package/lib/main/log.js
CHANGED
|
@@ -5,10 +5,13 @@ var addLog = function addLog(string) {
|
|
|
5
5
|
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
6
6
|
if (data) {
|
|
7
7
|
LogUtil.setLogInfo("log->".concat(string).concat(JSON.stringify(data)));
|
|
8
|
+
console.log("log->".concat(string).concat(JSON.stringify(data)));
|
|
8
9
|
} else {
|
|
9
10
|
LogUtil.setLogInfo("log->".concat(string));
|
|
11
|
+
console.log("log->".concat(string));
|
|
10
12
|
}
|
|
11
13
|
if (appName === 'miwear-rn-plugin') {
|
|
14
|
+
console.log(localLog, "[ECO-rn]->".concat(string));
|
|
12
15
|
localLog(Device.model, "[ECO-rn]->".concat(string));
|
|
13
16
|
}
|
|
14
17
|
};
|
package/lib/main/require.js
CHANGED
|
@@ -16,9 +16,11 @@ var log = function log(path, params, success, failure, logLevel) {
|
|
|
16
16
|
var header = nowDateString();
|
|
17
17
|
if (success != undefined) {
|
|
18
18
|
string = "[ApiRequest] : \u2705Success." + "\n\u8BF7\u6C42\u8DEF\u5F84: ".concat(path) + "\n\u8BF7\u6C42\u53C2\u6570: ".concat(JSON.stringify(params)) + "\n\u54CD\u5E94\u7ED3\u679C: ".concat(JSON.stringify(success));
|
|
19
|
+
console.log(string);
|
|
19
20
|
addLog("".concat(header, " : ").concat(string));
|
|
20
21
|
} else {
|
|
21
22
|
string = "[ApiRequest] : \u274CFailure." + "\n\u8BF7\u6C42\u8DEF\u5F84: ".concat(path) + "\n\u8BF7\u6C42\u53C2\u6570: ".concat(JSON.stringify(params)) + "\n\u54CD\u5E94\u7ED3\u679C: ".concat(JSON.stringify(failure));
|
|
23
|
+
console.log(string);
|
|
22
24
|
addLog("".concat(header, " : ").concat(string));
|
|
23
25
|
}
|
|
24
26
|
};
|
package/lib/page/LogPage.js
CHANGED
|
@@ -35,6 +35,7 @@ var LogPage = /*#__PURE__*/function (_LogComponent) {
|
|
|
35
35
|
key: "componentWillMount",
|
|
36
36
|
value: function componentWillMount() {
|
|
37
37
|
var logInfoArray = LogUtil.getLogInfo();
|
|
38
|
+
console.log('logInfoArray', logInfoArray);
|
|
38
39
|
// this.newFile(logInfoArray);
|
|
39
40
|
this.setState({
|
|
40
41
|
logInfo: logInfoArray
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eco-access-specifications",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "生态链公司插件接入规范,帮助生态链公司提高生产效率.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,7 +23,5 @@
|
|
|
23
23
|
"javascript-obfuscator": "^4.1.1",
|
|
24
24
|
"uglify-js": "^3.19.3"
|
|
25
25
|
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
},
|
|
28
26
|
"private": false
|
|
29
27
|
}
|