Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
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
hujun
tl_estate
Commits
9116d362
Commit
9116d362
authored
Mar 25, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频删除和审核
parent
89e4647c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
Houses.php
application/index/controller/Houses.php
+40
-2
route.php
application/route.php
+2
-0
No files found.
application/index/controller/Houses.php
View file @
9116d362
...
...
@@ -878,7 +878,7 @@ class Houses extends Basic
}
}
$m_house_video
=
new
GHousesVideo
();
$m_house_video
=
new
GHousesVideo
();
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$field
=
'a.id,a.video_name,a.house_id,a.upload_name,a.check_name,a.check_id,a.check_time,a.create_time'
;
...
...
@@ -886,9 +886,46 @@ class Houses extends Basic
$total
=
$m_house_video
->
getVideoAgentListTotal
(
$where
);
foreach
(
$data
as
$k
=>
$v
)
{
$data
[
$k
][
'check_time'
]
=
$v
[
'check_time'
]
?
$v
[
'check_time'
]
:
''
;
$data
[
$k
][
'check_
id
'
]
=
$v
[
'check_id'
]
?
1
:
0
;
$data
[
$k
][
'check_
status
'
]
=
$v
[
'check_id'
]
?
1
:
0
;
}
$path
=
'resource/lib/Attachments/video/'
;
return
$this
->
response
(
200
,
''
,
[
'list'
=>
$data
,
'total'
=>
$total
,
'path'
=>
$path
]);
}
/**
* 删除和审核视频
*
* @return \think\Response
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public
function
checkVideo
()
{
$code
=
101
;
if
(
empty
(
$this
->
params
[
'video_id'
])
||
empty
(
$this
->
params
[
'type'
]))
{
return
$this
->
response
(
$code
,
'参数错误'
);
}
$m_house_video
=
new
GHousesVideo
();
$num
=
$m_house_video
->
getTotal
([
'id'
=>
$this
->
params
[
'video_id'
],
'is_del'
=>
0
]);
if
(
!
$num
)
{
return
$this
->
response
(
$code
,
'没有该视频'
);
}
if
(
$this
->
params
[
'type'
]
==
'check'
)
{
$data
[
'check_id'
]
=
$this
->
userId
;
$data
[
'check_name'
]
=
$this
->
userName
;
}
else
{
$data
[
'is_del'
]
=
1
;
}
$num
=
$m_house_video
->
updateData
(
$data
,
[
'id'
=>
$this
->
params
[
'video_id'
]]);
if
(
$num
)
{
$msg
=
'审核成功'
;
$code
=
200
;
}
else
{
$msg
=
'审核失败'
;
}
return
$this
->
response
(
$code
,
$msg
);
}
}
\ No newline at end of file
application/route.php
View file @
9116d362
...
...
@@ -126,6 +126,8 @@ Route::group('index', [
'isShow'
=>
[
'index/houses/isShow'
,
[
'method'
=>
'POST'
]],
//是否对C端显示
'vipHouse'
=>
[
'index/houses/vipHouse'
,
[
'method'
=>
'POST'
]],
//vip盘
'houseVideoList'
=>
[
'index/houses/houseVideoList'
,
[
'method'
=>
'GET'
]],
//视频审核列表
'checkVideo'
=>
[
'index/houses/checkVideo'
,
[
'method'
=>
'POST'
]],
//视频审核
'delVideo'
=>
[
'index/houses/checkVideo'
,
[
'method'
=>
'POST'
]],
//视频删除
//版本管理
'version'
=>
[
'index/version/index'
,
[
'method'
=>
'get'
]],
...
...
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