Options
All
  • Public
  • Public/Protected
  • All
Menu

Module config/constants

Index

Type aliases

BaseConfig

BaseConfig: { SsoLink?: string; accessType?: AccessType; actionPrefix?: string; appId?: string; checkFrame?: boolean; defaultAccess?: Access["LimitDetail"]; errorSession?: ErrorSession | null; formOpen?: string; logo?: string; onMemberError?: ((isMember: boolean) => unknown) | null; perferFetch?: boolean; proxyRequest?: AxiosInstance | null; staticBase?: string; trackOriginOpenId?: boolean; uaId?: string }

代理接口的一些基础配置

Type declaration

  • Optional SsoLink?: string

    单点登录链接,涉及到account相关接口时需要传入

  • Optional accessType?: AccessType

    checkAccess用到的type

  • Optional actionPrefix?: string

    pageview的默认title前缀

  • Optional appId?: string

    全局的appid配置

  • Optional checkFrame?: boolean
  • Optional defaultAccess?: Access["LimitDetail"]

    未返回值时的默认值 默认都为nothing

  • Optional errorSession?: ErrorSession | null

    阿里云日志分区

  • Optional formOpen?: string

    表单的api

    defaultvalue

    https://form.${isProduction ? 'cloud' : 'beta'}.custouch.com/open/v1/form

  • Optional logo?: string

    用于微信分享和外链的图片

  • Optional onMemberError?: ((isMember: boolean) => unknown) | null

    memberApi错误时的回调

  • Optional perferFetch?: boolean

    开启状态下会启用fetch.keepalive上报action

  • Optional proxyRequest?: AxiosInstance | null

    proxy request

  • Optional staticBase?: string

    静态资源地址

  • Optional trackOriginOpenId?: boolean

    分享中带上openid,访问时上报originOpenId

  • Optional uaId?: string

    全局的uaId配置

Variables

config

config: Required<BaseConfig> = ...

isInFrame

isInFrame: boolean = ...

判断是否在iframe中

isProduction

isProduction: boolean = ...

Functions

setConfig

  • 用于设置基础配置

    export

    Parameters

    Returns BaseConfig

    {BaseConfig}

Const shouldCheck

  • shouldCheck(): boolean
  • 判断是否在iframe中检查权限

    inner

    Returns boolean

Generated using TypeDoc