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
c3e62f2b
Commit
c3e62f2b
authored
Dec 09, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公共弹窗
parent
6533f7fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
1 deletions
+68
-1
src/components/activity/newyear-2019/common/commonPopup/index.js
+36
-0
src/components/activity/newyear-2019/common/commonPopup/index.scss
+29
-0
src/components/activity/newyear-2019/preheat/LiveRoom/index.js
+3
-1
No files found.
src/components/activity/newyear-2019/common/commonPopup/index.js
0 → 100644
View file @
c3e62f2b
import
React
,
{
Component
}
from
'react'
;
import
'./index.scss'
;
export
default
class
index
extends
Component
{
constructor
(
props
)
{
super
(
props
);
}
computedStyle
=
()
=>
{
return
{
'top'
:
`
${
this
.
props
.
top
}
px`
,
'width'
:
`
${
this
.
props
.
width
}
px`
}
}
// 控制点击空白处是否关闭弹窗 需要传递一个boolean属性 mark
closePopup
=
()
=>
{
if
(
this
.
props
.
mark
)
{
this
.
props
.
closePopup
();
}
}
render
()
{
return
(
<
div
className
=
'popup__container'
onClick
=
{
this
.
closePopup
}
>
<
div
className
=
'content__container'
style
=
{
this
.
computedStyle
()}
>
<
img
className
=
"close__btn"
onClick
=
{
this
.
props
.
closePopup
}
src
=
'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/close-btn.png'
alt
=
""
/>
{
React
.
Children
.
map
(
this
.
props
.
children
,
function
(
child
)
{
return
<>
{
child
}
<
/>
;
})
}
<
/div
>
<
/div
>
)
}
}
src/components/activity/newyear-2019/common/commonPopup/index.scss
0 → 100644
View file @
c3e62f2b
.popup__container
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100vw
;
height
:
100vh
;
background
:
rgba
(
0
,
0
,
0
,
0
.6
);
z-index
:
99
;
.content__container
{
width
:
320px
;
min-height
:
240px
;
border-radius
:
5px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
position
:
absolute
;
left
:
50%
;
transform
:
translateX
(
-50%
);
.close__btn
{
position
:
absolute
;
left
:
50%
;
transform
:
translateX
(
-50%
);
width
:
33px
;
height
:
33px
;
bottom
:
-57px
}
}
}
\ No newline at end of file
src/components/activity/newyear-2019/preheat/LiveRoom/index.js
View file @
c3e62f2b
...
...
@@ -3,6 +3,7 @@ import './index.scss';
import
{
Toast
}
from
'antd-mobile'
;
import
{
http
}
from
'@/utils'
;
import
CommonContainer
from
'./../../common/commonContainer/index'
import
CommonPopup
from
'./../../common/commonPopup/index'
;
export
default
class
index
extends
Component
{
constructor
(
props
)
{
...
...
@@ -13,7 +14,7 @@ export default class index extends Component {
}
componentDidMount
()
{
http
.
get
(
`
${
API
.
home
}
/
sys
/get_live_info`
).
then
(
res
=>
{
http
.
get
(
`
${
API
.
home
}
/
activity
/get_live_info`
).
then
(
res
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
;
if
(
code
===
200
)
{
this
.
setState
({
...
...
@@ -62,6 +63,7 @@ export default class index extends Component {
const
{
list
}
=
this
.
state
;
return
(
<
div
className
=
'live__container'
>
<
CommonPopup
top
=
{
50
}
/
>
<
CommonContainer
title
=
'大咖直播'
>
<
ul
className
=
'live__list'
>
{
...
...
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