|
@@ -57,6 +57,8 @@ import {
|
|
|
import '@/assets/css/form.css'
|
|
|
// 客户调出收发货地址
|
|
|
import {corpAddr} from "@/components/function/corpAddrSelect"
|
|
|
+//获取浏览器指纹并生成ID
|
|
|
+import Fingerprint2 from 'fingerprintjs2'
|
|
|
Vue.component('selectComponent', selectComponent);
|
|
|
Vue.component('warehouseSelect', warehouseSelect);
|
|
|
Vue.component('goodsSelect', goodsSelect);
|
|
@@ -237,3 +239,15 @@ Vue.directive("input-limit", {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+Fingerprint2.get(function(components) {
|
|
|
+ const values = components.map(function(component,index) {
|
|
|
+ if (index === 0) { //把微信浏览器里UA的wifi或4G等网络替换成空,不然切换网络会ID不一样
|
|
|
+ return component.value.replace(/\bNetType\/\w+\b/, '')
|
|
|
+ }
|
|
|
+ return component.value
|
|
|
+ })
|
|
|
+ console.log(values)
|
|
|
+ // 生成最终id murmur
|
|
|
+ const murmur = Fingerprint2.x64hash128(values.join(''), 31)
|
|
|
+ console.log(murmur)
|
|
|
+})
|