wvp-gb28181-project/web_src/src/main.js

47 lines
1.3 KiB
JavaScript
Raw Normal View History

2020-10-10 17:33:29 +08:00
import Vue from 'vue';
import App from './App.vue';
Vue.config.productionTip = false;
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from './router/index.js';
import axios from 'axios';
import VueCookies from 'vue-cookies';
import echarts from 'echarts';
import VueClipboard from 'vue-clipboard2';
2021-01-20 20:27:25 +08:00
import { Notification } from 'element-ui';
import Fingerprint2 from 'fingerprintjs2';
2021-01-20 20:27:25 +08:00
// <20><><EFBFBD><EFBFBD>ΨһID
Fingerprint2.get(function(components) {
const values = components.map(function(component,index) {
if (index === 0) { //<2F><>΢<EFBFBD><CEA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>UA<55><41>wifi<66><69>4G<34><47><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɿ<EFBFBD>,<2C><>Ȼ<EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID<49><44>һ<EFBFBD><D2BB>
return component.value.replace(/\bNetType\/\w+\b/, '');
}
return component.value;
})
//console.log(values) //ʹ<>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣnpm
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>id
let port = window.location.port;
console.log(port);
const fingerPrint = Fingerprint2.x64hash128(values.join(port), 31)
Vue.prototype.$browserId = fingerPrint;
console.log(һ<CEA8><D2BB>ʶ<EFBFBD>룺" + fingerPrint);
});
Vue.use(VueClipboard);
2020-10-10 17:33:29 +08:00
Vue.use(ElementUI);
Vue.use(VueCookies);
Vue.prototype.$axios = axios;
2021-01-20 20:27:25 +08:00
Vue.prototype.$notify = Notification;
2020-10-10 17:33:29 +08:00
axios.defaults.baseURL = (process.env.NODE_ENV === 'development') ? process.env.BASE_API : "";
Vue.prototype.$cookies.config(60*30);
new Vue({
router: router,
render: h => h(App),
}).$mount('#app')