Commit 57769f93 authored by 杨培's avatar 杨培

增加各种无数据的显示tip

parent bd318ef1
...@@ -58,7 +58,7 @@ class MyCourseController extends \yii\web\Controller ...@@ -58,7 +58,7 @@ class MyCourseController extends \yii\web\Controller
public function actionIndex() public function actionIndex()
{ {
$list = Course::getCourseListsByClassId($this->classStatus['id'], null, 12, null); $list = Course::getCourseListsByClassId($this->classStatus['id'], null, 12, null);
return $this->render('index', ['list'=>$list['data'], 'pagination'=>$list['pagination']]); return $this->render('index', ['count'=>$list['count'], 'list'=>$list['data'], 'pagination'=>$list['pagination']]);
} }
/** /**
......
...@@ -26,6 +26,7 @@ $this->registerJs($js); ...@@ -26,6 +26,7 @@ $this->registerJs($js);
*/ */
$qiniu = \Yii::$app->qiniu; $qiniu = \Yii::$app->qiniu;
?> ?>
<?php if ($count > 0) { ?>
<div class="cls-list-box clearfix"> <div class="cls-list-box clearfix">
<?php foreach ($list as $course) { ?> <?php foreach ($list as $course) { ?>
<div class="col-md-4"> <div class="col-md-4">
...@@ -105,11 +106,13 @@ $qiniu = \Yii::$app->qiniu; ...@@ -105,11 +106,13 @@ $qiniu = \Yii::$app->qiniu;
</div> </div>
<?php } ?> <?php } ?>
</div> </div>
<div class="text-center"> <div class="text-center">
<?= LinkPager::widget(['pagination' => $pagination]) ?> <?= LinkPager::widget(['pagination' => $pagination]) ?>
</div> </div>
<?php } else { ?>
<div class="empty-data">
您还没有添加课程!
</div>
<?php } ?>
\ No newline at end of file
...@@ -37,6 +37,7 @@ AppAsset::addScript($this, '@web/assets/my_income.js'); ...@@ -37,6 +37,7 @@ AppAsset::addScript($this, '@web/assets/my_income.js');
</div> </div>
</div> </div>
<?php if ($count > 0) { ?>
<div class="con-md-12"> <div class="con-md-12">
<div class="table-responsive table-box"> <div class="table-responsive table-box">
<table class="table table-hover"> <table class="table table-hover">
...@@ -70,4 +71,8 @@ AppAsset::addScript($this, '@web/assets/my_income.js'); ...@@ -70,4 +71,8 @@ AppAsset::addScript($this, '@web/assets/my_income.js');
</div> </div>
</div> </div>
</div> </div>
<?php } else { ?>
<div class="empty-data" style="margin-top:80px;">
您还没有卖出课程的记录!
</div>
<?php } ?>
\ No newline at end of file
...@@ -26,6 +26,7 @@ $this->title = '我的会员'; ...@@ -26,6 +26,7 @@ $this->title = '我的会员';
</div> </div>
</div> </div>
<?php if ($count > 0) { ?>
<div class="con-md-12"> <div class="con-md-12">
<div class="table-responsive table-box"> <div class="table-responsive table-box">
<table class="table table-hover"> <table class="table table-hover">
...@@ -59,4 +60,9 @@ $this->title = '我的会员'; ...@@ -59,4 +60,9 @@ $this->title = '我的会员';
<?=\yii\widgets\LinkPager::widget(['pagination'=>$pagination])?> <?=\yii\widgets\LinkPager::widget(['pagination'=>$pagination])?>
</div> </div>
</div> </div>
</div> </div>
\ No newline at end of file <?php } else { ?>
<div class="empty-data" style="margin-top:80px;">
您还没有会员!
</div>
<?php } ?>
\ No newline at end of file
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