@custouch/jssdk
    Preparing search index...

    Class WechatWorkKit

    微信/企业微信的授权登录

    Index

    Constructors

    • Parameters

      • params: { agentId?: string; auto?: boolean; corpId?: string }

      Returns WechatWorkKit

    Properties

    _config: Partial<Config>
    baseUrl: string = ...
    login: UseMemoizeReturn<Promise<string | void>, []> = ...

    授权/扫码登录

    WechatWorkKit

    memberId?: string
    request: FetchRequest
    sdk: __module = ww
    userInfo: UseMemoizeReturn<Promise<WechatWorkUserInfo & { avatar: string }>, []> = ...

    用户信息

    WechatWorkKit

    Methods

    • 获取配置

      Parameters

      • Optionaloption: Partial<Config>

      Returns Partial<Config>

      WechatWorkKit

    • 初始化ww.config

      Parameters

      • OptionaljsApiList: string[] = ...

      Returns Promise<undefined>

      WechatWorkKit

    • 登出

      Returns Promise<{ code: number }>

      WechatWorkKit

    • 代理接口

      Parameters

      Returns Promise<any>

      WechatWorkKit

    • 请求企业微信授权参数

      Parameters

      • url: string

      Returns Promise<
          {
              agentid: string;
              corpid: string;
              nonceStr: string;
              signature: string;
              timestamp: string;
          },
      >

      WechatWorkKit

    • 登录接口

      Parameters

      Returns Promise<
          {
              code: 200;
              memberId?: string;
              redirect?: string;
              session?: string;
              uid?: string;
          },
      >

      WechatWorkKit

    • 登出接口

      Returns Promise<{ code: number }>

      WechatWorkKit

    • 请求代理的接口

      Parameters

      Returns Promise<{ result: { code: any; detail?: any; error?: string } }>

      WechatWorkKit

    • 获取用户信息接口

      Returns Promise<{ code: number; info: WechatWorkUserInfo }>

      WechatWorkKit

    • 配置分享接口

      Parameters

      • OptionalshareInfo: ShareToUserConfig

      Returns Promise<void>

      WechatWorkKit