Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改联系人备注和标签 #120

Closed
originrobot opened this issue Dec 28, 2016 · 3 comments
Closed

修改联系人备注和标签 #120

originrobot opened this issue Dec 28, 2016 · 3 comments

Comments

@originrobot
Copy link
Contributor

originrobot commented Dec 28, 2016

发现还没有这个接口,就自己写了一个,但是commit中还有其他内容,就不发PR,贴在这儿,有需要的随意。

  updateRemarkName (UserName, RemarkName) {
    return Promise.resolve().then(() => {
        let params = {
          pass_ticket: this.PROP.passTicket,
          'lang': 'zh_CN'
        }
        let data = {
          BaseRequest: this.getBaseRequest(),
          CmdId: 2,
          RemarkName: RemarkName,
          UserName: UserName
        }
        return this.request({
          method: 'POST',
          url: this.CONF.API_webwxoplog,
          params: params,
          data: data
        }).then(res => {
          let data = res.data
          assert.equal(data.BaseResponse.Ret, 0, res)
      })
    }).catch(err => {
      debug(err)
      throw new Error('设置用户标签失败')
    })
  }
@spacelan
Copy link
Member

单独commit一次发个pr吧~

@originrobot
Copy link
Contributor Author

发了

@spacelan
Copy link
Member

#121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants