main.js 1022 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. Vue.config.productionTip = false
  5. import request from 'common/request.js'
  6. import common from 'common/common.js'
  7. Vue.prototype.$http = request.http
  8. import store from './store'
  9. Vue.prototype.$store = store // 定义成全局组件
  10. Vue.prototype.$common =common
  11. Vue.prototype.$request =request
  12. App.mpType = 'app'
  13. const app = new Vue({
  14. store, //挂载
  15. ...App
  16. })
  17. app.$mount()
  18. // #endif
  19. // #ifdef VUE3
  20. import { createSSRApp } from 'vue'
  21. export function createApp() {
  22. const app = createSSRApp(App)
  23. return {
  24. app
  25. }
  26. }
  27. // #endif
  28. //ae3737d4d27ffc8dff0c8f53c5e35b16
  29. //欧洲维修 AppSecret(小程序密钥):86abc1611b51fef4ddcc0a42eb4b800e AppID(小程序ID):wx43160afedef08c4a
  30. //66 ae3737d4d27ffc8dff0c8f53c5e35b16 appid wx33053a645546ec31
  31. // Vue全局处理undefined和null转为空白字符串
  32. Vue.prototype.$praseStrEmpty = function(str) {
  33. if (typeof str === 'undefined' || str === null) {
  34. return "";
  35. }
  36. return str;
  37. }