Commit 747ed97c by FE

share countdown modify

parent da9642fc
...@@ -141,6 +141,7 @@ class CollectBlessing extends Component { ...@@ -141,6 +141,7 @@ class CollectBlessing extends Component {
Toast.info('今日已分享,记得明天来~', 2, null, false); Toast.info('今日已分享,记得明天来~', 2, null, false);
}else { }else {
handleToShowShare(); handleToShowShare();
this.shareTimer && clearInterval(this.shareTimer);
this.shareTimer = setInterval(() => { this.shareTimer = setInterval(() => {
this.setState( this.setState(
{ {
...@@ -148,6 +149,9 @@ class CollectBlessing extends Component { ...@@ -148,6 +149,9 @@ class CollectBlessing extends Component {
}, },
() => { () => {
if (seconds === 0) { if (seconds === 0) {
this.setState({
seconds: 5
});
typeof cb === 'function' && cb(); typeof cb === 'function' && cb();
clearInterval(this.shareTimer); clearInterval(this.shareTimer);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment