觀看條件 - 白名單觀看
更新時間: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);
}
}
