@ibiz-template/runtime 0.3.0 → 0.3.1
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/dist/index.esm.js +45 -41
- package/dist/index.system.min.js +2 -2
- package/dist/index.system.min.js.map +1 -1
- package/out/service/service/async-action/async-action.service.d.ts.map +1 -1
- package/out/service/service/async-action/async-action.service.js +4 -0
- package/package.json +2 -2
- package/src/service/service/async-action/async-action.service.ts +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-action.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/async-action/async-action.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"async-action.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/async-action/async-action.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;GAMG;AACH,qBAAa,kBAAmB,YAAW,mBAAmB;IAC5D;;;;;;OAMG;IACG,KAAK,CACT,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAQ/C;;;;;;OAMG;IACG,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAC,CAAC;CAI1E"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isNil } from 'ramda';
|
|
1
2
|
/**
|
|
2
3
|
* 异步操作服务
|
|
3
4
|
* @author lxm
|
|
@@ -15,6 +16,9 @@ export class AsyncActionService {
|
|
|
15
16
|
*/
|
|
16
17
|
async fetch(params = {}) {
|
|
17
18
|
const res = await ibiz.net.post('/portal/asyncaction/all', params);
|
|
19
|
+
if (isNil(res.data)) {
|
|
20
|
+
res.data = [];
|
|
21
|
+
}
|
|
18
22
|
return res;
|
|
19
23
|
}
|
|
20
24
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "控制器包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"qx-util": "^0.4.8",
|
|
60
60
|
"ramda": "^0.29.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "2827c2bd507c4ab3efafa7ebb4990c18e198823a"
|
|
63
63
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IHttpResponse, IPortalAsyncAction } from '@ibiz-template/core';
|
|
2
|
+
import { isNil } from 'ramda';
|
|
2
3
|
import { IAsyncActionService } from '../../../interface';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -20,6 +21,9 @@ export class AsyncActionService implements IAsyncActionService {
|
|
|
20
21
|
params: IParams = {},
|
|
21
22
|
): Promise<IHttpResponse<IPortalAsyncAction[]>> {
|
|
22
23
|
const res = await ibiz.net.post('/portal/asyncaction/all', params);
|
|
24
|
+
if (isNil(res.data)) {
|
|
25
|
+
res.data = [];
|
|
26
|
+
}
|
|
23
27
|
return res as IHttpResponse<IPortalAsyncAction[]>;
|
|
24
28
|
}
|
|
25
29
|
|