...
|
...
|
@@ -7,6 +7,29 @@ Component({ |
|
|
},
|
|
|
tabIdx: String
|
|
|
},
|
|
|
data: {
|
|
|
animation: null,
|
|
|
},
|
|
|
ready: function() {
|
|
|
let animation = wx.createAnimation({
|
|
|
duration: 400,
|
|
|
timingFunction: 'ease',
|
|
|
});
|
|
|
//放大缩小循环动画
|
|
|
var next = true;
|
|
|
setInterval(function () {
|
|
|
if (next) {
|
|
|
animation.scale(1.05).step()
|
|
|
next = !next;
|
|
|
} else {
|
|
|
animation.scale(1).step()
|
|
|
next = !next;
|
|
|
}
|
|
|
this.setData({
|
|
|
animation: animation.export()
|
|
|
})
|
|
|
}.bind(this), 400)
|
|
|
},
|
|
|
methods: {
|
|
|
onClick() {
|
|
|
router.go('detail', {
|
...
|
...
|
|