<script setup>
import { getFullUrl } from '~/utils/helper';

const queryForm = reactive({
  limit: 10,
  page: 1,
  ss_type: undefined
})
const keyword = $ref('')


let data = $ref([])
let total = $ref(100)

watch(
  queryForm,
  () => {
    queryData()
  }
)

function queryData() {
  request({
    url: '/szmsg/school/index',
    data: { ...queryForm, keyword }
  }).then(res => {
    if (res.code === '1') {
      data = res.data.page_data
      total = res.data.total_rows * 1
    }
  })
}
queryData()


const router = useRouter()
function routerPush(name, data) {
  router.push({ name, ...data })
}
</script>

<template>
  <common-header />
  <div class="content w-full flex-col flex_center bg-hex-FCFEFF">
    <div class="title w-1400px h-60px">
      <breadcrumb-text title="艺术视野-特色课程展"></breadcrumb-text>
    </div>
    <div class="header w-full flex-col flex_center bg_img1 h-200px">
      <p class="text-5xl text-white mb-4">拓展课程1</p>
      <!-- <div class="search">
        <input v-model="searMsg" type="text" placeholder="搜索关键字" />
        <span class="inp-sear"></span>
      </div> -->
      <div class="w-500px">
        <search-input v-model="keyword" @search="queryData"></search-input>
      </div>
    </div>

    <div class="nav w-1400px mt-8">
      <!-- <div>
        <span>分类</span>
        <el-tabs v-model="kmActiveName" @tab-click="handleClick">
          <el-tab-pane label="全部" name="a"></el-tab-pane>
          <el-tab-pane label="学校" name="b"></el-tab-pane>
          <el-tab-pane label="机构" name="c"></el-tab-pane>
        </el-tabs>
      </div> -->
      <check-row v-model="queryForm.ss_type" label="分类" :items="[{n:'全部'},{n:'学校',v:'1'},{n:'机构',v:'2'}]"></check-row>

      <div class="flex flex-wrap justify-start">
        <div class="w-1/5 flex_center mb-4" v-for="i in data">
          <div class="w-268px h-204px rounded-xl shadow bg-white flex flex-col overflow-hidden cursor-pointer" :key="i"
            @click="routerPush('szmsg_tzkc_detail',{params:{id:i.ss_id}})">
            <div class="w-full flex-none h-157px">
              <img :src="getFullUrl(i.ss_img)" alt="" class="w-full h-full" />
            </div>
            <div class="p-2 flex justify-between items-center flex-auto mb-4 text-sm">
              {{ i.ss_name }}
            </div>
          </div>
        </div>
      </div>
      <!-- <div v-for="ys in 1" :key="ys" class="ysgc-kind">
        <ul class="specail">
          <li class="kc" v-for="kc in 1" :key="kc">
            <router-link to="/tzkc_detail">
              <img class="kc-back" src="@/assets/ysgc/kc3.png" alt="" />
              <div class="kc-des">
                <p class="kc-name">学校一</p>
              </div>
            </router-link>
          </li>
        </ul>
      </div> -->
      <!-- <div class="footer">
        <div style="
          width: 1280px;
          height: 50px;

          position: relative;
          margin: 0 auto;
        ">
          <el-pagination background layout="prev, pager, next" :total="1000"
            style="position: absolute; top: 0; right: 0">
          </el-pagination>
        </div>
      </div> -->
      <div class="flex justify-end mt-4 mb-8">
        <el-pagination background layout="prev, pager, next" :total="total" v-model:current-page="queryForm.page" />
      </div>
    </div>


  </div>
  <common-footer/>
</template>

<style lang="scss" scoped>
.bg_img1 {
  background-image: url("~/assets/ysgc/tskcz.png");
}
</style>

<!-- <style lang="scss" scoped>
.content {
  width: 100%;
  min-width: 1280px;
  margin: 0 auto;
  background-image: url("../../../assets/ysgc/back.png");
  background-size: 100%;
  background-repeat: no-repeat;
}

.title {
  width: 1280px;

  height: 55px;
  line-height: 55px;
  font-size: 18px;
  font-family: PingFangSC, PingFangSC-Regular;
  font-weight: 400;
  color: #050026;
  margin: 0 auto;

  span:first-of-type {
    width: 56px;
    height: 20px;
    font-size: 14px;
    font-family: PingFangSC, PingFangSC-Regular;
    font-weight: 400;
    text-align: left;
    color: #949494;
    line-height: 20px;
    margin-left: 10px;
  }

  span:last-of-type {
    width: 56px;
    height: 20px;
    font-size: 14px;
    font-family: PingFangSC, PingFangSC-Regular;
    font-weight: 400;
    text-align: left;
    color: #000000;
    line-height: 20px;
  }
}

