Commit 493731c9 by wangshuo

中奖记录以及地址

parent d1f84946
......@@ -41,14 +41,15 @@ class BlessingGetPrize extends Component {
}
showAddress = (bool) => {
const {history, uid} = this.props
const {history, uid} = this.props;
const {name} = this.state;
if (bool && !uid) {
history.push('/passport')
} else {
if (bool && !this.popupInstance) {
this.popupInstance = Popup({
title: '收货信息',
content: <AddressPopup handleToHide={() => this.showAddress(false)}/>
title: '恭喜您',
content: <AddressPopup tip='填写您的联系方式' prize={name} handleToHide={() => this.showAddress(false)}/>
})
} else {
this.popupInstance.close()
......@@ -72,7 +73,7 @@ class BlessingGetPrize extends Component {
{
is_winning === 1 && is_virtual === 0 && (
<div className='real__prize'>
<div>恭喜你,抽中{name}奖品</div>
<div>恭喜你,抽中{name}奖品</div>
<span onClick={()=> this.showAddress(true)} className='address'>填写收货地址</span>
</div>
)
......@@ -109,6 +110,7 @@ class BlessingGetPrize extends Component {
<a href='/blessingPreheat' className='join__button'>
立即参与抽奖
</a>
<span onClick={()=> this.showAddress(true)} className='address'>填写收货地址</span>
<div className='prize__tip'>
......
......@@ -192,4 +192,14 @@
color:rgba(255,255,255, .6);
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 {
render() {
const { isLoading, addressInfo } = this.state;
const {tip, prize} = this.props;
return (
<>
{
......@@ -84,7 +85,14 @@ class AddressPopup extends Component {
}}
render={({errors}) => (
<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
name="name"
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