HarmonyOS SDK Description
- JVerificationInterface,include SDK All interfaces
Settings Debug Mode
Supported version
Supported since version 1.0.0
API definition
- JVerificationInterface.setDebugMode(enable: boolean)
- Description:
- Settings to open debug Mode.true will print more log information. Recommendation init Call before interface.
- Parameters:
- enable:debug Switches
- Example:
JVerificationInterface.setDebugMode(true);
JVerificationInterface.setDebugMode(true);
This code block is shown in the floating window
SDK Initialize
Supported version
Supported since version 1.0.0
API definition
- JVerificationInterface.init(context:common.ApplicationContext,
appkey:string, callback:(code:number, msg:string)=>void)
- Description:
- Initialization interface.
- Parameters:
- contextGlobalcontext(Systems get context out of time, need to enter as parameters)
- callback:Return interface
- appkey:Jiguangappkey
- Callback:
- code: Return code.8000 The initialization was successful, the others failed, as detailedError CodeDescription
- msg: ResultsDescription
- Example:
JVerificationInterface.init(this.getUIContext().getHostContext()!.getApplicationContext(),"你的APPKEY", (code, msg) => {
});
JVerificationInterface.init(this.getUIContext().getHostContext()!.getApplicationContext(),"你的APPKEY", (code, msg) => {
});
This code block is shown in the floating window
Successful initialization
Supported version
Supported since version 1.0.0
API definition
- JVerificationInterface.isInitSuccess()
- Description:
- Access sdk Identification of success in overall initialization
- Return value
- boolean: true - Success.false - Failed.
- Example:
let isSuccess = JVerificationInterface.isInitSuccess();
let isSuccess = JVerificationInterface.isInitSuccess();
This code block is shown in the floating window
Judge whether the network environment supports one-tap login
Supported version
Supported since version 1.0.0
API definition
- async JVerificationInterface.checkVerifyEnable()
- Description:
- The current mobile phone network environment is judged to be usable for authentication.
- Return value:
- Back true delegates can use;return false Other means of verification were suggested.
- Example:
let verifyEnable = await JVerificationInterface.checkVerifyEnable();
let verifyEnable = await JVerificationInterface.checkVerifyEnable();
This code block is shown in the floating window
Preclaim number
- **SDK Caches the pretake result, and lifts the authorized page at a speed. It is therefore proposed to pull up the authorized page, e.g. by pre-altering this interface to a pre-take number on an open or business entry page. **
- **Request succeeded, do not repeat calls frequently. **
- ** Do not repeat the pre-number or pull up the authorized page interface in the pre-number callback. **
Supported version
Supported since version 1.0.0
API definition
- JVerificationInterface.prelogin(callback:(code:number, msg:string, operatorMsg:string)=>void, timeout = 10000)
- Description:
- Authenticate CurrentCarrierCan the network perform a key?LoginOperation, this method will cache access to number information, raise one-tap loginEfficiency. Suggests to launch one-tap loginThis method is called first.
- Parameters:
- timeOut: Timeout (ms), effective range (ms)5000,30000, if less than equal 5000 Or greater 30000 Take Default 10000. Recommended settings as 5001-10000.
- listenerInterface echoes
- Callback:
- code: Return code.7000 Representative success, others failure, as detailedError CodeDescription
- content: Call result informationDescription
- carrierMsg: CarrierInformation
- Example:
JVerificationInterface.prelogin((code,msg,operateRet)=>{
console.log("code:" + code + ", msg:" + msg + ", operateRet:" + operateRet);
});
JVerificationInterface.prelogin((code,msg,operateRet)=>{
console.log("code:" + code + ", msg:" + msg + ", operateRet:" + operateRet);
});
This code block is shown in the floating window
Let's see if the precept is valid.
Supported version
Supported since version 1.0.0
API definition
- async JVerificationInterface.isValidePreloginCache()
- Description:
- Determines whether the current precept number is valid.
- Return value:
- Back true delegates can use;return false Other means of verification were suggested.
- Example:
let enable = await JVerificationInterface.isValidePreloginCache();
let enable = await JVerificationInterface.isValidePreloginCache();
This code block is shown in the floating window
Clear Pretract Cache
Supported version
Supported since version 1.0.0
API definition
- JVerificationInterface.clearPreLoginCache()
- Description:
- Clear sdk failed
- Example:
JVerificationInterface.clearPreLoginCache();
JVerificationInterface.clearPreLoginCache();
This code block is shown in the floating window
Pull up authorized pages
- ** one-tap loginWe need to rely on pre-number results. If there's no pre-number, one key.Login**
- ** It is proposed to pull up the authorized page, e.g., by pre-altering this interface to a pre-alignment number on the open page or the business entry page, to increase the speed of the authorized page and optimize the experience. **
- ** one-tap loginRequest succeeded, do not repeat calls frequently.CarrierThe number of requests will be limited in unit time. **
- ** Not in one-tap loginRepeats in the return call with the pre-number or pulls up the authorized page interface. **
Supported version
Supported since version 1.0.0
API definition
- JVerificationInterface.loginAuth(settings:JVerificationLoginSettings, callback:(code:number, msg:string, operatorMsg:string)=>void)
- Description:
- Raise one-tap loginPermission page obtained with user authorization loginToken
- Parameters:
- settings:LoginInterface settings.
- callback:LoginThe results are being reversed.
- Callback:
- code: Return code.6000 Representative loginToken failed.6001 Representative loginToken failedDescription
- content: return code explanatory information, if successful, content information representative loginToken。
- carrierReturn: CarrierOutcome information
- Example:
let settings = new JVerificationLoginSettings();
JVerificationInterface.loginAuth(settings, (code,msg,operateRet)=>{
console.log("code:" + code + ", msg:" + msg + ", operateRet:" + operateRet);
});
let settings = new JVerificationLoginSettings();
JVerificationInterface.loginAuth(settings, (code,msg,operateRet)=>{
console.log("code:" + code + ", msg:" + msg + ", operateRet:" + operateRet);
});
This code block is shown in the floating window
One-Tap LoginParametersJVerificationLoginSettings
export class JVerificationLoginSettings {
autoFinish = true//自动关闭
timeout = 10*1000//超时时间
authPageEventListener?:JVAuthPageEventListener//事件listener
context: UIContext //ui上下文
navPathStack?: NavPathStack //导航栈,isRouter为false时需要设置;必填 1.2.2版本开始 移动强制要求使用Navigation
isRouter = true //是否使用router打开,如果需要使用导航模式打开需要设置为false,仅在电信,联通情况下生效
constructor(context: UIContext) {
this.context = context;
}
}
export class JVerificationLoginSettings {
autoFinish = true
timeout = 10*1000
authPageEventListener?:JVAuthPageEventListener
context: UIContext
navPathStack?: NavPathStack
isRouter = true
constructor(context: UIContext) {
this.context = context;
}
}
This code block is shown in the floating window
Note: Acquire one-tap loginYes. loginToken then return it to the application service and call it from the service provider REST API To get a cell phone number.
Page Time BackJVAuthPageEventListener
export type JVAuthPageEventListener = (code:number, msg:string)=>void
export type JVAuthPageEventListener = (code:number, msg:string)=>void
This code block is shown in the floating window
Event codes
| code |
message |
Notes |
| 1 |
login activity closed. |
Enabling Page Close Event |
| 2 |
login activity started. |
Enabled Page Open Event |
| 3 |
carrier privacy clicked. |
CarrierProtocol Click Event |
| 3 |
privacy clicked. |
Custom Protocol Click Event |
| 6 |
checkbox checked. |
Protocol Bar checkbox |
| 7 |
checkbox unchecked. |
Protocol Bar checkbox |
| 8 |
login button clicked. |
One-Tap Loginbutton (under available status) |
Close Authorized Page
Supported version
Supported since version 1.0.0
API definition
- JVerificationInterface.dismissLoginAuthActivity(context: UIContext)
- Parameters:
- contextPageuicontext
- Description:
- CloseLoginMandate page, if the current mandate is in progress loginAuth The interface will trigger immediately. 6002 Cancel the callback.
- Support for movement, connectivity, telecommunications
- Example:
JVerificationInterface.dismissLoginAuthActivity()
JVerificationInterface.dismissLoginAuthActivity()
This code block is shown in the floating window
Close the privacy protocol second window.
Supported version
Supported since version 1.1.0
API definition
- JVerificationInterface.closeCheckDialog()
- Description:
- Close the privacy protocol second window.
- Access only, telecommunications
- Example:
JVerificationInterface.closeCheckDialog()
JVerificationInterface.closeCheckDialog()
This code block is shown in the floating window
Customise authorized page UI styles
Supported version
Supported since version 1.1.0
API definition
- JVerificationInterface.setCustomUIWithConfig(config:JVerifyUIConfig)
- Description:
- Modify the authorized page theme by setCustomUIWithConfig Method changes to authorized page theme, need to loginAuth Call before interface
- Parameters:
- uiConfig: Theme profiler, developer in JVerifyUIConfig.java Category calls the corresponding method to configure the corresponding elements in the authorized page, for details JVerifyUIConfig Configure Element Description。
- Example:
let builder = new JVerifyUIConfigBuilder();
builder.enableDialogMode(true).setDialogWidth(275).setDialogHeight(400).setLogoOffsetY(30).setDialogPage(this).setLogBtnOffsetY(30).setLogBtnWidth(150).setPrivacyMargin({left:10, right:20, bottom:20})................................
let uiconfig:JVerifyUIConfig = builder.build();
JVerificationInterface.setCustomUIWithConfig(uiconfig);
let builder = new JVerifyUIConfigBuilder();
builder.enableDialogMode(true).setDialogWidth(275).setDialogHeight(400).setLogoOffsetY(30).setDialogPage(this).setLogBtnOffsetY(30).setLogBtnWidth(150).setPrivacyMargin({left:10, right:20, bottom:20})................................
let uiconfig:JVerifyUIConfig = builder.build();
JVerificationInterface.setCustomUIWithConfig(uiconfig);
This code block is shown in the floating window
- Supported version :1.1.0
- Use JVerifyUIConfigBuilder Configure Correlation Properties
- Set Mandate Page Background
- One-Tap Login-Blast Window Mode
| Methodology |
Parameter Type |
Annotations |
| enableDialogMode |
boolean |
Set AstrueTime click window mode, defaultfalse |
| setDialogPage |
object |
The one who shows the window.ComponentPage |
| setDialogWidth |
number |
Window width |
| setDialogHeight |
number |
Window height |
| Methodology |
Parameter Type |
Annotations |
| setAuthBGImgPath |
string |
Background pictures |
| setAuthBGVideoPath |
string,string |
Parameter 1: Background video to set onresources/rawfileUnder Catalogue Parameter 2: Video preload prepreset pictures |
| setAuthBGGifPath |
string |
gifBackground pictures |
| Methodology |
Parameter Type |
Annotations |
| setAuthPageFontFollowSystem |
boolean |
One-Tap LoginWhether the page font follows the font size of the system, default true;as false Time page fonts do not change with system settings |
- Safe area and Back button
| Methodology |
Parameter Type |
Annotations |
| setTopSafeAreaHeight |
number |
Top security height |
| setBottomSafeAreaHeight |
number |
Bottom level secure. |
| setReturnBtnImgPath |
string |
Return Button Picture |
| setReturnBtnHidden |
boolean |
Whether to hide back buttons |
| setReturnBtnWidth |
number |
Return button width |
| setReturnBtnHeight |
number |
Return button height |
| setReturnBtnOffsetX |
number |
Return button x-axis offset |
| setReturnBtnOffsetY |
number |
Return button y-axis offset |
| Methodology |
Parameter Type |
Annotations |
| setLogoImgPath |
string |
logoPicture |
| setLogoWidth |
number |
SettingslogoWidth |
| setLogoHeight |
number |
SettingslogoHeight |
| setLogoOffsetX |
number |
logo x-axis Offset |
| setLogoOffsetY |
number |
logo y-axis Offset |
| setLogoHidden |
boolean |
Whether to hidelogo |
| Methodology |
Parameter Type |
Annotations |
| setNumberColor |
ResourceColor |
Cell phone number colour |
| setNumberSize |
number |
Cell phone number |
| setNumberFieldOffsetX |
number |
Cell phone number x-axis offset |
| setNumberFieldOffsetY |
number |
Cellular y-axis Offset |
| setNumberFieldWidth |
number |
Width of cell phone text |
| setNumberFieldHeight |
number |
Cell phone text height |
| setNumberTextBold |
boolean |
Is the cell number thicker? |
| Methodology |
Parameter Type |
Annotations |
| setSloganTextColor |
ResourceColor |
sloganColours |
| setSloganTextSize |
number |
sloganCharacter |
| setSloganOffsetX |
number |
slogan x-axis Offset |
| setSloganOffsetY |
number |
slogan y-axis Offset |
| setSloganTextBold |
boolean |
sloganIs it thicker? |
| Methodology |
Parameter Type |
Annotations |
| setLogBtnText |
string |
LoginButton Text |
| setLogBtnTextColor |
ResourceColor |
LoginButton Text Colour |
| setLogBtnBackgroundColor |
number |
Loginbutton background colour, default 0x359af3 |
| setLogBtnBorderRadius |
number |
Loginbutton round radians, default 16 |
| setLogBtnImgPath |
string |
LoginButton Background Picture |
| setLogBtnOffsetX |
number |
LoginButton x-axis Offset |
| setLogBtnOffsetY |
number |
LoginButton y-axis Offset |
| setLogBtnWidth |
number |
LoginButton width |
| setLogBtnHeight |
number |
LoginButton height |
| setLogBtnTextSize |
number |
LoginButton Text Font |
| setLogBtnTextBold |
boolean |
LoginWhether buttons are thicker |
| Methodology |
Parameter Type |
Annotations |
| setPrivacyColor |
ResourceColor,ResourceColor |
Parameter 1: Private protocol base colour Parameter 2: Private protocol base colour |
| setPrivacyMargin |
Margin |
Privacy protocol edge distancetopProperties OnlysetStackLayoutYestruein force since then) |
| setPrivacyText |
string,string |
Parameter 1: Privacy protocol pretext Parameter 2: Privacy protocol backtext |
| setUncheckedImgPath |
string |
When not selectedcheckboxPicture |
| setCheckedImgPath |
string |
When SelectedcheckboxPicture |
| setPrivacyState |
boolean |
Privacy protocol tick status |
| setPrivacyTextCenterGravity |
boolean |
Whether privacy agreements are in the middle |
| setPrivacyTextSize |
number |
Privacy protocol character |
| setPrivacyCheckboxSize |
number |
checkboxDimensions |
| setPrivacyCheckboxInCenter |
boolean |
checkboxWhether to centre vertically |
| setEnableHintToastText |
string |
Click on without ticking privacy protocolLoginHint text |
| setEnablePrivacyCheckDialog |
boolean |
Whether or not to support a second bullet window for privacy protocol |
| setPrivacyTextBold |
boolean |
Whether privacy agreements are thicker |
| setPrivacyUnderlineText |
boolean |
Whether privacy protocols add a underlined |
| setPrivacyNameAndUrlBeanList |
Array |
Privacy protocol array |
| setPrivacyWithBookTitleMark |
boolean |
Privacy protocol added book names |
- PrivacyBean-Privacy protocol model
| Methodology |
Parameter Type |
Annotations |
| name |
string |
Page Name |
| url |
string |
urlAddress |
| separator |
string |
Separator |
| text |
string |
Show text |
| Methodology |
Parameter Type |
Annotations |
| setPrivacyNavColor |
ResourceColor |
Private Protocol Page Navigator Color |
| setPrivacyNavTitleTextColor |
ResourceColor |
Private protocol page navigator title colour |
| setPrivacyNavTitleTextSize |
number |
Private protocol page navigation column title character |
| setPrivacyNavReturnBtnPath |
string |
Private Protocol Page Navigator Return Button Picture |
| setPrivacyNavTitleTextBold |
boolean |
Whether the title of the private protocol page navigator is thicker |
- Privacy protocol double-barrel
| Methodology |
Parameter Type |
Annotations |
| setPrivacyCheckDialogTitleText |
string |
Second bullet window title |
| setPrivacyCheckDialogLogBtnText |
string |
Second bullet window.LoginButton Text |
| setPrivacyCheckDialogTitleTextSize |
number |
Second bullet window title text font |
| setPrivacyCheckDialogTitleTextColor |
ResourceColor |
Second bullet window title colour |
| setPrivacyCheckDialogContentTextGravityCenter |
boolean |
Whether the second bullet window content should be centered |
| setPrivacyCheckDialogContentTextSize |
number |
Second bullet window contents |
| setPrivacyCheckDialogContentTextMargin |
Margin |
Distance to the edge of the second bullet window contents |
| setPrivacyCheckDialogLogBtnImgPath |
string |
Second bullet window.LoginButton Background Picture |
| setPrivacyCheckDialoglogBtnTextColor |
ResourceColor |
Second bullet window.LoginButton Text Colour |
| setPrivacyCheckDialogWidth |
number |
Width of secondary bullet windows |
| setPrivacyCheckDialogHeight |
number |
Second bullet window height |
| setPrivacyCheckDialogLogBtnWidth |
number |
Second bullet window.LoginButton width |
| setPrivacyCheckDialogLogBtnHeight |
number |
Second bullet window.LoginButton height |
| setPrivacyCheckDialogLogBtnMargin |
Margin |
Second bullet window.LoginPress edge distance |
| setPrivacyCheckDialogBackgroundColor |
ResourceColor |
Second bullet window background colour |
| setPrivacyCheckDialogBackgroundImgPath |
string |
A second window background picture |
| Methodology |
Parameter Type |
Annotations |
| addCustomView |
WrappedBuilder<[]> |
Set a custom @Builder UI on the one-tap login page |
| addCustomViewToCheckDialog |
WrappedBuilder<[]> |
Set a custom @Builder UI on the secondary dialog |
| setStackLayout |
boolean |
SettingssloganPhone mask,Loginbutton, the protocol layout isStack, you can change the vertical order |
- Import one-tap loginDefault pictures used for pages
- Need to SDKImport a picture toAppScope/resources/base/mediaFolder
| Filename |
Annotations |
| jverify_background.png |
One-Tap LoginMain background picture |
| jverify_ctlogo.png |
Telecommunicationslogo |
| jverify_culogo.png |
Connectlogo |
| jverify_dialog_background.png |
One-Tap LoginWindow Background Picture |
| jverify_dialog_close.png |
One-Tap LoginBlast window off button |
| jverify_return.png |
One-Tap LoginPage Off Button |
Because of movementCarrier SDK Provides a complete set of UIs without being able to remove their UIs and then customize the design, so the move needs to be built using the mobile provided UI builderCarrierUi.
Specific configuration elements readMove UI Configuration Element Description
| Methodology |
Parameter Type |
Annotations |
| setCmUIConfig |
GenAuthThemeConfigBuilder |
Configure Move UI |
Description of moving UI configuration elements
- Supported version :1.1.0
- Use GenAuthThemeConfigBuilder Configure Correlation Properties
- Set the background for moving authorized pages
cmUIConfig(jgBuilder: JVerifyUIConfigBuilder, isDialog: boolean) {
let builder = new GenAuthThemeConfigBuilder();
builder.setNumberMargin({top:100})
if (isDialog) {
builder.setWindowMode({ width:'80%', height:'50%' })
}
builder.setLogBtnText("登录")
builder.setLoginBtnTextColor(Color.White)
builder.setLoginBtnColor(Color.Black)
jgBuilder.setCmUIConfig(builder);
}
cmUIConfig(jgBuilder: JVerifyUIConfigBuilder, isDialog: boolean) {
let builder = new GenAuthThemeConfigBuilder();
builder.setNumberMargin({top:100})
if (isDialog) {
builder.setWindowMode({ width:'80%', height:'50%' })
}
builder.setLogBtnText("登录")
builder.setLoginBtnTextColor(Color.White)
builder.setLoginBtnColor(Color.Black)
jgBuilder.setCmUIConfig(builder);
}
This code block is shown in the floating window
| Methodology |
Annotations |
| setSystemBarProperties |
Sets the navigation bar, status bar properties in the window. |
| Methodology |
Annotations |
| setNavTextColor |
Set the font colour for the service title |
| setNavColor |
Set service title colour |
| setNavTextSize |
Set the font size of the service title |
| setClauseComponent |
Set service line title bar to customise view |
| Methodology |
Annotations |
| setLoginPageComponent |
Set Mandate Page Layout Customise View |
| setAuthPageGrayScale |
Set permission page greyscale value, range 0-1 |
| Methodology |
Annotations |
| setNumberColor |
Set the font colour for cell phone number |
| setNumberSize |
Set the size of the number bar fonts, thicker |
| setNumberMargin |
Set Bar Offset |
| setNumberAlignRuleOption |
Set the number bar relative layout offset rule |
| setNumberWidth |
Set the width of the number bar |
| setNumberHeight |
Set the height of the number bar |
| setClauseLineSpacing |
Set the privacy clause line spacing |
- Authorization PageLoginbutton
| Methodology |
Annotations |
| setLoginBtnWidth |
SettingsLoginButton width |
| setLoginBtnHeight |
SettingsLoginButton height |
| setLogBtnText |
SettingsLoginButton Text Contents |
| setLoginBtnTextSize |
Set AuthorizationLoginText font size |
| setLoginBtnTextColor |
Set AuthorizationLoginButton Font Colours |
| setLogBtnMargin |
SettingsLoginButton Edge Margin |
| setLoginBtnAlignRuleOption |
SettingsLoginButton Relative Layout Offset Rule |
| setLoginBtnImgPath |
SettingsLoginButton Background Picture |
| setLoginBtnColor |
SettingsLoginbutton. Optional Parameters loginBtnStateEffect:false No pressure effect,true Or an empty pressure effect. |
| setLoginBtnBorderRadius |
SettingsLoginbutton round corner |
| setLoginBtnBorderColor |
SettingsLoginButton Border Color |
| setLoginBtnBorderWidth |
SettingsLoginThick button border |
| setLogBtnClickListener |
SettingsLoginButton Click to listen to events |
| setLoginBtnDisabledTextColor |
Set the text colour for button ash |
| setLoginBtnDisabledColor |
Set the background color for button ash |
| setLoginBtnDisabledBorderColor |
Set the border colour for button ash |
| setLoginBtnDisabledBorderWidth |
Set the button to ash with a thick border |
| setLoginBtnDisabledImgPath |
Set background pictures for button ash |
- Authorise Page Privacy Bar
| Methodology |
Annotations |
| setClauses |
Agreement text, custom terms, links, font colours setting privacy clauses (Note: cannot be deleted)Carrierof the Agreement) |
| setClauseMargin |
Set the privacy clause margin |
| setClauseTextAlign |
Sets how privacy provisions are aligned, e.g. TextAlign.Center、TextAlign.Start |
| setClauseAlignRuleOption |
Sets rules for the distribution of privacy provisions relative to layout |
| setCheckBox |
Set the privacy clause ticker box wide |
| setClauseState |
Set the privacy box tick status |
| setCheckBoxMargin |
Sets the privacy box ticker margin |
| setCheckBoxShape |
Set the type of tick box (rounded rectangle/round) |
| setCheckBoxImg |
Settings checkbox Check and No pictures ticked |
| setCheckBoxAlignRuleOption |
Sets the privacy box offset rule against layout |
| setGenCheckBoxListener |
Set the authorized page tick box and LoginButton listening events |
| setGenCheckedChangeListener |
Sets whether an authorized page tick box is ticked for listening events |
| setCheckTipText |
Sets a custom text file for unchecked tips, and no hints without setting |
| setClauseNavMarginTop |
Set protocol page title bar margin top, range is 0-99, in Vp |
| Methodology |
Annotations |
| setWindowMode |
Sets the width, deviation, window properties, etc. of the authorized page window. |
| Methodology |
Annotations |
| setWebDomStorage |
Enable Web DOM Storage,true To enable. |
- Authorise Language Switches
| Methodology |
Annotations |
| setLanguageType |
Sets the default element language, 0 / / / / / / Chinese. |
- Pull up the authorization page.
| Methodology |
Annotations |
| setGenLoginPageInListener |
Sets the authorized page to successfully pull up the listening event. |
| Methodology |
Annotations |
| setClauseClickListener |
Set protocol click to listen,clauseClick: (clauseUrl: string, clauseName: string) => voidCall back. url and Protocol name. |
- protocol page off button configuration
| Methodology |
Annotations |
| setWebCloseImgPath |
Set off button icon |
| setWebCloseImgWidth |
Set the width of the closed button |
| setWebCloseImgHeight |
Set the height of the off button |
| setWebCloseImgMargin |
Set close button margin |
| setWebCloseImgAlignRuleOption |
Set Close button alignment |
| Methodology |
Annotations |
| setGenBackPressedListener |
Sets the authorized page to return the key listening event and enter the reference call GenBackPressedCallBack A secondary withdrawal of the authorized page can be achieved. |
- Authorized button listening
| Methodology |
Annotations |
| setGenAuthLoginListener |
Sets the authorized button to listen to events. User ClickLoginbutton is triggered if no protocol is ticked (context: UIContext, callBack: AuthLoginCallBack) allows for a second confirmation of the bullet window. |
| AuthLoginCallBack |
Permission to call back. Pass. onAuthLoginCallBack(b: booleanWhether or not to proceedLoginProcess, which allows for secondary window confirmation. |
- Set Mandate Page Background
| Methodology |
Parameter Type |
Annotations |
| authPageType |
number |
LoginMode 0 full screen 1 bullet window |
| dialogPage |
object |
The one who shows the window.ComponentPage |
| btnName |
string |
Button Name |
| loginBtnColor |
number |
LoginButton ColourHEX |
| loginTextColor |
number |
LoginButton Text ColourHEX |
| privacyList |
string[][] |
Customize privacy protocols, ["Presentity protocol"] |
| customPolicyLinkColor |
number |
User protocol text colourHEX |
| cmDialogController |
CustomDialogController |
China Move Window one-tap loginSpecial. For the time being, you have to set the attribute to use it. |
Number authentication
Supported version
Supported since version 1.0.0
API definition
- JVerificationInterface.getToken(callback:(code:number, msg:string)=>void, timeout = 10000)
- Description:
- Access current online at scheduled time sim Carcass.Carrierand token, the interface return timed out of time if the time is exceeded.
- Parameters:
- timeOut: Timeout (ms), effective range (ms)5000,30000, if less than equal 5000 Or greater 30000 Take Default 10000. Recommended settings as 5001-10000.
- callbackInterface echoes
- Callback:
- code: Return code.2000 Representative success, others failure, as detailedError CodeDescription
- content: when successful token, which can be used to call the cell phone interface.token It is valid for one minute and requires re-acquisition before it can be used. failed
- carrierReturn: CarrierOutcome information
- Example:
JVerificationInterface.getToken((code,msg,operateRet)=>{
console.log("code:" + code + ", msg:" + msg + ", operateRet:" + operateRet);
});
JVerificationInterface.getToken((code,msg,operateRet)=>{
console.log("code:" + code + ", msg:" + msg + ", operateRet:" + operateRet);
});
This code block is shown in the floating window