作者 lyh

gx

@@ -61,8 +61,8 @@ class TaskController extends BaseController @@ -61,8 +61,8 @@ class TaskController extends BaseController
61 * @method :post 61 * @method :post
62 * @time :2023/8/23 15:09 62 * @time :2023/8/23 15:09
63 */ 63 */
64 - public function info(Request $request, TaskLogic $logic){  
65 - $request->validate([ 64 + public function info(TaskLogic $logic){
  65 + $this->request->validate([
66 'id'=>'required' 66 'id'=>'required'
67 ],[ 67 ],[
68 'id.required' => 'ID不能为空' 68 'id.required' => 'ID不能为空'
@@ -71,6 +71,13 @@ class TaskController extends BaseController @@ -71,6 +71,13 @@ class TaskController extends BaseController
71 return $this->response('success',Code::SUCCESS,$data); 71 return $this->response('success',Code::SUCCESS,$data);
72 } 72 }
73 73
  74 + /**
  75 + * @remark :保存
  76 + * @name :save
  77 + * @author :lyh
  78 + * @method :post
  79 + * @time :2023/8/23 17:13
  80 + */
74 public function save(TaskRequest $request, TaskLogic $logic) 81 public function save(TaskRequest $request, TaskLogic $logic)
75 { 82 {
76 $this->param['created_manage_id'] = $this->manage->id; 83 $this->param['created_manage_id'] = $this->manage->id;
@@ -38,6 +38,10 @@ class TaskLogic extends BaseLogic @@ -38,6 +38,10 @@ class TaskLogic extends BaseLogic
38 public function getTaskInfo() 38 public function getTaskInfo()
39 { 39 {
40 $info = $this->model->where(['id'=>$this->param['id']])->with('owner')->with('follow')->first(); 40 $info = $this->model->where(['id'=>$this->param['id']])->with('owner')->with('follow')->first();
  41 + if($info === false){
  42 + $this->fail('error');
  43 + }
  44 + $info = $this->getFileUrl($info);
41 return $this->success($info); 45 return $this->success($info);
42 } 46 }
43 47