my.MQNFCTagReader

Description: Provides JavaScript API support for calling system NFC scanning function and reading data content in tags for mini programs

Sample Code

copy
my.call('MQNFCTagReader').then((res)=>{
  my.alert({content: res})
})

Parameters

N/A

Success Callback Function

Name

Type

Required

Description

success

Bool

true

Is the JSAPI call successful

code

Int

true

0: Successful,

-1: Failed,

Other codes, based on the error returned by the system

message

String

false

error message

result

Object

O

|typeNameFormat

Int

M

Specify the content type of payload data:

0- empty

1- nfcWellKnowledge

2- Media

3- absoluteURI

4- nfcExternal

5- Unknown

6- Unchanged

|type

String

O

Custom tag type

|identifier

String

O

Custom tag identification information

|payload

String

O

Custom tag data content