<template>
  <Nav title="我的预约"> </Nav>
  <div class="list-wrap">
    <VideoItem v-for="(item, index) in list" :item="item.video" :key="index" />
    <Empty text="暂无预约" v-if="!list.length" />
  </div>
</template>

<script setup>
import { ref } from "vue";
import Nav from "@/components/NavBar.vue";
import Empty from "@/components/Empty.vue";
import { getSubscribeList } from "@/api/index";

const list = ref([]);
const onLoad = async () => {
  // 异步更新数据
  let ret = await getSubscribeList({ type: 1 });
  list.value = ret.data;
};
onLoad();
</script>
<style scoped lang="scss">
.van-pull-refresh {
  height: 100%;
}
::v-deep .van-list {
  background: #f5f6f7;
  .van-list__finished-text {
    background: #fff;
  }
  .van-list__loading {
    background: #fff;
  }
}
.list-wrap {
  padding: 0 32px 0 40px;
  border-radius: 16px 16px 0 0;
  background: #fff;
}
</style>
