...
|
...
|
@@ -19,6 +19,7 @@ export default class wheelSurf extends PureComponent { |
|
|
super(props);
|
|
|
this.state = {
|
|
|
uid: 0,
|
|
|
expIdx: 1,
|
|
|
query: {},
|
|
|
canStart: true, // 可以抽奖
|
|
|
slowEnding: false, // 减速结束
|
...
|
...
|
@@ -107,6 +108,7 @@ export default class wheelSurf extends PureComponent { |
|
|
if (result.code === 200) {
|
|
|
this.setState({
|
|
|
conf: result.data.conf,
|
|
|
expIdx: result.data.prize_idx,
|
|
|
totalParts: result.data.prize,
|
|
|
remainCount: result.data.residueCount,
|
|
|
dayLeftTimesTip: result.data.conf.btm_tip_one,
|
...
|
...
|
@@ -148,7 +150,11 @@ export default class wheelSurf extends PureComponent { |
|
|
});
|
|
|
|
|
|
if (result.code !== 200) {
|
|
|
console.log(result.message);
|
|
|
result = {
|
|
|
data: {
|
|
|
prize_idx: this.state.expIdx
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let timer = setTimeout(() => {
|
...
|
...
|
@@ -201,7 +207,7 @@ export default class wheelSurf extends PureComponent { |
|
|
};
|
|
|
|
|
|
stop = angle => {
|
|
|
let rotateDeg = angle + 360 * 2;
|
|
|
let rotateDeg = angle + 360 * 5;
|
|
|
let randCssName = 'stop_' + (new Date()).getTime();
|
|
|
let randCssContent = '{' +
|
|
|
'transform: rotateZ(' + rotateDeg + 'deg) !important;' +
|
...
|
...
|
|