海南旅游项目 前端仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
952 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. import Vue from 'vue';
  2. import App from './App';
  3. import mixin from '@/common/mixin.js';
  4. import * as API from '@/common/api.js';
  5. import * as $shared from '@/common/shared.js';
  6. import { uploadFile } from '@/common/uploadFile.js'
  7. Vue.config.productionTip = false;
  8. App.mpType = 'app';
  9. // 每个页面都会进入mixin
  10. Vue.mixin(mixin);
  11. // 将API注入全局
  12. Vue.prototype.API = API;
  13. // 全局共享方法
  14. Vue.prototype.$shared = $shared;
  15. Vue.prototype.uploadFile = uploadFile
  16. // 引入全局uView
  17. import uView from 'uview-ui';
  18. Vue.use(uView);
  19. // 引入请求方法
  20. import { $http } from '@/common/http.js';
  21. Vue.prototype.$http = $http;
  22. // 将无数据组件注入全局
  23. import lfNocontent from '@/components/lf-nocontent/lf-nocontent.vue';
  24. Vue.component('lf-nocontent', lfNocontent);
  25. const app = new Vue({
  26. ...App
  27. });
  28. // 引入http拦截器
  29. import httpInterceptor from '@/common/http.interceptor.js';
  30. Vue.use(httpInterceptor, app);
  31. app.$mount();