Skip to content

Instantly share code, notes, and snippets.

@zhangkn
Created May 25, 2018 06:34
Show Gist options
  • Save zhangkn/f837af826c8cdab72baf40fd33288382 to your computer and use it in GitHub Desktop.
Save zhangkn/f837af826c8cdab72baf40fd33288382 to your computer and use it in GitHub Desktop.

说明:

  • wx.on 开头的 API 是监听某个事件发生的API接口,接受一个 CALLBACK 函数作为参数。当该事件触发时,会调用 CALLBACK 函数。
  • 如未特殊约定,其他 API 接口都接受一个OBJECT作为参数。
  • OBJECT中可以指定success, fail, complete来接收接口调用结果。
参数名 类型 必填 说明
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment