main.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import App from './App'
  2. import store from './store'
  3. import common from './pages/utils/common.js'
  4. import constant from './pages/utils/constant.js'
  5. Vue.prototype.$gaodeKey = 'OJ7BZ-ULH6V-XBLPV-ULIMK-APS3H-QHFIP'; //高德地图key
  6. import {
  7. showToast,
  8. transDate
  9. } from './js_sdk/common.js'
  10. // #ifndef VUE3
  11. import Vue from 'vue'
  12. import auth from './js_sdk/auth'
  13. Vue.prototype.$auth = auth
  14. // import "./vite.config"
  15. Vue.prototype.$constant = constant
  16. Vue.prototype.$common = common
  17. Vue.config.productionTip = false
  18. Vue.prototype.$store = store
  19. Vue.prototype.$transDate = transDate
  20. Vue.prototype.$showToast = showToast
  21. import $http from './js_sdk/request/requestConfig';
  22. Vue.prototype.$http = $http;
  23. // 全局mixin引入 是否登录判断
  24. // import {isLoginMixin} from "./common/mixins";
  25. // Vue.mixin(isLoginMixin);
  26. App.mpType = 'app'
  27. const app = new Vue({
  28. store,
  29. ...App
  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. app.use(store)
  40. app.config.globalProperties.$adpid = "1111111111"
  41. app.config.globalProperties.$backgroundAudioData = {
  42. playing: false,
  43. playTime: 0,
  44. formatedPlayTime: '00:00:00'
  45. }
  46. return {
  47. app
  48. }
  49. }
  50. // #endif