@cpzxrobot/sdk 1.1.22 → 1.1.24
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/company_gateway.js +20 -0
- package/dist/factory_gateway.js +4 -0
- package/dist/project_gateway.js +2 -4
- package/dist/user_gateway.js +1 -1
- package/factory_gateway.ts +5 -0
- package/package.json +1 -1
- package/project_gateway.ts +6 -4
- package/readme.md +3 -2
- package/user_gateway.ts +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductGateway = void 0;
|
|
4
|
+
class ProductGateway extends Object {
|
|
5
|
+
constructor(context) {
|
|
6
|
+
super();
|
|
7
|
+
this.context = context;
|
|
8
|
+
}
|
|
9
|
+
list(args) {
|
|
10
|
+
return this.context.ready.then((axios) => {
|
|
11
|
+
return axios.post(`/api/v2/coremde-sale/product/list`, args);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
get(id) {
|
|
15
|
+
return this.context.ready.then((axios) => {
|
|
16
|
+
return axios.get(`/api/v2/coremde-sale/product/get?id=${id}`);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.ProductGateway = ProductGateway;
|
package/dist/factory_gateway.js
CHANGED
|
@@ -27,6 +27,10 @@ class FactoryGateway extends Object {
|
|
|
27
27
|
var axios = await this.context.ready;
|
|
28
28
|
return axios.post("/api/v2/company/factory", factory);
|
|
29
29
|
}
|
|
30
|
+
async listByCompany(companyId) {
|
|
31
|
+
var axios = await this.context.ready;
|
|
32
|
+
return axios.get(`/api/v2/company/${companyId}/factory`);
|
|
33
|
+
}
|
|
30
34
|
//获得工厂的应用信息, 如果指定withRoles为true,则返回app和app的详细角色信息
|
|
31
35
|
async apps(id, withRoles = false) {
|
|
32
36
|
var axios = await this.context.ready;
|
package/dist/project_gateway.js
CHANGED
|
@@ -27,11 +27,9 @@ class ProjectGateway extends Object {
|
|
|
27
27
|
});
|
|
28
28
|
},
|
|
29
29
|
//date 传入格式为2019-8或者Date类型对象
|
|
30
|
-
list: (
|
|
30
|
+
list: (args) => {
|
|
31
31
|
return this.context.ready.then((axios) => {
|
|
32
|
-
return axios.post(`/api/v2/coremde-sale/project/feedback/list`,
|
|
33
|
-
projectId,
|
|
34
|
-
});
|
|
32
|
+
return axios.post(`/api/v2/coremde-sale/project/feedback/list`, args);
|
|
35
33
|
});
|
|
36
34
|
}
|
|
37
35
|
};
|
package/dist/user_gateway.js
CHANGED
package/factory_gateway.ts
CHANGED
|
@@ -33,6 +33,11 @@ export class FactoryGateway extends Object {
|
|
|
33
33
|
return axios.post("/api/v2/company/factory", factory);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
async listByCompany(companyId: number) {
|
|
37
|
+
var axios = await this.context.ready;
|
|
38
|
+
return axios.get(`/api/v2/company/${companyId}/factory`);
|
|
39
|
+
}
|
|
40
|
+
|
|
36
41
|
//获得工厂的应用信息, 如果指定withRoles为true,则返回app和app的详细角色信息
|
|
37
42
|
async apps(id: number, withRoles = false): Promise<any> {
|
|
38
43
|
var axios = await this.context.ready;
|
package/package.json
CHANGED
package/project_gateway.ts
CHANGED
|
@@ -37,11 +37,13 @@ export class ProjectGateway extends Object {
|
|
|
37
37
|
});
|
|
38
38
|
},
|
|
39
39
|
//date 传入格式为2019-8或者Date类型对象
|
|
40
|
-
list: (
|
|
40
|
+
list: (args: {
|
|
41
|
+
pageNo: number;
|
|
42
|
+
pageSize: number;
|
|
43
|
+
projectId: number;
|
|
44
|
+
}) => {
|
|
41
45
|
return this.context.ready.then((axios) => {
|
|
42
|
-
return axios.post(`/api/v2/coremde-sale/project/feedback/list`,
|
|
43
|
-
projectId,
|
|
44
|
-
});
|
|
46
|
+
return axios.post(`/api/v2/coremde-sale/project/feedback/list`, args);
|
|
45
47
|
});
|
|
46
48
|
}
|
|
47
49
|
};
|
package/readme.md
CHANGED
|
@@ -91,6 +91,7 @@ baseURL: "/"
|
|
|
91
91
|
| cpzxrobot().factory.roles | 获得工厂的角色列表 |
|
|
92
92
|
| cpzxrobot().factory.addRole | 添加工厂的角色 |
|
|
93
93
|
| cpzxrobot().factory.deleteRole | 删除工厂的角色 |
|
|
94
|
+
| cpzxrobot().factory.listByCompany | 获得工厂列表,传入companyId参数 |
|
|
94
95
|
| cpzxrobot().factory.info.get | 获得工厂的附加信息 |
|
|
95
96
|
| cpzxrobot().factory.info.post | 更新或更新工厂的附加信息 |
|
|
96
97
|
| cpzxrobot().factory.banner.add | 添加工厂的banner图片,提交formdata,需要传入file参数 |
|
|
@@ -146,8 +147,8 @@ baseURL: "/"
|
|
|
146
147
|
| cpzxrobot().user.approval.count | 获取用户审批列表的数量,传入userId和status参数 |
|
|
147
148
|
| cpzxrobot().user.checkin.add | 添加用户签到记录,传入userId和address参数 |
|
|
148
149
|
| cpzxrobot().user.checkin.list | 列出用户签到记录,传入userId和date参数 |
|
|
149
|
-
| cpzxrobot().user.
|
|
150
|
-
| cpzxrobot().user.
|
|
150
|
+
| cpzxrobot().user.searchHistory.list | 列出用户搜索历史记录,传入type参数 |
|
|
151
|
+
| cpzxrobot().user.searchHistory.add | 添加用户搜索历史记录,传入type参数和搜索内容 |
|
|
151
152
|
| cpzxrobot().product.list | 获得产品列表,传入factory_id和必要的分页参数 |
|
|
152
153
|
| cpzxrobot().product.get | 获得产品信息,传入id参数 |
|
|
153
154
|
| cpzxrobot().project.list | 获得项目列表,传入factory_id和必要的分页参数 |
|