index.js 707 B

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