Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

keyzf/DeviceJs

Repository files navigation

License MIT


安装

yarn add @skillnull/device-js
# or with npm
npm install @skillnull/device-js

使用

import Device from '@skillnull/device-js'
/**
* @params:{
* domain: <String> 生成浏览器指纹所需,不传默认使用window.location.host;
* info: <Array> 想要获取的信息,不传默认显示全部信息
* }
*
* @return: 返回 Promise 对象
*/
Device.Info({
 domain: 'your domain',
 info: ['OS', 'lanuage']
}).then(data => {
 console.log(data)
})

Device.Info().then(data => {
 console.log(data)
})

INFO 配置项

  • deviceType: 设备类型
  • OS: 操作系统
  • OSVersion: 操作系统版本
  • screenHeight: 屏幕高
  • screenWidth: 屏幕宽
  • language: 当前使用的语言-国家
  • netWork: 联网类型
  • orientation: 横竖屏
  • browserInfo: 浏览器信息
  • fingerprint: 浏览器指纹
  • userAgent: 包含 appCodeName,appName,appVersion,language,platform 等
  • geoPosition: 地理位置
  • date: 阳历日期时间
  • week: 周几
  • UUID: 通用唯一标识 Universally Unique Identifier

About

JS获取设备信息(操作系统信息、地理位置、UUID、横竖屏状态、设备类型、网络状态、浏览器信息、生成浏览器指纹、日期、周几等)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • JavaScript 87.4%
  • CSS 7.3%
  • HTML 4.8%
  • Shell 0.5%

AltStyle によって変換されたページ (->オリジナル) /