<template>
  <div id="app">
    <headere></headere>
    <router-view/>
    <foot></foot>
    <div v-if="isshow" class="isbox">
      <el-card class="box-card">
        <span class="cha" @click="isshow = false">x</span>
        <h2>温馨提示</h2>
        <span v-html="this.configurationdata && this.configurationdata.isname"></span>
      </el-card>
    </div>
  </div>
</template>

<script>
import headere from './components/heads/index.vue'
import foot from './components/foot/index.vue'
import { createNamespacedHelpers } from 'vuex'
const { mapActions, mapState } = createNamespacedHelpers('webconfig')
export default {
  components: {
    headere,
    foot
  },
  data () {
    return {
      isshow: false
    }
  },
  computed: {
    ...mapState(['configurationdata'])
  },
  methods: {
    ...mapActions(['configurationquery'])
  },
  async mounted () {
    // window.addEventListener('scroll', this.handlescroll, true)
    await this.configurationquery()
    this.isshow = this.configurationdata.isshow
  }
}
</script>

<style lang="less">
#app {
  background: #fff;
  min-width: 1500px;
  margin: 0;
  padding: 0;
}
.isbox {
  position: fixed;
  top: 30vh;
  left: 40%;
  // margin-left: -50%;
  width: 400px;
  // height: 400px;
  z-index: 999;
  box-shadow: 0 0 20px #999;
  // border: 1px solid #999;
  h2 {
    width: 100%;
    text-align: center;
  }
  .box-card {
    border-top: 10px solid #a80002;
  }
  .cha {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
  }
}
</style>
