Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projecttwo
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangtao
projecttwo
Commits
c5fc4692
Commit
c5fc4692
authored
Jun 30, 2025
by
wangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学习资料
parent
50c19f31
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
5 deletions
+12
-5
index.html
app/admin/view/system/manager/index.html
+1
-1
index.html
app/admin/view/users/user/index.html
+1
-1
Course.php
app/api/controller/Course.php
+2
-1
Project.php
app/api/controller/project/Project.php
+1
-1
Course.php
app/model/Course.php
+3
-0
CourseTag.php
app/model/CourseTag.php
+4
-1
No files found.
app/admin/view/system/manager/index.html
View file @
c5fc4692
...
...
@@ -22,7 +22,7 @@
</div>
</div>
</div>
<div
class=
"layui-col-md9"
>
<div
class=
"layui-col-md9"
style=
"width: 80%;"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-header"
>
<form
class=
"layui-form render"
>
...
...
app/admin/view/users/user/index.html
View file @
c5fc4692
...
...
@@ -14,7 +14,7 @@
<div
class=
"layui-inline"
style=
"width:150px;"
>
<select
name=
"role"
>
<option
value=
""
>
审核状态
</option>
<option
value=
""
>
用户类型
</option>
<option
value=
"1"
>
普通用户
</option>
<option
value=
"2"
>
企业用户
</option>
<option
value=
"3"
>
高校用户
</option>
...
...
app/api/controller/Course.php
View file @
c5fc4692
...
...
@@ -162,6 +162,7 @@ class Course extends BaseController
->
with
([
'getSections'
=>
function
(
$query
)
use
(
$userId
)
{
$query
->
with
([
'getCourseClass'
=>
function
(
$query
)
use
(
$userId
)
{
$query
->
where
([
'is_sell'
=>
1
,
'is_del'
=>
0
]);
$query
->
with
([
'fileData'
,
'courseProgress'
=>
function
(
$query
)
use
(
$userId
)
{
$query
->
where
(
'user_id'
,
$userId
);
}])
...
...
@@ -171,7 +172,7 @@ class Course extends BaseController
},
'getCourseClass'
=>
function
(
$query
)
use
(
$userId
)
{
//没有章节的课时查询
$query
->
where
(
'cate_id'
,
0
);
$query
->
where
(
[
'is_sell'
=>
1
,
'cate_id'
=>
0
,
'is_del'
=>
0
]
);
$query
->
with
([
'fileData'
,
'courseProgress'
=>
function
(
$query
)
use
(
$userId
)
{
$query
->
where
(
'user_id'
,
$userId
);
}])
...
...
app/api/controller/project/Project.php
View file @
c5fc4692
...
...
@@ -73,7 +73,7 @@ class Project extends BaseController
$list
=
UserMoneyLog
::
getUserMoneyRanking
(
$limit
,
$type
,
0
);
if
(
!
$list
)
if
(
$list
)
{
$list
=
[
[
'user_id'
=>
26
,
'total_money'
=>
2998
,
'record_count'
=>
10
,
'user_info'
=>
[
'username'
=>
'Colin'
,
'realname'
=>
null
,
'headico'
=>
40
,
'id'
=>
1
]],
...
...
app/model/Course.php
View file @
c5fc4692
...
...
@@ -209,7 +209,10 @@ class Course extends Model
public
function
getCourseClass
()
{
return
$this
->
hasMany
(
\app\model\CourseClass
::
class
,
'course_id'
,
'id'
)
->
field
(
'*'
)
->
where
(
'is_del'
,
0
)
->
where
(
'is_sell'
,
1
)
->
order
(
'sort'
,
'desc'
);
}
...
...
app/model/CourseTag.php
View file @
c5fc4692
...
...
@@ -19,5 +19,8 @@ use think\Model;
class
CourseTag
extends
Model
{
// 自动时间戳(将createtime转换为时间戳自动管理)
protected
$autoWriteTimestamp
=
true
;
protected
$createTime
=
'createtime'
;
protected
$updateTime
=
false
;
}
\ No newline at end of file
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