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
558ceb98
Commit
558ceb98
authored
Mar 26, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频长度
parent
e7b8da1f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
Shop.php
application/api/controller/Shop.php
+3
-0
Shop.php
application/api_broker/controller/Shop.php
+1
-0
HouseService.php
application/index/service/HouseService.php
+23
-1
No files found.
application/api/controller/Shop.php
View file @
558ceb98
...
...
@@ -237,6 +237,7 @@ class Shop extends Basic
#商铺视频
$house_id
=
148
;
$result
[
$key
][
'shop_videos'
]
=
$s_house
->
getHouseVideoList
(
$house_id
);
// $result[$key]['shop_videos_length'] = $s_house->getHouseVideoLength();
}
if
(
$params
[
'site_area'
]
==
6
)
{
...
...
@@ -417,6 +418,8 @@ class Shop extends Basic
$s_house
=
new
HouseService
();
$house_id
=
148
;
$result
[
'shop_videos'
]
=
$s_house
->
getHouseVideoList
(
$house_id
);
$result
[
'shop_videos_length'
]
=
$s_house
->
getHouseVideoLength
();
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
}
...
...
application/api_broker/controller/Shop.php
View file @
558ceb98
...
...
@@ -699,6 +699,7 @@ class Shop extends Basic
#商铺视频
$result
[
'shop_videos'
]
=
$s_house
->
getHouseVideoList
(
$params
[
'id'
]);
$result
[
'shop_videos_length'
]
=
$s_house
->
getHouseVideoLength
();
unset
(
$result
[
'external_image_id'
]);
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
...
...
application/index/service/HouseService.php
View file @
558ceb98
...
...
@@ -11,6 +11,7 @@ namespace app\index\service;
use
app\api_broker\service\PushMessageService
;
use
app\api_broker\service\VipService
;
use
app\extra\RedisExt
;
use
app\index\validate\HouseValidate
;
use
app\model\AAgents
;
use
app\model\ACase
;
...
...
@@ -1047,7 +1048,9 @@ class HouseService
$result_
[
$k
][
'id'
]
=
$v
[
'id'
];
$result_
[
$k
][
'upload_id'
]
=
$v
[
'upload_id'
];
$result_
[
$k
][
'check_name'
]
=
$v
[
'check_name'
];
$result_
[
$k
][
'upload_name'
]
=
$agent_model
->
getAgentFieldById
(
$v
[
'upload_id'
],
'name'
);
$upload
=
$agent_model
->
findByOne
(
'name,phone'
,[
'id'
=>
$v
[
'upload_id'
]]);
$result_
[
$k
][
'upload_name'
]
=
$upload
[
'name'
];
$result_
[
$k
][
'upload_phone'
]
=
$upload
[
'phone'
];
$result_
[
$k
][
'video_image'
]
=
$v
[
'video_image'
]
?
$internet_path
.
$v
[
'video_image'
]
:
'http://n.sinaimg.cn/ent/transform/20170921/FVGl-fymesmp0851702.jpg'
;
$result_
[
$k
][
'video_path'
]
=
$internet_path
.
$v
[
'video_name'
];
$result_
[
$k
][
'create_time'
]
=
$v
[
'create_time'
];
...
...
@@ -1055,4 +1058,22 @@ class HouseService
return
$result_
;
}
/**
* 视频长度
* @return mixed
*/
public
function
getHouseVideoLength
()
{
$redis_
=
RedisExt
::
getRedis
();
$start_time
=
$redis_
->
get
(
"s_video_start_time"
);
$end_time
=
$redis_
->
get
(
"s_video_end_time"
);
$result_
[
's_video_start_time'
]
=
$start_time
?
$start_time
:
0
;
$result_
[
's_video_end_time'
]
=
$end_time
?
$end_time
:
10
;
return
$result_
;
}
}
\ No newline at end of file
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