Commit 62d5e62d by xuzhenghua

pull

parent fdf98450
...@@ -3,9 +3,16 @@ import ReactDOM from 'react-dom' ...@@ -3,9 +3,16 @@ import ReactDOM from 'react-dom'
import './index.scss' import './index.scss'
import classnames from 'classnames' import classnames from 'classnames'
const re = /(https?|ftp):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/
function ClosablePopup({ function ClosablePopup({
title, content, className, closable = true, close = function () { title,
} content,
className,
closable = true,
close = function () {
},
closeIcon = 'iconiconfront-2'
} = {}) { } = {}) {
function unmountComponent() { function unmountComponent() {
...@@ -35,7 +42,10 @@ function ClosablePopup({ ...@@ -35,7 +42,10 @@ function ClosablePopup({
{content} {content}
</div> </div>
{ {
closable && <i className={'close iconfont iconiconfront-2'} onClick={_close}/> closable &&
re.test(closeIcon)
? <img src={closeIcon} alt="" className={'close-icon'} onClick={_close}/>
: <i className={`close iconfont ${closeIcon}`} onClick={_close}/>
} }
</div> </div>
</div> </div>
......
...@@ -31,5 +31,16 @@ ...@@ -31,5 +31,16 @@
font-size: 36px; font-size: 36px;
color: #fff; color: #fff;
} }
.close-icon {
position: absolute;
bottom: -66px;
left: 50%;
width: 33px;
height: 33px;
transform: translateX(-50%);
font-size: 36px;
color: #fff;
}
} }
} }
.box-container {
position: relative;
background: #327443;
padding: 14px 0;
.image-box {
height: 100%;
background: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/sd_nr_bj2.png") repeat-y;
background-size: 100% auto;
}
@mixin common-deco($bg) {
content: '';
position: absolute;
left: 0;
width: 100%;
height: 14px;
display: block;
background: url($bg) no-repeat;
background-size: 375px auto;
}
&::before {
@include common-deco("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/sd_nr_bj1.png");
top: 0;
}
&::after {
@include common-deco("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/sd_nr_bj3.png");
bottom: 0;
}
}
import React, { Component } from 'react'
import './box-container.scss'
class Container extends Component {
render() {
return (
<div className={'box-container'}>
<div className="image-box">
{this.props.children}
</div>
</div>
)
}
}
export default Container
...@@ -220,10 +220,17 @@ export default [ ...@@ -220,10 +220,17 @@ export default [
}, },
{ {
path: '/activity', path: '/activity',
exact: true,
component: Activity, component: Activity,
}, },
{ {
path: '/invite', path: '/invite',
component: Invite, component: Invite,
} },
//双旦活动
{
path: '/activity/newyear-2019/landing',
component: loadable(() => import(/* webpackChunkName: 'newyear-2019-landing'*/ '@components/activity/newyear-2019/landing/index'))
},
] ]
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