保利威文档中心

幫助中心

觀看條件 - 白名單觀看

更新時間: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);
  }
}
联系客服,在线咨询