Commit ea8dc32c authored by zhuwei's avatar zhuwei

bug

parent 700c9398
...@@ -12,6 +12,7 @@ class SquareService ...@@ -12,6 +12,7 @@ class SquareService
private $m_coment; private $m_coment;
private $m_coment_ext; private $m_coment_ext;
private $redis; private $redis;
private $internet_path;
public function __construct() public function __construct()
{ {
...@@ -19,6 +20,12 @@ class SquareService ...@@ -19,6 +20,12 @@ class SquareService
$this->m_coment = new BComment(); $this->m_coment = new BComment();
$this->m_coment_ext = new BCommentExt(); $this->m_coment_ext = new BCommentExt();
$this->redis = new RedisCacheService(); $this->redis = new RedisCacheService();
if (CURRENT_URL == 'https://api.tonglianjituan.com/') {
$this->internet_path = IMAGES_URL.'resource/lib/Attachments/images/';
}else {
$this->internet_path = 'http://pre2.tonglianjituan.com/resource/lib/Attachments/images/';
}
} }
/** /**
...@@ -74,6 +81,7 @@ class SquareService ...@@ -74,6 +81,7 @@ class SquareService
* @return array * @return array
*/ */
public function getSquareList($params){ public function getSquareList($params){
// big_log(json_encode($params));
$pageNo = empty($params['page_no']) ? 1 : $params['page_no']; $pageNo = empty($params['page_no']) ? 1 : $params['page_no'];
$pageSize = empty($params['page_size']) ? 15 : $params['page_size']; $pageSize = empty($params['page_size']) ? 15 : $params['page_size'];
...@@ -117,12 +125,16 @@ class SquareService ...@@ -117,12 +125,16 @@ class SquareService
//评论数 //评论数
$res[$key]['comment_num'] = $this->getCommenNum($val['id']); $res[$key]['comment_num'] = $this->getCommenNum($val['id']);
$res[$key]['cover_img_path'] = $val['cover_img'] ? $this->internet_path . $val['cover_img'] : '';
} }
return [ 'data' => $res, 'total' => $res_total ]; return [ 'data' => $res, 'total' => $res_total ];
} }
public function getSquareCommentList($params){ public function getSquareCommentList($params){
big_log(json_encode($params));
$pageNo = empty($params['page_no']) ? 1 : $params['page_no']; $pageNo = empty($params['page_no']) ? 1 : $params['page_no'];
$pageSize = empty($params['page_size']) ? 15 : $params['page_size']; $pageSize = empty($params['page_size']) ? 15 : $params['page_size'];
......
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