Commit aa618b9d by maolipeng

fix:接口调试。。。。

parent 85c17b16
import React from 'react';
import React, { useEffect, useState } from 'react';
import { Select, Tooltip } from 'antd';
import DataSet from "@antv/data-set";
import { Chart as G2Chart } from '@antv/g2';
......@@ -19,11 +19,44 @@ import {
} from "bizcharts";
import moment from 'moment'
import Service from "@/common/js/service";
import BaseService from "@/domains/basic-domain/baseService";
import User from '@/common/js/user';
import './Home.less';
const Option = Select.Option;
function HomeTip() {
const [isOverNum, setIsOverNum] = useState(false)
useEffect(()=> {
BaseService.getLesseeVersionMsg()
.then(res=> {
setIsOverNum(res.result.surplusUserNum === 0)
})
},[])
return isOverNum ? (
<div className="home-tip">
<div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>温馨提示:企业使用人数已达上限,将无法新增员工、学员,如需增加人数限制,请联系小麦企学院服务平台。
<div className="renew-btn">立即续费
<div className="renew-popover">
<div className="popover-arrow"><span class="popover-arrow-content"></span></div>
<div className="qrcode">
<img src="https://cdn.xiaomai5.com/qixueyuankehu.png" alt=""></img>
<div className="des">微信/企业微信扫码续费</div>
</div>
<div className="phone"><svg style={{position:"relative",top:"2px",marginRight:"4px"}} viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512.651 3.78c-281.433 0-509.21 228.324-509.21 509.209 0 281.43 228.325 509.203 509.21 509.203 281.427 0 509.202-228.317 509.202-509.203 0.55-280.885-227.775-509.21-509.202-509.21z m198.205 743.553c-36.14 36.136-169.737 1.641-302.24-130.312-131.953-131.959-165.902-266.104-129.768-301.695 31.211-31.21 68.99-85.417 125.939-14.782 56.943 70.629 29.016 90.34-3.291 122.647-22.449 22.448 24.642 79.392 73.37 128.125 49.283 48.73 105.678 95.818 128.126 73.368 32.306-32.305 52.017-60.23 122.646-3.288 71.182 56.949 16.426 95.276-14.782 125.937z" p-id="4409" fill="#999999"></path></svg>
咨询电话:19157875632</div>
</div>
</div>
</div>
</div>
) : ("")
}
class Home extends React.Component {
constructor(props) {
super(props);
......@@ -265,22 +298,7 @@ class Home extends React.Component {
};
return (
<div className="home-page">
<div className="home-tip">
<div className="content">
<span className="icon iconfont" style={{color:"#FF4F4F",marginRight:"8px"}}>&#xe61d;</span>温馨提示:企业使用人数已达上限,将无法新增员工、学员,如需增加人数限制,请联系小麦企学院服务平台。
<div className="renew-btn">立即续费
<div className="renew-popover">
<div className="popover-arrow"><span class="popover-arrow-content"></span></div>
<div className="qrcode">
<img src="https://cdn.xiaomai5.com/qixueyuankehu.png" alt=""></img>
<div className="des">微信/企业微信扫码续费</div>
</div>
<div className="phone"><svg style={{position:"relative",top:"2px",marginRight:"4px"}} viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M512.651 3.78c-281.433 0-509.21 228.324-509.21 509.209 0 281.43 228.325 509.203 509.21 509.203 281.427 0 509.202-228.317 509.202-509.203 0.55-280.885-227.775-509.21-509.202-509.21z m198.205 743.553c-36.14 36.136-169.737 1.641-302.24-130.312-131.953-131.959-165.902-266.104-129.768-301.695 31.211-31.21 68.99-85.417 125.939-14.782 56.943 70.629 29.016 90.34-3.291 122.647-22.449 22.448 24.642 79.392 73.37 128.125 49.283 48.73 105.678 95.818 128.126 73.368 32.306-32.305 52.017-60.23 122.646-3.288 71.182 56.949 16.426 95.276-14.782 125.937z" p-id="4409" fill="#999999"></path></svg>
咨询电话:19157875632</div>
</div>
</div>
</div>
</div>
<HomeTip />
<div className="data-wrap">
<div className="home-title">数据概况</div>
<div className="data-box">
......
......@@ -22,28 +22,44 @@ function ExpirationPopover(props) {
useEffect(()=> {
if (props.surplusDayTime === 0 ) {
//已过期
if (storage.get("expiration_tip"+User.getUserId()+"_login") === "true") {
let loginflag = storage.get("expiration_tip_login")
if (loginflag === null || loginflag === "true") {
//只有登陆进来的时候提示一次
console.log("showtype",showType)
setShowType(3)
}
} else {
return
}
//即将过期
if (props.surplusDayTime === 30) {
if (storage.get("expiration_tip"+User.getUserId()+"_thirty") == null || storage.get("expiration_tip"+User.getUserId()+"_thirty") === "true") {
setShowType(1)
}
} else if (props.surplusDayTime <= 7) {
return
}
if (props.surplusDayTime <= 7) {
let daysflag = storage.getObj("expiration_tip"+User.getUserId()+"_7day");
if (!daysflag) {
setShowType(2)
return
}
if (daysflag[props.surplusDayTime - 1] === 0) {
setShowType(2)
}
}
},[props.endTime,props.surplusDayTime])
function iknow() {
if (props.surplusDayTime === 0 ) {
//已过期
storage.set("expiration_tip"+User.getUserId()+"_login",false)
storage.set("expiration_tip_login",false)
} else if (props.surplusDayTime === 30) {
storage.set("expiration_tip"+User.getUserId()+"_thirty",false)
} else if (props.surplusDayTime <= 7) {
let daysflag = [0,0,0,0,0,0,0]
daysflag[props.surplusDayTime - 1] = 1
storage.setObj("expiration_tip"+User.getUserId()+"_7day",daysflag)
}
setShowType(0)
}
......
......@@ -194,7 +194,6 @@
}
.expiration-time {
width: 129px;
height: 24px;
text-align: center;
font-size: 12px;
......
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