|
|
|
@ -16,6 +16,9 @@ class infofix extends CI_Controller
|
|
|
|
|
header('Access-Control-Allow-Origin: *');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据关键词搜索信息
|
|
|
|
|
*/
|
|
|
|
|
function list_info_by_keys()
|
|
|
|
|
{
|
|
|
|
|
// 防止超时
|
|
|
|
@ -114,6 +117,9 @@ class infofix extends CI_Controller
|
|
|
|
|
echo json_encode($rs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新含有关键的信息
|
|
|
|
|
*/
|
|
|
|
|
function update_info_by_keys()
|
|
|
|
|
{
|
|
|
|
|
// json参数
|
|
|
|
@ -186,9 +192,8 @@ class infofix extends CI_Controller
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 无条件获取内容
|
|
|
|
|
* 无条件获取信息内容
|
|
|
|
|
* @param mixed $ic_id
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
function get_by_icid($ic_id)
|
|
|
|
|
{
|
|
|
|
@ -214,6 +219,9 @@ class infofix extends CI_Controller
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 无条件更新信息内容
|
|
|
|
|
*/
|
|
|
|
|
function update_by_icid()
|
|
|
|
|
{
|
|
|
|
|
$ic_id = $this->input->get_post('ic_id');
|
|
|
|
@ -221,5 +229,29 @@ class infofix extends CI_Controller
|
|
|
|
|
$this->infoContents_model->force_update($ic_id, $ic_content);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 列举使用旧版构建工具的信息,用于批量替换更新。
|
|
|
|
|
* @param mixed $site
|
|
|
|
|
*/
|
|
|
|
|
function list_use_hb($site)
|
|
|
|
|
{
|
|
|
|
|
$rs = $this->infoContents_model->list_use_hb($site);
|
|
|
|
|
if ($rs) {
|
|
|
|
|
echo json_encode(
|
|
|
|
|
array(
|
|
|
|
|
'state' => 0,
|
|
|
|
|
'infos' => $rs,
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
echo json_encode(
|
|
|
|
|
array(
|
|
|
|
|
'state' => -1,
|
|
|
|
|
'msg' => 'not content by ' . $site
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//end of infofix
|