import 'babel-polyfill' import Vue from 'vue' import 'normalize.css/normalize.css' // A modern alternative to CSS resets import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' import slideVerify from 'vue-monoplasty-slide-verify' Vue.use(slideVerify) import quill from 'vue-quill-editor' Vue.use(quill) Vue.use(ElementUI) import '@/styles/index.scss' // global css import App from './App' import store from './store' import router from './router' import '@/utils/dialog.js' import '@/icons' // icon //import '@/permission' //权限控制 Vue.prototype.$userInfo = null // 用户信息 Vue.prototype.msgSuccess = function (msg) { alert(msg); } // 全局自定义组件 import Pagination from '@/components/pagination/index.vue' Vue.component("Pagination", Pagination) import tabsearch from '@/components/tab-search/index.vue' Vue.component("tab-search", tabsearch) import eimage from "@/components/E-image/index.vue" Vue.component("eimage", eimage); // 全局组件挂载 Vue.component('Pagination', Pagination) import Print from '@/utils/print' // 引入附件的js文件 Vue.use(Print) // 注册 import {setStorage, getStorage, setDefaultOrgPathName, setDefaultOrgPath } from "./utils/auth.js" let token = null; token = GetQueryString("token") //if (token) { //setStorage(token) //let href = window.location.href; //href = href.split(`token=${token}`)[0]; //window.location.href = href.slice(0, href.length - 1); //} function GetQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; } var one = window.location.href.indexOf('&organizationData') + 18 console.log(1111, one) if (parseInt(one) > 18) { const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 var data1 = decodeURIComponent(data) console.log(data1, 858585) if (data1 !== undefined) { const obj = JSON.parse(data1) setDefaultOrgPath(obj.defaultOrgPath) setDefaultOrgPathName(obj.defaultOrgPathName) } } import VueAMap from 'vue-amap' Vue.use(VueAMap) VueAMap.initAMapApiLoader({ key: 'ccda12d8bffc72e9f1a32c599323a876',//此处的key,在高德开放平台申请 plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.Geocoder'],//此处的插件按需添加 v: '1.4.4', uiVersion: '1.0' }) Vue.config.productionTip = false new Vue({ el: '#app', router, store, render: h => h(App) })