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
703ae6db
Commit
703ae6db
authored
Jul 17, 2025
by
wangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口修改
parent
9c1c899d
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
12 deletions
+25
-12
Course.php
app/admin/controller/course/Course.php
+5
-0
index.html
app/admin/view/article/index.html
+1
-1
index.html
app/admin/view/cert/cert/index.html
+1
-1
index.html
app/admin/view/users/business/index.html
+1
-1
ShCourseClass.php
app/api/controller/manage/ShCourseClass.php
+2
-2
ShCourseClassCategory.php
app/api/controller/manage/ShCourseClassCategory.php
+3
-1
CourseValidate.php
app/api/validate/CourseValidate.php
+1
-0
CourseCategory.php
app/model/CourseCategory.php
+10
-5
User.php
app/model/project/User.php
+1
-1
No files found.
app/admin/controller/course/Course.php
View file @
703ae6db
...
...
@@ -73,6 +73,11 @@ class Course extends AdminBase
{
$post
=
input
();
$courseinfo
=
$this
->
course
->
where
(
'id'
,
$post
[
'id'
])
->
field
(
'id,title,user_id,status'
)
->
find
();
if
(
$post
[
'af'
]
==
'is_sell'
&&
$post
[
'av'
]
==
1
&&
$courseinfo
[
'status'
]
!=
3
)
{
return
$this
->
returnMsg
(
'未审核的课程不能操作上架'
);
}
$result
=
$this
->
course
->
update
([
$post
[
'af'
]
=>
$post
[
'av'
]],
[[
'id'
,
'='
,
$post
[
'id'
]]]);
if
(
$post
[
'af'
]
==
'is_sell'
)
{
$course_id
=
$post
[
'id'
];
...
...
app/admin/view/article/index.html
View file @
703ae6db
...
...
@@ -152,7 +152,7 @@
}
layer
.
open
({
type
:
2
,
area
:
[
'
900px
'
,
'90%'
],
area
:
[
'
70%
'
,
'90%'
],
title
:
title
,
btn
:
[
'确定'
,
'关闭'
],
// fixed: false, //不固定
...
...
app/admin/view/cert/cert/index.html
View file @
703ae6db
...
...
@@ -192,7 +192,7 @@
}
layer
.
open
({
type
:
2
,
area
:
[
'
900px
'
,
'90%'
],
area
:
[
'
70%
'
,
'90%'
],
title
:
title
,
btn
:
[
'确定'
,
'关闭'
],
content
:
app_root
+
'/edit?id='
+
id
+
'&type='
+
type
,
...
...
app/admin/view/users/business/index.html
View file @
703ae6db
...
...
@@ -93,7 +93,7 @@
{
field
:
'businessname'
,
align
:
'center'
,
width
:
160
,
title
:
'用户名'
,
templet
:
'<div>{{d.getuserdata.username}}</div>'
},
{
field
:
'mobile'
,
align
:
'center'
,
width
:
120
,
title
:
'用户手机号'
,
templet
:
'<div>{{d.getuserdata.mobile}}</div>'
},
{
field
:
'name'
,
align
:
'center'
,
minWidth
:
150
,
title
:
'企业名称'
},
{
field
:
'type'
,
align
:
'center'
,
minWidth
:
100
,
title
:
'类型'
},
//
{field:'type',align:'center',minWidth:100,title:'类型'},
{
field
:
'addressxx'
,
align
:
'center'
,
minWidth
:
200
,
title
:
'详细地址'
},
{
field
:
"status_text"
,
width
:
100
,
align
:
'center'
,
title
:
"状态"
,
templet
:
'#status-demo'
},
{
field
:
'contacts_name'
,
align
:
'center'
,
width
:
100
,
title
:
'联系人姓名'
},
...
...
app/api/controller/manage/ShCourseClass.php
View file @
703ae6db
...
...
@@ -34,7 +34,7 @@ class ShCourseClass extends BaseController
//编辑课时
public
function
editCourseClass
(
Request
$request
)
{
$filed
=
[
'cate_id'
,
'course_id'
,
'title'
,
'tv_file'
,
'tvtime'
,
'course_class_id'
,
'is_sk'
];
$filed
=
[
'cate_id'
,
'course_id'
,
'title'
,
'tv_file'
,
'tvtime'
,
'course_class_id'
,
'is_sk'
,
'sort'
];
$vo
=
(
new
ShCourseClassValidate
())
->
goCheck
(
$filed
);
if
(
$vo
!==
true
)
{
return
$vo
;
...
...
@@ -86,7 +86,7 @@ class ShCourseClass extends BaseController
$where
=
[
'is_del'
=>
0
,
'user_id'
=>
$request
->
userId
];
$list
=
ShCourseClassModel
::
where
(
$where
)
->
where
(
$map
)
->
order
(
'createtime desc'
)
->
order
(
'
sort desc,
createtime desc'
)
->
append
([
'course_class_cate'
,
'course_title'
])
->
paginate
([
'page'
=>
$page
,
...
...
app/api/controller/manage/ShCourseClassCategory.php
View file @
703ae6db
...
...
@@ -50,6 +50,8 @@ class ShCourseClassCategory extends BaseController
}
return
$this
->
returnMsg
(
'操作成功'
,
1
,
$result
);
}
//章节列表
public
function
ShCourseClassCategoryList
(
Request
$request
)
{
...
...
@@ -66,7 +68,7 @@ class ShCourseClassCategory extends BaseController
$page
=
$request
->
param
(
'page'
,
1
);
$pageSize
=
$request
->
param
(
'pageSize'
,
10
);
$list
=
ShCourseCategoryModel
::
where
(
$where
)
->
where
(
$map
)
->
order
(
'createtime desc'
)
->
order
(
'
sort desc,
createtime desc'
)
->
append
([
'course_title'
])
->
paginate
([
'page'
=>
$page
,
...
...
app/api/validate/CourseValidate.php
View file @
703ae6db
...
...
@@ -22,6 +22,7 @@ class CourseValidate extends BaseValidate
protected
$message
=
[
'name.require'
=>
'名称必须'
,
'class_id.require'
=>
'没有课时不能操作'
,
'mobile.require'
=>
'手机号不能为空'
,
'mobile.mobile'
=>
'手机号格式不正确'
,
'password.require'
=>
'密码必须'
,
...
...
app/model/CourseCategory.php
View file @
703ae6db
...
...
@@ -21,7 +21,6 @@ class CourseCategory extends Model
{
public
function
catetree
(
$cate_id
=
0
)
{
$map
[]
=
[
'is_del'
,
'='
,
0
];
...
...
@@ -35,6 +34,7 @@ class CourseCategory extends Model
$categorydata
=
$tree
->
getTree
(
0
,
$str
,
$cate_id
);
return
$categorydata
;
}
public
function
getThumbpathAttr
(
$value
,
$data
)
{
return
get_upload_file
(
$data
[
'thumb'
]);
...
...
@@ -53,13 +53,18 @@ class CourseCategory extends Model
*/
public
function
getCourseCategoryList
(
$pid
=
0
)
{
$limit
=
100
;
if
(
$pid
==
0
)
{
$limit
=
10
;
}
$where
[]
=
[
'is_del'
,
'='
,
0
];
return
$this
->
with
([
'children'
=>
function
(
$query
)
use
(
$where
)
{
$query
->
where
(
$where
);
$query
->
order
(
'sort'
,
'desc'
);
}])
return
$this
->
with
([
'children'
=>
function
(
$query
)
use
(
$where
)
{
$query
->
where
(
$where
);
$query
->
order
(
'sort'
,
'desc'
);
}])
->
where
(
'pid'
,
$pid
)
->
where
(
$where
)
->
limit
(
$limit
)
->
order
(
'sort'
,
'desc'
)
->
select
();
...
...
app/model/project/User.php
View file @
703ae6db
...
...
@@ -47,7 +47,7 @@ class User extends Model
{
return
$this
->
hasOne
(
UserSmrz
::
class
,
'user_id'
,
'id'
)
->
where
(
'is_del'
,
0
)
->
where
(
'status'
,
2
)
//
->where('status',2)
->
field
(
'id,realname,user_id,idcard'
);
}
//获取头像
...
...
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