(to)
| 179 | } |
| 180 | |
| 181 | notifyMobile (to) { |
| 182 | return Promise.resolve().then(() => { |
| 183 | let params = { |
| 184 | pass_ticket: this.PROP.passTicket, |
| 185 | lang: 'zh_CN' |
| 186 | } |
| 187 | let data = { |
| 188 | 'BaseRequest': this.getBaseRequest(), |
| 189 | 'Code': to ? 1 : 3, |
| 190 | 'FromUserName': this.user['UserName'], |
| 191 | 'ToUserName': to || this.user['UserName'], |
| 192 | 'ClientMsgId': getClientMsgId() |
| 193 | } |
| 194 | return this.request({ |
| 195 | method: 'POST', |
| 196 | url: this.CONF.API_webwxstatusnotify, |
| 197 | params: params, |
| 198 | data: data |
| 199 | }).then(res => { |
| 200 | let data = res.data |
| 201 | assert.equal(data.BaseResponse.Ret, 0, res) |
| 202 | }) |
| 203 | }).catch(err => { |
| 204 | debug(err) |
| 205 | err.tips = '手机状态通知失败' |
| 206 | throw err |
| 207 | }) |
| 208 | } |
| 209 | |
| 210 | getContact (seq = 0) { |
| 211 | return Promise.resolve().then(() => { |
no test coverage detected