Commit 0e86f4de authored by hujun's avatar hujun

公告

parent f376d763
...@@ -110,9 +110,11 @@ class News extends Basic ...@@ -110,9 +110,11 @@ class News extends Basic
$file_data['new_id'] = $id; $file_data['new_id'] = $id;
$file_data['type'] = 1; $file_data['type'] = 1;
$file_data['status'] = 0; $file_data['status'] = 0;
if (!empty($file_data['file_name'])) {
$m_file->insertData($file_data); $m_file->insertData($file_data);
} }
} }
}
} catch (\Exception $e) { } catch (\Exception $e) {
return $this->response(101, '新增或编辑失败!'.$e->getMessage()); return $this->response(101, '新增或编辑失败!'.$e->getMessage());
} }
......
...@@ -111,9 +111,11 @@ class Notice extends Basic ...@@ -111,9 +111,11 @@ class Notice extends Basic
$file_data['new_id'] = $id; $file_data['new_id'] = $id;
$file_data['type'] = 2; $file_data['type'] = 2;
$file_data['status'] = 0; $file_data['status'] = 0;
if (!empty($file_data['file_name'])) {
$s_file->insertData($file_data); $s_file->insertData($file_data);
} }
} }
}
} else { } else {
return $this->response(101, '新增公告失败!'); return $this->response(101, '新增公告失败!');
} }
...@@ -158,6 +160,8 @@ class Notice extends Basic ...@@ -158,6 +160,8 @@ class Notice extends Basic
$num = $this->m_push->editData(['status'=> 1], $this->params['id']); $num = $this->m_push->editData(['status'=> 1], $this->params['id']);
if ($num > 0) { if ($num > 0) {
$m_sile = new SFile();
$m_sile->editData(['status'=>1], $this->params['id'], 'new_id');
return $this->response(200); return $this->response(200);
} else { } else {
return $this->response(101, "删除失败!"); return $this->response(101, "删除失败!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment