<template>
  <div class="box-border h-240px w-320px border border-[#EEEEEE] rounded-8px border-solid bg-[#FFFFFF] px-31px py-25px">
    <div class="flex">
      <div>
        <img src="~/assets/images/user2.png" alt="" srcset="" class="h-47px w-48px rounded-full" />
      </div>
      <div class="ml-13px">
        <div class="text-16px text-[#333333] font-normal">你好</div>
        <div class="mt-6px text-14px text-[#999999] font-normal">欢迎使用多多图纸~</div>
      </div>
    </div>
    <div class="mt-26px flex justify-between text-14px text-[#999999] font-normal">
      <div class="flex flex-col items-center">
        <div>下载</div>
        <div class="mt-4px">-</div>
      </div>
      <div class="flex flex-col items-center">
        <div>查看</div>
        <div class="mt-4px">-</div>
      </div>
      <div class="flex flex-col items-center">
        <div>点赞</div>
        <div class="mt-4px">-</div>
      </div>
      <div class="flex flex-col items-center">
        <div>评论</div>
        <div class="mt-4px">-</div>
      </div>
    </div>
    <div
      class="mt-25px h-36px w-260px cursor-pointer rounded-4px bg-[#1A65FF] text-center text-15px text-[#FFFFFF] font-normal line-height-36px"
      @click="handleClick"
      >发帖子</div
    >
  </div>
</template>

<script setup lang="ts">
  import useUserStore from '~/stores/user'
  const userStore = useUserStore()
  const handleClick = () => {
    // 判断是否登录
    if (!userStore.token) {
      ElMessage.warning('请先登录')
      return
    }
    navigateTo('/channel/create')
  }
</script>
