保利威文档中心

帮助中心

观看条件 - 白名单观看

更新时间:2024-10-10 17:27:10

一、设置信息

1.1 白名单观看条件设置信息

Interface 接口: AuthSettingItemPhone

属性名 说明 类型
authType 条件类型 Phone
privacyContent 隐私声明内容 string
privacyStatus 是否开启隐私声明 YN
authTips 欢迎标题 string
whiteListEntryText 入口文本 null | string
whiteListInputTips 输入提示 string

二、使用方式

2.1 验证白名单观看

Api 方法: verifyPhoneAuth(params: VerifyPhoneAuthParams): Promise<VerifyPhoneAuthResult>

参数说明:

  • params:白名单参数,VerifyPhoneAuthParams 类型,必传,详细类型说明如下
参数名 说明 类型 必须 默认值
phone 会员码信息 string -

返回值说明: 授权结果,Promise<VerifyPhoneAuthResult> 类型

示例:

// 执行白名单授权
async function toDoAuthPhone(phone) {
  const result = await watchCore.auth.verifyPhoneAuth({
    phone,
  });
  if (result.success) {
    await handleAuthVerifySuccess(result);
  } else {
    await handleAuthVerifyFail(result);
  }
}
联系客服,在线咨询