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
38d5f154
Commit
38d5f154
authored
Jun 05, 2025
by
wangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理后台 看板
parent
d518036a
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
250 additions
and
202 deletions
+250
-202
Upload.php
app/admin/controller/system/Upload.php
+209
-196
User.php
app/admin/controller/users/User.php
+6
-1
index.html
app/admin/view/users/user/index.html
+9
-1
ShCourse.php
app/api/controller/manage/ShCourse.php
+3
-3
Student.php
app/api/controller/manage/Student.php
+2
-1
Aliyun.php
vendor/veitool/admin/src/veitool/storage/engine/Aliyun.php
+19
-0
Server.php
vendor/veitool/admin/src/veitool/storage/engine/Server.php
+2
-0
No files found.
app/admin/controller/system/Upload.php
View file @
38d5f154
This diff is collapsed.
Click to expand it.
app/admin/controller/users/User.php
View file @
38d5f154
...
@@ -34,6 +34,11 @@ class User extends AdminBase
...
@@ -34,6 +34,11 @@ class User extends AdminBase
$map
[]
=
[
'username|mobile|realname'
,
'like'
,
'%'
.
$post
[
'kw'
]
.
'%'
];
$map
[]
=
[
'username|mobile|realname'
,
'like'
,
'%'
.
$post
[
'kw'
]
.
'%'
];
}
}
if
(
isset
(
$post
[
'role'
])
&&
!
empty
(
$post
[
'role'
]))
{
$map
[]
=
[
'role'
,
'='
,
$post
[
'role'
]];
}
$list
=
$this
->
user
->
where
(
$map
)
->
append
([
'headericourl'
,
'sexdata'
,
'roletxt'
])
->
paginate
(
$post
[
'limit'
]);
$list
=
$this
->
user
->
where
(
$map
)
->
append
([
'headericourl'
,
'sexdata'
,
'roletxt'
])
->
paginate
(
$post
[
'limit'
]);
return
$this
->
returnMsg
(
$list
);
return
$this
->
returnMsg
(
$list
);
}
}
...
@@ -91,7 +96,7 @@ class User extends AdminBase
...
@@ -91,7 +96,7 @@ class User extends AdminBase
{
{
$post
=
input
();
$post
=
input
();
$user
=
$this
->
user
->
find
(
$post
[
'id'
]);
$user
=
$this
->
user
->
find
(
$post
[
'id'
]);
$pwd
=
md5
(
'123456'
.
$user
[
'salt'
]);
$pwd
=
md5
(
'
ls
123456'
.
$user
[
'salt'
]);
$result
=
$this
->
user
->
where
(
'id'
,
$post
[
'id'
])
->
update
([
'password'
=>
$pwd
]);
$result
=
$this
->
user
->
where
(
'id'
,
$post
[
'id'
])
->
update
([
'password'
=>
$pwd
]);
if
(
$result
)
{
if
(
$result
)
{
return
$this
->
returnMsg
(
"成功"
,
1
);
return
$this
->
returnMsg
(
"成功"
,
1
);
...
...
app/admin/view/users/user/index.html
View file @
38d5f154
...
@@ -12,7 +12,15 @@
...
@@ -12,7 +12,15 @@
<div
class=
"layui-inline"
style=
"width:250px;"
><input
type=
"text"
name=
"kw"
placeholder=
"关键词"
autocomplete=
"off"
class=
"layui-input"
lay-affix=
"clear"
/></div>
<div
class=
"layui-inline"
style=
"width:250px;"
><input
type=
"text"
name=
"kw"
placeholder=
"关键词"
autocomplete=
"off"
class=
"layui-input"
lay-affix=
"clear"
/></div>
<div
class=
"layui-inline"
style=
"width:150px;"
>
<select
name=
"role"
>
<option
value=
""
>
审核状态
</option>
<option
value=
"1"
>
普通用户
</option>
<option
value=
"2"
>
企业用户
</option>
<option
value=
"3"
>
高校用户
</option>
</select>
</div>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline"
>
<div
class=
"layui-btn-group"
>
<div
class=
"layui-btn-group"
>
...
@@ -139,7 +147,7 @@
...
@@ -139,7 +147,7 @@
usermoneylogOpen
(
id
);
usermoneylogOpen
(
id
);
}
else
if
(
menudata
.
id
===
'restpwd'
){
}
else
if
(
menudata
.
id
===
'restpwd'
){
layer
.
confirm
(
'确定要重置【'
+
data
.
username
+
'】的密码为123456?'
,
function
(){
layer
.
confirm
(
'确定要重置【'
+
data
.
username
+
'】的密码为
ls
123456?'
,
function
(){
$
.
ajax
({
$
.
ajax
({
method
:
"post"
,
method
:
"post"
,
url
:
layui
.
cache
.
maps
+
'/users.user/resetpwd'
,
url
:
layui
.
cache
.
maps
+
'/users.user/resetpwd'
,
...
...
app/api/controller/manage/ShCourse.php
View file @
38d5f154
...
@@ -25,7 +25,7 @@ class ShCourse extends BaseController
...
@@ -25,7 +25,7 @@ class ShCourse extends BaseController
$where
=
[
'sh_course.is_del'
=>
0
,
'user_id'
=>
$request
->
userId
];
$where
=
[
'sh_course.is_del'
=>
0
,
'user_id'
=>
$request
->
userId
];
$map
=
[];
$map
=
[];
if
(
isset
(
$parm
[
'searchKeyWords'
])
&&
$parm
[
'searchKeyWords'
])
{
if
(
isset
(
$parm
[
'searchKeyWords'
])
&&
$parm
[
'searchKeyWords'
])
{
$map
[]
=
[
'title'
,
'like'
,
'%'
.
$parm
[
'searchKeyWords'
]
.
'%'
];
$map
[]
=
[
'
sh_course.
title'
,
'like'
,
'%'
.
$parm
[
'searchKeyWords'
]
.
'%'
];
}
}
if
(
isset
(
$parm
[
'status'
])
&&
$parm
[
'status'
]
||
$parm
[
'status'
]
===
'0'
)
{
if
(
isset
(
$parm
[
'status'
])
&&
$parm
[
'status'
]
||
$parm
[
'status'
]
===
'0'
)
{
$map
[]
=
[
'status'
,
'='
,
$parm
[
'status'
]];
$map
[]
=
[
'status'
,
'='
,
$parm
[
'status'
]];
...
@@ -38,8 +38,8 @@ class ShCourse extends BaseController
...
@@ -38,8 +38,8 @@ class ShCourse extends BaseController
$start_time
=
strtotime
(
$parm
[
'start_time'
]);
$start_time
=
strtotime
(
$parm
[
'start_time'
]);
$end_time
=
strtotime
(
$parm
[
'end_time'
]);
$end_time
=
strtotime
(
$parm
[
'end_time'
]);
$map
[]
=
[
'createtime'
,
'>='
,
$start_time
];
$map
[]
=
[
'
sh_course.
createtime'
,
'>='
,
$start_time
];
$map
[]
=
[
'createtime'
,
'<='
,
$end_time
];
$map
[]
=
[
'
sh_course.
createtime'
,
'<='
,
$end_time
];
}
}
$page
=
$request
->
param
(
'page'
,
1
);
$page
=
$request
->
param
(
'page'
,
1
);
...
...
app/api/controller/manage/Student.php
View file @
38d5f154
...
@@ -134,7 +134,8 @@ class Student extends BaseController
...
@@ -134,7 +134,8 @@ class Student extends BaseController
return
$vo
;
return
$vo
;
}
}
$parm
=
$request
->
param
();
$parm
=
$request
->
param
();
$result
=
StudentModel
::
destroy
([
$parm
[
'student_id'
]]);
$student_id
=
is_array
(
$parm
[
'student_id'
])
?
$parm
[
'student_id'
]
:
explode
(
','
,
$parm
[
'student_id'
]);
$result
=
StudentModel
::
destroy
(
$student_id
);
return
$this
->
returnMsg
(
'success'
,
1
,
$result
);
return
$this
->
returnMsg
(
'success'
,
1
,
$result
);
}
}
...
...
vendor/veitool/admin/src/veitool/storage/engine/Aliyun.php
View file @
38d5f154
...
@@ -39,6 +39,25 @@ class Aliyun extends Server
...
@@ -39,6 +39,25 @@ class Aliyun extends Server
*/
*/
public
function
upload
()
public
function
upload
()
{
{
$type
=
$this
->
config
[
'type'
];
$type
=
isset
(
$this
->
config
[
$type
])
&&
is_array
(
$this
->
config
[
$type
])
?
$type
:
'image'
;
$ext
=
$this
->
config
[
$type
][
'ext'
];
$size
=
$this
->
config
[
$type
][
'size'
];
try
{
validate
([
'file'
=>
[
'fileSize'
=>
$size
*
1024
*
1024
,
'fileExt'
=>
$ext
]],[
'file.fileSize'
=>
'上传的文件大小不能超过'
.
$size
.
'M'
,
'file.fileExt'
=>
'请上传后缀为:'
.
$ext
.
'的文件'
])
->
check
([
'file'
=>
$this
->
file
]);
}
catch
(
\think\exception\ValidateException
$e
){
$this
->
error
=
$e
->
getError
();
return
false
;
}
try
{
try
{
$ossClient
=
new
OssClient
(
$ossClient
=
new
OssClient
(
$this
->
config
[
'access_key_id'
],
$this
->
config
[
'access_key_id'
],
...
...
vendor/veitool/admin/src/veitool/storage/engine/Server.php
View file @
38d5f154
...
@@ -44,6 +44,7 @@ abstract class Server
...
@@ -44,6 +44,7 @@ abstract class Server
{
{
// 接收上传的文件
// 接收上传的文件
$this
->
file
=
request
()
->
file
(
$name
);
$this
->
file
=
request
()
->
file
(
$name
);
if
(
empty
(
$this
->
file
))
{
if
(
empty
(
$this
->
file
))
{
throw
new
Exception
(
'未找到上传文件的信息'
);
throw
new
Exception
(
'未找到上传文件的信息'
);
}
}
...
@@ -97,6 +98,7 @@ abstract class Server
...
@@ -97,6 +98,7 @@ abstract class Server
{
{
// 要上传图片的本地路径
// 要上传图片的本地路径
$realPath
=
$this
->
file
->
getRealPath
();
$realPath
=
$this
->
file
->
getRealPath
();
// 扩展名
// 扩展名
$ext
=
$this
->
file
->
getOriginalExtension
();
$ext
=
$this
->
file
->
getOriginalExtension
();
// 自动生成文件名
// 自动生成文件名
...
...
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