Feedback.php 539 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace addons\shopro\controller;
  3. class Feedback extends Base
  4. {
  5. protected $noNeedLogin = ['type'];
  6. protected $noNeedRight = ['*'];
  7. public function type()
  8. {
  9. $this->success('反馈类型', array_values(\addons\shopro\model\Feedback::$typeAll));
  10. }
  11. public function add() {
  12. $params = $this->request->post();
  13. // 表单验证
  14. $this->shoproValidate($params, get_class(), 'add');
  15. $this->success('反馈成功', \addons\shopro\model\Feedback::add($params));
  16. }
  17. }