<!--
 * @Author: ym
 * @Date: 2021-09-28 10:53:53
 * @LastEditTime: 2022-01-09 18:57:16
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \background-front-end\src\views\common\home.vue
-->
<template>
  <div class="mod-home">
    <el-dialog
      title="提示：您的密码过于简单，请您修改密码"
      :visible.sync="dialogVisible"
      width="30%"
      :show-close="false"
      :destroy-on-close="true"
      :close-on-click-modal="false"
    >
      <span>这是一段信息</span>
      <span slot="footer" class="dialog-footer">
        <!-- <el-button @click="dialogVisible = false">取 消</el-button> -->
        <el-button type="primary" @click="dialogVisible = false"
          >确定并重新登入</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      dialogVisible: false,
    };
  },
  created() {
    if (
      JSON.parse(sessionStorage.getItem("password")) == "123456" &&
      JSON.parse(sessionStorage.getItem("role")) === "ROLE_BRAND_MANAGER"
    ) {
      this.dialogVisible = true;
    }
  },
};
</script>

<style lang="scss" scoped>
.mod-home {
  line-height: 1.5;
}
.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
  color: #fff;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>
