my.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view>
  3. <swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" circular>
  4. <swiper-item v-for="(item,i) in swiperList" :key="i">
  5. <view class="swiper-item">
  6. <image :src="item.src"></image>
  7. </view>
  8. </swiper-item>
  9. </swiper>
  10. <uni-easyinput v-model="phone" placeholder="请输入手机号" prefixIcon="phone" clearable type="number" maxlength="11" />
  11. <uni-easyinput v-model="verificationCode" placeholder="请输入验证码" prefixIcon="phone" clearable type="number" maxlength="4" />
  12. <login></login>
  13. <userInfo></userInfo>
  14. <button @click="increment">123</button>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. swiperList: [],
  22. phone: '',
  23. verificationCode: '',
  24. };
  25. },
  26. methods: {
  27. getSwiperList() {
  28. this.swiperList = [{
  29. "id": 1,
  30. "src": "../../static/ad1.png"
  31. },
  32. {
  33. "id": 2,
  34. "src": "../../static/ad2.png"
  35. },
  36. {
  37. "id": 3,
  38. "src": "../../static/ad3.png"
  39. }
  40. ]
  41. },
  42. },
  43. onLoad() {
  44. this.getSwiperList()
  45. },
  46. }
  47. </script>
  48. <style lang="scss">
  49. swiper {
  50. height: 180rpx;
  51. .swiper-item,
  52. image {
  53. width: 100%;
  54. height: 100%;
  55. }
  56. }
  57. </style>