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
c7578b6d
Commit
c7578b6d
authored
Oct 17, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
1e3ae2af
693d0b1e
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 @
c7578b6d
...
@@ -79,7 +79,7 @@ class Income extends \yii\db\ActiveRecord
...
@@ -79,7 +79,7 @@ class Income extends \yii\db\ActiveRecord
*/
*/
public
function
getOrder
()
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'
);
}
}
/**
/**
...
...
src/frontend/controllers/MyIncomeController.php
View file @
c7578b6d
...
@@ -10,9 +10,13 @@ class MyIncomeController extends \yii\web\Controller
...
@@ -10,9 +10,13 @@ class MyIncomeController extends \yii\web\Controller
public
$layout
=
'classCenter'
;
public
$layout
=
'classCenter'
;
/**
* 售课记录
* @return string
*/
public
function
actionIndex
()
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
);
return
$this
->
render
(
'index'
,
$ret
);
}
}
...
...
src/frontend/views/my-income/index.php
View file @
c7578b6d
...
@@ -34,25 +34,15 @@ $this->title = '知识有价';
...
@@ -34,25 +34,15 @@ $this->title = '知识有价';
<?php
foreach
(
$data
as
$row
)
{
?>
<?php
foreach
(
$data
as
$row
)
{
?>
<tr>
<tr>
<td>
<td>
20012313131
<br/>
<?=
$row
[
'order'
][
'number'
]
?>
<br/>
2016-12-11
<?=
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>
《
<?=
$row
[
'order'
][
'course
WithTeachers
'
][
'name'
]
?>
》
</td>
<td>
《
<?=
$row
[
'order'
][
'course'
][
'name'
]
?>
》
</td>
<td>
¥
123.00
</td>
<td>
¥
<?=
$row
[
'order'
][
'credit'
]
?>
</td>
<td>
审核中
</td>
<td>
<?=
(
$row
[
'status'
]
?
'未结算'
:
'已结算'
)
?>
</td>
</tr>
</tr>
<?php
}
?>
<?php
}
?>
<tr>
<td>
20012313131
<br/>
2016-12-11
</td>
<td>
18788860327 / 百丐洪七公
</td>
<td>
《中国为什么这么久还没有进入社会主义社会》
</td>
<td>
¥123.00
</td>
<td>
审核中
</td>
</tr>
</tbody>
</tbody>
</table>
</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