<!-- <template>
  <div>
    <div class="px-10 pt-20">
      <van-search
        v-model="searchStr"
        placeholder="请输入搜索关键词"
        shape="round"
        @search="onSearch"
      >
      </van-search>
      <van-list
        v-if="dataList.length"
        v-model:loading="loading"
        :immediate-check="false"
        :finished="finished"
        finished-text=""
        @load="loadMore"
      >
        <TravelProjectItem
          v-for="item in dataList"
          :key="item.id"
          :item-data="item"
        />
      </van-list>
      <Empty v-else-if="!dataList.length && !loading" />
    </div>
  </div>
</template>

<script setup>
const menuName = useRouteQuery("menuName");

const id = useRouteParam("id");

const searchStr = ref("");
const dataList = ref([]);
const loading = ref(false);
const finished = ref(false);
const pageNum = ref(1);
const pageSize = ref(10);
async function getProjects() {
  const { data } = await request(`website/tourism/project/list`, {
    query: {
      pageNum: pageNum.value,
      pageSize: pageSize.value,
      belongTab: id.value,
      searchString: searchStr.value,
    },
  });
  dataList.value = dataList.value.concat(data.dataList);
  loading.value = false;
  if (dataList.value.length >= data.totalCount) {
    finished.value = true;
  } else {
    finished.value = false;
  }
}

function loadMore() {
  pageNum.value++;
  getProjects();
}

function onSearch() {
  pageNum.value = 1;
  dataList.value = [];
  getProjects();
}

onMounted(() => {
  getProjects();
});

useSeoMeta({
  title: `${menuName.value}精品旅游`,
});
</script>

<style lang="scss" scoped></style> -->

<template>
  <div></div>
</template>

<script setup></script>

<style lang="scss" scoped></style>
