Commit 36ea1e2b authored by xiabin's avatar xiabin

会员列表的 “首次购买” 与 购买记录的 “课程”

均加上对应课程的链接。
parent ad9b9f9b
...@@ -123,6 +123,9 @@ class HomeController extends \yii\web\Controller ...@@ -123,6 +123,9 @@ class HomeController extends \yii\web\Controller
{ {
$coursewareInfo = Courseware::findOne(['course_id' => $courseId, 'status' => Courseware::STATUS_OK]); $coursewareInfo = Courseware::findOne(['course_id' => $courseId, 'status' => Courseware::STATUS_OK]);
$course = Course::findOne(['id' => $courseId]); $course = Course::findOne(['id' => $courseId]);
if($course === NULL){
throw new InvalidParamException('参数错误');
}
$teachers = $course->teachers; $teachers = $course->teachers;
$userId = Yii::$app->user->id; $userId = Yii::$app->user->id;
if ($coursewareInfo === NULL) { if ($coursewareInfo === NULL) {
......
...@@ -29,7 +29,6 @@ class MyMemberController extends \yii\web\Controller ...@@ -29,7 +29,6 @@ class MyMemberController extends \yii\web\Controller
if ($data['count'] > 0) { if ($data['count'] > 0) {
Member::injectOrderInfo($uid, $data['data']); Member::injectOrderInfo($uid, $data['data']);
} }
return $this->render('index', $data + compact('typeCount')); return $this->render('index', $data + compact('typeCount'));
} }
......
...@@ -57,7 +57,7 @@ AppAsset::addScript($this, '@web/assets/my_income.js'); ...@@ -57,7 +57,7 @@ AppAsset::addScript($this, '@web/assets/my_income.js');
<?=date('Y-m-d H:i', $row['order']['updated_at'])?> <?=date('Y-m-d H:i', $row['order']['updated_at'])?>
</td> </td>
<td><?=$row['order']['user']['telephone']?> / <?=$row['order']['user']['username']?></td> <td><?=$row['order']['user']['telephone']?> / <?=$row['order']['user']['username']?></td>
<td>《<a href="<?=\common\models\Course::url($row['order']['course_id'])?>" target="_blank"><?=$row['order']['course']['name']?></a>》</td> <td><a href="<?=\common\models\Course::url($row['order']['course_id'])?>" target="_blank">《<?=$row['order']['course']['name']?>》</a></td>
<td>¥<?=$row['order']['credit']?></td> <td>¥<?=$row['order']['credit']?></td>
<td><?=($row['status'] ? '已结算' : '未结算')?></td> <td><?=($row['status'] ? '已结算' : '未结算')?></td>
</tr> </tr>
......
...@@ -45,7 +45,7 @@ $this->title = '我的会员'; ...@@ -45,7 +45,7 @@ $this->title = '我的会员';
<td><?=$row['user']['telephone']?> / <?=$row['user']['username']?></td> <td><?=$row['user']['telephone']?> / <?=$row['user']['username']?></td>
<td>推广</td> <td>推广</td>
<?php if (!empty($row['first_order'])) { ?> <?php if (!empty($row['first_order'])) { ?>
<td>《<?=$row['first_order']['course']['name']?>》</td> <td><a target="_blank" href="<?=\common\models\Course::url($row['first_order']['course_id'],true)?>">《<?=$row['first_order']['course']['name']?>》</a></td>
<?php } else { ?> <?php } else { ?>
<td>无</td> <td>无</td>
<?php } ?> <?php } ?>
......
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