import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import routes from './router';
import VueRouter from 'vue-router';
import echarts from 'echarts';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/assets/styles/publicEle.scss'
import '@/utils/browser_patch'
import Pagination from "@/components/Pagination/index.vue";
import {judgmentNetworkReturnAddress,parseTime,goLogin } from '@/utils/public'
import { accAdd,accSub,accDiv,accMul } from "@/utils/index";
Vue.prototype.axios = axios
Vue.prototype.$echarts = echarts;
Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.component('Pagination', Pagination)
Vue.config.productionTip = false
Vue.prototype.parseTime = parseTime;
Vue.prototype.judgmentNetworkReturnAddress = judgmentNetworkReturnAddress;
Vue.prototype.goLogin = goLogin;
Vue.prototype.accAdd = accAdd;
Vue.prototype.accSub = accSub;
Vue.prototype.accDiv = accDiv;
Vue.prototype.accMul = accMul;

Vue.prototype.msgSuccess = function (msg) {
    this.$message({ showClose: true, message: msg, type: "success", offset:100 });
}

Vue.prototype.msgError = function (msg) {
    this.$message({ showClose: true, message: msg, type: "error", offset:100 });
}

Vue.prototype.msgInfo = function (msg) {
    this.$message.info(msg);
}

const router = new VueRouter({
  routes
});


new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
