Commit e754ba73 by wangshuo

弹框消失

parent abbda65a
......@@ -38,6 +38,21 @@ class MyTreasure extends Component {
this.fetchActivityStatus();
}
componentWillUnmount() {
if(this.phoneInstance) {
this.phoneInstance.close();
}
if(this.confrimInstance) {
this.confrimInstance.close();
}
if(this.splitInstance) {
this.splitInstance.close();
}
if(this.addressInstance) {
this.addressInstance.close();
}
}
// 页面加载时,是否需要拆宝箱
judgeIsHaveId = (data) => {
const id = getParam('id');
......@@ -70,7 +85,11 @@ class MyTreasure extends Component {
<p className="phone-treasure__notice">为了您的账户安全,请于20191231日前绑定手机号,过期将失效</p>
</>
}
/>
/>,
close: () => new Promise(resolve => {
this.phoneInstance = null;
resolve()
})
});
}
......@@ -89,7 +108,11 @@ class MyTreasure extends Component {
data={params}
bindInfo={bindInfo}
successBindPhone={this.successBindPhone}
/>
/>,
close: () => new Promise(resolve => {
this.confrimInstance = null;
resolve()
})
});
}
......@@ -137,7 +160,11 @@ class MyTreasure extends Component {
toCourseList={this.toCourseList}
toFecthMoney={this.toFecthMoney}
/>
</SplitSuccess>
</SplitSuccess>,
close: () => new Promise(resolve => {
this.splitInstance = null;
resolve()
})
});
// 跟新队伍状态
......@@ -205,7 +232,11 @@ class MyTreasure extends Component {
</>
}
handleToHide={() => this.addressInstance.close()}
/>
/>,
close: () => new Promise(resolve => {
this.addressInstance = null;
resolve()
})
});
}
......
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