<cover-view class=‘leida’ animation="{{animationData01}}">
<cover-view class=‘leida01’ animation="{{animationData}}"></cover-view>
var animation = wx.createAnimation({
duration: 4000,
timingFunction: ‘linear’,
})
var animation01 = wx.createAnimation({
duration: 4000,
timingFunction: ‘linear’,
})
this.animation = animation;
this.animation01 = animation01
this.setData({
animationData: animation.export(),
animationData01: animation01.export()
})
var n = 0;
setInterval(function () {
n = n + 1;
this.animation.rotate(180 * (n)).step();
this.animation01.rotate(-180 * (n)).step()
this.setData({
animationData: this.animation.export(),
animationData01: this.animation01.export()
})
}.bind(this), 1000)
然后就只有animationData01这个动画在转动,animationData没有转动