<template>
  <view>
    <view>
      <view class="home-main">
        <view class="custom-swiper">
          <up-swiper :list="list3" indicator indicatorMode="line" circular :height="'697rpx'" :indicatorStyle="{ bottom: '60px' }"></up-swiper>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import { ref } from 'vue';
import {
  slideshow,
} from '@/api/home.js'
import {
  onShow
} from "@dcloudio/uni-app";


const list3 = ref([]);//轮播图数据


const getBanners = async () => {
  try {
    const res = await slideshow(19);
    if (res.code === 200 && res.data.picture) {
      list3.value = res.data.picture.split(',');
    }
  } catch (error) {
    console.log('error', error);

  }
}


onShow(() => {
  getBanners();
})
</script>

<style scoped lang="scss">
.custom-swiper {
  width: 750rpx;
  height: 697rpx;
}
</style>
