Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat Small Program API NFC Mifare Ultralight label


May 19, 2021 WeChat Mini Program Development Document


Table of contents


MifareUltralight

Base library 2.11.2 starts to be supported, and low versions need to be compatible.

Mifare Ultralight label


Method:

MifareUltralight.close(Object object)

Base library 2.11.2 starts to be supported, and low versions need to be compatible.

Disconnect

Parameters

Object object

Property Type The default Required Description
success function Whether The interface calls a successful callback function
fail function Whether The interface calls the failed callback function
complete function Whether Callback function at end of interface call (call succeeds, fails are executed)


MifareUltralight.connect(Object object)

Base library 2.11.2 starts to be supported, and low versions need to be compatible.

Connect the NFC label

Parameters

Object object

Property Type The default Required Description
success function Whether The interface calls a successful callback function
fail function Whether The interface calls the failed callback function
complete function Whether Callback function at end of interface call (call succeeds, fails are executed)


MifareUltralight.getMaxTransceiveLength(Object object)

Base library 2.11.2 starts to be supported, and low versions need to be compatible.

Gets the maximum transfer length

Parameters

Object object

Property Type The default Required Description
success function Whether The interface calls a successful callback function
fail function Whether The interface calls the failed callback function
complete function Whether Callback function at end of interface call (call succeeds, fails are executed)

object.success callback function

Parameters
Object res
Property Type Description
length number Maximum transmission length


MifareUltralight.setTimeout(Object object)

Base library 2.11.2 starts to be supported, and low versions need to be compatible.

Set a timeout

Parameters

Object object

Property Type The default Required Description
timeout number Is Set timeout (ms)
success function Whether The interface calls a successful callback function
fail function Whether The interface calls the failed callback function
complete
function Whether Callback function at end of interface call (call succeeds, fails are executed)


MifareUltralight.transceive(Object object)

Base library 2.11.2 starts to be supported, and low versions need to be compatible.

Send data

Parameters

Object object

Property Type The default Required Description
data ArrayBuffer Is The binary data that needs to be passed
success function Whether The interface calls a successful callback function
fail function Whether The interface calls the failed callback function
complete function Whether Callback function at end of interface call (call succeeds, fails are executed)

object.success callback function

Parameters
Object res
Property Type Description
data ArrayBuffer