main.js 709 B

12345678910111213141516171819202122232425262728293031323334
  1. import Vue from 'vue'
  2. import App from './App'
  3. import store from './store' // store
  4. import plugins from './plugins' // plugins
  5. import './permission' // permission
  6. import config from '@/config'
  7. Vue.use(plugins)
  8. Vue.config.productionTip = false
  9. Vue.prototype.$store = store
  10. App.mpType = 'app'
  11. // 挂载全局图片地址
  12. Vue.prototype.$HTTP = config.baseUrl
  13. // 图片使用网络地址
  14. Vue.prototype.loadImgSrc = function(img) {
  15. //项目的地址域名,例如百度
  16. return config.baseIconUrl+img;
  17. }
  18. //本地上传图片前缀地址
  19. Vue.prototype.loadImgSrcLocalhost = function(img) {
  20. //项目的地址域名,例如百度
  21. return config.baseUrl+img;
  22. }
  23. const app = new Vue({
  24. ...App
  25. })
  26. app.$mount()