// pages/marvellous/components/videoAn/video.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
  },
  transverse: undefined,
  portrait: undefined,
  /**
   * 组件的初始数据
   */
  data: {
    tra: {},
    por: {},
    step: 0,
    show: true,
    heng: true,
  },

  ready() {
    // this.transverse = wx.createAnimation({
    //   duration: 1500,
    //   timingFunction: 'linear',
    // })
    // this.portrait = wx.createAnimation({
    //   duration: 1500,
    //   timingFunction: 'linear',
    // })
    // this.transverse.width("750rpx").step();
    // this.portrait.height("100vh").step();
  },
  /**
   * 组件的方法列表
   */
  methods: {
    start() {
      let _this = this;
      this.setData({
        // tra: this.transverse.export(),
        step: 1
      },()=>{
        let time = setInterval(() => {
          clearInterval(time);
          _this.nextAnstion();
        }, 1450);

      })
    },
    nextAnstion() {
      let _this = this;
      this.setData({
        heng: false,
        // por: this.portrait.export(),
        step: 2
      },()=>{
        _this.end();
      })
    },
    end(){
      this.setData({
        step: 3
      })
      this.triggerEvent("close")
    }
  }
})
