Commit c1169a11 authored by zhuwei's avatar zhuwei

商铺视频

parent 11cec534
...@@ -12,6 +12,7 @@ namespace app\api\controller; ...@@ -12,6 +12,7 @@ namespace app\api\controller;
use app\api\extend\Basic; use app\api\extend\Basic;
use app\api_broker\service\LookShopService; use app\api_broker\service\LookShopService;
use app\api_broker\service\VerifyService; use app\api_broker\service\VerifyService;
use app\index\service\HouseService;
use app\model\AAgents; use app\model\AAgents;
use app\model\AttentionModel; use app\model\AttentionModel;
use app\model\GHouses; use app\model\GHouses;
...@@ -103,6 +104,7 @@ class Shop extends Basic ...@@ -103,6 +104,7 @@ class Shop extends Basic
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo']; $pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize']; $pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$s_house = new HouseService();
//c端查对外的名字 b端查对内的名字 //c端查对外的名字 b端查对内的名字
if (isset($params['title'])) { if (isset($params['title'])) {
...@@ -231,6 +233,10 @@ class Shop extends Basic ...@@ -231,6 +233,10 @@ class Shop extends Basic
$house_img_where["img_type"] = 2; //默认主图 产品盼盼于11.16号修改 $house_img_where["img_type"] = 2; //默认主图 产品盼盼于11.16号修改
$result[$key]["images"] = $this->gHousesImgModel->getHouseImages($house_img_where, 1); $result[$key]["images"] = $this->gHousesImgModel->getHouseImages($house_img_where, 1);
} }
#商铺视频
$house_id = 148;
$result[$key]['shop_videos'] = $s_house->getHouseVideoList($house_id);
} }
if ($params['site_area'] == 6) { if ($params['site_area'] == 6) {
...@@ -407,6 +413,11 @@ class Shop extends Basic ...@@ -407,6 +413,11 @@ class Shop extends Basic
$result['address'] = $result['city'].$result['disc'].$result['internal_title'];//7151 $result['address'] = $result['city'].$result['disc'].$result['internal_title'];//7151
#商铺视频
$s_house = new HouseService();
$house_id = 148;
$result['shop_videos'] = $s_house->getHouseVideoList($house_id);
return $this->response("200", 'request success', $result); return $this->response("200", 'request success', $result);
} }
......
...@@ -696,7 +696,11 @@ class Shop extends Basic ...@@ -696,7 +696,11 @@ class Shop extends Basic
//判断是否有权限点击独家合同按钮 0:可查看 1:不可查看 //判断是否有权限点击独家合同按钮 0:可查看 1:不可查看
$s_house = new HouseService(); $s_house = new HouseService();
$result['is_can_edit_only_contract'] = $s_house->isCanEditOnlyContract($this->agentId,$params["id"]); $result['is_can_edit_only_contract'] = $s_house->isCanEditOnlyContract($this->agentId,$params["id"]);
#商铺视频
$house_id = 148;
$result['shop_videos'] = $s_house->getHouseVideoList($house_id);
unset($result['external_image_id']); unset($result['external_image_id']);
return $this->response("200", 'request success', $result); return $this->response("200", 'request success', $result);
} }
......
...@@ -1037,14 +1037,16 @@ class HouseService ...@@ -1037,14 +1037,16 @@ class HouseService
if (CURRENT_URL == 'https://api.tonglianjituan.com/') { if (CURRENT_URL == 'https://api.tonglianjituan.com/') {
$internet_path = CHAT_IMG_URL; $internet_path = CHAT_IMG_URL;
} elseif (CURRENT_URL == 'https://pre2.tonglianjituan.com/') { } elseif (CURRENT_URL == 'https://pre2.tonglianjituan.com/') {
$internet_path = 'https://pre2.tonglianjituan.com/static/resource/lib/Attachments/video/'; $internet_path = 'http://pre2.tonglianjituan.com/static/resource/lib/Attachments/video/';
} else { } else {
$internet_path = 'https://pre2.tonglianjituan.com/static/resource/lib/Attachments/video/'; $internet_path = 'http://pre2.tonglianjituan.com/static/resource/lib/Attachments/video/';
} }
foreach ($result as $k=>$v) { foreach ($result as $k=>$v) {
$result[$k]['path'] = $internet_path.$v['video_name']; $result_[$k]['id'] = $v['id'];
$result_[$k]['video_creenshot'] = $internet_path.$v['video_name'];
$result_[$k]['video_path'] = $internet_path.$v['video_name'];
} }
return $result; 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