123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- // pages/marvellous/components/videoAn/video.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- },
- transverse: undefined,
- portrait: undefined,
- /**
- * 组件的初始数据
- */
- data: {
- tra: {},
- por: {},
- step: 0,
- show: true,
- heng: true,
- shu: 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
- },()=>{
- let time = setInterval(() => {
- clearInterval(time);
- _this.end();
- }, 1450);
- })
- },
- end(){
- this.setData({
- shu: false,
- step: 3
- })
- this.triggerEvent("close")
- }
- }
- })
|