diff --git a/application/controllers/info_amp.php b/application/controllers/info_amp.php index ef6c04b7..9667e3d3 100644 --- a/application/controllers/info_amp.php +++ b/application/controllers/info_amp.php @@ -190,55 +190,4 @@ class Info_amp extends CI_Controller )); } } - - public function update_amp() - { - $icid = $this->input->get_post('icid'); - $json = $this->input->get_post('json'); - $html = $this->input->get_post('html'); - $css = $this->input->get_post('css'); - $schema = $this->input->get_post('schema'); - $script = $this->input->get_post('script'); - $status = $this->input->get_post('status'); - if ($icid && $json && $html) { - try { - //html - $meta = $this->InfoMetas_model->get($icid, 'AMP_BODY'); - if ($meta === false) { - $this->InfoMetas_model->add($icid, 'AMP_BODY', $html); - } else { - $this->InfoMetas_model->update($icid, 'AMP_BODY', $html); - } - //css - $meta = $this->InfoMetas_model->get($icid, 'AMP_CSS'); - if ($meta === false) { - $this->InfoMetas_model->add($icid, 'AMP_CSS', $css); - } else { - $this->InfoMetas_model->update($icid, 'AMP_CSS', $css); - } - //script - $meta = $this->InfoMetas_model->get($icid, 'AMP_SCRIPT'); - if ($meta === false) { - $this->InfoMetas_model->add($icid, 'AMP_SCRIPT', $script); - } else { - $this->InfoMetas_model->update($icid, 'AMP_SCRIPT', $script); - } - echo json_encode(array( - "succ" => true - )); - } catch(Exception $e) { - echo json_encode(array( - "succ" => false, - "message" => "update_amp() -> ".$e->getMessage() - )); - } - } else { - echo json_encode(array( - "succ" => false, - "message" => "update_amp() -> 参数传递错误。" - )); - } - } - } -