@freelog/tools-lib 0.1.144 → 0.1.145

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freelog/tools-lib",
3
- "version": "0.1.144",
3
+ "version": "0.1.145",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "prepare": "tsdx build",
20
20
  "size": "size-limit",
21
21
  "analyze": "size-limit --why",
22
- "publish": "npm publish --access public"
22
+ "publish": "npm publish --access=public"
23
23
  },
24
24
  "husky": {
25
25
  "hooks": {}
@@ -117,7 +117,8 @@ class I18nNext {
117
117
  }
118
118
 
119
119
  private async _fetchData(this: I18nNext): Promise<Resource> {
120
- const res: any = await axios.get(window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test, {
120
+ const url: string = window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test;
121
+ const res: any = await axios.get(url + '?timestamp=' + Date.now(), {
121
122
  withCredentials: false,
122
123
  });
123
124
  // console.log(res, 'data09oiw3qjelsfkdfjlsdkfjl');
@@ -1,5 +1,41 @@
1
1
  import FUtil from '../utils';
2
2
 
3
+ // 创建合同
4
+ interface CreateContractParamsType {
5
+ subjectId: string;
6
+ subjectType: 1 | 2 | 3; // 标的物类型 1:资源 2:展品 3:用户组
7
+ policyId: string;
8
+ licenseeId: string | number;
9
+ licenseeIdentityType: 1 | 2 | 3; // 乙方身份类型 1:资源方 2:节点方 3:C端用户
10
+ }
11
+
12
+ export function createContract({...params}: CreateContractParamsType) {
13
+ return FUtil.Request({
14
+ method: 'POST',
15
+ url: `/v2/contracts`,
16
+ data: params,
17
+ });
18
+ }
19
+
20
+ // 批量创建合同
21
+ interface BatchCreateContractsParamsType {
22
+ subjects: {
23
+ subjectId: string;
24
+ policyId: string;
25
+ }[];
26
+ subjectType: 1 | 2 | 3; // 标的物类型 1:资源 2:展品 3:用户组
27
+ licenseeId: string | number;
28
+ licenseeIdentityType: 1 | 2 | 3; // 乙方身份类型 1:资源方 2:节点方 3:C端用户
29
+ }
30
+
31
+ export function batchCreateContracts({...params}: BatchCreateContractsParamsType) {
32
+ return FUtil.Request({
33
+ method: 'POST',
34
+ url: `/v2/contracts/batchSign`,
35
+ data: params,
36
+ });
37
+ }
38
+
3
39
  // 查看合同详情
4
40
  interface ContractDetailsParamsType {
5
41
  contractId: string;