<script setup>
import ClubApi from '@/api/ClubApi';
import ClubNav from '@/components/ClubNav.vue';
import Nav from '@/components/Nav.vue';
import { ref } from 'vue';

// 俱乐部
const club = ref()
// 加载俱乐部信息
function loadClub(){
  //调用查询俱乐部api
  
  ClubApi.getClub(3).then((result) =>{
    console.log(result)
    console.log("++++++++",result.data);
    club.value = result.data;
    console.log(club.value);
  })
}
loadClub();
// 展示列表
const shows = ref([])
// 加载展示列表
function loadShows(){
  ClubApi.getShows(3).then((result) =>{
    console.log(result);
    shows.value = result.data;
  })
}
// 
loadShows();
</script>

<template>
    <Nav></Nav>
    <ClubNav></ClubNav>
    <div class="club">
    <!-- 俱乐部相关信息 -->
    <header>
      <div class="club-header1">
        <img v-if="club && club[0]" class="club-image" :src="club[0].image" alt="视频缩略图">
        <button class="club-button" @click="handleMore">查看更多</button>
      </div>
      
      <p v-if="club && club[0]">{{ club[0].introduction }}</p>
    </header>
    <!-- 俱乐部内容 -->
    <section class="special-topic">
      <div class="special-topic">
        <h2>专题</h2>
      </div>
      <div class="topic">
        <div class="topic-title">
          <p>驾驭AI的深度</p>
          <span @click="handleMore">查看更多</span>
        </div>
        
        <!-- 展示列表 -->
        <div class="sub-topic">
          <ul class="display-list">
            <li v-for="show in shows">
              <!-- 左边 -->
              <div class="sub-left">
                <img class="sub-image" :src="show.cover" alt="视频缩略图">
                <img v-if="show.flagType==1" class="player" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAApeSURBVHic7Z39b1PXGcc/8bJSEDQMSpWEZHOBLtkMpbxIUMFWyCLeSqwRLYA2aWiaFEAg5YdICCEQ/wC/IRFA+2lbW2qkVrxkgfC6F8bSUBBtWtEYtYaYvGDyAjGEhhTvhxODMY7ta9/rc659PhISsc+955G/eu4953nOOU8e2cEkYBowFZgMFIx+NgF4FRgHvBJ1zTDwPfAYeAQMAveBAaAXCIx+ZmvyZBuQ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dOAqYiS9QWjn01AlM8dx8vZrWFEzajHiMozgwiPHEDs1guQBQVL/g8kNuAku4fBgAAAAABJRU5ErkJggg==">
              </div>
              <!-- 右边 -->
              <div class="sub-right">
                <div class="right-inline">
                  <img src="https://d31zlh4on95l9h.cloudfront.net/web/20241127093642/img/clubS2.fecd330b.png" class="logo">
                  <span :name="show.name">{{ show.name }}</span>
                </div>
                <div class="right-inline">
                  <div class="yellow">
                    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAnCAYAAACMo1E1AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAIvSURBVFiF7VhbcsMgDFxo7lUyk+RWnsTDrZrMhB4sVj9iGoxBSDj96375IYu1BCsB8I8+mK0ODp5cvLaY3AQbAOA2mLDVdxe5gydnQOf51nG2BjQCwNfwcdGOoyKXkGIJ1QejUUNSRG4rqeWANE6wQZL2JrmZ2F04doDwByRRtNzLk39cFMRwHexeaksw55N/XDibKrmTf1wI5lx7nyNOfDyjJwLBnNPVLiJ38OQ0xLIBx7bVCwZ0rxEskrOYisYc4vzp0bdEljIeGbTpnJ3n0Qqa7wG4UvRW5HrTmflQpRYoR28hJT1RA4DrYFeSdPQTaf0QzD6dFqyUSFBIaUSoPOd8LQKzS2+yqAVJeqii49fB7jmZAJ4Lj8vUwnMpFdp6KEWt8qSptalxyYlEybWQVp5dywB4Ejz66ZNgxi19WmwgSFh/7euiKbzOgO69UUyixY6T8vglFzvYFnrSfPTTvUeiuqREQ3Cey07qOw1St879xQoGlrXZZg/D2rwIqZ3W7wJdkTOg79JzRo5EtTavNgtyUiellMbV+E5NLBXs5nJPC31l8xNyTdT6BcotExu9NPSMdqk1sdRArMi1JnBc6hLtSiWH++la/S4uiFb05gbBcTYpwaOfaFb+ULKpFYDqvlW5X+0G1/VUpeQ2mMA0km9Bqx1r7vh7W/cW8pa8BPFZSatrVWAlMzWoTpk2RlFMKqLrfC6RhxbRMNt1NambTzaBV9qBpSy843TzHz34AcF4N1nRyTl4AAAAAElFTkSuQmCC" class="img2">
                    <span  v-if="club && club[0]" :clubname="club[0].name">{{ club[0].name }}</span>
                  </div>
                </div>
                <div class="right-inline">
                  <!-- HomilyLink -->
                  <div class="right-item">
                    <img :src="show.user.avatar" class="img1">
                    <div :username="show.user.username">{{show.user.username}}</div>
                  </div>
                  <!-- 日期 -->
                  <div :releaseTime="show.releaseTime" class="right-item">{{ show.releaseTime }}</div>
                  <!-- 观看 -->
                  <div class="right-item">
                    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAIjSURBVFiF7VhtkqQgDE2sudfSxwAOox4GOUYzFzPzY2Ar0higdWtnqni//IjwQh5JBGBgYGBg4H8C7xrIe68AAPZ9V4j4h4g+07tpmoLWOtwxzyXC3ntFRDMAqBZ7IlqttcuVOd8i3Es0xxXi3YSdcwsiztnjAACAiCsAQAq/917t+67iu/ybt4h3Ed627QnHVQ2IuLbqs+RsL+lmwjnZK2EtEA/GmEfLt1XCJb0i4uPqro/jPtmjpmhVCW/bRj2D8vRWi8A7iyESzkInhk3KHDX5ZHIT5zklnOvMGNNsW0IPacl2aiGAiKcelzYQIj6IaCWilY0xJ7mUkFJizbZImBMgIlGzua0x5qG1DtbaxVq7cNJRMkVorUNm+yyRfiHsnFs4ASmMfMAz2/gsxFslrXJmW3TwQNh7r/gmq+3yVMVq4OGuIW64EG9fHCxKohXTNIXSdQ7uWKOTpzYHwlGraWLF5VGDpM/DhIJjAEdJAsBLW1pMVbxYNKQj0fZKeizZfpQ+jGnpGa9n7/1pA57bOucA4Hsl80LCs0AOVnhE26KGCymmOR0h4oyIc3TiQFaKFO8rJFuxNPeUTKHaVfuPW0ozG6yr+QH4Jp82V61RymUjabyJMMBrL/yj28uEX9PAVybqIn7SgjaTBbjvJ/RvGuJnEKmssiyj8m/+6U8oR0sPLKDr55Xj8slPJ/G3iSbcelTFG5t0XNWS3gYGBgYGfg++AMoF42iHsimVAAAAAElFTkSuQmCC" class="img2">
                    <div :viewCount="viewCount">{{ show.viewCount }}</div>
                  </div>
                  <!-- 评论 -->
                  <div class="right-item">
                    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAIkSURBVFiF7Zc9j9NAEIafsRM+KhpqoKDiR4DTREqDaJAoafhoQuK1ckg0ZyMdEiS2OySEECVItBR0Z4TEj6Ch5gdc66GxcxtfEjsHzoGUt9rZmfU83vXHDOz0n0lsI01TT1X3C9NrO7mqRkEQhCuBkiTRtiGWSUR6vu9nAJ1yMo7jsByrarQFiFsUp1CcyiKQiJRHlVW3sS3FcRxaeQFwqkGq+nUbMBV55eAE0FlrB1SnHVCdOvUhkCTJM2APeGWMeWH7ZrPZZdd13+V5fr3T6TwYjUbfK2vvAS+BL8aYR3W5ancoTdM7wAFwCTgo7Llc132tqrdF5Eae558rsFeBD8AV4GEcx8//GEhVL9TYF63xOdsnIucr9sLaUwEZYz4C08KcFvZc3W73CfAN+CUid21fEAQ/HMd5DByJyCdjzNO6fI2eIWPM3nQ6jSaTyVHVNxwOfwI3V60dj8dvwjB8G4Zh3iRX47dsGUxTNYWBf/C13wHVaQdUpzMFKsrYBdnfoQzwRGQ/TdMMoCy865SmqbcpTJ7nHsc19byGt2vqSFXLgEOAJEkAMmNMb9lFy5pYdfNmReS44XEcJ5vP20FWX+bZ89X+qYg73JjipDIRieyTkFWRFbj5LlVhVDWy77CpVj0OK/9lvu9ncRx7IuJVIBdg/nbL5K5zDgYDgPvAtX6/L8D7NmFgzZGVWtZetwUDzQq0hbZaRHrb6mzX6jTfmp3a0G+wI+Yg4Q0N4wAAAABJRU5ErkJggg==" class="img2">
                    <div :comments="show.comments">{{ show.comments }}</div>
                  </div>
                  <!-- 点赞 -->
                  <div class="right-item">
                    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAHOSURBVFiF7ZjdbawwEIXPISkknVzvC9p2sAtgKQC7hrTBS0wn9zbiyQsg4/3JgnfjKLpHWgmN/74dezwDwH/dFnMGO+eUiLQAlIh0AGCMOeXMWeUMDiEoAAoASLYk277vs4Be9g7s+/5EsgUAEelIAsAbSVXXNYdh8HvmzfLQJG+MOWmtD/O2kWydc+rbgGLvkOxme+752Q0Uq2kan5g8AEyHfbM2A6VnZ8+iDwWK9YgtSrUJyDmnnumdzUDTvQPgOd4BgNctnTd6R1lrP641isgInP+xu4HiG3iDd9S1BpJqmnc1391A93qHZBdCGL/o8wdRynHO+fn6WCXXS3nIGHOKQ11rnZWQY1lrZXr0WusDEHkoytwrOed8COFRDCtNOXC1ZhU17rpZczRt3UpnYT9RH74HaVlzOXOPyPY5UqmhGFBcnlRV5ZfnEjC3VAwoTkNxCVMMKIowH9uLb1kcYUBZIHXJWNxDqYoAXQt54Ad4KH1JKAIUh3yqIkBzyF+qrc4KNJJtmvmrqvKzzVr7kYbqDhh1rX0BEpFxLiu/kLqz302JSHepFF4+NgzD4I/H4ygi/wCM84/k36ZpfF3XnD8oZLJ4EXl/1lvL79cnbWbUVZZeqYsAAAAASUVORK5CYII=" class="img2">
                    <div :likes="show.likes">{{ show.likes }}</div>
                  </div>
                </div>
              </div>
            </li>
          </ul>
        </div>
      </div>
    </section>
  </div>
