26 lines
486 B
PHP
26 lines
486 B
PHP
<?php
|
|
|
|
namespace app\controller;
|
|
|
|
use support\Request;
|
|
use app\model\pms\Task;
|
|
|
|
class TaskController
|
|
{
|
|
public function index(Request $request)
|
|
{
|
|
return view('task/index');
|
|
}
|
|
|
|
public function apiGetList(Request $request)
|
|
{
|
|
$taskList = Task::getList();
|
|
foreach($taskList as $task){
|
|
$task->statusName = Task::$statusList[$task->status];
|
|
}
|
|
|
|
return json(['code' => 0, 'msg' => 'ok', 'taskList' => $taskList]);
|
|
}
|
|
|
|
}
|