观看条件 - 白名单观看
更新时间:2026-03-16 09:21:59
一、设置信息
1.1 白名单观看条件设置信息
Interface 接口: AuthSettingItemPhone
| 属性名 | 说明 | 类型 |
|---|---|---|
authType |
条件类型 | Phone |
enabled |
是否启用 | null | YN |
privacyContent |
隐私声明内容 | string |
privacyStatus |
是否开启隐私声明 | YN |
authTips |
欢迎标题 | string |
whiteListEntryText |
入口文本 | null | string |
whiteListInputTips |
输入提示 | string |
二、使用方式
2.1 验证白名单观看
Api 方法: verifyPhoneAuth(params: VerifyPhoneAuthParams): Promise<VerifyPhoneAuthResult>
参数说明:
- params:白名单参数,
VerifyPhoneAuthParams类型,必传
返回值说明: 授权结果,Promise<VerifyPhoneAuthResult> 类型
示例:
// 执行白名单授权
async function toDoAuthPhone(phone) {
const result = await watchCore.auth.verifyPhoneAuth({
phone,
});
if (result.success) {
await handleAuthVerifySuccess(result);
} else {
await handleAuthVerifyFail(result);
}
}
