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

66 lines
1.2 KiB

4 months ago
4 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. import share from '@/utils/share.js'
  33. share()
  34. // #endif
  35. const app = new Vue({
  36. ...App,
  37. store,
  38. })
  39. app.$mount()
  40. // #endif
  41. // #ifdef VUE3
  42. import {
  43. createSSRApp
  44. } from 'vue'
  45. export function createApp() {
  46. const app = createSSRApp(App)
  47. return {
  48. app
  49. }
  50. }
  51. // #endif