Commit 4a94c072 by guomingpang

fix:首页数据统计,有新增就显示,没有就0即

parent 3f0a9d28
......@@ -281,7 +281,7 @@ class Home extends React.Component {
<div className='data-footer'>
<span className='footer-word'>本月新增</span>
{incCustomerNum > 0 && <span className='icon iconfont'>&#xe635;</span>}
<span className='footer-number'>{incCustomerNum}</span>
<span className='footer-number'>{incCustomerNum > 0 ? incCustomerNum : 0}</span>
</div>
</div>
<div className='data-item'>
......@@ -292,8 +292,9 @@ class Home extends React.Component {
<div className='data-number'>{weekVisitCustomerNum || 0}</div>
<div className='data-footer'>
<span className='footer-word'>本月新增</span>
{incWeekVisitCustomerNum > 0 && <span className='icon iconfont'>&#xe635;</span>}
<span className='footer-number'>{incWeekVisitCustomerNum || 0}</span>
<span className='footer-number'>{incWeekVisitCustomerNum > 0 ? incWeekVisitCustomerNum : 0}</span>
</div>
</div>
......@@ -307,7 +308,7 @@ class Home extends React.Component {
<div className='data-footer'>
<span className='footer-word'>本月新增</span>
{incCustomerNum > 0 && <span className='icon iconfont'>&#xe635;</span>}
<span className='footer-number'>{incCustomerNum}</span>
<span className='footer-number'>{incCustomerNum > 0 ? incCustomerNum : 0}</span>
</div>
<div className='course-box'>
<div className='course-item'>
......@@ -315,7 +316,7 @@ class Home extends React.Component {
<div className='data'>
<span className='course-number'>{liveCourseNum}</span>
{incLiveCourseNum > 0 && <span className='icon iconfont'>&#xe635;</span>}
<span className='add-number'>{incLiveCourseNum}</span>
<span className='add-number'>{incLiveCourseNum > 0 ? incLiveCourseNum : 0}</span>
</div>
</div>
<div className='course-item'>
......@@ -323,7 +324,7 @@ class Home extends React.Component {
<div className='data'>
<span className='course-number'>{videoCourseNum}</span>
{incVideoCourseNum > 0 && <span className='icon iconfont'>&#xe635;</span>}
<span className='add-number'>{incVideoCourseNum}</span>
<span className='add-number'>{incVideoCourseNum > 0 ? incVideoCourseNum : 0}</span>
</div>
</div>
<div className='course-item'>
......@@ -331,7 +332,7 @@ class Home extends React.Component {
<div className='data'>
<span className='course-number'>{pictureCourseNum}</span>
{incPictureCourseNum > 0 && <span className='icon iconfont'>&#xe635;</span>}
<span className='add-number'>{incPictureCourseNum}</span>
<span className='add-number'>{incPictureCourseNum > 0 ? incPictureCourseNum : 0}</span>
</div>
</div>
<div className='course-item'>
......@@ -339,7 +340,7 @@ class Home extends React.Component {
<div className='data'>
<span className='course-number'>{offlineCourseNum}</span>
{incOfflineCourseNum > 0 && <span className='icon iconfont'>&#xe635;</span>}
<span className='add-number'>{incOfflineCourseNum}</span>
<span className='add-number'>{incOfflineCourseNum > 0 ? incOfflineCourseNum : 0}</span>
</div>
</div>
</div>
......@@ -353,7 +354,7 @@ class Home extends React.Component {
<div className='data-footer'>
<span className='footer-word'>本月新增</span>
{incTrainingPlanNum > 0 && <span className='icon iconfont'>&#xe635;</span>}
<span className='footer-number'>{incTrainingPlanNum}</span>
<span className='footer-number'>{incTrainingPlanNum > 0 ? incTrainingPlanNum : 0}</span>
</div>
</div>
......@@ -366,7 +367,7 @@ class Home extends React.Component {
<div className='data-footer'>
<span className='footer-word'>本月新增</span>
{incExamNum > 0 && <span className='icon iconfont'>&#xe635;</span>}
<span className='footer-number'>{incExamNum}</span>
<span className='footer-number'>{incExamNum > 0 ? incExamNum : 0}</span>
</div>
</div>
</div>
......@@ -417,7 +418,7 @@ class Home extends React.Component {
<Choose>
<When condition={_.isEmpty(list)}>
<div className='study-empty'>
<img src='https://image.xiaomaiketang.com/xm/52dmait5Bx.png' />
<img src='https://image.xiaomaiketang.com/xm/52dmait5Bx.png' alt='' />
<div>暂无课程上榜</div>
</div>
</When>
......
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