|
@@ -290,8 +290,10 @@
|
|
|
|
|
|
// 停止动画
|
|
// 停止动画
|
|
stop() {
|
|
stop() {
|
|
- // 获取屏幕距离,用于计算停止动画移动距离计算
|
|
|
|
|
|
+ if(this.btnIng) return
|
|
|
|
|
|
|
|
+ this.btnIng = true
|
|
|
|
+ // 获取屏幕距离,用于计算停止动画移动距离计算
|
|
// #ifndef MP-ALIPAY
|
|
// #ifndef MP-ALIPAY
|
|
let screenWidth = null
|
|
let screenWidth = null
|
|
uni.getSystemInfo({
|
|
uni.getSystemInfo({
|
|
@@ -301,7 +303,7 @@
|
|
});
|
|
});
|
|
// #endif
|
|
// #endif
|
|
|
|
|
|
- this.btnIng = true
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 0秒:下标4
|
|
* 0秒:下标4
|
|
* 1秒:下标6
|
|
* 1秒:下标6
|
|
@@ -373,7 +375,6 @@
|
|
let windowWidth = res.windowWidth;
|
|
let windowWidth = res.windowWidth;
|
|
my.createSelectorQuery().select('.rolling-prize-list').boundingClientRect().exec(info => {
|
|
my.createSelectorQuery().select('.rolling-prize-list').boundingClientRect().exec(info => {
|
|
_this.data = info[0].width
|
|
_this.data = info[0].width
|
|
- console.log(_this.data);
|
|
|
|
_this.animation.translateX(-(_this.data + windowWidth * 3)).step({
|
|
_this.animation.translateX(-(_this.data + windowWidth * 3)).step({
|
|
duration: 4000,
|
|
duration: 4000,
|
|
timingFunction: 'ease'
|
|
timingFunction: 'ease'
|
|
@@ -403,7 +404,6 @@
|
|
timingFunction: 'ease'
|
|
timingFunction: 'ease'
|
|
})
|
|
})
|
|
this.animationData = this.animation.export()
|
|
this.animationData = this.animation.export()
|
|
- console.log(-(this.data / 8 * this.num2 + screenWidth * 3));
|
|
|
|
}).exec();
|
|
}).exec();
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|