<template>
  <div id="app">
    <div  v-if="!dd.pc && !dd.other" class="pc commonFont">
      请移步PC端操作
    </div>
    <router-view  v-else  class="main"/>
    <div @dblclick="handleShowVcnsole" class="baaa" style="width:20px;height:20px;"></div>
  </div>
</template>

<script>
import { mapState, mapActions, mapMutations } from 'vuex'
import * as dd from 'dingtalk-jsapi'

import VConsole from 'vconsole'
console.log('ddApp: ', dd)

export default {
  name: 'App',
  data () {
    return {
      dd: {
        pc: true,
        other: true
      },
      active: true,
      fullPage: true,
      dingCode: '',
      dataForm: {
        verify: ''
      }
    }
  },
  components: {
  },
  computed: {
  },
  async created () {
    if (dd.other) {
      var vConsole = new VConsole({
        vConsole_switch_x: 0,
        vConsole_switch_y: 0
      })
      localStorage.setItem('vConsole_switch_y', 0)
      localStorage.setItem('vConsole_switch_x', 1000)
    }
  },
  async mounted () {
    this.dd = dd
  },
  methods: {
    handleShowVcnsole () {
      var vConsole = new VConsole({
        vConsole_switch_x: 0,
        vConsole_switch_y: 0
      })
      localStorage.setItem('vConsole_switch_y', 0)
      localStorage.setItem('vConsole_switch_x', 1000)
    }
  }
}
</script>

<style lang='less'>
#app {

}
.pc{
  width: 100%;
  height: 200px;
  .center();
}
.baaa{
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0999999999999;
}
</style>
