UNPKG

w-vue-middle

Version:

统一公共服务组件

44 lines (35 loc) 1.06 kB
import Vue from 'vue'; import Antd from 'ant-design-vue'; import 'ant-design-vue/dist/antd.css'; import moment from 'moment' const WinTitle = require("../../components/winTitle").default const WinIcon = require("../../components/winIcon/win_icon").default const WinLaneChain = require('../../components/winLaneChain').default import '../../utils/storage' import { encrypt } from '../../utils/encryp' export default ({Vue, router}) => { Vue.use(Antd) Vue.component('win-title', WinTitle) Vue.component('win-icon', WinIcon) Vue.component('win-lane-chain', WinLaneChain) Vue.prototype.$encrypt = encrypt window.moment = Vue.prototype.moment = moment console.log('**storage', $storage); window.$service = { /** * @Author: Jason Liu * @description: 统一门户服务 */ portalService: "/portalService", /** * 全链路服务 */ edsmService: '/edsm' } const {pathname} = location if (pathname !== '/df-design/') { if (!$storage.getToken()) { location.href = '/df-design/' } } }