Commit bde70f24 by maolipeng

fix:样式修改,版本信息参数修改

parent f95f64a2
.limit-tip {
height: 32px;
background: #E9EFFF;
border-radius: 2px;
margin-bottom: 13px;
......
......@@ -42,29 +42,58 @@ function HomeTip() {
const [isOverNum, setIsOverNum] = useState(false)
const [tipType, setTipType] = useState(0) //0不显示1即将过期2已过期
const [expirationTime, setExpirationTime] = useState("")
const [surplusDay, setSurplusDay] = useState(0)
useEffect(()=> {
BaseService.getLesseeVersionMsg()
.then(res=> {
setIsOverNum(res.result.surplusUserNum === 0)
setSurplusDay(res.result.surplusDayTime)
setExpirationTime(moment(res.result.validEndTime).format("YYYY-MM-DD"))
if (res.result.stateEnum === "NO") {
setTipType(2)
}
if (res.result.surplusDayTime === 30 || res.result.surplusDayTime <= 7) {
setTipType(1)
}
})
},[])
return (
<div className="home-tip">
{
(isOverNum || tipType !== 0) &&
<div className="tip">
<Carousel dotPosition="left" dots={false} autoplay={true}>
<Carousel dotPosition="left" dots={false} autoplay={true} autoplaySpeed={5000}>
{
isOverNum && (
<div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>温馨提示:企业使用人数已达上限,将无法新增员工、学员,如需增加人数限制,请联系小麦企学院服务平台。
<Popover placement="bottom" content={RenewPopover}><div className="renew-btn">立即续费</div></Popover>
</div>
)
}
{
tipType === 2 && (
<div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>温馨提示:企业使用人数已达上限,将无法新增员工、学员,如需增加人数限制,请联系小麦企学院服务平台。
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>温版本到期提醒:当前企业购买的小麦企学院服务已于{expirationTime}到期,到期后仍可访问,但功能不可使用,建议尽快续费购买哦~
<Popover placement="bottom" content={RenewPopover}><div className="renew-btn">立即续费</div></Popover>
</div>
)
}
{
tipType === 1 && (
<div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>当前企业购买的小麦企学院服务仅剩{surplusDay}天(于{expirationTime}到期),为了不影响使用,建议尽快续费购买哦~
<Popover placement="bottom" content={RenewPopover}><div className="renew-btn">立即续费</div></Popover>
</div>
)
}
</Carousel>
</div>
}
</div>
)
}
......
......@@ -28,52 +28,8 @@
font-family: 'number';
src: url('https://image.xiaomaiketang.com/xm/n2sADd2jY6.TTF');
}
#renew-popover {
width: 276px;
height: 294px;
// transform: translate(-98px,13px);
// box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.06);
background-color: white;
background-image: url(https://image.xiaomaiketang.com/xm/CZ4a752jzi.png);
background-repeat: no-repeat;
background-size: cover;
text-align: center;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 22px;
// box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.06);
// .popover-arrow {
// position: absolute;
// display: block;
// width: 8.48528137px;
// height: 8.48528137px;
// background: 0 0;
// border-style: solid;
// border-width: 4.24264069px;
// left: 50%;
// transform: translateX(-50%) rotate(45deg);
// top: -4px;
// border-top-color: #fff;
// border-right-color: transparent;
// border-bottom-color: transparent;
// border-left-color: #fff;
// box-shadow: -2px -2px 5px #0000000f;
// }
.qrcode {
width: 182px;
height: 204px;
background-color: white;
margin: 28px auto 16px auto;
img {
width: 150px;
height: 150px;
margin: 16px 16px 8px 16px;
}
}
}
.home-tip {
display: flex;
.tip {
height: 40px;
background: #FFE7E7;
......@@ -96,10 +52,7 @@
line-height: 28px;
text-align: center;
cursor: pointer;
&:hover .renew-popover {
display: block;
}
margin-left: 8px;
}
}
......
......@@ -136,7 +136,7 @@ export default class CollegeManagePage extends React.Component {
.then(res=> {
User.setVersion(res.result)
this.setState({
surplusDayTime: res.result.stateEnum === "YES" ? 0 : res.result.surplusDayTime,
surplusDayTime: res.result.stateEnum === "NO" ? 0 : res.result.surplusDayTime,
endTime: res.result.validEndTime
})
})
......
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