Commit 0e86f4de authored by hujun's avatar hujun

公告

parent f376d763
......@@ -110,7 +110,9 @@ class News extends Basic
$file_data['new_id'] = $id;
$file_data['type'] = 1;
$file_data['status'] = 0;
$m_file->insertData($file_data);
if (!empty($file_data['file_name'])) {
$m_file->insertData($file_data);
}
}
}
} catch (\Exception $e) {
......
......@@ -111,7 +111,9 @@ class Notice extends Basic
$file_data['new_id'] = $id;
$file_data['type'] = 2;
$file_data['status'] = 0;
$s_file->insertData($file_data);
if (!empty($file_data['file_name'])) {
$s_file->insertData($file_data);
}
}
}
} else {
......@@ -158,6 +160,8 @@ class Notice extends Basic
$num = $this->m_push->editData(['status'=> 1], $this->params['id']);
if ($num > 0) {
$m_sile = new SFile();
$m_sile->editData(['status'=>1], $this->params['id'], 'new_id');
return $this->response(200);
} else {
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