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
11673138
Commit
11673138
authored
Oct 28, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参与抽奖弹框
parent
9350ebc1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
2 deletions
+96
-2
src/common/closable-popup/index.js
+10
-0
src/components/blessingPreheat/index.js
+28
-2
src/components/blessingPreheat/index.scss
+58
-0
No files found.
src/common/closable-popup/index.js
View file @
11673138
...
@@ -14,6 +14,16 @@ class ClosablePopup extends Component {
...
@@ -14,6 +14,16 @@ class ClosablePopup extends Component {
close
?
close
()
:
this
.
setState
({
visible
:
false
})
close
?
close
()
:
this
.
setState
({
visible
:
false
})
}
}
componentDidUpdate
(
prevProps
)
{
const
{
visible
}
=
this
.
props
if
(
prevProps
.
visible
!==
visible
)
{
this
.
setState
({
visible
})
}
}
render
()
{
render
()
{
const
{
title
,
className
,
children
,
closable
=
true
}
=
this
.
props
const
{
title
,
className
,
children
,
closable
=
true
}
=
this
.
props
return
(
return
(
...
...
src/components/blessingPreheat/index.js
View file @
11673138
...
@@ -3,6 +3,9 @@ import RulePopup from './rulePopup/index'
...
@@ -3,6 +3,9 @@ import RulePopup from './rulePopup/index'
import
CoursePopup
from
'./coursePopup/index'
import
CoursePopup
from
'./coursePopup/index'
import
'./index.scss'
import
'./index.scss'
import
{
Popup
}
from
'@/common'
import
{
Popup
}
from
'@/common'
import
{
CopyToClipboard
}
from
'react-copy-to-clipboard'
import
{
Toast
}
from
"antd-mobile"
class
BlessingPreheat
extends
Component
{
class
BlessingPreheat
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -10,7 +13,8 @@ class BlessingPreheat extends Component {
...
@@ -10,7 +13,8 @@ class BlessingPreheat extends Component {
this
.
state
=
{
this
.
state
=
{
isRule
:
false
,
isRule
:
false
,
isCourse
:
false
,
isCourse
:
false
,
inviteVisible
:
true
inviteVisible
:
true
,
joinLottery
:
true
}
}
}
}
...
@@ -22,6 +26,10 @@ class BlessingPreheat extends Component {
...
@@ -22,6 +26,10 @@ class BlessingPreheat extends Component {
})
})
}
}
onCopy
=
()
=>
{
Toast
.
info
(
'复制成功'
,
2
,
null
,
false
)
}
render
()
{
render
()
{
const
{
isRule
,
isCourse
,
inviteVisible
}
=
this
.
state
const
{
isRule
,
isCourse
,
inviteVisible
}
=
this
.
state
return
(
return
(
...
@@ -40,7 +48,25 @@ class BlessingPreheat extends Component {
...
@@ -40,7 +48,25 @@ class BlessingPreheat extends Component {
className
=
{
'invite-popup'
}
className
=
{
'invite-popup'
}
>
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png"
alt
=
""
className
=
"qr-code"
/>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png"
alt
=
""
className
=
"qr-code"
/>
<
button
>
一键复制网址
<
/button
>
<
CopyToClipboard
text
=
{
'kkk'
}
onCopy
=
{
this
.
onCopy
}
>
<
button
>
一键复制网址
<
/button
>
<
/CopyToClipboard
>
<
/Popup
>
<
Popup
visible
=
{
this
.
state
.
joinLottery
}
title
=
{
'你已成功参与本时段抽奖'
}
className
=
{
'join-lottery'
}
>
<
div
className
=
"text"
>
<
div
className
=
"code"
>
抽奖码为:
99999999
<
/div
>
<
div
className
=
"time"
>
本时段的中奖结果将在
xx
:
xx
公布
<
/div
>
<
div
className
=
"hint"
>
你可关注‘七月在线’服务号第一时间获得中奖信息。
<
/div
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png"
className
=
'qr-code'
alt
=
""
/>
<
/div
>
<
button
onClick
=
{()
=>
{
this
.
setState
({
joinLottery
:
false
})}}
>
知道了
<
/button
>
<
/Popup
>
<
/Popup
>
<
/div
>
<
/div
>
)
)
...
...
src/components/blessingPreheat/index.scss
View file @
11673138
...
@@ -25,4 +25,62 @@
...
@@ -25,4 +25,62 @@
}
}
}
}
}
}
.join-lottery
{
background
:
#5327FA
;
text-align
:
center
;
.title
{
color
:
#fff
;
margin-bottom
:
15px
;
}
.text
{
width
:
275px
;
height
:
248px
;
padding
:
36px
30px
0
;
margin-bottom
:
10px
;
text-align
:
center
;
background
:
url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/join-lottery-bg.png")
;
background-size
:
contain
;
font-size
:
14px
;
.code
{
color
:
#FF0000
;
margin-bottom
:
8px
;
}
.time
,
.hint
{
font-size
:
12px
;
color
:
#525C65
;
}
.time
{
margin-bottom
:
20px
;
}
.hint
{
color
:
rgba
(
82
,
92
,
101
,
.8
);
margin-bottom
:
10px
;
text-align
:
left
;
}
.qr-code
{
width
:
90px
;
height
:
90px
;
}
}
button
{
width
:
133px
;
height
:
30px
;
background
:
#fff
;
border-radius
:
15px
;
font-size
:
14px
;
color
:
#5327FA
;
-webkit-appearance
:
none
;
outline
:
none
;
border
:
none
;
}
}
}
}
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