Commit 183e350f by zhanghaozhe

Merge branch '11-11' into dev

parents c1fa1bf5 1213ac7e
......@@ -45,6 +45,10 @@ function ClosablePopup({
ReactDOM.render(closablePopup, div)
return {
close: _close
}
}
export default ClosablePopup
......@@ -131,7 +131,7 @@ class Live extends Component {
<div key={index}>
{
preheatLives.map((item, index) => {
return <LiveContent key={index} item={item} makeSubscribe={this.makeSubscribe}/>
return <LiveContent key={index} item={item} makeSubscribe={this.makeSubscribe} toLiveRoom={this.toLiveRoom}/>
})
}
</div>
......@@ -147,7 +147,7 @@ class Live extends Component {
}
}
function LiveContent({item, makeSubscribe}) {
function LiveContent({item, makeSubscribe, toLiveRoom}) {
return (
<div className="content">
{
......@@ -181,7 +181,7 @@ function LiveContent({item, makeSubscribe}) {
</div>
{
item['on_live']
? <button className={'on-living'} onClick={this.toLiveRoom.bind(this, item['live_id'])}>正在直播</button>
? <button className={'on-living'} onClick={() => {toLiveRoom(item['live_id'])}}>正在直播</button>
:
item['is_end']
? <button className={'subscribed'}>已结束</button>
......
......@@ -11,6 +11,7 @@ import './index.scss'
}
))
class BlessingRank extends Component {
popupInstance = null
constructor(props) {
super(props)
this.state = {
......@@ -44,10 +45,15 @@ class BlessingRank extends Component {
if (bool && !uid) {
history.push('/passport')
} else {
Popup({
title: '收货信息',
content: <AddressPopup handleToHide={() => this.handleToSwitch(false)}/>
})
if (bool && !this.popupInstance) {
this.popupInstance = Popup({
title: '收货信息',
content: <AddressPopup handleToHide={() => this.handleToSwitch(false)}/>
})
} else {
this.popupInstance.close()
this.popupInstance = null
}
}
}
......
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