<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
import vueCanvasNest from "vue-canvas-nest";
// npm install watermark-dom --save 安装水印插件

//引入水印插件
// import watermark from "watermark-dom";
import watermark from "./utils/watermark";
export default {
  name: "app",
  components: { vueCanvasNest },
  created() {
    const loginName = localStorage.getItem("loginName");
    const userCell = localStorage.getItem("userCellFour");
    const nowDate = new Date();
    const nowMonth = nowDate.getMonth() + 1;
    const nowDay = nowDate.getDate()>10?nowDate.getDate():'0'+nowDate.getDate();
    // console.log(nowTime,'当前时间');
    setTimeout(() => {
      if (loginName) {
        watermark.load({
          watermark_txt: loginName + userCell+nowMonth+nowDay,
          watermark_color: "#aaa",
          watermark_angle: 30,
          watermark_width: 400,
        });
      }
    }, 100);
  },
  mounted() {
    this.$nextTick(() => {
      document.getElementById("loading").innerHTML = "";
    });
  },
};
</script>
<style>
* {
  margin: 0;
  padding: 0;
}

#app {
  width: 100%;
  height: 100%;
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* overflow: auto; */
}
</style>
