|
@@ -107,6 +107,15 @@ class Recharge extends Component {
|
|
localStorage.userInfo = JSON.stringify(data)
|
|
localStorage.userInfo = JSON.stringify(data)
|
|
this.setState({ visible: false, userInfo: data })
|
|
this.setState({ visible: false, userInfo: data })
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 退出登录
|
|
|
|
+ onLoginOut = () => {
|
|
|
|
+ localStorage.removeItem('userInfo')
|
|
|
|
+ this.setState({
|
|
|
|
+ userInfo: {}
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
render () {
|
|
render () {
|
|
const { payAliPc, choosenItem, visible, userInfo, uploading, payParams } = this.state
|
|
const { payAliPc, choosenItem, visible, userInfo, uploading, payParams } = this.state
|
|
return (
|
|
return (
|
|
@@ -123,6 +132,9 @@ class Recharge extends Component {
|
|
<p>ID:{userInfo.userId}</p>
|
|
<p>ID:{userInfo.userId}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div hidden={!userInfo || !userInfo.userId} onClick={this.onLoginOut} className={styles['logout-btn']}>
|
|
|
|
+ 退出登录
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div className={styles['content-wrap']}>
|
|
<div className={styles['content-wrap']}>
|
|
<div className={styles['banner-bg']}></div>
|
|
<div className={styles['banner-bg']}></div>
|
|
@@ -166,13 +178,6 @@ class Recharge extends Component {
|
|
onCancel={this.onModalCancel}
|
|
onCancel={this.onModalCancel}
|
|
onOk={this.onLoginOk}
|
|
onOk={this.onLoginOk}
|
|
/>
|
|
/>
|
|
- {/* <Modal
|
|
|
|
- footer={false}
|
|
|
|
- visible={!!payParams}
|
|
|
|
- width={700}
|
|
|
|
- >
|
|
|
|
- <div dangerouslySetInnerHTML={{__html: payParams}} />
|
|
|
|
- </Modal> */}
|
|
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|