企业微信登录方式(3种)

企业微信登录方式1: 一般用于企业微信工作台应用登录

字段名 注释
env_id 私有化环境id
redirect_uri 登录成功带code跳转页面路径,请使用encodeURIComponent编码
appid 教育号应用id(服务商后台应用详情的SuiteId)
  const redirect_uri = '/pages/result/result' // 登录成功后的回跳页面
  const appid = 10000

  epaasLogin({
    redirect_uri: encodeURIComponent(redirect_uri),
    appid
  })

企业微信工作台的小程序应用,点击后进入小程序的页面地址固定为pages/wxwork/indexappid会带在页面路径后面,需要接入方在此页面下获取参数,再做后续相关操作; 示例:pages/wxwork/index?appid=10000

// pages/wxwork/index页面onLoad,在此处获取appid
onLoad: function (options) {
  console.log(options)
  this.setData({
    'appid': options.appid
  })
}

企业微信登录方式2: 一般用于企业微信消息跳转登入

字段名 注释
env_id 私有化环境id
redirect_uri 登录成功带code跳转页面路径,请使用encodeURIComponent编码
appid 教育号应用id(服务商后台应用详情的SuiteId)
corpid 教育号机构id
  const redirect_uri = '/pages/result/result' // 登录成功后的回跳页面
  const appid = 10000
  const corpid = 10010

  epaasLogin({
    redirect_uri: encodeURIComponent(redirect_uri),
    appid,
    corpid
  })

企业微信登录方式3: 一般用于企业微信工作台应用登录(针对存量应用,新接入请用方式1)

字段名 注释
redirect_uri 登录成功带code跳转页面路径,请使用encodeURIComponent编码
qywx_suite_id 企业微信应用id
  const redirect_uri = '/pages/result/result' // 登录成功后的回跳页面
  const qywx_suite_id = 'wx60214ce950ea264a'

  epaasLogin({
    redirect_uri: encodeURIComponent(redirect_uri),
    qywx_suite_id
  })
© 1998 - 2021 Tencent Inc. All Rights Reserved all right reserved,powered by ePaaS.更新时间: 2024-08-22 10:14:39

results matching ""

    No results matching ""

    results matching ""

      No results matching ""