Commit 82bf7c5b authored by hujun's avatar hujun

公告

parent 03292a97
...@@ -63,17 +63,15 @@ class Notice extends Basic ...@@ -63,17 +63,15 @@ class Notice extends Basic
$data['list'] = $this->m_push->getListAgent($pageNo, $pageSize, 'id DESC', $field, $where); $data['list'] = $this->m_push->getListAgent($pageNo, $pageSize, 'id DESC', $field, $where);
$m_file = new SFile(); $m_file = new SFile();
$file_name = [];
foreach ($data['list'] as $k => $v){ foreach ($data['list'] as $k => $v){
$file_data = $m_file->getFileList('id,file_name', ['new_id'=>$v['id'], 'type'=>1]); $file_data = $m_file->getFileList('id,file_name', ['new_id'=>$v['id'], 'type'=>2]);
if (!empty($file_data)) {
if (empty($file_data)) {
$data['list'][$k]['annex_file_path'] = [];
} else {
foreach ($file_data as $k2=>$v2) { foreach ($file_data as $k2=>$v2) {
$data['list'][$k]['annex_file_path'][] = CURRENT_URL . 'static/business_school_file/' . $v2['annex_file_name'];; $file_name[] = CURRENT_URL . 'static/business_school_file/' . $v2['file_name'];
} }
} }
$data['list'][$k]['annex_file_path'] = $file_name;
} }
$data['total'] = $this->m_push->getListAgentTotal($where); $data['total'] = $this->m_push->getListAgentTotal($where);
return $this->response(200, "", $data); return $this->response(200, "", $data);
......
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