|
|
import router from '../router/router';
|
|
|
|
|
|
let timer;
|
|
|
|
|
|
Component({
|
|
|
properties: {
|
|
|
product: {
|
...
|
...
|
@@ -17,7 +19,7 @@ Component({ |
|
|
});
|
|
|
//放大缩小循环动画
|
|
|
var next = true;
|
|
|
setInterval(function () {
|
|
|
timer = setInterval(function () {
|
|
|
if (next) {
|
|
|
animation.scale(1.05).step()
|
|
|
next = !next;
|
...
|
...
|
@@ -30,6 +32,10 @@ Component({ |
|
|
})
|
|
|
}.bind(this), 400)
|
|
|
},
|
|
|
detached: function() {
|
|
|
clearInterval(timer);
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
onClick() {
|
|
|
router.go('detail', {
|
...
|
...
|
|