时空网前端
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.

64 lines
1.3 KiB

4 years ago
4 years ago
4 years ago
4 years ago
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 $scene from '@/common/scene.js';
  6. import * as $shared from '@/common/shared.js';
  7. import { uploadFile } from '@/common/uploadFile.js'
  8. Vue.config.productionTip = false
  9. App.mpType = 'app'
  10. Vue.mixin(mixin);
  11. // 将API注入全局
  12. Vue.prototype.API = API;
  13. // 场景值
  14. Vue.prototype.$scene = $scene;
  15. // 全局共享方法
  16. Vue.prototype.$shared = $shared;
  17. Vue.prototype.uploadFile = uploadFile
  18. // 引入全局uView
  19. import uView from 'uview-ui'
  20. Vue.use(uView);
  21. import { $http } from '@/common/http.js';
  22. Vue.prototype.$http = $http;
  23. // 价格组件
  24. import lfPrice from './components/lf-price/lf-price.vue';
  25. Vue.component('lf-price', lfPrice);
  26. //骨架屏
  27. import Skeleton from './components/my-uni-skeleton/index.vue'
  28. Vue.component('skeleton', Skeleton);
  29. // 无数据
  30. import myNocontent from './components/my-nocontent/my-nocontent.vue';
  31. Vue.component('my-nocontent', myNocontent);
  32. Vue.prototype.$toast=msg=>{
  33. uni.showToast({
  34. icon:'none',
  35. title:msg
  36. })
  37. }
  38. //路由跳转
  39. Vue.prototype.$routerGo = (obj) => {
  40. uni.navigateTo({
  41. url: obj
  42. })
  43. }
  44. const app = new Vue({
  45. ...App
  46. })
  47. // 引入http拦截器
  48. import httpInterceptor from '@/common/http.interceptor.js'
  49. Vue.use(httpInterceptor, app);
  50. app.$mount();