main.js 579 B

123456789101112131415161718192021222324252627
  1. import {createSSRApp} from "vue";
  2. import App from "./App.vue";
  3. import i18n from './lang/index'
  4. //挂载 接口
  5. import http from './common/mehaotian-request/index.js'
  6. export function createApp() {
  7. const app = createSSRApp(App);
  8. app.config.globalProperties.i18n = i18n
  9. app.config.globalProperties.$http = http
  10. const t =(path)=>{
  11. const time = Date.parse(new Date())
  12. uni.switchTab({
  13. url:path + time
  14. })
  15. }
  16. app.config.globalProperties.$t = t
  17. app.use(i18n)
  18. //app.prototype._i18n = i18n
  19. return {
  20. app
  21. };
  22. }
  23. //app.prototype._i18n = i18n
  24. //app.mount('#app')