跳到主要内容

bn.scanCode

scanCode(options?): Promise<ScanCodeResponse>

description Set up the client scan interface to scan the code

example

 bn.scanCode({ success(res) {} })

Parameters

NameType
options?ScanCodeOptions

Returns

Promise<ScanCodeResponse>

ScanCodeResponse

Interface: ScanCodeOptions

NameTypeDescription
scanType?string[]Scan code type, eg: ['barCode', 'qrCode']. barCode: One-dimensional code, qrCode: two-dimensional barcode.

Interface: ScanCodeResponse

NameTypeDescription
resultstringThe contents of the scanned code
scanTypestringType of code scanned