@cpzxrobot/sdk 1.2.99 → 1.3.0
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/user_gateway.js +2 -2
- package/package.json +1 -1
- package/user_gateway.ts +13 -2
package/dist/user_gateway.js
CHANGED
|
@@ -13,8 +13,8 @@ class UserGateway extends Object {
|
|
|
13
13
|
async selectUnit(unit) {
|
|
14
14
|
if ((typeof unit === "string") || (typeof unit === "number")) {
|
|
15
15
|
var axios = await this.context.ready;
|
|
16
|
-
|
|
17
|
-
this.context.platform.setSelectedUnit(
|
|
16
|
+
var resp = await this.context.unit.get(unit);
|
|
17
|
+
this.context.platform.setSelectedUnit(resp.data);
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
20
20
|
this.context.platform.setSelectedUnit(unit);
|
package/package.json
CHANGED
package/user_gateway.ts
CHANGED
|
@@ -16,8 +16,8 @@ export class UserGateway extends Object {
|
|
|
16
16
|
public async selectUnit(unit: Unit | String | Number) {
|
|
17
17
|
if ((typeof unit === "string") || (typeof unit === "number")) {
|
|
18
18
|
var axios = await this.context.ready;
|
|
19
|
-
|
|
20
|
-
this.context.platform.setSelectedUnit(
|
|
19
|
+
var resp = await this.context.unit.get(unit);
|
|
20
|
+
this.context.platform.setSelectedUnit(resp.data);
|
|
21
21
|
} else {
|
|
22
22
|
this.context.platform.setSelectedUnit(unit);
|
|
23
23
|
}
|
|
@@ -321,6 +321,17 @@ export class UserGateway extends Object {
|
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
323
|
});
|
|
324
|
+
},
|
|
325
|
+
// 任务审核功能
|
|
326
|
+
approve: (params: {
|
|
327
|
+
taskId: number,
|
|
328
|
+
taskType: string,
|
|
329
|
+
approveResult: number,
|
|
330
|
+
approveNotes?: string
|
|
331
|
+
}) => {
|
|
332
|
+
return this.context.ready.then((axios) => {
|
|
333
|
+
return axios.post('/api/v2/coremde-sale/task/approve', params);
|
|
334
|
+
});
|
|
324
335
|
}
|
|
325
336
|
}
|
|
326
337
|
}
|