页内导航:

切换分校登录

字段名 注释
change_role 固定值为1,代表进行切换分校登录
redirect_uri 登录成功带code跳转过去的页面的路径,请使用encodeURIComponent编码

切换分校前,请先调用sdk的isMultiRole接口,用来判定是否可正常切换分校。不可正常切换分校时,请重新进行登录。

  const canChangeRole = await isMultiRole();
  const redirect_uri = '/pages/result/result' // 登录成功后的回跳页面

  if (canChangeRole) {
    epaasLogin({
      redirect_uri: encodeURIComponent(redirect_uri),
      change_role: 1
    })
  } else {
    // 按相关登录传参重新登录即可
    var appid = 10000
    epaasLogin({
      redirect_uri: encodeURIComponent(redirect_uri),
      appid
    })
  }
© 1998 - 2021 Tencent Inc. All Rights Reserved all right reserved,powered by ePaaS.更新时间: 2025-01-09 17:17:38

results matching ""

    No results matching ""

    results matching ""

      No results matching ""