VUE用fingerprintjs2.js获取浏览器指纹并生成ID,且WIFI和4G状态下ID保持一致


Warning: getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /home/wwwroot/xiedandan.com/content/templates/xiedandan/log_list.php on line 14

Warning: getimagesize(): Failed to enable crypto in /home/wwwroot/xiedandan.com/content/templates/xiedandan/log_list.php on line 14

Warning: getimagesize(https://xiedandan.com/content/uploadfile/201911/54031574836878.jpg): failed to open stream: operation failed in /home/wwwroot/xiedandan.com/content/templates/xiedandan/log_list.php on line 14
首先安装浏览器指纹插件fingerprintjsnpm install --save fingerprintjs2然后引入import Fingerprint2 from 'fingerprintjs2' 官方给的演示代码生成的指纹ID在大部分浏览器都没问题,就是在微信浏览器里因为UA多了网络字段,所以导致生成的ID不一样。把NetType/**网络部分替换成空,就能确保微信浏览器里切换4G或者WIFI网络后,指纹ID也能保持一致了。阅读全文>>
阅读全文