init
Showing
1 changed file
with
8 additions
and
16 deletions
| ... | @@ -206,22 +206,14 @@ class Work extends CI_Controller { | ... | @@ -206,22 +206,14 @@ class Work extends CI_Controller { |
| 206 | $data['draw'] = $_GET['draw']++; | 206 | $data['draw'] = $_GET['draw']++; |
| 207 | $data['recordsTotal'] = 57; | 207 | $data['recordsTotal'] = 57; |
| 208 | $data['recordsFiltered'] = 57; | 208 | $data['recordsFiltered'] = 57; |
| 209 | $data['data'] = [ | 209 | $data['data'] = array(); |
| 210 | ['id' => 1001, 'name' => '张四'], | 210 | for ($i = 0; $i < 57; $i++) { |
| 211 | ['id' => 1001, 'name' => '张三'], | 211 | $arr = array( |
| 212 | ['id' => 1001, 'name' => '张三'], | 212 | 'id'=>$i, |
| 213 | ['id' => 1001, 'name' => '张三'], | 213 | 'name'=>'小明'.$i |
| 214 | ['id' => 1001, 'name' => '张三'], | 214 | ); |
| 215 | ['id' => 1001, 'name' => '张三'], | 215 | $data['data'][] = $arr; |
| 216 | ['id' => 1001, 'name' => '张三'], | 216 | } |
| 217 | ['id' => 1001, 'name' => '张三'], | ||
| 218 | ['id' => 1001, 'name' => '张三'], | ||
| 219 | ['id' => 1001, 'name' => '张三'], | ||
| 220 | ['id' => 1001, 'name' => '张三'], | ||
| 221 | ['id' => 1001, 'name' => '张三'], | ||
| 222 | ['id' => 1001, 'name' => '张三'], | ||
| 223 | ]; | ||
| 224 | |||
| 225 | $this->output->set_content_type('application/json')->set_output(json_encode($data)); | 217 | $this->output->set_content_type('application/json')->set_output(json_encode($data)); |
| 226 | } | 218 | } |
| 227 | } | 219 | } | ... | ... |
-
Please register or sign in to post a comment