.header {
  width: 100%;
  height: 200px;
  background: url("@/assets/ysgc/tskcz.png");
  background-size: 100% 200px;
  background-repeat: no-repeat;
  // padding-top: 40px;

  p {
    width: 192px;
    height: 67px;
    font-size: 48px;
    font-family: PingFangSC, PingFangSC-Semibold;
    font-weight: 600;
    text-align: left;
    color: #ffffff;
    line-height: 67px;
    margin: 0 auto;
    margin-bottom: 15px;
  }

  .search {
    position: relative;
    height: 50px;
    width: 497px;
    margin: 0 auto;

    input {
      background: #ffffff;
      border-radius: 8px;
      border: 1px solid #00a3ff;
      height: 50px;
      padding: 20px;
      width: 100%;
      outline: none;
    }

    .inp-sear {
      display: block;
      width: 26px;
      height: 26px;
      background-color: #00a3ff;
      border-radius: 6px;
      position: absolute;
      top: 11px;
      right: 10px;
      background-image: url("@/assets/ysgc/search.png");
      background-size: 60%;
      background-position: center;
      background-repeat: no-repeat;
    }
  }
}

.nav {
  width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;

  div {
    display: flex;

    span {
      padding-top: 10px;
      display: inline-block;
      width: 50px;
      height: 50px;
      font-size: 16px;
      font-family: PingFangSC, PingFangSC-Semibold;
      font-weight: 600;
      text-align: center;
      color: #000000;
      line-height: 21px;
    }
  }
}

.ysgc-kind {
  // width: 1650px;
  width: 1280px;
  margin: 0 auto;

  .specail {
    width: 100%;
    display: flex;
    flex-wrap: wrap;

    li {
      margin: 0 13px 17px 0;
      overflow: hidden;
      box-shadow: 0px 10px 24px 0px rgba(161, 153, 168, 0.18);
    }

    .kind-name {
      width: 300px;
      height: 274px;
      background: #ffffff;
      border-radius: 12px;
      box-shadow: 0px 10px 24px 0px rgba(161, 153, 168, 0.18);
      padding: 49px 20px;
      box-sizing: border-box;
      background-image: url("@/assets/img/zhjyzxxx/zxxx_bg.png");
      background-position: center -15px;

      h3 {
        width: 263px;
        height: 37px;
        font-size: 26px;
        font-family: PingFangSC, PingFangSC-Medium;
        font-weight: 500;
        text-align: left;
        color: #050026;
        line-height: 37px;
      }

      p {
        width: 246px;
        height: 22px;
        font-size: 16px;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;
        text-align: left;
        color: #050026;
        line-height: 22px;
        margin-top: 25px;
      }

      .btn-more {
        width: 111px;
        height: 31px;
        padding: 2px;
        box-sizing: border-box;
        border-radius: 38px;
        margin-top: 45px;
        background: linear-gradient(127deg, #3f64ff 10%, #8f78f8 91%);

        button {
          width: 100%;
          height: 100%;
          padding-left: 6px;
          background: #fff;
          border-radius: 38px;
          font-weight: 400;
          font-size: 14px;
          color: #6c5dd3;
          line-height: 20px;
          letter-spacing: 0.6px;
          border-image: linear-gradient(127deg, #3f64ff 10%, #8f78f8 91%) 1 1;
        }
      }
    }

    .kc {
      width: 300px;
      height: 278px;
      background: #ffffff;
      border-radius: 12px;
      box-shadow: 0px 10px 24px 0px rgba(161, 153, 168, 0.18);
      position: relative;

      .kc-back {
        width: 100%;
      }

      .kc-des {
        padding: 11px 6px;
        box-sizing: border-box;

        .kc-name {
          height: 22px;
          font-size: 16px;
          font-family: PingFangSC, PingFangSC-Regular;
          font-weight: 400;
          color: #000000;
          line-height: 22px;
        }

        .rate {
          display: flex;
          margin: 11px 0;

          img {
            margin-right: 6px;
          }
        }
      }

      .zan {
        position: absolute;
        top: 0;
        right: 0;
        width: 173px;
        height: 34px;
        line-height: 34px;
        font-size: 14px;
        color: #fff;
        display: flex;
        padding-left: 20px;
        background: rgba(0, 0, 0, 0.59);
        border-radius: 0px 12px 0px 12px;

        img {
          display: inline-block;
          width: 17px;
          height: 16px;
          margin: 8px 5px 0 10px;
        }
      }
    }
  }
}

.block {
  width: 350px;
  height: 50px;
  margin: 0 auto;
  margin-top: 50px;
}

.footer {
  width: 100%;
  height: 50px;
  margin-top: 100px;

  display: inline-block;
}
</style> -->

