main.js 579 B

123456789101112131415161718192021222324
  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. const app = new Vue({
  19. store,
  20. ...App
  21. })
  22. app.$mount()