耀实惠小程序
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.

55 lines
1.2 KiB

  1. import Vue from 'vue'
  2. import App from './App'
  3. import util from '@/utils/utils'
  4. import store from './store/index.js'
  5. import api from '@/request/index'
  6. import Global from '@/utils/global.js'
  7. import tools from '@/utils/functions.js'
  8. import uView from "@/plugin/uview-ui";
  9. import filters from "@/utils/filters.js"
  10. import { storageKeys, storage } from '@/utils/storage.js'
  11. import { IMG_URL, upload_img } from '@/env.js'
  12. Vue.use(uView);
  13. Vue.config.productionTip = false
  14. /* 导入接口 xujinwei */
  15. // let api = require('./utils/js/api');
  16. // Vue.prototype.$api = api;
  17. Vue.prototype.$api = api;
  18. Vue.prototype.$store = store
  19. Vue.prototype.$util = util
  20. Vue.prototype.$tools = tools
  21. Vue.prototype.$global = new Global()
  22. Vue.prototype.$IMG_URL = IMG_URL
  23. Vue.prototype.$upload_img = upload_img; // 上传图片接口
  24. Vue.prototype.$storage = storage; // 上传图片接口
  25. // if (!storage.getStorage(storageKeys.TOKEN)) {
  26. // tools.reLaunch({
  27. // url: '/pages/login/login'
  28. // })
  29. // }
  30. Vue.prototype.$Toast = function(title) {
  31. return uni.showToast({
  32. title:title,
  33. icon:'none'
  34. })
  35. }
  36. Object.keys(filters).forEach(key => {
  37. Vue.filter(key, filters[key]);
  38. })
  39. App.mpType = 'app'
  40. const app = new Vue({
  41. store,
  42. ...App
  43. })
  44. app.$mount()