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
c4805280
Commit
c4805280
authored
Jun 16, 2025
by
wangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理后台 看板
parent
ceaa7084
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
73 additions
and
25 deletions
+73
-25
ProjectCategory.php
app/admin/controller/project/ProjectCategory.php
+6
-2
CertValidate.php
app/admin/validate/CertValidate.php
+3
-3
edit.html
app/admin/view/cert/cert/edit.html
+1
-1
index.html
app/admin/view/cert/cert/index.html
+1
-1
index.html
app/admin/view/cert/cert_tag/index.html
+0
-1
index.html
app/admin/view/course/course/index.html
+3
-1
edit.html
app/admin/view/project/project_category/edit.html
+9
-0
index.html
app/admin/view/project/project_category/index.html
+11
-0
Cert.php
app/api/controller/cert/Cert.php
+19
-3
CourseTeacher.php
app/api/controller/manage/CourseTeacher.php
+1
-1
Project.php
app/api/controller/manage/Project.php
+2
-2
User.php
app/api/controller/mine/User.php
+3
-2
CertOrder.php
app/model/CertOrder.php
+10
-6
AdvertCate.php
app/model/project/AdvertCate.php
+1
-0
UserWithdrawal.php
app/model/project/UserWithdrawal.php
+1
-0
SystemUploadFile.php
app/model/system/SystemUploadFile.php
+2
-2
No files found.
app/admin/controller/project/ProjectCategory.php
View file @
c4805280
...
...
@@ -47,8 +47,12 @@ class ProjectCategory extends AdminBase
public
function
editup
()
{
$post
=
input
();
$this
->
projectcategory
->
update
([
$post
[
'af'
]
=>
$post
[
'av'
]],
[[
'id'
,
'='
,
$post
[
'id'
]]]);
return
$this
->
returnMsg
(
'修改成功'
);
$result
=
$this
->
projectcategory
->
update
([
$post
[
'af'
]
=>
$post
[
'av'
]],
[[
'id'
,
'='
,
$post
[
'id'
]]]);
if
(
$result
){
return
$this
->
returnMsg
(
'修改成功'
,
1
);
}
else
{
return
$this
->
returnMsg
(
'修改失败'
);
}
}
//编辑新增分类
...
...
app/admin/validate/CertValidate.php
View file @
c4805280
...
...
@@ -14,7 +14,7 @@ class CertValidate extends BaseValidate
'cate_id'
=>
'require'
,
'thumb_id'
=>
'require'
,
'description'
=>
'require'
,
'price'
=>
'require|between:0.01,999999.99'
,
//
'price' => 'require|between:0.01,999999.99',
'start_time'
=>
'require'
,
'end_time'
=>
'require'
,
'content'
=>
'require'
,
...
...
@@ -25,8 +25,8 @@ class CertValidate extends BaseValidate
'cate_id.require'
=>
'请选择分类'
,
'thumb_id.require'
=>
'请上传图片'
,
'description.require'
=>
'请输入证书简介'
,
'price.require'
=>
'请输入价格'
,
'price.between'
=>
'价格格式不对'
,
//
'price.require' => '请输入价格',
//
'price.between' => '价格格式不对',
'start_time.require'
=>
'请输入报名开始时间'
,
'end_time.require'
=>
'请输入报名结束时间'
,
'content.require'
=>
'请输入内容'
,
...
...
app/admin/view/cert/cert/edit.html
View file @
c4805280
...
...
@@ -49,7 +49,7 @@
<label
class=
"layui-form-label"
>
价格
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"price"
placeholder=
"请输入价格"
autocomplete=
"off"
class=
"layui-input"
value=
"{$data.price|default=''}"
>
value=
"{$data.price|default='
0
'}"
>
</div>
</div>
...
...
app/admin/view/cert/cert/index.html
View file @
c4805280
...
...
@@ -108,7 +108,7 @@
elem
:
'#cert'
,
page
:
true
,
limit
:{
$limit
},
height
:
'full-341'
,
//
height: 'full-341',
url
:
app_root
+
"index?&do=json"
,
// css: 'td .layui-table-cell{height:80px;line-height:80px;padding:0 5px;}',
cols
:
[[
...
...
app/admin/view/cert/cert_tag/index.html
View file @
c4805280
...
...
@@ -72,7 +72,6 @@
elem
:
'#certtag'
,
page
:
true
,
limit
:{
$limit
},
height
:
'full-341'
,
url
:
app_root
+
"index?&do=json"
,
// css: 'td .layui-table-cell{height:80px;line-height:80px;padding:0 5px;}',
cols
:
[[
...
...
app/admin/view/course/course/index.html
View file @
c4805280
...
...
@@ -59,7 +59,9 @@
<
div
class
=
"layui-clear-space"
>
<
a
class
=
"layui-btn layui-btn-xs"
lay
-
event
=
"detail"
>
详情
<
/a
>
<
a
class
=
"layui-btn layui-btn-xs"
lay
-
event
=
"shenhei"
>
审核
<
/a
>
{{
#
if
(
d
.
status
===
1
)
{
}}
<
a
class
=
"layui-btn layui-btn-xs"
lay
-
event
=
"shenhei"
>
审核
<
/a
>
{{
#
}
}}
<
a
class
=
"layui-btn layui-btn-xs"
lay
-
event
=
"more"
>
更多
<
i
class
=
"layui-icon layui-icon-down"
><
/i
>
...
...
app/admin/view/project/project_category/edit.html
View file @
c4805280
...
...
@@ -29,6 +29,15 @@
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
推荐分类
</label>
<div
class=
"layui-input-block"
>
<input
type=
"radio"
name=
"is_tj"
value=
"0"
title=
"否"
checked
{
eq
name=
"$data.is_tj|default=''"
value=
"0"
}
checked
{/
eq
}
>
<input
type=
"radio"
name=
"is_tj"
value=
"1"
title=
"是"
{
eq
name=
"$data.is_tj|default=''"
value=
"1"
}
checked
{/
eq
}
>
</div>
<div
class=
"layui-form-mid"
><i
class=
"layui-icon"
>
</i>
设计推荐分类可显示在项目工坊页面
</div>
</div>
<input
type=
"hidden"
name=
"id"
value=
"{$data.id|default=0}"
>
...
...
app/admin/view/project/project_category/index.html
View file @
c4805280
...
...
@@ -56,11 +56,22 @@
{
field
:
'title'
,
align
:
'left'
,
title
:
'分类'
,
edit
:
'text'
},
{
field
:
'thumb'
,
width
:
50
,
align
:
'center'
,
title
:
'缩略图'
,
templet
:
'<div><div class="files_itemw1"><img src="{{d.thumbpath}}" lay-event="article-event-image" /></div></div>'
},
{
field
:
'sort'
,
width
:
50
,
align
:
'center'
,
title
:
'排序'
,
edit
:
'text'
},
{
field
:
"is_tj"
,
width
:
80
,
align
:
'center'
,
title
:
"是否推荐"
,
templet
:
function
(
d
){
return
'<input type="checkbox" name="is_tj" lay-skin="switch" lay-text="是|否" lay-filter="is_tj-chang" value="'
+
d
.
is_tj
+
'" data-json="'
+
encodeURIComponent
(
JSON
.
stringify
(
d
))
+
'"'
+
(
d
.
is_tj
==
1
?
' checked'
:
''
)
+
'>'
;},
unresize
:
true
,},
{
fixed
:
'right'
,
width
:
130
,
align
:
'center'
,
toolbar
:
'<div><a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a><a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a></div>'
,
title
:
'操作'
}
]],
done
:
function
(){
admin
.
vShow
(
$
(
'[lay-table-id="projectcategory"]'
));
}
});
// 状态 - 开关操作
form
.
on
(
'switch(is_tj-chang)'
,
function
(
obj
){
var
json
=
JSON
.
parse
(
decodeURIComponent
(
$
(
this
).
data
(
'json'
)));
var
av
=
obj
.
elem
.
checked
?
1
:
0
;
admin
.
req
(
app_root
+
"editup"
,{
id
:
json
.
id
,
av
:
av
,
af
:
obj
.
elem
.
name
},
function
(
res
){
layer
.
tips
(
res
.
msg
,
obj
.
othis
,{
time
:
1000
});
if
(
res
.
code
===
0
)
obj
.
elem
.
checked
=
parseInt
(
obj
.
value
);
},
'post'
,{
headersToken
:
true
});
});
/*展开或折叠*/
$
(
'#projectcategory-sz'
).
click
(
function
(){
var
ob
=
$
(
this
),
i
,
t
;
...
...
app/api/controller/cert/Cert.php
View file @
c4805280
...
...
@@ -46,7 +46,8 @@ class Cert extends BaseController
$page
=
$request
->
param
(
'page/d'
,
1
);
$pageSize
=
$request
->
param
(
'pageSize/d'
,
10
);
$data
[
'category_id'
]
=
$data
[
'category_id'
]
==
16
?
0
:
$data
[
'category_id'
];
$list
=
(
new
CertModel
())
->
getCertList
(
$data
[
'category_id'
],
$page
,
$pageSize
,
$data
[
'type'
],
$data
[
'searchKeyWords'
]
??
null
);
return
$this
->
returnMsg
(
'success'
,
1
,
$list
);
...
...
@@ -59,8 +60,23 @@ class Cert extends BaseController
$page
=
$request
->
param
(
'page/d'
,
1
);
$pageSize
=
$request
->
param
(
'pageSize/d'
,
10
);
$list
=
(
new
CertOrder
())
->
latestCertList
(
$page
,
$pageSize
);
$list
=
(
new
CertOrder
())
->
latestCertList
(
$page
,
$pageSize
)
->
toArray
();
$dd
=
$list
[
'data'
][
0
];
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
$list
[
'data'
][]
=
$dd
;
return
$this
->
returnMsg
(
'success'
,
1
,
$list
);
}
...
...
app/api/controller/manage/CourseTeacher.php
View file @
c4805280
...
...
@@ -18,7 +18,7 @@ class CourseTeacher extends BaseController
//添加讲师
public
function
createCourseTeacher
(
Request
$request
)
{
$vo
=
(
new
CourseTeacherValidate
())
->
goCheck
([
'nickname'
,
'mobile'
,
'idcard'
]);
$vo
=
(
new
CourseTeacherValidate
())
->
goCheck
([
'nickname'
]);
if
(
$vo
!==
true
)
{
return
$vo
;
}
...
...
app/api/controller/manage/Project.php
View file @
c4805280
...
...
@@ -132,7 +132,7 @@ class Project extends BaseController
$order_status
=
ProjectModel
::
where
(
'id'
,
$request
->
param
(
'project_id'
))
->
value
(
'status'
);
if
(
$order_status
>=
2
)
{
$query
->
where
([
'
project_put.
status'
=>
2
]);
$query
->
where
([
'status'
=>
2
]);
}
...
...
@@ -197,7 +197,7 @@ class Project extends BaseController
$isConfirm
=
ProjectModel
::
where
([
'id'
=>
$data
[
'project_id'
],
'sh_status'
=>
2
])
->
where
(
'status'
,
'
!
='
,
1
)
->
lock
(
true
)
->
count
();
])
->
where
(
'status'
,
'='
,
1
)
->
lock
(
true
)
->
count
();
if
(
!
$isConfirm
)
{
throw
new
\Exception
(
'当前项目已完成或已确认接单人'
);
}
...
...
app/api/controller/mine/User.php
View file @
c4805280
...
...
@@ -149,14 +149,15 @@ class User extends BaseController
$UserWithdrawalModel
=
new
UserWithdrawal
();
$sum
=
$UserWithdrawalModel
->
where
([
'user_id'
=>
$userId
,
'type'
=>
1
])
$sum
=
$UserWithdrawalModel
->
where
([
'user_id'
=>
$userId
])
->
whereBetween
(
'createtime'
,
[
strtotime
(
'today'
),
strtotime
(
'tomorrow'
)
-
1
])
->
sum
(
'money'
);
->
sum
(
'
tx_
money'
);
if
(
$sum
>
10000
)
{
return
$this
->
returnMsg
(
'超出每日限额'
);
}
$userAccount
=
UserAccount
::
where
([
'user_id'
=>
$userId
,
'is_del'
=>
0
,
'type'
=>
$data
[
'txType'
]])
->
find
();
$commission
=
vconfig
(
'commission'
)
?
:
0
;
...
...
app/model/CertOrder.php
View file @
c4805280
...
...
@@ -59,21 +59,25 @@ class CertOrder extends Model
public
function
latestCertList
(
$page
,
$pageSize
)
{
$where
=
[
'status'
=>
3
,
'is_del'
=>
0
];
$list
=
self
::
where
(
$where
)
->
with
([
'user'
=>
[
'headico'
],
'cert'
])
->
order
(
'createtime'
,
'desc'
)
->
field
(
'id,cert_id,user_id,name,updatetime'
)
->
append
([
'updatetime_text'
])
->
paginate
([
'page'
=>
$page
,
'list_rows'
=>
$pageSize
]);
$list
->
each
(
function
(
$item
)
{
$item
->
append
([
'updatetime_text'
]);
return
$item
;
});
//
$list->each(function($item) {
//
$item->append(['updatetime_text']);
//
return $item;
//
});
return
$list
;
}
...
...
@@ -89,7 +93,7 @@ class CertOrder extends Model
public
function
getUpdatetimeTextAttr
(
$value
,
$data
)
{
$timestamp
=
is_numeric
(
$data
[
'updatetime'
])
?
$data
[
'updatetime'
]
:
strtotime
(
$data
[
'
upd
atetime'
]);
$timestamp
=
is_numeric
(
$data
[
'updatetime'
])
?
$data
[
'updatetime'
]
:
strtotime
(
$data
[
'
cre
atetime'
]);
return
$this
->
timeElapsedString
(
$timestamp
);
}
...
...
app/model/project/AdvertCate.php
View file @
c4805280
...
...
@@ -18,6 +18,7 @@ class AdvertCate extends Model
{
return
$this
->
hasMany
(
Advert
::
class
,
'p_id'
,
'id'
)
->
where
(
'is_del'
,
0
)
->
where
(
'is_show'
,
1
)
->
field
(
'id,name,type,url,p_id,url,cover_img_id'
)
->
order
(
'sort desc'
);
}
...
...
app/model/project/UserWithdrawal.php
View file @
c4805280
...
...
@@ -47,6 +47,7 @@ class UserWithdrawal extends Model
*/
public
function
applyWithdrawal
(
$userId
,
$amount
,
$accountType
,
$account
,
$realName
,
$commissionRate
=
0
,
$front_money
=
0
)
{
// 验证提现金额
if
(
$amount
<=
0
)
{
return
[
'status'
=>
false
,
'msg'
=>
'提现金额必须大于0'
];
...
...
app/model/system/SystemUploadFile.php
View file @
c4805280
...
...
@@ -39,8 +39,8 @@ class SystemUploadFile extends Base
public
function
getFileurlAttr
(
$value
,
$data
)
{
if
(
isset
(
$data
[
'storage'
])
&&
$data
[
'storage'
]
==
'local'
)
{
$module
=
app
(
'http'
)
->
getName
();
// 获取模块名(不含应用名)
if
(
isset
(
$data
[
'storage'
])
&&
$data
[
'storage'
]
==
'local'
&&
$module
==
'api'
)
{
return
config
(
'app.file_http_url'
)
.
$value
;
}
return
$value
;
...
...
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