Watch Conditions - CAPTCHA Verification
Updated: 2024-10-10 17:27:10
1. Configuration Information
1.1 CAPTCHA Watch Condition Settings
Interface: AuthSettingItemCode
| Property | Description | Type |
|---|---|---|
authType |
Condition Type | Code |
privacyContent |
Privacy Statement Content | string |
privacyStatus |
Enable Privacy Statement | YN |
codeAuthTips |
Welcome Title | string |
codeEntryText |
Entry Text | null | string |
qcodeImg |
QR Code Image URL | string |
qcodeTips |
QR Code Prompt Text | string |
2. Usage
2.1 Verify CAPTCHA for Watching
API Method: verifyCodeAuth(params: VerifyCodeAuthParams): Promise<VerifyCodeAuthResult>
Parameter Description:
- params: Call parameters, type
VerifyCodeAuthParams, required. Detailed type description is as follows:
| Parameter | Description | Type | Required | Default Value |
|---|---|---|---|---|
code |
CAPTCHA | string |
Yes | - |
Return Value Description: Authorization result, type Promise<VerifyCodeAuthResult>
Example:
// 执行验证码授权
async function toDoAuthCode(code) {
const result = await watchCore.auth.verifyCodeAuth({
code,
});
if (result.success) {
await handleAuthVerifySuccess(result);
} else {
await handleAuthVerifyFail(result);
}
}
// 传入验证码
toDoAuthCode('1234');
