Bargain.php 640 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\api\controller\user;
  3. use app\api\controller\Controller;
  4. use app\api\model\plus\bargain\Task;
  5. /**
  6. * 个人砍价控制器
  7. */
  8. class Bargain extends Controller
  9. {
  10. // 当前用户
  11. private $user;
  12. /**
  13. * 构造方法
  14. */
  15. public function initialize()
  16. {
  17. parent::initialize();
  18. $this->user = $this->getUser(); // 用户信息
  19. }
  20. /**
  21. *个人砍价列表
  22. */
  23. public function lists()
  24. {
  25. $model = new Task();
  26. $list = $model->getList($this->user['user_id'], $this->postData());
  27. return $this->renderSuccess('', compact('list'));
  28. }
  29. }