index.vue 817 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="main">
  3. <view class="swiper"><u-swiper :list="list"></u-swiper></view>
  4. </view>
  5. </template>
  6. <script>
  7. import { getBannerList } from '@/apis/main.js'
  8. export default {
  9. data() {
  10. return {
  11. title: 'Hello',
  12. list: []
  13. }
  14. },
  15. onLoad() {
  16. },
  17. onShow(){
  18. this.getBannerLists()
  19. },
  20. methods: {
  21. getBannerLists() {
  22. getBannerList().then(res => {
  23. console.log(res)
  24. })
  25. }
  26. }
  27. }
  28. </script>
  29. <style>
  30. .content {
  31. display: flex;
  32. flex-direction: column;
  33. align-items: center;
  34. justify-content: center;
  35. }
  36. .logo {
  37. height: 200rpx;
  38. width: 200rpx;
  39. margin-top: 200rpx;
  40. margin-left: auto;
  41. margin-right: auto;
  42. margin-bottom: 50rpx;
  43. }
  44. .text-area {
  45. display: flex;
  46. justify-content: center;
  47. }
  48. .title {
  49. font-size: 36rpx;
  50. color: #8f8f94;
  51. }
  52. </style>