1012414140@qq.com
2026-10-16 d31766e742cbc2bac63e335396f22abcc7d6e256
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios';
import qs from 'qs'
 
// ===================== 【删除下面3行】UI库本地引入 =====================
// import ElementUI from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';
// import ViewUI from 'view-design';
// import 'view-design/dist/styles/iview.css';
// import echarts from 'echarts';
// ======================================================================
 
import './assets/css/fonts/iconfont.css'
import './assets/css/icon.css';
import './components/common/directives';
import "babel-polyfill";
import ByUtils, {byUtils} from './assets/js/ByUtils'
import StringUtil from './assets/js/StringUtil'
import TscPrintUtil from './assets/js/TscPrintUtil'
import Print from './assets/js/print'
import moment from 'moment'
import store from './store/index' // 引入vuex
Vue.prototype.$moment = moment;
Vue.use(Print)
 
import 'lib-flexible'
import preview from 'vue-photo-preview'
 
//preview的参数
var option = {
    minZoom:0.3,
    maxSpreadZoom: 20,
    fullscreenEl: false,
    closeEl: true,
    tapToClose: true,
    shareEl: false,
    zoomEl: true,
    counterEl: true,
    arrowEl: true,
    tapToToggleControls: true,
    allowPanToNext:true,
    clickToCloseNonZoomable: false,
    closeOnVerticalDrag:false,
    pinchToClose:false,
    getDoubleTapZoom:()=>1
}
Vue.use(preview,option)
 
// ===================== 【保留】全局注册UI库(CDN全局变量) =====================
// Vue.use(ElementUI);
// Vue.use(ViewUI);
// ===========================================================================
 
Vue.config.productionTip = false
 
// ===================== 【保留】ECharts 全局挂载(CDN全局变量) =====================
// Vue.prototype.$echarts = echarts;
// ===============================================================================
 
import '@/utils/lib-fiexible'
import {getStore,setStore,removeStore} from "./libs/store";
 
Vue.prototype.getStore = getStore
Vue.prototype.setStore = setStore
Vue.prototype.removeStore = removeStore
 
Vue.prototype.$axios = axios;
axios.defaults.withCredentials = true
// 对提交的数据进行json序列化
axios.interceptors.request.use((config) => {
    if (config.method === 'post') {
        config.data = qs.stringify(config.data)
    }
    if (config.method === 'get') {
        config.data = qs.stringify(config.data)
    }
    // 生产环境建议注释 console.log
    // console.log(config.data)
    return config
})
 
// 配置文件
Vue.prototype.$systemconfig = {
    basePath:'http://183.196.93.178:8089'
    // basePath:'http://192.168.0.147:8089'
}
Vue.prototype.$byutil = byUtils
Vue.prototype.$stringUtil = StringUtil
Vue.prototype.$tscPrintUtil = TscPrintUtil
 
// 路由守卫
router.beforeEach((to,from,next) => {
    if(to.meta.title === '峰峰矿区智慧停车') {
       document.title = to.meta.title
   }
    next();
})
 
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')