From 9571eb3a15046bf12dae06f58d567b9a8a307e66 Mon Sep 17 00:00:00 2001 From: Lawrence <1934378145@qq.com> Date: 星期三, 27 一月 2021 15:24:28 +0800 Subject: [PATCH] 增加移动位置显示功能 --- web_src/src/main.js | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web_src/src/main.js b/web_src/src/main.js index 03bb4a4..5e0696b 100644 --- a/web_src/src/main.js +++ b/web_src/src/main.js @@ -12,21 +12,21 @@ import { Notification } from 'element-ui'; import Fingerprint2 from 'fingerprintjs2'; -// 生成唯一ID +// 鐢熸垚鍞竴ID Fingerprint2.get(function(components) { const values = components.map(function(component,index) { - if (index === 0) { //把微信浏览器里UA的wifi或4G等网络替换成空,不然切换网络会ID不一样 + if (index === 0) { //鎶婂井淇℃祻瑙堝櫒閲孶A鐨剋ifi鎴�4G绛夌綉缁滄浛鎹㈡垚绌�,涓嶇劧鍒囨崲缃戠粶浼欼D涓嶄竴鏍� return component.value.replace(/\bNetType\/\w+\b/, ''); } return component.value; }) - //console.log(values) //使用的浏览器信息npm - // 生成最终id + //console.log(values) //浣跨敤鐨勬祻瑙堝櫒淇℃伅npm + // 鐢熸垚鏈�缁坕d let port = window.location.port; console.log(port); const fingerPrint = Fingerprint2.x64hash128(values.join(port), 31) Vue.prototype.$browserId = fingerPrint; - console.log("唯一标识码:" + fingerPrint); + console.log("鍞竴鏍囪瘑鐮侊細" + fingerPrint); }); Vue.use(VueClipboard); -- Gitblit v1.8.0