推拿小程序前端代码仓库
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.

63 lines
1.2 KiB

3 months ago
3 months ago
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. import './uni.promisify.adaptor'
  5. Vue.config.productionTip = false
  6. App.mpType = 'app'
  7. import store from '@/store/store'
  8. import './config'
  9. import './utils/index.js'
  10. import mixinConfigList from '@/mixins/configList.js'
  11. Vue.mixin(mixinConfigList)
  12. //组件注册
  13. import configPopup from '@/components/config/configPopup.vue'
  14. import navbar from '@/components/base/navbar.vue'
  15. Vue.component('configPopup',configPopup)
  16. Vue.component('navbar',navbar)
  17. // #ifdef H5
  18. //获取url中参数的方法
  19. function GetQueryString(name) {
  20. var url = window.location.href;
  21. try {
  22. var cs = url.split('?')[1]; //获取?之后的参数字符串
  23. var cs_arr = cs.split('&'); //参数字符串分割为数组
  24. for (var i = 0; i < cs_arr.length; i++) { //遍历数组,拿到json对象
  25. if (cs_arr[i].split('=')[0] == name) {
  26. sessionStorage.setItem('vid',cs_arr[i].split('=')[1]);
  27. }
  28. }
  29. }catch(e){}
  30. }
  31. GetQueryString('vid');
  32. // #endif
  33. const app = new Vue({
  34. ...App,
  35. store,
  36. })
  37. app.$mount()
  38. // #endif
  39. // #ifdef VUE3
  40. import {
  41. createSSRApp
  42. } from 'vue'
  43. export function createApp() {
  44. const app = createSSRApp(App)
  45. return {
  46. app
  47. }
  48. }
  49. // #endif