Commit f376d763 authored by hujun's avatar hujun

公告

# Conflicts: # application/index/controller/Notice.php
parent e3fee8a4
...@@ -57,17 +57,22 @@ class Notice extends Basic ...@@ -57,17 +57,22 @@ class Notice extends Basic
$where['a.title'] = ['LIKE', '%' . $this->params['title'] . '%']; $where['a.title'] = ['LIKE', '%' . $this->params['title'] . '%'];
} }
$field = 'a.id,a.title,a.content,a.create_time,a.create_time,annex_file_name,b.name'; $field = 'a.id,a.title,a.content,a.create_time,a.create_time,b.name';
$where['a.status'] = 0; $where['a.status'] = 0;
$where['a.type'] = 1; $where['a.type'] = 1;
$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();
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_name = [];
foreach ($file_data as $k2=>$v2) { $file_data = $m_file->getFileList('id,file_name', ['new_id'=>$v['id'], 'type'=>2]);
$data['list'][$k]['annex_file_path'][] = CURRENT_URL . 'static/business_school_file/' . $v2['annex_file_name'];; if (!empty($file_data)) {
foreach ($file_data as $k2=>$v2) {
$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