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
11cec534
Commit
11cec534
authored
Mar 26, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频列表
parent
91c9fc02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
2 deletions
+85
-2
Shop.php
application/api_broker/controller/Shop.php
+82
-0
route.php
application/route.php
+3
-2
No files found.
application/api_broker/controller/Shop.php
View file @
11cec534
...
...
@@ -17,6 +17,7 @@ use app\model\GHousesExt;
use
app\model\GHousesFollowUp
;
use
app\model\GHousesImgs
;
use
app\model\GHousesToAgents
;
use
app\model\GHousesVideo
;
use
app\model\GImageDepot
;
use
app\model\GLandlordPhone
;
use
app\model\OBargainModel
;
...
...
@@ -1114,4 +1115,85 @@ class Shop extends Basic
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
()
{
if
(
isset
(
$this
->
params
[
'is_check'
])
&&
$this
->
params
[
'is_check'
]
==
0
)
{
if
(
$this
->
params
[
'is_check'
]
!=
1
)
{
$where
[
'check_id'
]
=
0
;
}
else
{
$where
[
'check_id'
]
=
[
'>'
,
0
];
}
}
$where
[
'is_del'
]
=
0
;
$vip
=
new
VipService
();
$is_auth
=
$vip
->
checkRule
(
$this
->
agentId
,
'index/checkVideo'
);
if
(
$is_auth
)
{
$where
[
'a.upload_id'
]
=
$this
->
agentId
;
}
else
{
$m_agent
=
new
AAgents
();
$agent_data
=
$m_agent
->
getAgentInfo
(
'district_id,store_id'
,
$this
->
agentId
);
$where
[
'b.district_id'
]
=
$agent_data
[
'district_id'
];
$where
[
'b.store_id'
]
=
$agent_data
[
'store_id'
];
}
$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
);
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
,
'path'
=>
$path
,
'is_auth'
=>
$is_auth
]);
}
/**
* 删除和审核视频
*
* @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
->
agentId
;
$data
[
'check_name'
]
=
$this
->
agentName
;
$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
);
}
}
application/route.php
View file @
11cec534
...
...
@@ -672,8 +672,9 @@ Route::group('broker', [
'getCityInfoByMap'
=>
[
'api_broker/MapFindHouse/getCityInfoByMap'
,
[
'method'
=>
'get|post'
]],
'getShopDetail'
=>
[
'api_broker/Shop/getShopDetail'
,
[
'method'
=>
'get'
]],
'addShopFollowUp'
=>
[
'api_broker/Shop/addShopFollowUp'
,
[
'method'
=>
'post'
]],
//新增商铺跟进记录
'addHouseVideo'
=>
[
'api_broker/Shop/addHouseVideo'
,
[
'method'
=>
'post'
]],
//新增商铺视频
'addHouseVideo'
=>
[
'api_broker/Shop/addHouseVideo'
,
[
'method'
=>
'post'
]],
//新增商铺视频
'houseVideoList'
=>
[
'api_broker/Shop/houseVideoList'
,
[
'method'
=>
'get'
]],
//商铺视频列表
'checkVideo'
=>
[
'api_broker/Shop/checkVideo'
,
[
'method'
=>
'post'
]],
//视频审核和删除
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]
],
'getCheckType'
=>
[
'api_broker/Report/getCheckType'
,
[
'method'
=>
'get|post'
]
],
...
...
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