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
158bcbb3
Commit
158bcbb3
authored
Mar 27, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频审核和删除
parent
21e89343
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
121 additions
and
127 deletions
+121
-127
Houses.php
application/index/controller/Houses.php
+0
-88
VideoCheck.php
application/index/controller/VideoCheck.php
+67
-10
video_check_list.html
application/index/view/video_check/video_check_list.html
+1
-1
route.php
application/route.php
+3
-3
videoCheckList.js
public/resource/js/videoCheckList.js
+40
-18
video_check_list_template_tpl.html
public/resource/template/video_check_list_template_tpl.html
+10
-7
No files found.
application/index/controller/Houses.php
View file @
158bcbb3
...
@@ -846,91 +846,4 @@ class Houses extends Basic
...
@@ -846,91 +846,4 @@ class Houses extends Basic
return
$this
->
response
(
$code
,
$msg
,
[]);
return
$this
->
response
(
$code
,
$msg
,
[]);
}
}
/**
* 商铺视频列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
houseVideoList
()
{
$where
[
'is_del'
]
=
0
;
if
(
isset
(
$this
->
params
[
'district_id'
]))
{
$where
[
'b.district_id'
]
=
$this
->
params
[
'district_id'
];
}
if
(
isset
(
$this
->
params
[
'store_id'
]))
{
$where
[
'b.store_id'
]
=
$this
->
params
[
'store_id'
];
}
if
(
isset
(
$this
->
params
[
'house_id'
]))
{
$where
[
'a.house_id'
]
=
$this
->
params
[
'house_id'
];
}
if
(
isset
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'a.upload_id'
]
=
$this
->
params
[
'agent_id'
];
}
if
(
isset
(
$this
->
params
[
'is_check'
])
&&
$this
->
params
[
'is_check'
]
==
0
)
{
if
(
$this
->
params
[
'is_check'
]
!=
1
)
{
$where
[
'agent_id'
]
=
0
;
}
else
{
$where
[
'agent_id'
]
=
[
'>'
,
0
];
}
}
$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,a.video_image'
;
$data
=
$m_house_video
->
getVideoAgentList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$field
,
$where
);
$total
=
$m_house_video
->
getVideoAgentListTotal
(
$where
);
foreach
(
$data
as
$k
=>
$v
)
{
$data
[
$k
][
'check_time'
]
=
$v
[
'check_time'
]
?
$v
[
'check_time'
]
:
''
;
$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
;
$data
[
'check_time'
]
=
date
(
'Y-m-d H:i:s'
);
}
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/index/controller/VideoCheck.php
View file @
158bcbb3
...
@@ -24,26 +24,83 @@ class VideoCheck extends Basic
...
@@ -24,26 +24,83 @@ class VideoCheck extends Basic
public
function
videoCheckList
()
public
function
videoCheckList
()
{
{
$this
->
display
(
"video_check_list"
);
if
(
!
$this
->
request
->
isAjax
())
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'video_check/video_check_list'
);
return
view
(
'video_check/video_check_list'
);
}
}
$where
[
'is_del'
]
=
0
;
if
(
isset
(
$this
->
params
[
'district_id'
]))
{
$where
[
'b.district_id'
]
=
$this
->
params
[
'district_id'
];
}
if
(
isset
(
$this
->
params
[
'store_id'
]))
{
$where
[
'b.store_id'
]
=
$this
->
params
[
'store_id'
];
}
if
(
isset
(
$this
->
params
[
'house_id'
]))
{
$where
[
'a.house_id'
]
=
$this
->
params
[
'house_id'
];
}
if
(
isset
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'a.upload_id'
]
=
$this
->
params
[
'agent_id'
];
}
if
(
isset
(
$this
->
params
[
'is_check'
])
&&
$this
->
params
[
'is_check'
]
!=
0
)
{
if
(
$this
->
params
[
'is_check'
]
==
1
)
{
$where
[
'a.check_id'
]
=
0
;
}
else
{
$where
[
'a.check_id'
]
=
[
'>'
,
0
];
}
}
$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,a.video_image'
;
$data
=
$this
->
m_houses_video
->
getVideoAgentList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$field
,
$where
);
$total
=
$this
->
m_houses_video
->
getVideoAgentListTotal
(
$where
);
foreach
(
$data
as
$k
=>
$v
)
{
$data
[
$k
][
'check_time'
]
=
$v
[
'check_time'
]
?
$v
[
'check_time'
]
:
''
;
}
$path
=
'resource/lib/Attachments/video/'
;
return
$this
->
response
(
200
,
''
,
[
'list'
=>
$data
,
'total'
=>
$total
,
'path'
=>
$path
]);
}
}
public
function
getHouseVideoList
()
/**
* 删除和审核视频
*
* @return \think\Response
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public
function
checkVideo
()
{
{
$
params
=
$this
->
params
;
$
code
=
101
;
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
if
(
empty
(
$this
->
params
[
'video_id'
])
||
empty
(
$this
->
params
[
'type'
]))
{
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
]
;
return
$this
->
response
(
$code
,
'参数错误'
)
;
}
$res
=
$this
->
m_houses_video
->
getHouseVideoList
(
$pageNo
,
$pageSize
,
$field
,
$get_params
);
$num
=
$this
->
m_houses_video
->
getTotal
([
'id'
=>
$this
->
params
[
'video_id'
],
'is_del'
=>
0
]);
$res_total
=
$this
->
m_houses_video
->
getHouseVideoListTotal
(
$field
,
$get_params
);
if
(
!
$num
)
{
return
$this
->
response
(
$code
,
'没有该视频'
);
}
foreach
(
$res
as
$key
=>
$val
)
{
if
(
$this
->
params
[
'type'
]
==
'check'
)
{
$data
[
'check_id'
]
=
$this
->
userId
;
$data
[
'check_name'
]
=
$this
->
userName
;
$data
[
'check_time'
]
=
date
(
'Y-m-d H:i:s'
);
$msg
=
'审核成功'
;
}
else
{
$data
[
'is_del'
]
=
1
;
$msg
=
'删除成功'
;
}
$num
=
$this
->
m_houses_video
->
updateData
(
$data
,
[
'id'
=>
$this
->
params
[
'video_id'
]]);
if
(
$num
)
{
$code
=
200
;
}
else
{
$msg
=
'操作失败'
;
}
}
return
$this
->
response
(
$code
,
$msg
);
}
}
}
}
...
...
application/index/view/video_check/video_check_list.html
View file @
158bcbb3
{layout name="global/frame_two_tpl" /}
video_check_list
{layout name="global/frame_two_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"videoCheckList"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"videoCheckList"
/>
<style>
<style>
video
{
video
{
...
...
application/route.php
View file @
158bcbb3
...
@@ -125,9 +125,9 @@ Route::group('index', [
...
@@ -125,9 +125,9 @@ Route::group('index', [
'getEditLog'
=>
[
'index/houses/getEditLog'
,
[
'method'
=>
'get'
]],
//商铺修改日志
'getEditLog'
=>
[
'index/houses/getEditLog'
,
[
'method'
=>
'get'
]],
//商铺修改日志
'isShow'
=>
[
'index/houses/isShow'
,
[
'method'
=>
'POST'
]],
//是否对C端显示
'isShow'
=>
[
'index/houses/isShow'
,
[
'method'
=>
'POST'
]],
//是否对C端显示
'vipHouse'
=>
[
'index/houses/vipHouse'
,
[
'method'
=>
'POST'
]],
//vip盘
'vipHouse'
=>
[
'index/houses/vipHouse'
,
[
'method'
=>
'POST'
]],
//vip盘
'
houseVideoList'
=>
[
'index/houses/houseVideo
List'
,
[
'method'
=>
'GET'
]],
//视频审核列表
'
videoCheckList'
=>
[
'index/VideoCheck/videoCheck
List'
,
[
'method'
=>
'GET'
]],
//视频审核列表
'checkVideo'
=>
[
'index/
houses
/checkVideo'
,
[
'method'
=>
'POST'
]],
//视频审核
'checkVideo'
=>
[
'index/
VideoCheck
/checkVideo'
,
[
'method'
=>
'POST'
]],
//视频审核
'delVideo'
=>
[
'index/
houses
/checkVideo'
,
[
'method'
=>
'POST'
]],
//视频删除
'delVideo'
=>
[
'index/
VideoCheck
/checkVideo'
,
[
'method'
=>
'POST'
]],
//视频删除
//版本管理
//版本管理
'version'
=>
[
'index/version/index'
,
[
'method'
=>
'get'
]],
'version'
=>
[
'index/version/index'
,
[
'method'
=>
'get'
]],
...
...
public/resource/js/videoCheckList.js
View file @
158bcbb3
...
@@ -103,7 +103,7 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
...
@@ -103,7 +103,7 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
$
(
'.shop-name'
).
html
(
house
.
videoName
);
$
(
'.shop-name'
).
html
(
house
.
videoName
);
$
(
'.shop-time'
).
html
(
house
.
videoTime
);
$
(
'.shop-time'
).
html
(
house
.
videoTime
);
document
.
getElementById
(
"video-check"
).
src
=
ServerHostImageLiu
+
'/resource/lib/Attachments/video/'
+
house
.
videoPath
;
document
.
getElementById
(
"video-check"
).
src
=
ServerHostImageLiu
+
'/resource/lib/Attachments/video/'
+
house
.
videoPath
;
if
(
$
(
this
).
attr
(
"data-
status"
)
==
1
){
//审核过
if
(
$
(
this
).
attr
(
"data-
check_id"
)
>
0
){
//审核过
$
(
'.shop-name-check'
).
html
(
''
);
$
(
'.shop-name-check'
).
html
(
''
);
$
(
'.shop-time-check'
).
html
(
''
);
$
(
'.shop-time-check'
).
html
(
''
);
$
(
'.checkVideo'
).
hide
();
$
(
'.checkVideo'
).
hide
();
...
@@ -112,11 +112,14 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
...
@@ -112,11 +112,14 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
$
(
'.shop-time-check'
).
hide
();
$
(
'.shop-time-check'
).
hide
();
$
(
'.checkVideo'
).
show
();
$
(
'.checkVideo'
).
show
();
}
}
});
});
//审核视频 删除视频
//审核视频 删除视频
_doc
.
on
(
'click'
,
'.delVideo'
,
function
(){
_doc
.
on
(
'click'
,
'.delVideo'
,
function
(){
if
(
!
confirm
(
'是否删除?'
))
{
return
;
}
var
_this
=
$
(
this
);
var
_this
=
$
(
this
);
house
.
videoId
=
_this
.
attr
(
"data-id"
);
house
.
delVideo
();
house
.
delVideo
();
});
});
//审核视频 审核通过视频
//审核视频 审核通过视频
...
@@ -168,23 +171,34 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
...
@@ -168,23 +171,34 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
house
.
getFollowupList
();
house
.
getFollowupList
();
// $('.iframe-shop-detail').attr('src', '/app_broker/shop_detail_pc?shop_id='+_id);
// $('.iframe-shop-detail').attr('src', '/app_broker/shop_detail_pc?shop_id='+_id);
});
});
},
},
getList
:
function
(
pageNo
)
{
//商铺视频列表
getList
:
function
(
pageNo
)
{
//商铺视频列表
house
.
pageNo
=
pageNo
;
house
.
pageNo
=
pageNo
;
var
params
=
{};
var
params
=
{};
params
.
pageNo
=
house
.
pageNo
;
params
.
pageNo
=
house
.
pageNo
;
params
.
pageSize
=
house
.
pageSize
;
params
.
pageSize
=
house
.
pageSize
;
params
.
district_id
=
$
(
'#district_id'
).
val
();
//部门
params
.
is_check
=
$
(
'#is_check'
).
val
();
params
.
store_id
=
$
(
'#guest_stores'
).
val
();
//门店
params
.
agent_id
=
house
.
agent_id_phone
?
house
.
agent_id_phone
:
$
(
'#guest_stores_agent'
).
val
();
//下拉搜索 跟进人id
var
district_id
=
$
(
'#district_id'
).
val
();
//部门
params
.
is_check
=
$
(
'#is_check'
).
val
();
if
(
district_id
)
{
params
.
shop_id
=
$
(
'#shop_id'
).
val
();
params
.
district_id
=
district_id
;
}
var
store_id
=
$
(
'#guest_stores'
).
val
();
//门店
if
(
store_id
)
{
params
.
store_id
=
store_id
;
//门店
}
var
agent_id
=
house
.
agent_id_phone
?
house
.
agent_id_phone
:
$
(
'#guest_stores_agent'
).
val
();
//下拉搜索 跟进人id
if
(
agent_id
)
{
params
.
agent_id
=
agent_id
;
}
var
house_id
=
$
(
'#shop_id'
).
val
();
if
(
house_id
)
{
params
.
house_id
=
house_id
;
}
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
'/index/
houseVideo
List'
,
//商铺视频审核
url
:
'/index/
videoCheck
List'
,
//商铺视频审核
data
:
params
,
data
:
params
,
timeout
:
30000
,
timeout
:
30000
,
dataType
:
'json'
,
dataType
:
'json'
,
...
@@ -197,7 +211,7 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
...
@@ -197,7 +211,7 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'video_check_list_tpl'
).
innerHTML
);
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'video_check_list_tpl'
).
innerHTML
);
$
(
"#shop_video_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
$
(
"#shop_video_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
/*分页代码*/
/*分页代码*/
add_page
(
40000
,
pageNo
,
house
.
pageSize
,
house
.
getList
);
add_page
(
data
.
data
.
total
,
pageNo
,
house
.
pageSize
,
house
.
getList
);
$
(
'.hide-total-info-liu'
).
hide
();
$
(
'.hide-total-info-liu'
).
hide
();
}
else
{
}
else
{
...
@@ -267,9 +281,13 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
...
@@ -267,9 +281,13 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
},
},
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
alert
(
data
.
msg
);
if
(
data
.
code
==
200
)
{
$
(
"#modal_shop_check"
).
modal
(
'hide'
);
house
.
getList
(
house
.
pageNo
);
alert
(
data
.
msg
);
$
(
"#modal_shop_check"
).
modal
(
'hide'
);
}
else
{
alert
(
data
.
msg
);
}
}
}
});
});
},
},
...
@@ -284,9 +302,13 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
...
@@ -284,9 +302,13 @@ define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.c
},
},
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
alert
(
data
.
msg
);
if
(
data
.
code
==
200
)
{
$
(
"#modal_shop_check"
).
modal
(
'hide'
);
house
.
getList
(
house
.
pageNo
);
alert
(
data
.
msg
);
$
(
"#modal_shop_check"
).
modal
(
'hide'
);
}
else
{
alert
(
data
.
msg
)
}
}
}
});
});
},
},
...
...
public/resource/template/video_check_list_template_tpl.html
View file @
158bcbb3
...
@@ -6,18 +6,21 @@
...
@@ -6,18 +6,21 @@
<
td
>
[
%=
it
[
item
][
'upload_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'upload_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'house_id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'house_id'
]
%
]
<
/td
>
<
td
>
<
td
>
[
%
if
(
it
[
item
][
"check_
status"
]
==
1
)
{
%
]
[
%
if
(
it
[
item
][
"check_
id"
]
>
0
)
{
%
]
已审核
已审核
[
%
}
else
{
%
]
[
%
}
else
{
%
]
未审核
未审核
[
%
}
%
]
[
%
}
%
]
<
/td
>
<
/td
>
<
td
>
<
td
>
<
a
class
=
"btn1 btn-success review-video"
href
=
"#modal_shop_check"
data
-
name
=
'[%= it[item]["video_name"] %]'
data
-
toggle
=
"modal"
data
-
uploadName
=
'[%= it[item]["upload_name"] %]'
data
-
time
=
'[%= it[item]["create_time"] %]'
data
-
id
=
'[%= it[item]["id"] %]'
data
-
status
=
'[%= it[item]["check_status"] %]'
>
审核
<
/a
>
[
%
if
(
it
[
item
][
"check_id"
]
==
0
&&
check_auth
(
'index/checkVideo'
))
{
%
]
<
a
class
=
"btn1 btn-success review-video"
href
=
"#modal_shop_check"
data
-
name
=
'[%= it[item]["video_name"] %]'
data
-
toggle
=
"modal"
data
-
uploadName
=
'[%= it[item]["upload_name"] %]'
data
-
time
=
'[%= it[item]["create_time"] %]'
data
-
id
=
'[%= it[item]["id"] %]'
data
-
check_id
=
'[%= it[item]["check_id"] %]'
>
审核
<
/a
>
<
a
class
=
"btn1 btn-success"
href
=
"#modal_shop_detail"
data
-
id
=
'[%= it[item]["house_id"] %]'
data
-
toggle
=
"modal"
>
查看商铺
<
/a
>
[
%
}
%
]
<
a
class
=
"btn1 btn-success"
href
=
"#modal_shop_detail"
data
-
id
=
'[%= it[item]["house_id"] %]'
data
-
toggle
=
"modal"
>
查看商铺
<
/a
>
[
%
if
(
check_auth
(
'index/delVideo'
))
{
%
]
<
a
class
=
"btn1 btn-danger delVideo"
href
=
"javascript:;"
data
-
id
=
'[%= it[item]["id"] %]'
>
删除
<
/a
>
[
%
}
%
]
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
[
%
}
%
]
[
%
}
%
]
...
...
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