公众号前端
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

42 lines
1.1 KiB

  1. import Vue from 'vue'
  2. import App from './App.vue'
  3. import router from './router'
  4. import store from './store'
  5. import VueCookie from 'vue-cookie'
  6. import ElementUI from 'element-ui';
  7. import moment from 'moment'
  8. import Vant from 'vant';
  9. import 'vant/lib/index.css';
  10. import 'element-ui/lib/theme-chalk/index.css';
  11. import './assets/css/common.css'
  12. import './assets/scss/index.scss'
  13. import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios
  14. import {isAuth} from '@/utils'
  15. import VueClipboard from 'vue-clipboard2'
  16. Vue.use(ElementUI);
  17. Vue.use(VueClipboard)
  18. Vue.use(VueCookie)
  19. Vue.use(Vant);
  20. Vue.config.productionTip = false
  21. // 挂载全局
  22. Vue.prototype.$http = httpRequest // ajax请求方法
  23. Vue.prototype.isAuth = isAuth // 权限方法
  24. moment.locale('zh-cn');
  25. Vue.prototype.$moment = moment; //时间处理
  26. new Vue({
  27. router,
  28. store,
  29. render: h => h(App)
  30. }).$mount('#app')
  31. // 设置导航守卫
  32. router.beforeEach((to, form, next) => {
  33. window.document.title = to.meta.title == undefined ? '默认标题' : to.meta.title
  34. next()
  35. })