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

62 lines
1.2 KiB

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