diff --git a/application/third_party/advertise/controllers/index.php b/application/third_party/advertise/controllers/index.php index 494b5479..25e59be9 100644 --- a/application/third_party/advertise/controllers/index.php +++ b/application/third_party/advertise/controllers/index.php @@ -12,7 +12,6 @@ class Index extends CI_Controller $this->permission->is_admin(); $this->load->model('InfoStructures_model'); $this->load->model('advertise_model'); - header('Access-Control-Allow-Origin: *'); } //广告列表 @@ -65,6 +64,7 @@ class Index extends CI_Controller public function ad_edit() { + header('Access-Control-Allow-Origin: *'); $ad_title = $this->input->post('ad_title'); $ad_content = $this->input->post('ad_content'); $ad_type = ''; @@ -111,6 +111,7 @@ class Index extends CI_Controller //添加新广告节点 public function add($is_parent_id, $is_ajax = true) { + header('Access-Control-Allow-Origin: *'); $insert_id = $this->InfoStructures_model->Add($is_parent_id); if ($insert_id && $ad_id = $this->advertise_model->add_advertise($insert_id, 'New tree', $this->config->item('site_code'), time())) { $data[] = array('name' => 'ok', 'value' => $insert_id);