Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
693d0b1e
Commit
693d0b1e
authored
Oct 17, 2016
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
已售课程列表完成
parent
9a29fa00
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
17 deletions
+11
-17
Income.php
src/common/models/Income.php
+1
-1
MyIncomeController.php
src/frontend/controllers/MyIncomeController.php
+5
-1
index.php
src/frontend/views/my-income/index.php
+5
-15
No files found.
src/common/models/Income.php
View file @
693d0b1e
...
...
@@ -76,7 +76,7 @@ class Income extends \yii\db\ActiveRecord
public
function
getOrder
()
{
return
$this
->
hasOne
(
Orders
::
className
(),
[
'id'
=>
'orders_id'
])
->
with
(
'user'
)
->
with
(
'course
WithTeachers
'
);
return
$this
->
hasOne
(
Orders
::
className
(),
[
'id'
=>
'orders_id'
])
->
with
(
'user'
)
->
with
(
'course'
);
}
//public function getUser()
...
...
src/frontend/controllers/MyIncomeController.php
View file @
693d0b1e
...
...
@@ -10,9 +10,13 @@ class MyIncomeController extends \yii\web\Controller
public
$layout
=
'classCenter'
;
/**
* 售课记录
* @return string
*/
public
function
actionIndex
()
{
$ret
=
Income
::
getIncomeListByUserId
(
Yii
::
$app
->
user
->
getId
(),
null
);
$ret
=
Income
::
getIncomeListByUserId
(
Yii
::
$app
->
user
->
getId
(),
null
,
20
);
return
$this
->
render
(
'index'
,
$ret
);
}
...
...
src/frontend/views/my-income/index.php
View file @
693d0b1e
...
...
@@ -34,25 +34,15 @@ $this->title = '知识有价';
<?php
foreach
(
$data
as
$row
)
{
?>
<tr>
<td>
20012313131
<br/>
2016-12-11
<?=
$row
[
'order'
][
'number'
]
?>
<br/>
<?=
date
(
'Y-m-d H:i'
,
$row
[
'order'
][
'updated_at'
])
?>
</td>
<td>
<?=
$row
[
'order'
][
'user'
][
'telephone'
]
?>
/
<?=
$row
[
'order'
][
'user'
][
'username'
]
?>
</td>
<td>
《
<?=
$row
[
'order'
][
'course
WithTeachers
'
][
'name'
]
?>
》
</td>
<td>
¥
123.00
</td>
<td>
审核中
</td>
<td>
《
<?=
$row
[
'order'
][
'course'
][
'name'
]
?>
》
</td>
<td>
¥
<?=
$row
[
'order'
][
'credit'
]
?>
</td>
<td>
<?=
(
$row
[
'status'
]
?
'未结算'
:
'已结算'
)
?>
</td>
</tr>
<?php
}
?>
<tr>
<td>
20012313131
<br/>
2016-12-11
</td>
<td>
18788860327 / 百丐洪七公
</td>
<td>
《中国为什么这么久还没有进入社会主义社会》
</td>
<td>
¥123.00
</td>
<td>
审核中
</td>
</tr>
</tbody>
</table>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment