|
@@ -73,7 +73,7 @@ import {
|
|
|
// 导入弹窗放大样式
|
|
|
import '@/assets/css/form.css'
|
|
|
// 客户调出收发货地址
|
|
|
-import {corpAddr} from "@/components/function/corpAddrSelect"
|
|
|
+import { corpAddr } from "@/components/function/corpAddrSelect"
|
|
|
//获取浏览器指纹并生成ID
|
|
|
import Fingerprint2 from 'fingerprintjs2'
|
|
|
Vue.component('trackPlayback', trackPlayback);
|
|
@@ -139,11 +139,11 @@ iconfontVersion.forEach(ele => {
|
|
|
Vue.prototype.getColumnName = getColumnName
|
|
|
Vue.prototype.getColumnData = getColumnData
|
|
|
Vue.prototype.saveColumnData = saveColumnData
|
|
|
-Vue.prototype.delColumnData=delColumnData
|
|
|
+Vue.prototype.delColumnData = delColumnData
|
|
|
//进入详情页时,保存id和其他参数
|
|
|
-Vue.prototype.inDetailsKey=inDetailsKey
|
|
|
+Vue.prototype.inDetailsKey = inDetailsKey
|
|
|
//离开详情页时,清除对应key的id和其他参数
|
|
|
-Vue.prototype.leaveDetailsKey=leaveDetailsKey
|
|
|
+Vue.prototype.leaveDetailsKey = leaveDetailsKey
|
|
|
Vue.config.productionTip = false;
|
|
|
Vue.prototype.corpAddr = corpAddr;
|
|
|
// 业务锁
|
|
@@ -174,7 +174,7 @@ Vue.directive("input-limit", {
|
|
|
flag = true;
|
|
|
});
|
|
|
target.addEventListener("input", e => {
|
|
|
- setTimeout(function() {
|
|
|
+ setTimeout(function () {
|
|
|
if (flag) {
|
|
|
if (binding.value == 0) {
|
|
|
if (wins_0.test(e.target.value)) {
|
|
@@ -203,7 +203,7 @@ Vue.directive("input-limit", {
|
|
|
if (!no_int) {
|
|
|
e.target.value = e.target.value.replace(wins_1, "").replace('.', '$#$').replace(/\./g, '').replace(
|
|
|
'$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').substring(0, e.target.value.indexOf(
|
|
|
- ".") + 2)
|
|
|
+ ".") + 2)
|
|
|
} else {
|
|
|
e.target.value = e.target.value.replace(wins_0, "")
|
|
|
}
|
|
@@ -231,7 +231,7 @@ Vue.directive("input-limit", {
|
|
|
if (!no_int) {
|
|
|
e.target.value = e.target.value.replace(wins_1, "").replace('.', '$#$').replace(/\./g, '').replace(
|
|
|
'$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').substring(0, e.target.value.indexOf(
|
|
|
- ".") + 3)
|
|
|
+ ".") + 3)
|
|
|
} else {
|
|
|
e.target.value = e.target.value.replace(wins_0, "")
|
|
|
}
|
|
@@ -259,7 +259,7 @@ Vue.directive("input-limit", {
|
|
|
if (!no_int) {
|
|
|
e.target.value = e.target.value.replace(wins_1, "").replace('.', '$#$').replace(/\./g, '').replace(
|
|
|
'$#$', '.').substring(0, e.target.value.indexOf(
|
|
|
- ".") + 5)
|
|
|
+ ".") + 5)
|
|
|
} else {
|
|
|
e.target.value = e.target.value.replace(wins_0, "")
|
|
|
}
|
|
@@ -271,8 +271,20 @@ Vue.directive("input-limit", {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
-Fingerprint2.get(function(components) {
|
|
|
- const values = components.map(function(component,index) {
|
|
|
+
|
|
|
+Vue.directive('debounce', { //防抖函数指令
|
|
|
+ inserted: function (el, binding) {
|
|
|
+ el.addEventListener("click", () => {
|
|
|
+ if (!el.disabled)
|
|
|
+ el.disabled = true
|
|
|
+ setTimeout(() => {
|
|
|
+ el.disabled = false
|
|
|
+ }, binding.value || 1000);
|
|
|
+ });
|
|
|
+ }
|
|
|
+})
|
|
|
+Fingerprint2.get(function (components) {
|
|
|
+ const values = components.map(function (component, index) {
|
|
|
if (index === 0) {
|
|
|
return component.value.replace(/\bNetType\/\w+\b/, '')
|
|
|
}
|
|
@@ -280,7 +292,7 @@ Fingerprint2.get(function(components) {
|
|
|
})
|
|
|
// 生成最终id murmur
|
|
|
const murmur = Fingerprint2.x64hash128(values.join(''), 31)
|
|
|
- if(localStorage.getItem('browserID')!=murmur){
|
|
|
- localStorage.setItem('browserID',murmur)
|
|
|
+ if (localStorage.getItem('browserID') != murmur) {
|
|
|
+ localStorage.setItem('browserID', murmur)
|
|
|
}
|
|
|
})
|