...
|
...
|
@@ -164,8 +164,6 @@ export default class wheelSurf extends PureComponent { |
|
|
};
|
|
|
|
|
|
begin = async () => {
|
|
|
console.log('开始抽奖');
|
|
|
|
|
|
this.state.canStart = false;
|
|
|
this.setState({
|
|
|
remainCount: this.state.remainCount - 1
|
...
|
...
|
@@ -207,7 +205,7 @@ export default class wheelSurf extends PureComponent { |
|
|
});
|
|
|
this.state.angle = this.state.stopAngle;
|
|
|
this.stop(this.state.stopAngle);
|
|
|
}, 3000);
|
|
|
}, 2000);
|
|
|
};
|
|
|
|
|
|
calcStopAngle = idx => {
|
...
|
...
|
@@ -248,7 +246,7 @@ export default class wheelSurf extends PureComponent { |
|
|
};
|
|
|
|
|
|
stop = angle => {
|
|
|
let rotateDeg = angle + 360 * 5;
|
|
|
let rotateDeg = angle + 360 * 3;
|
|
|
let randCssName = 'stop_' + (new Date()).getTime();
|
|
|
let randCssContent = '{' +
|
|
|
'transform: rotateZ(' + rotateDeg + 'deg) !important;' +
|
...
|
...
|
|