main.js 628 B

123456789101112131415161718192021222324252627282930
  1. import Vue from 'vue'
  2. import App from './App'
  3. //引入vuex
  4. import store from '@/store'
  5. //引入所有工具函数
  6. import utils from '@/utils'
  7. //引入所有接口函数
  8. import api from '@/api'
  9. import 'vant-weapp-convert-uniapp/components/common/index.less'
  10. Vue.config.productionTip = false
  11. App.mpType = 'app'
  12. //goPageGetData中存在this需要引用当前
  13. Vue.prototype.goPageGetData = utils.goPageGetData
  14. //挂载工具类
  15. Vue.prototype.$utils = utils
  16. //挂载请求接口
  17. Vue.prototype.$api = api
  18. Vue.mixin({
  19. methods: {
  20. dynaImagePrefix: utils.dynaImagePrefix
  21. }
  22. });
  23. const app = new Vue({
  24. store,
  25. ...App
  26. })
  27. app.$mount()