(contacts)
| 234 | } |
| 235 | |
| 236 | batchGetContact (contacts) { |
| 237 | return Promise.resolve().then(() => { |
| 238 | let params = { |
| 239 | 'pass_ticket': this.PROP.passTicket, |
| 240 | 'type': 'ex', |
| 241 | 'r': +new Date(), |
| 242 | 'lang': 'zh_CN' |
| 243 | } |
| 244 | let data = { |
| 245 | 'BaseRequest': this.getBaseRequest(), |
| 246 | 'Count': contacts.length, |
| 247 | 'List': contacts |
| 248 | } |
| 249 | return this.request({ |
| 250 | method: 'POST', |
| 251 | url: this.CONF.API_webwxbatchgetcontact, |
| 252 | params: params, |
| 253 | data: data |
| 254 | }).then(res => { |
| 255 | let data = res.data |
| 256 | assert.equal(data.BaseResponse.Ret, 0, res) |
| 257 | |
| 258 | return data.ContactList |
| 259 | }) |
| 260 | }).catch(err => { |
| 261 | debug(err) |
| 262 | err.tips = '批量获取联系人失败' |
| 263 | throw err |
| 264 | }) |
| 265 | } |
| 266 | |
| 267 | statReport (text) { |
| 268 | return Promise.resolve().then(() => { |
no test coverage detected