Commit a09244a8 authored by hujun's avatar hujun

图片路径修改

parent 3138b4b3
...@@ -26,7 +26,7 @@ class SNews extends BaseModel ...@@ -26,7 +26,7 @@ class SNews extends BaseModel
*/ */
public function getListAgent($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') public function getListAgent($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '')
{ {
return $this->field($field) $data = $this->field($field)
->alias('a') ->alias('a')
->join('a_agents b', 'a.publisher_id = b.id', 'left') ->join('a_agents b', 'a.publisher_id = b.id', 'left')
->join('s_label c', 'a.s_label_id = c.id', 'left') ->join('s_label c', 'a.s_label_id = c.id', 'left')
...@@ -35,6 +35,13 @@ class SNews extends BaseModel ...@@ -35,6 +35,13 @@ class SNews extends BaseModel
->limit($pageSize) ->limit($pageSize)
->page($pageNo) ->page($pageNo)
->select(); ->select();
foreach ($data as $k=>$v) {
if (isset($v['cover_plan'])) {
$data[$k]['cover_plan'] = CK_IMG_URL . '/images/' . $v['cover_plan'];
}
}
return $data;
} }
/** /**
...@@ -69,7 +76,7 @@ class SNews extends BaseModel ...@@ -69,7 +76,7 @@ class SNews extends BaseModel
->order($order) ->order($order)
->find(); ->find();
$data['cover_plan'] = CURRENT_URL . 'static/business_school/' . $data['cover_plan']; $data['cover_plan'] = CK_IMG_URL . '/images/' . $data['cover_plan'];
return $data; return $data;
} }
......
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