<template>
    <div>
      <ChatBox />
      <!-- <LoginModal
        :visible.sync="showLoginModal"
        @close="showLoginModal = false"
        @login-success="handleLoginSuccess"
      /> -->
    </div>
  </template>
  
  <script>
  import ChatBox from "@/components/webAi/index.vue";
  import LoginModal from "@/components/LoginModal";
  
  export default {
    components: {
      ChatBox,
      LoginModal,
    },
    data() {
      return {
        showLoginModal: false,
      };
    },
    mounted() {
      //this.checkAIData();
    },
    methods: {
      checkAIData() {
        const aiData = localStorage.getItem('AIData');
        this.showLoginModal = !aiData;
      },
      handleLoginSuccess() {
        this.showLoginModal = false;
        // 处理登录成功后的逻辑，例如刷新数据或更新状态
      },
    },
  };
  </script>
  <style scoped>
/*   ::v-deep .chat-container {
    height: 100vh;
  } */
  ::v-deep .chat-container .header {
  width: 98%;
  margin: 10px 20px;
}
::v-deep .messages {
  width: 98%;
  margin-bottom: 0;
  height: calc(100vh - 120px);
}
::v-deep .input-container {
  max-width: 1200px;
}
::v-deep .title {
  width: 98%;
  /* margin: 0 20px 15px; */
  display: flex;
  align-items: center;
}
  </style>