@cpzxrobot/sdk 1.2.23 → 1.2.25

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.
@@ -73,12 +73,12 @@ export class CustomerGateway extends Object {
73
73
  });
74
74
  }
75
75
 
76
- ///contact/list
77
- contact(id: number) {
78
- return this.context.ready.then((axios) => {
79
- return axios.get(`/api/v2/coremde-sale/customer/contact/list?id=${id}`);
80
- });
81
- }
76
+ // ///contact/list
77
+ // contact(id: number) {
78
+ // return this.context.ready.then((axios) => {
79
+ // return axios.get(`/api/v2/coremde-sale/customer/contact/list?id=${id}`);
80
+ // });
81
+ // }
82
82
 
83
83
  get visit() {
84
84
  return {
@@ -184,8 +184,6 @@ export class CustomerGateway extends Object {
184
184
  });
185
185
  }
186
186
 
187
-
188
-
189
187
  //获得客户类型列表
190
188
  types() {
191
189
  return this.context.ready.then((axios) => {
@@ -200,4 +198,45 @@ export class CustomerGateway extends Object {
200
198
  });
201
199
  }
202
200
 
201
+ // 联系人管理
202
+ get contact() {
203
+ return {
204
+ // 新增联系人
205
+ add: (args: {
206
+ contactName: string;
207
+ contactPhone: string;
208
+ position: string;
209
+ customerId: number;
210
+ }) => {
211
+ return this.context.ready.then((axios) => {
212
+ return axios.post(`/api/v2/coremde-sale/customer/contact/add`, args);
213
+ });
214
+ },
215
+ // 修改联系人
216
+ update: (args: {
217
+ contactName: string;
218
+ contactPhone: string;
219
+ position: string;
220
+ id: number;
221
+ }) => {
222
+ return this.context.ready.then((axios) => {
223
+ return axios.post(`/api/v2/coremde-sale/customer/contact/update`, args);
224
+ });
225
+ },
226
+ // 删除联系人
227
+ delete: (args: {
228
+ id: number;
229
+ }) => {
230
+ return this.context.ready.then((axios) => {
231
+ return axios.post(`/api/v2/coremde-sale/customer/contact/delete`, args);
232
+ });
233
+ },
234
+ // 获取联系人列表
235
+ list: (id:number) => {
236
+ return this.context.ready.then((axios) => {
237
+ return axios.get(`/api/v2/coremde-sale/customer/contact/list?id=${id}`);
238
+ });
239
+ },
240
+ }
241
+ }
203
242
  }
@@ -54,12 +54,12 @@ class CustomerGateway extends Object {
54
54
  });
55
55
  });
56
56
  }
57
- ///contact/list
58
- contact(id) {
59
- return this.context.ready.then((axios) => {
60
- return axios.get(`/api/v2/coremde-sale/customer/contact/list?id=${id}`);
61
- });
62
- }
57
+ // ///contact/list
58
+ // contact(id: number) {
59
+ // return this.context.ready.then((axios) => {
60
+ // return axios.get(`/api/v2/coremde-sale/customer/contact/list?id=${id}`);
61
+ // });
62
+ // }
63
63
  get visit() {
64
64
  return {
65
65
  add: (args) => {
@@ -146,5 +146,34 @@ class CustomerGateway extends Object {
146
146
  return axios.get(`/api/v2/coremde-sale/customer/category/list`);
147
147
  });
148
148
  }
149
+ // 联系人管理
150
+ get contact() {
151
+ return {
152
+ // 新增联系人
153
+ add: (args) => {
154
+ return this.context.ready.then((axios) => {
155
+ return axios.post(`/api/v2/coremde-sale/customer/contact/add`, args);
156
+ });
157
+ },
158
+ // 修改联系人
159
+ update: (args) => {
160
+ return this.context.ready.then((axios) => {
161
+ return axios.post(`/api/v2/coremde-sale/customer/contact/update`, args);
162
+ });
163
+ },
164
+ // 删除联系人
165
+ delete: (args) => {
166
+ return this.context.ready.then((axios) => {
167
+ return axios.post(`/api/v2/coremde-sale/customer/contact/delete`, args);
168
+ });
169
+ },
170
+ // 获取联系人列表
171
+ list: (id) => {
172
+ return this.context.ready.then((axios) => {
173
+ return axios.get(`/api/v2/coremde-sale/customer/contact/list?id=${id}`);
174
+ });
175
+ },
176
+ };
177
+ }
149
178
  }
150
179
  exports.CustomerGateway = CustomerGateway;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {