安装依赖
npm i @fingerprintjs/fingerprintjs
import FingerprintJS from '@fingerprintjs/fingerprintjs' // 引入
methods: {
// 获取设备或浏览器唯一标识
async getvisitorId() {
const fp = await FingerprintJS.load()
const result = await fp.get()
const visitorId = result.visitorId
console.log('唯一标识', visitorId)
},
}
网友评论