65 lines
2.0 KiB
JavaScript
65 lines
2.0 KiB
JavaScript
import Vue from 'vue'
|
||
import App from './App.vue'
|
||
import router from './router'
|
||
import store from './store'
|
||
import './assets/text/text.css'
|
||
import ElementUI from 'element-ui'
|
||
import 'element-ui/lib/theme-chalk/index.css'
|
||
import moment from 'moment'
|
||
import axios from 'axios'
|
||
import VueGtag from "vue-gtag";
|
||
import iErrorMsg from './components/errorDialog/index.js'
|
||
Vue.prototype.$axios = axios
|
||
|
||
// import Web3 from 'web3'
|
||
Vue.use(ElementUI)
|
||
// 全局的错误提示, this.$showErr(string|object)
|
||
Vue.use(iErrorMsg)
|
||
|
||
import {Message} from 'element-ui'
|
||
Vue.prototype.$message = Message
|
||
|
||
Vue.filter('formatDate', function (value) {
|
||
return moment(value).format('YYYY-MM-DD HH:mm:ss')
|
||
})
|
||
|
||
Vue.use(VueGtag, {
|
||
config: { id: "G-4KSHDJ3MGL" }
|
||
}, router);
|
||
|
||
// Vue.config.errorHandler = function(err, vm, info){
|
||
// //todo: show error message
|
||
// console.error('[vue error handler|error]: ', err)
|
||
// console.error('[vue error handler|VM]: ', vm)
|
||
// console.warn('[vue error handler|info]: ', info)
|
||
// Message({
|
||
// message: info,
|
||
// type: 'error',
|
||
// duration: 3 * 1000
|
||
// })
|
||
// }
|
||
//引入观测云rum的sdk
|
||
import { datafluxRum } from '@cloudcare/browser-rum'
|
||
datafluxRum.init({
|
||
applicationId: '20efe220_006a_11ef_941d_2d8bd5427e6e',
|
||
site: 'https://ap1-rum-openway.guance.one',
|
||
clientToken: '2OQwyC5Quls2McUi6QIUF7mzxD3ryhHDFwIMQHBBfUoiNCR_OQ',
|
||
env: process.env.VUE_APP_MODE,
|
||
version: '1.0.0',
|
||
service: 'browser',
|
||
sessionSampleRate: 100,
|
||
sessionReplaySampleRate: 70,
|
||
trackInteractions: true,
|
||
traceType: 'ddtrace', // 非必填,默认为ddtrace,目前支持 ddtrace、zipkin、skywalking_v3、jaeger、zipkin_single_header、w3c_traceparent 6种类型
|
||
allowedTracingOrigins: ['https://api.example.com',/https:\/\/.*\.my-api-domain\.com/], // 非必填,允许注入trace采集器所需header头部的所有请求列表。可以是请求的origin,也可以是是正则
|
||
});
|
||
// datafluxRum.startSessionReplayRecording()
|
||
|
||
Vue.config.productionTip = false
|
||
|
||
new Vue({
|
||
router,
|
||
store,
|
||
render: h => h(App),
|
||
}).$mount('#app')
|