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.

59 lines
955 B

9 months ago
9 months ago
9 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. import sTabbar from '@/components/base/tabBar.vue'
  17. Vue.component("sTabbar", sTabbar)
  18. //后端返回数据格式过滤
  19. window.parseList = function(data) {
  20. if (!data) {
  21. return [];
  22. } else if (data.length || data.length == 0) {
  23. return data
  24. } else {
  25. return [data]
  26. }
  27. }
  28. const app = new Vue({
  29. ...App,
  30. i18n,
  31. store,
  32. })
  33. app.$mount()
  34. // #endif
  35. // #ifdef VUE3
  36. import {
  37. createSSRApp
  38. } from 'vue'
  39. export function createApp() {
  40. const app = createSSRApp(App)
  41. return {
  42. app
  43. }
  44. }
  45. // #endif