Commit 0e86f4de authored by hujun's avatar hujun

公告

parent f376d763
...@@ -110,7 +110,9 @@ class News extends Basic ...@@ -110,7 +110,9 @@ 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;
$m_file->insertData($file_data); if (!empty($file_data['file_name'])) {
$m_file->insertData($file_data);
}
} }
} }
} catch (\Exception $e) { } catch (\Exception $e) {
......
...@@ -111,7 +111,9 @@ class Notice extends Basic ...@@ -111,7 +111,9 @@ 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;
$s_file->insertData($file_data); if (!empty($file_data['file_name'])) {
$s_file->insertData($file_data);
}
} }
} }
} else { } else {
...@@ -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