Commit 493731c9 by wangshuo

中奖记录以及地址

parent d1f84946
...@@ -41,14 +41,15 @@ class BlessingGetPrize extends Component { ...@@ -41,14 +41,15 @@ class BlessingGetPrize extends Component {
} }
showAddress = (bool) => { showAddress = (bool) => {
const {history, uid} = this.props const {history, uid} = this.props;
const {name} = this.state;
if (bool && !uid) { if (bool && !uid) {
history.push('/passport') history.push('/passport')
} else { } else {
if (bool && !this.popupInstance) { if (bool && !this.popupInstance) {
this.popupInstance = Popup({ this.popupInstance = Popup({
title: '收货信息', title: '恭喜您',
content: <AddressPopup handleToHide={() => this.showAddress(false)}/> content: <AddressPopup tip='填写您的联系方式' prize={name} handleToHide={() => this.showAddress(false)}/>
}) })
} else { } else {
this.popupInstance.close() this.popupInstance.close()
...@@ -72,7 +73,7 @@ class BlessingGetPrize extends Component { ...@@ -72,7 +73,7 @@ class BlessingGetPrize extends Component {
{ {
is_winning === 1 && is_virtual === 0 && ( is_winning === 1 && is_virtual === 0 && (
<div className='real__prize'> <div className='real__prize'>
<div>恭喜你,抽中{name}奖品</div> <div>恭喜你,抽中{name}奖品</div>
<span onClick={()=> this.showAddress(true)} className='address'>填写收货地址</span> <span onClick={()=> this.showAddress(true)} className='address'>填写收货地址</span>
</div> </div>
) )
...@@ -109,6 +110,7 @@ class BlessingGetPrize extends Component { ...@@ -109,6 +110,7 @@ class BlessingGetPrize extends Component {
<a href='/blessingPreheat' className='join__button'> <a href='/blessingPreheat' className='join__button'>
立即参与抽奖 立即参与抽奖
</a> </a>
<span onClick={()=> this.showAddress(true)} className='address'>填写收货地址</span>
<div className='prize__tip'> <div className='prize__tip'>
......
...@@ -193,3 +193,13 @@ ...@@ -193,3 +193,13 @@
text-align: center; text-align: center;
} }
} }
.address__prize {
font-size: 16px;
width: 100%;
text-align: center;
text-align-last: center;
color: #525C65;
line-height: 16px;
margin-top: 16px;
}
\ No newline at end of file
...@@ -54,6 +54,7 @@ class AddressPopup extends Component { ...@@ -54,6 +54,7 @@ class AddressPopup extends Component {
render() { render() {
const { isLoading, addressInfo } = this.state; const { isLoading, addressInfo } = this.state;
const {tip, prize} = this.props;
return ( return (
<> <>
{ {
...@@ -84,7 +85,14 @@ class AddressPopup extends Component { ...@@ -84,7 +85,14 @@ class AddressPopup extends Component {
}} }}
render={({errors}) => ( render={({errors}) => (
<Form className="address-form"> <Form className="address-form">
<p className="address-form__desc">请及时填写收货信息,获得实物奖品后将第一时间为您邮寄</p> {
prize ? (
<p className='address__prize'>您抽中了{prize}<span style={{'color': '#FF4000'}}>实物奖品</span></p>
) : (null)
}
{
tip ? (<p className="address-form__desc">{tip}</p>) : (<p className="address-form__desc">请及时填写收货信息,获得实物奖品后将第一时间为您邮寄</p>)
}
<Field <Field
name="name" name="name"
render={({ field }) => ( render={({ field }) => (
......
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