Commit 558ceb98 authored by zhuwei's avatar zhuwei

视频长度

parent e7b8da1f
......@@ -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);
}
......
......@@ -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);
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment