main.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import App from './App'
  2. import uviewPlus from '@/uni_modules/uview-plus'
  3. import {isEmpty,parseIDCardInfo,parseText,urlToObj,clearHisSearch,getHisSearch,addHisSearch,logout,getDictLabelName,getProvider,parsePhone,isLogin,getAge,parseIdCard,isLoginCourse} from './utils/common.js'
  4. // #ifndef VUE3
  5. import Vue from 'vue'
  6. Vue.config.productionTip = false
  7. App.mpType = 'app'
  8. const app = new Vue({
  9. ...App
  10. })
  11. app.$mount()
  12. // #endif
  13. // #ifdef VUE3
  14. import { createSSRApp } from 'vue'
  15. export function createApp() {
  16. const app = createSSRApp(App)
  17. app.config.globalProperties.$getProvider = getProvider
  18. app.config.globalProperties.$parsePhone = parsePhone
  19. app.config.globalProperties.$isLogin = isLogin
  20. app.config.globalProperties.$isEmpty = isEmpty
  21. app.config.globalProperties.$getAge = getAge
  22. app.config.globalProperties.$parseIdCard = parseIdCard
  23. app.config.globalProperties.$getDictLabelName = getDictLabelName
  24. app.config.globalProperties.$logout = logout
  25. app.config.globalProperties.$clearHisSearch = clearHisSearch
  26. app.config.globalProperties.$getHisSearch = getHisSearch
  27. app.config.globalProperties.$addHisSearch = addHisSearch
  28. app.config.globalProperties.$urlToObj = urlToObj
  29. app.config.globalProperties.$parseText = parseText
  30. app.config.globalProperties.$parseIDCardInfo = parseIDCardInfo
  31. app.config.globalProperties.$isLoginCourse = isLoginCourse
  32. app.use(uviewPlus)
  33. return {
  34. app
  35. }
  36. }
  37. // #endif