<template>
  <router-view />
</template>

<script>
import { LocalStorage, Platform } from 'quasar';
import { useMenuStore } from 'src/stores/useMenuStore';
// import Vconsole from 'vconsole'
// if (process.env.NODE_ENV !== 'production') {
//   const vConsole = new Vconsole()
// }
export default {
  name: 'initialLayout',
  data() {
    return {
      webto: '',
    };
  },
  methods: {},
  beforeCreate() {
    const menuSotre=useMenuStore();
    console.log('生成initlayout');
    if(LocalStorage.has('menuInfo'))
    {
      menuSotre.menuInfos=LocalStorage.getItem('menuInfo');
    }
    if (Platform.is.cordova) {
      if (window.device) {
        if (window.device.manufacturer === 'Zebra Technologies') {
          LocalStorage.set('device', 2);
          this.webto = 'urovoscan';
        } else if (
          window.device.manufacturer === 'Urovo' ||
          window.device.manufacturer === 'ubx'
        ) {
          LocalStorage.set('device', 2);
          this.webto = 'urovoscan';
        } else if (window.device.manufacturer === 'SEUIC') {
          LocalStorage.set('device', 2);
          this.webto = 'seuicscan';
        } else {
          LocalStorage.set('device', 2);
          this.webto = 'urovoscan';
        }
      }
    } else if (Platform.is.mobile) {
      LocalStorage.set('device', 1);
      this.webto = 'mobile_index';
    } else {
      LocalStorage.set('device', 0);
      this.webto = 'web_index';
      if (LocalStorage.has('menulink')) {
        if (LocalStorage.getItem('menulink') !== '') {
          this.webto = LocalStorage.getItem('menulink');
        }
      }
    }
    // this.$router.push({ name: this.webto });
  },
};
</script>

<style scoped></style>
