鸿宇研学生前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
703 B

  1. <template>
  2. <view class="swiper">
  3. <uv-swiper
  4. :list="bannerList" keyName="image"
  5. indicator
  6. indicatorMode="dot"
  7. indicatorInactiveColor="rgba(255, 255, 255, 0.7)"
  8. height="382rpx"
  9. ></uv-swiper>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. bannerList: [],
  17. }
  18. },
  19. created() {
  20. this.getData()
  21. },
  22. methods: {
  23. async getData() {
  24. try {
  25. this.bannerList = (await this.$fetch('queryBannerList', { type: 0 })).records // type:0-首页顶部 1-首页中部
  26. } catch (err) {
  27. }
  28. },
  29. },
  30. }
  31. </script>
  32. <style scoped lang="scss">
  33. .swiper {
  34. border-radius: 40rpx;
  35. overflow: hidden;
  36. }
  37. </style>