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.

58 lines
1.3 KiB

8 months ago
8 months ago
8 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. Vue.config.isCustomElement = tag => tag === 'image' || tag.startsWith('app-')
  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. import 'vant/lib/index.css';
  16. import vant from 'vant';
  17. import jweixin from './utils/jweixin-module.js'
  18. import mixinConfigList from '@/mixins/configList.js'
  19. import store from '@/store/store'
  20. import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  21. import uniDrawer from '@/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue'
  22. //获取url中参数的方法
  23. function GetQueryString(name) {
  24. var url = window.location.href;
  25. try {
  26. var cs = url.split('?')[1]; //获取?之后的参数字符串
  27. var cs_arr = cs.split('&'); //参数字符串分割为数组
  28. for (var i = 0; i < cs_arr.length; i++) { //遍历数组,拿到json对象
  29. if (cs_arr[i].split('=')[0] == name) {
  30. sessionStorage.setItem('vid',cs_arr[i].split('=')[1]);
  31. }
  32. }
  33. }catch(e){}
  34. }
  35. GetQueryString('vid');
  36. export function createApp() {
  37. const app = createSSRApp(App)
  38. app.use(vant)
  39. app.use(store)
  40. app.mixin(mixinConfigList)
  41. return {
  42. app
  43. }
  44. }
  45. // #endif