wvp-gb28181-project/web_src/src/main.js
panlinlin 0f58218bad Merge remote-tracking branch 'origin/master' into wvp-28181-2.0
# Conflicts:
#	README.md
#	src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/event/alarm/AlarmEvent.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/transmit/SIPProcessorFactory.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java
#	src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java
#	src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
#	src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorager.java
#	src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
#	src/main/java/com/genersoft/iot/vmp/vmanager/SseController/SseController.java
#	src/main/java/com/genersoft/iot/vmp/vmanager/service/IPlayService.java
#	src/main/java/com/genersoft/iot/vmp/vmanager/service/impl/PlayServiceImpl.java
#	src/main/resources/wvp.sqlite
#	web_src/.postcssrc.js
#	web_src/src/components/UiHeader.vue
#	web_src/src/main.js
#	web_src/src/router/index.js
2021-02-25 18:10:02 +08:00

47 lines
1.4 KiB
JavaScript

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';
import { Notification } from 'element-ui';
import Fingerprint2 from 'fingerprintjs2';
// 生成唯一ID
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) //使用的浏览器信息npm
// 生成最终id
let port = window.location.port;
console.log(port);
const fingerPrint = Fingerprint2.x64hash128(values.join(port), 31)
Vue.prototype.$browserId = fingerPrint;
console.log("唯一标识码:" + fingerPrint);
});
Vue.use(VueClipboard);
Vue.use(ElementUI);
Vue.use(VueCookies);
Vue.prototype.$axios = axios;
Vue.prototype.$notify = Notification;
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')