Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
493731c9
Commit
493731c9
authored
Nov 06, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中奖记录以及地址
parent
d1f84946
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
src/components/blessingGetPrize/index.js
+6
-4
src/components/blessingGetPrize/index.scss
+11
-0
src/components/blessingPreheat/addressPopup/index.js
+9
-1
No files found.
src/components/blessingGetPrize/index.js
View file @
493731c9
...
@@ -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'
>
...
...
src/components/blessingGetPrize/index.scss
View file @
493731c9
...
@@ -192,4 +192,14 @@
...
@@ -192,4 +192,14 @@
color
:rgba
(
255
,
255
,
255
,
.6
)
;
color
:rgba
(
255
,
255
,
255
,
.6
)
;
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
src/components/blessingPreheat/addressPopup/index.js
View file @
493731c9
...
@@ -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
})
=>
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment