New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tuhu/native-interaction

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tuhu/native-interaction

native-interaction for tuhu arch

  • 0.1.8
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

native-interaction

与途虎IOS与Android客户端交互方法

var native = require('@tuhu/native-interaction')

native.getUserInfo().then(res => {
  console.log('res: ', res);
})
native.getDevice().then(res => {
  console.log('res: ', res);
})
native.getLocation().then(res => {
  console.log('res: ', res);
})
方法名参数返回值方法说明
getUserInfo-返回值1获取用户信息
getDevice-返回值2获取用户设备信息
getLocation-返回值3获取地理位置信息
返回值1
{
    islogin: true,
    userid: "2c17639a-a05b-46ac-966b-123b15b644cb",
    phone: "17621373772",
    name: "lijingwen@tuhu.cn",
    usersession: "8e75f4015a8b4931829fe0f7de7b8dee"
}
返回值2

row 字段为返回的原始值

{
  "blackBox":"eyJvcyI6ImFuZHJvaWQiLCJ2ZXJzaW9uIjoiMy4xLjEiLCJwYWNrYWdlcyI6ImNuLlR1SHUuYW5kcm9pZF81LjEuMCIsInByb2ZpbGVfdGltZSI6MTkyLCJpbnRlcnZhbF90aW1lIjozODIzODQsInRva2VuX2lkIjoiblNKT1NiazdNMXZxaForejJWRHdGSjkzanQ0SGl1RFdHQU4xOGdONm54ZWZPZlhmYVVEc3ZLRDBcLzFJSnE5dmk3ZnE1KzVlMHlEYXNHRW1hc3NMRGhnPT0ifQ==",
  "deviceId":"d8bd90d4-9c0a-3d81-815e-e91cbbfb11bf",
  "deviceModel":"_yuzhuang4",
  "deviceType":"NX511J",
  "deviceCarrier":"Unknown",
  "isGpsEnabled":true,
  "isNotifyEnabled":"",
  "lang":"zh",
  "model":"NX511J",
  "osName":"nubia",
  "osVersion":"5.1.1",
  "version":"5.1.0",
  "netWork":"wifi",
  "raw":{
    "device_type":"NX511J",
    "is_notify_enabled":false,
    "city":"上海市",
    "client_time":1509444370,
    "event_type":"get_info",
    "app_id":"android_app",
    "screen_resolution":"1920x1080",
    "app_name":"途虎养车",
    "network":"wifi",
    "is_gps_enabled":true,
    "device_carrier":"Unknown",
    "app_version":"5.1.0",
    "country":"CN",
    "device_id":"d8bd90d4-9c0a-3d81-815e-e91cbbfb11bf",
    "event_action":"get_info",
    "imei":"9261d262c97215531d7a9a26cba000e5",
    "location":"31.135892,121.403088",
    "lang":"zh",
    "device_model":"NX511J",
    "os_version":"5.1.1",
    "metadata":"{\"Source\":\"_yuzhuang4\"}",
    "level":"info",
    "os_name":"nubia",
    "deviceid":"d8bd90d4-9c0a-3d81-815e-e91cbbfb11bf",
    "blackbox":"eyJvcyI6ImFuZHJvaWQiLCJ2ZXJzaW9uIjoiMy4xLjEiLCJwYWNrYWdlcyI6ImNuLlR1SHUuYW5kcm9pZF81LjEuMCIsInByb2ZpbGVfdGltZSI6MTkyLCJpbnRlcnZhbF90aW1lIjozODIzODQsInRva2VuX2lkIjoiblNKT1NiazdNMXZxaForejJWRHdGSjkzanQ0SGl1RFdHQU4xOGdONm54ZWZPZlhmYVVEc3ZLRDBcLzFJSnE5dmk3ZnE1KzVlMHlEYXNHRW1hc3NMRGhnPT0ifQ==",
    "channel":"_yuzhuang4"
  } 
}

字段含义

字段类型描述
blackBoxString同盾黑盒子设备指纹
deviceIdString设备号
deviceModelString设备类型
deviceTypeString设备名称
deviceCarrierString网络运营商名
isGpsEnabledBool定位是否开启
isNotifyEnabledBool通知是否开启
langString系统语言
modelString设备型号
osNameString系统名称
osVersionString系统版本号
versionStringApp版本号
netWorkString网络状态
rawObject原生返回的所有数据,以上所有内容都包括在内

raw字段含义

详情参见IOS 交互文档

字段类型描述
versionStringApp版本号
UDIDString设备号
provinceString所选省份(首页可修改,默认取定位省份)
cityString所选城市(首页可修改,默认取定位城市)
districtString所选区(首页可修改,默认取定位区)
latitudeDouble定位纬度
longitudeDouble定位经度
blackBoxString同盾黑盒子设备指纹
is_gps_enabledBool定位是否开启
is_notify_enabledBool通知是否开启
screen_resolutionString屏幕分辨率(逻辑像素)
os_nameString系统名称
os_versionString系统版本号
device_carrierString网络运营商名
device_modelString设备类型
device_typeString设备名称
langString系统语言
countryString系统设置国家
locationString位置(经纬度)
network_statusString网络状态
modelString设备型号
返回值3
{
  "city":"上海市",
  "district":"闵行区",
  "info":"中国上海市闵行区万源路18号-1",
  "latitude":"31.136137",
  "longitude":"121.40296",
  "province":"上海市"
}

FAQs

Package last updated on 28 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc