保利威文档中心

幫助中心

觀看條件 - 驗證碼觀看

更新時間:2024-10-10 17:27:10

一、設定資訊

1.1 驗證碼觀看條件設定資訊

Interface 介面: AuthSettingItemCode

屬性名稱 說明 型別
authType 條件類型 Code
privacyContent 隱私聲明內容 string
privacyStatus 是否開啟隱私聲明 YN
codeAuthTips 歡迎標題 string
codeEntryText 入口文字 null | string
qcodeImg QR Code 圖片位址 string
qcodeTips QR Code 提示文案 string

二、使用方式

2.1 驗證驗證碼觀看

Api 方法: verifyCodeAuth(params: VerifyCodeAuthParams): Promise<VerifyCodeAuthResult>

參數說明:

  • params:呼叫參數,VerifyCodeAuthParams 型別,必傳,詳細型別說明如下
參數名稱 說明 型別 必須 預設值
code 驗證碼 string -

回傳值說明: 授權結果,Promise<VerifyCodeAuthResult> 型別

範例:

// 执行验证码授权
async function toDoAuthCode(code) {
  const result = await watchCore.auth.verifyCodeAuth({
    code,
  });
  if (result.success) {
    await handleAuthVerifySuccess(result);
  } else {
    await handleAuthVerifyFail(result);
  }
}

// 传入验证码
toDoAuthCode('1234');
联系客服,在线咨询