TodoConvey.php 880 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. use think\App;
  6. use think\Db;
  7. use think\exception\Handle;
  8. class TodoConvey extends Base
  9. {
  10. public function __construct(App $app = null) {
  11. parent::__construct($app);
  12. $this->model = new \app\common\model\TodoConvey();
  13. }
  14. // 扫码
  15. public function sweepCode(){
  16. $data = [
  17. 'code' =>input('code'),
  18. 'isStart' => input('isStart'),
  19. 'orgId' =>$this->orgId,
  20. 'todoId' => input('todoId'),
  21. 'content' => input('content'),
  22. 'img' => input('img'),
  23. 'sample' => ''
  24. ];
  25. $ret = $this->model->sweepCode($data,$this->userId);
  26. if(!$ret){
  27. HelpHander::error($this->model->getError());
  28. }
  29. HelpHander::success([],'操作成功');
  30. }
  31. }