@freelog/tools-lib 0.1.163 → 0.1.165

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.
@@ -0,0 +1,29 @@
1
+ import FUtil from '../utils';
2
+ // import {CommonReturn} from "./tools";
3
+
4
+ // 根据编号取资源类型
5
+ interface GetInfoByCodeType {
6
+ code: string;
7
+ }
8
+
9
+ export function getInfoByCode({...params}: GetInfoByCodeType) {
10
+ return FUtil.Request({
11
+ method: 'GET',
12
+ url: `/v2/resources/types/getInfoByCode`,
13
+ params: params,
14
+ });
15
+ }
16
+
17
+ // 根据编号取资源类型
18
+ interface GetInfoByCodeOrNameType {
19
+ code?: string;
20
+ name?: string;
21
+ }
22
+
23
+ export function getInfoByCodeOrName({...params}: GetInfoByCodeOrNameType) {
24
+ return FUtil.Request({
25
+ method: 'GET',
26
+ url: `/v2/resources/types/getInfoByCodeOrName`,
27
+ params: params,
28
+ });
29
+ }