diff --git a/application/controllers/info_amp.php b/application/controllers/info_amp.php index b9857d42..30e55544 100644 --- a/application/controllers/info_amp.php +++ b/application/controllers/info_amp.php @@ -29,6 +29,13 @@ class Info_amp extends CI_Controller $schema = $this->input->get_post('schema'); $script = $this->input->get_post('script'); $status = $this->input->get_post('status'); + + //如果源信息的内容为空,则插入内容。 + $info = $this->InfoContents_model->get_ic_contents2($icid); + if ($info && empty($info->ic_content)) { + $this->InfoContents_model->force_update($ic_id, ''.$pc_html); + } + if ($icid && $json && $html) { try { //html diff --git a/application/models/infoContents_model.php b/application/models/infoContents_model.php index 5f99c142..676d76db 100644 --- a/application/models/infoContents_model.php +++ b/application/models/infoContents_model.php @@ -85,6 +85,14 @@ class InfoContents_model extends CI_Model return $query; } + //删除信息 + function force_update($ic_id, $ic_content) + { + $sql = "UPDATE infoContents SET ic_content = N? WHERE ic_id = ?"; + $query = $this->HT->query($sql, array($ic_content, $ic_id)); + return $query; + } + //删除信息 function Delete($ic_id) {