(text)
| 265 | } |
| 266 | |
| 267 | statReport (text) { |
| 268 | return Promise.resolve().then(() => { |
| 269 | text = text || { |
| 270 | 'type': '[action-record]', |
| 271 | 'data': { |
| 272 | 'actions': [{ |
| 273 | 'type': 'click', |
| 274 | 'action': '发送框', |
| 275 | 'time': +new Date() |
| 276 | }] |
| 277 | } |
| 278 | } |
| 279 | text = JSON.stringify(text) |
| 280 | let params = { |
| 281 | 'pass_ticket': this.PROP.passTicket, |
| 282 | 'fun': 'new', |
| 283 | 'lang': 'zh_CN' |
| 284 | } |
| 285 | let data = { |
| 286 | 'BaseRequest': this.getBaseRequest(), |
| 287 | 'Count': 1, |
| 288 | 'List': [{ |
| 289 | 'Text': text, |
| 290 | 'Type': 1 |
| 291 | }] |
| 292 | } |
| 293 | return this.request({ |
| 294 | method: 'POST', |
| 295 | url: this.CONF.API_webwxreport, |
| 296 | params: params, |
| 297 | data: data |
| 298 | }) |
| 299 | }).catch(err => { |
| 300 | debug(err) |
| 301 | err.tips = '状态报告失败' |
| 302 | throw err |
| 303 | }) |
| 304 | } |
| 305 | |
| 306 | syncCheck () { |
| 307 | return Promise.resolve().then(() => { |
nothing calls this directly
no test coverage detected