<template>
    <div class="boxs" @click="close">
      <home class="all top" :outside="true" v-if="guider" @close="close"></home>
      <div class="all-mask" v-if="guider" @click="close"></div>
      <home class="all" :outside="false"></home>
    </div>
</template>
<script>

import home from './page/home';
import { getUrlParameter, isWeChatApplet, formatUrl, getEllipsisText } from "@js/tooler";

function checkGuider(){
  var param = getUrlParameter("param");
  try{
    var list = param.split("_");
    return list[1] == 1;
  }
  catch(e){

  }
  return false;
}

export default {
  data() {
    return {
      // guider: getUrlParameter("step") == 1 && !localStorage.getItem("guider")
      guider: checkGuider()
    }
  },
  components: {
    home
  },  
  methods: {
    close(){
      console.log("close");
      this.guider = false;
    }
  },
  created() {
    console.log("guider: " + this.guider);
  }
}
</script>

<style lang="less" scoped>
.boxs{
  position: relative;
}
.all{
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 1;
}
.top{
  top: 0;
  opacity: 1;
  z-index: 3;
}
.all-mask{
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2;
}
</style>