</template>
<style scoped>
.club{
    width: 50%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}
header {
    background: linear-gradient(to right,  #dbeaf6,#8bc7f9,#30a0fc);
    padding: 20px;
    border-radius: 2%;
}

.club-header1 {
    display: flex; /* 启用flexbox布局 */
    align-items: center; /* 垂直居中对齐 */
    justify-content: space-between; /* 在主轴上两端对齐 */
    padding: 10px; /* 可选：根据需要添加内边距 */
}

.club-image {
    height: 80px;
    width: 80px;
    max-width: 100%; 
    /* height: auto; 保持图片的原始宽高比 */
    margin-left: 50px;
    border-radius: 100%; /* 设置图片为圆形 */
}

.club-button{
    margin-left: auto; /* 将按钮推向右侧 */
    margin-right: 50px;
    padding: 5px;
    background-color: #3d9eee;
    color: white;
    border: none;
    top: 20px; /* 距离顶部20px */
    right: 20px; /* 距离右侧20px */
    cursor: pointer;
    color: #72706a;
    border-radius: 10%;
}

header p {
    margin: 10px 10px;
    
}
.special-topic {
    margin: 20px;
}
.topic{
  background: linear-gradient(to bottom,  #daebf8,#e7f3fc,#f8f9fa);
  h3 {
    background-color: #e0e0e0;
    padding: 10px;
    margin: 0;
}
}

.special-topic {
    background-color: #f8f8f8; /* 背景颜色，根据需要调整 */
    padding: 10px; /* 内边距，根据需要调整 */
    margin: 20px 0; /* 外边距，根据需要调整 */
}

.special-topic h2 {
    margin: 0; /* 移除默认的外边距 */
    padding-bottom: 5px; /* 下方内边距，为下划线留出空间 */
    border-bottom: 2px solid #007bff; /* 下划线样式 */
    display: inline-block; /* 使下划线只在文字下方 */
}
.topic-title{
    display: flex;
    justify-content: space-between;
    span{
        margin-left: auto; /* 向右对齐 */
        margin-right: 50px;
        color: #8e8e8e;
        font-size: 14px;
    }
    p{
        display: inline-block;
        font-size: 20px;
        
    }
}
.sub-topic {
    margin: 10px 0;
    padding: 10px;
    display: flex; 

}
.display-list{
    list-style-type: none;
    padding: 0px;
    
}
.sub-topic li{
    display: flex; 
}
.sub-left{
    height: 112px;
    width: 200px;
    position: relative;
    .sub-image{
        position: absolute;
        width: 100%;
        height: 100%;
    }
    .player{
        position: absolute;
        width: 40px;
        height: 40px;
        left: 40%;
        top: 40%;
        z-index: 999;
    }
}

.sub-right{
    margin-left: 20px;
    
}
.right-inline{
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    font-size: 16px;
    .yellow{
        display: flex;
        color: #5f95fe;
        font-size: 14px;
        height: 18px;
        background-color: #d5e2ff;
    }
    .right-item{
        display: flex;
        color: #8e8e8e;
        font-size: 14px;
        margin-right: 18px;
        align-items: center;
    }
}

.logo{
    width: 30px;
    height: 30px;
    margin-right: 10px;
}
.img1{
    width: 22px;
    height: 22px;
}
.img2{
    width: 18px;
    height: 18px;
}
.club-badge {
    display: inline-flex; /* 使用flex布局使图标和文字并排 */
    align-items: center; /* 垂直居中对齐 */
    background-color: #f0f0f0; /* 背景颜色 */
    padding: 5px 10px; /* 内边距 */
    border-radius: 15px; /* 圆角边框 */
    font-size: 14px; /* 字体大小 */
    color: #333; /* 字体颜色 */
}

.club-icon {
    width: 16px; /* 图标宽度 */
    height: 16px; /* 图标高度 */
    margin-right: 5px; /* 图标和文字之间的间距 */
}

.club-text {
    white-space: nowrap; /* 防止文本换行 */
    color: #ffba75;
}

.sub-topic p {
    margin: 5px 0;
}
</style>