fingerprintjs 其他安装方法 https://github.com/fingerprintjs/fingerprintjs#upgrade-guide-from-182-to-200
npm i @fingerprintjs/fingerprintjs # or yarn add @fingerprintjs/fingerprintjs
// 引入已安装好的fingerprintjs import FingerprintJS from '@fingerprintjs/fingerprintjs'; (async () => { // We recommend to call `load` at application startup. const fp = await FingerprintJS.load(); // The FingerprintJS agent is ready. // Get a visitor identifier when you'd like to. const result = await fp.get(); // This is the visitor identifier: const visitorId = result.visitorId; console.log(visitorId); })();
示例(uni-App):