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
868 B

8 months ago
  1. import App from './App'
  2. // #ifndef VUE3
  3. import i18n from './locale/index.js'
  4. import Vue from 'vue'
  5. import './uni.promisify.adaptor'
  6. Vue.config.productionTip = false
  7. App.mpType = 'app'
  8. import request from './utils/request'
  9. Vue.prototype.$api = 'http://124.71.12.219:8085/'
  10. Vue.prototype.request = request
  11. import store from './store/index.js'
  12. import uView from '@/uni_modules/uview-ui'
  13. Vue.use(uView)
  14. import './plugin'
  15. import 'interceptor/interceptor.js'
  16. //后端返回数据格式过滤
  17. window.parseList = function(data) {
  18. if (!data) {
  19. return [];
  20. } else if (data.length || data.length == 0) {
  21. return data
  22. } else {
  23. return [data]
  24. }
  25. }
  26. const app = new Vue({
  27. ...App,
  28. i18n,
  29. store,
  30. })
  31. app.$mount()
  32. // #endif
  33. // #ifdef VUE3
  34. import {
  35. createSSRApp
  36. } from 'vue'
  37. export function createApp() {
  38. const app = createSSRApp(App)
  39. return {
  40. app
  41. }
  42. }
  43. // #endif