@ray-js/ray-ipc-utils 1.1.12 → 1.1.13-beta.2
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/interface.d.ts +1 -0
- package/lib/service/index.js +18 -4
- package/package.json +3 -3
package/lib/interface.d.ts
CHANGED
package/lib/service/index.js
CHANGED
|
@@ -67,9 +67,9 @@ const api = function (a, postData) {
|
|
|
67
67
|
* @description: 通用 IPC 标准能力接口基础封装
|
|
68
68
|
*/
|
|
69
69
|
|
|
70
|
-
const wrapIpcApiCall = async (apiFunc, params) => {
|
|
70
|
+
const wrapIpcApiCall = async (apiFunc, params, options) => {
|
|
71
71
|
try {
|
|
72
|
-
const res = await apiFunc(params);
|
|
72
|
+
const res = await apiFunc(params, options);
|
|
73
73
|
return {
|
|
74
74
|
code: 0,
|
|
75
75
|
data: res
|
|
@@ -78,7 +78,8 @@ const wrapIpcApiCall = async (apiFunc, params) => {
|
|
|
78
78
|
const e = typeof err === 'string' ? JsonUtil.parseJSON(err) : err;
|
|
79
79
|
return {
|
|
80
80
|
code: -1,
|
|
81
|
-
msg: (e === null || e === void 0 ? void 0 : e.message) || (e === null || e === void 0 ? void 0 : e.errorMsg) || String(e)
|
|
81
|
+
msg: (e === null || e === void 0 ? void 0 : e.message) || (e === null || e === void 0 ? void 0 : e.errorMsg) || String(e),
|
|
82
|
+
msgCode: e === null || e === void 0 ? void 0 : e.errorCode
|
|
82
83
|
};
|
|
83
84
|
}
|
|
84
85
|
};
|
|
@@ -92,6 +93,9 @@ const wrapIpcApiCall = async (apiFunc, params) => {
|
|
|
92
93
|
export const getIpcConfigInfo = async deviceId => {
|
|
93
94
|
return wrapIpcApiCall(getIpcRtcConfig, {
|
|
94
95
|
devId: deviceId
|
|
96
|
+
}, {
|
|
97
|
+
toastError: false,
|
|
98
|
+
transError: false
|
|
95
99
|
});
|
|
96
100
|
};
|
|
97
101
|
|
|
@@ -308,6 +312,9 @@ export const getCameraConfigInfo = async function (deviceId) {
|
|
|
308
312
|
export const getCollectionPointsInfo = async deviceId => {
|
|
309
313
|
return wrapIpcApiCall(getIpcPointList, {
|
|
310
314
|
devId: deviceId
|
|
315
|
+
}, {
|
|
316
|
+
toastError: false,
|
|
317
|
+
transError: false
|
|
311
318
|
});
|
|
312
319
|
};
|
|
313
320
|
|
|
@@ -343,6 +350,9 @@ export const updateCollectionPointsInfo = async (deviceId, id, name) => {
|
|
|
343
350
|
devId: deviceId,
|
|
344
351
|
id,
|
|
345
352
|
name
|
|
353
|
+
}, {
|
|
354
|
+
toastError: false,
|
|
355
|
+
transError: false
|
|
346
356
|
});
|
|
347
357
|
};
|
|
348
358
|
|
|
@@ -511,7 +521,10 @@ export const getServiceUrl = async function (deviceId, serveType) {
|
|
|
511
521
|
params.categoryCode = '';
|
|
512
522
|
params.path = 'pages/aiInspection/reportDetails/index';
|
|
513
523
|
}
|
|
514
|
-
const result = await wrapIpcApiCall(getVasUrlInfo, params
|
|
524
|
+
const result = await wrapIpcApiCall(getVasUrlInfo, params, {
|
|
525
|
+
toastError: false,
|
|
526
|
+
transError: false
|
|
527
|
+
});
|
|
515
528
|
if ((result === null || result === void 0 ? void 0 : result.code) === -1) {
|
|
516
529
|
return result;
|
|
517
530
|
}
|
|
@@ -553,6 +566,7 @@ export const getServiceIsOpen = async function (deviceId, categoryCode) {
|
|
|
553
566
|
uuid
|
|
554
567
|
}
|
|
555
568
|
} = await getDevInfo(deviceId);
|
|
569
|
+
console.log(uuid, homeId);
|
|
556
570
|
const res = await getDeviceDetailsById(_objectSpread({
|
|
557
571
|
uuid,
|
|
558
572
|
homeId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/ray-ipc-utils",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13-beta.2",
|
|
4
4
|
"description": "IPC 工具库",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"files": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"test": "yarn jest"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@ray-js/ray": "^1.7.
|
|
35
|
+
"@ray-js/ray": "^1.7.60"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ray-js/panel-sdk": "^1.13.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@commitlint/cli": "^7.2.1",
|
|
43
43
|
"@commitlint/config-conventional": "^9.0.1",
|
|
44
44
|
"@ray-js/cli": "^1.7.14",
|
|
45
|
-
"@ray-js/ray": "^1.7.
|
|
45
|
+
"@ray-js/ray": "^1.7.60",
|
|
46
46
|
"@testing-library/react-hooks": "^8.0.1",
|
|
47
47
|
"@types/jest": "^29.5.14",
|
|
48
48
|
"core-js": "^3.19.1",
|