index.js 454 B

123456789101112131415161718192021222324252627
  1. //index.js
  2. //获取应用实例
  3. const app = getApp()
  4. Page({
  5. data: {
  6. imgUrls:[
  7. "/assets/carousel/1.jpg",
  8. "/assets/carousel/2.jpg",
  9. "/assets/carousel/3.jpg"
  10. ],
  11. indicatorDots: false,
  12. autoplay: true,
  13. interval: 4000,
  14. duration: 800,
  15. },
  16. swiperChange(e) {
  17. const that = this;
  18. that.setData({
  19. swiperIndex: e.detail.current,
  20. })
  21. },
  22. onLoad: function(){
  23. },
  24. onShareAppMessage: function(){
  25. }
  26. })