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