index.js 665 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. var app = getApp()
  2. Component({
  3. properties: {
  4. imgUrls: {
  5. type: Object,
  6. value: []
  7. },
  8. videoline: {
  9. type: String,
  10. value: ''
  11. }
  12. },
  13. data: {
  14. indicatorDots: true,
  15. circular: true,
  16. autoplay: false,
  17. interval: 3000,
  18. duration: 500,
  19. currents: '1',
  20. controls: true
  21. },
  22. ready: function () {
  23. this.videoContext = wx.createVideoContext('myVideo', this)
  24. },
  25. methods: {
  26. bindPause: function () {
  27. this.videoContext.play()
  28. this.setData({
  29. controls: false
  30. })
  31. },
  32. change: function (e) {
  33. this.setData({
  34. currents: e.detail.current + 1
  35. })
  36. }
  37. }
  38. })