hotfix/远程访问多媒体中心
lmrwork 7 years ago
parent 7fb9f1416f
commit ede7a249ae

@ -238,7 +238,7 @@ class Info_amp extends CI_Controller
));
return false;
}
$rs = $this->Information_model->get_list_by_path($is_path, false, $site_code);
$rs = $this->Information_model->list_info_by_path_with_meta($is_path, $site_code);
if (!empty($rs)) {
$newrs = array();
foreach ($rs as $info) {
@ -247,7 +247,8 @@ class Info_amp extends CI_Controller
'ic_url' => $info->ic_url,
'ic_id' => $info->ic_id,
'title' => $info->ic_title,
'photo' => $this->config->item('site_image_url').$info->ic_photo
'photo' => $this->config->item('site_image_url').$info->ic_photo,
'im_id' => $info->im_id
));
}
}

@ -55,6 +55,24 @@ class InfoMetas_model extends CI_Model {
return $query->result();
}
//按节点列表信息含meta数据
function list_info_by_path_with_meta($is_path, $site_code) {
$sql = "SELECT is.is_id, \n"
. " ic.ic_id, \n"
. " ic.ic_url, \n"
. " ic.ic_status, \n"
. " ic.ic_template, \n"
. " ic.ic_sitecode, \n"
. " im.im_id \n"
. " FROM infoStructures is \n"
. " INNER JOIN infoContents ic ON ic.ic_id = is.is_ic_id \n"
. " AND ic.ic_sitecode = is.is_sitecode \n"
. " LEFT JOIN infoMetas im ON im.im_ic_id = ic.ic_id AND im.im_key=?"
. " WHERE is.is_path = ? AND is_sitecode = ?";
$query = $this->HT->query($sql, array('AMP_JSON', $is_path, $site_code));
return $query->result();
}
function get($im_ic_id, $im_key) {
$sql = "SELECT im.im_value \n"
. "FROM infoMetas im \n"

Loading…
Cancel
Save