my.MQFetchDeviceIPAddress

Obtain the current public IP address information of the device

Sample code

copy
my.call('MQFetchDeviceIPAddress').then((values)=>{
  my.alert({
    content:JSON.stringify(values)
  });
}).catch((value)=>{
  my.alert({
    title:'faile',
    content:JSON.stringify(value)
  });
})

Parameters

N/A

Success Callback Function

Property

Type

Optional/Mandatory

Description

success

Bool

M

Whether JSAPI is successfully invoked

code

Int

M

0:success

-1:failure

1001:params error

message

String

O

result

Object

O

response data

ipaddress

String

M

response device ip address