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

67 lines
1.4 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
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 $shared from '@/common/shared.js';
  6. Vue.config.productionTip = false
  7. App.mpType = 'app'
  8. Vue.mixin(mixin);
  9. // 将API注入全局
  10. Vue.prototype.API = API;
  11. // 全局共享方法
  12. Vue.prototype.$shared = $shared;
  13. // 引入全局uView
  14. import uView from 'uview-ui'
  15. Vue.use(uView);
  16. import { $http } from '@/common/http.js';
  17. Vue.prototype.$http = $http;
  18. //color-ui-标题组件
  19. import cuCustom from './colorui/components/cu-custom.vue'
  20. Vue.component('cu-custom', cuCustom)
  21. // 上拉加载、下拉刷新
  22. import MescrollBody from './components/mescroll-uni/mescroll-body.vue'
  23. Vue.component('mescroll-body', MescrollBody)
  24. //骨架屏
  25. import Skeleton from './components/my-uni-skeleton/index.vue'
  26. Vue.component('skeleton', Skeleton);
  27. // 无数据
  28. import myNocontent from './components/my-nocontent/my-nocontent.vue';
  29. Vue.component('my-nocontent', myNocontent);
  30. //金融数字
  31. import aMount from './components/amount/index.vue'
  32. Vue.component('amount', aMount)
  33. Vue.prototype.$toast=msg=>{
  34. uni.showToast({
  35. icon:'none',
  36. title:msg
  37. })
  38. }
  39. //路由跳转
  40. Vue.prototype.$routerGo = (obj) => {
  41. uni.navigateTo({
  42. url: obj
  43. })
  44. }
  45. const app = new Vue({
  46. ...App
  47. })
  48. // 引入http拦截器
  49. import httpInterceptor from '@/common/http.interceptor.js'
  50. Vue.use(httpInterceptor, app);
  51. app.$mount();